Latest Token Prices
curl --request POST \
--url https://api.allium.so/api/v1/developer/prices \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum"
},
{
"token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain": "solana"
}
]
'import requests
url = "https://api.allium.so/api/v1/developer/prices"
payload = [
{
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum"
},
{
"token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain": "solana"
}
]
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{token_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', chain: 'ethereum'},
{token_address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', chain: 'solana'}
])
};
fetch('https://api.allium.so/api/v1/developer/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allium.so/api/v1/developer/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'token_address' => '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'chain' => 'ethereum'
],
[
'token_address' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'chain' => 'solana'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.allium.so/api/v1/developer/prices"
payload := strings.NewReader("[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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))
}HttpResponse<String> response = Unirest.post("https://api.allium.so/api/v1/developer/prices")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]"
response = http.request(request)
puts response.read_body{
"items": [
{
"timestamp": "2023-11-07T05:31:56Z",
"chain": "<string>",
"address": "<string>",
"price": 123,
"open": 123,
"high": 123,
"close": 123,
"low": 123,
"decimals": 123
}
],
"cursor": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Prices
Fetch latest token price
Get the latest price for the given token addresses and chains.
POST
/
api
/
v1
/
developer
/
prices
Latest Token Prices
curl --request POST \
--url https://api.allium.so/api/v1/developer/prices \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum"
},
{
"token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain": "solana"
}
]
'import requests
url = "https://api.allium.so/api/v1/developer/prices"
payload = [
{
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum"
},
{
"token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain": "solana"
}
]
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{token_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', chain: 'ethereum'},
{token_address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', chain: 'solana'}
])
};
fetch('https://api.allium.so/api/v1/developer/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allium.so/api/v1/developer/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'token_address' => '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'chain' => 'ethereum'
],
[
'token_address' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'chain' => 'solana'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.allium.so/api/v1/developer/prices"
payload := strings.NewReader("[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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))
}HttpResponse<String> response = Unirest.post("https://api.allium.so/api/v1/developer/prices")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"token_address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chain\": \"ethereum\"\n },\n {\n \"token_address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain\": \"solana\"\n }\n]"
response = http.request(request)
puts response.read_body{
"items": [
{
"timestamp": "2023-11-07T05:31:56Z",
"chain": "<string>",
"address": "<string>",
"price": 123,
"open": 123,
"high": 123,
"close": 123,
"low": 123,
"decimals": 123
}
],
"cursor": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint returns the latest price and OHLC values for a list of tokens. Prices and OHLC values are aggregated from trades in the most recent completed minute interval. If no trades occurred in the last minute, the endpoint returns the most recent available data.
For inactive tokens, the last known price is derived from the most recent on-chain trade. If no trade has occurred within the past 7 days, the endpoint will return no data for that token. We recommend checking the timestamp included in the response, which corresponds to the last trade time.
Pagination
This endpoint returns prices for up to 200 tokens in a single request.Supported Chains
Authorizations
Query Parameters
Body
application/json
Was this page helpful?
⌘I