Get prices for multiple tokens
curl --request POST \
--url https://api.xentfi.com/v1/assets/prices/tokens \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"symbols": [
"ETH",
"USDC",
"USDT"
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbols: ['ETH', 'USDC', 'USDT']})
};
fetch('https://api.xentfi.com/v1/assets/prices/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/assets/prices/tokens"
payload = { "symbols": ["ETH", "USDC", "USDT"] }
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/assets/prices/tokens"
payload := strings.NewReader("{\n \"symbols\": [\n \"ETH\",\n \"USDC\",\n \"USDT\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbols: ['ETH', 'USDC', 'USDT']})
};
fetch('https://api.xentfi.com/v1/assets/prices/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"symbol": "ETH",
"price": "3500.50",
"lastUpdatedAt": "2024-01-15T10:30:00Z"
}
],
"total": 25,
"hasMore": true
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Prices
Get prices for multiple tokens
POST
/
v1
/
assets
/
prices
/
tokens
Get prices for multiple tokens
curl --request POST \
--url https://api.xentfi.com/v1/assets/prices/tokens \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"symbols": [
"ETH",
"USDC",
"USDT"
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbols: ['ETH', 'USDC', 'USDT']})
};
fetch('https://api.xentfi.com/v1/assets/prices/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/assets/prices/tokens"
payload = { "symbols": ["ETH", "USDC", "USDT"] }
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/assets/prices/tokens"
payload := strings.NewReader("{\n \"symbols\": [\n \"ETH\",\n \"USDC\",\n \"USDT\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbols: ['ETH', 'USDC', 'USDT']})
};
fetch('https://api.xentfi.com/v1/assets/prices/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"symbol": "ETH",
"price": "3500.50",
"lastUpdatedAt": "2024-01-15T10:30:00Z"
}
],
"total": 25,
"hasMore": true
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Body
application/json
Array of token symbols
Required array length:
1 - 100 elementsExample:
["ETH", "USDC", "USDT"]
⌘I

