Get Token Price Snapshot (batch)
curl --request POST \
--url https://demo-api.mobula.io/api/2/token/price-at \
--header 'Content-Type: application/json' \
--data '
[
{
"timestamp": 1,
"chainId": "<string>",
"blockchain": "<string>",
"address": "<string>"
}
]
'import requests
url = "https://demo-api.mobula.io/api/2/token/price-at"
payload = [
{
"timestamp": 1,
"chainId": "<string>",
"blockchain": "<string>",
"address": "<string>"
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{timestamp: 1, chainId: '<string>', blockchain: '<string>', address: '<string>'}
])
};
fetch('https://demo-api.mobula.io/api/2/token/price-at', 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://demo-api.mobula.io/api/2/token/price-at",
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([
[
'timestamp' => 1,
'chainId' => '<string>',
'blockchain' => '<string>',
'address' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://demo-api.mobula.io/api/2/token/price-at"
payload := strings.NewReader("[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://demo-api.mobula.io/api/2/token/price-at")
.header("Content-Type", "application/json")
.body("[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/token/price-at")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"payload": [
{
"name": "<string>",
"symbol": "<string>",
"logo": "<string>",
"priceUSD": 123,
"marketCapUSD": 123,
"marketCapDilutedUSD": 123,
"timestamp": 123,
"swapTimestamp": 123,
"poolAddress": "<string>"
}
]
}Market & Token Data
Get Token Price Snapshot (batch)
Retrieve historical token prices for multiple tokens at specific timestamps in a single request.
POST
/
2
/
token
/
price-at
Get Token Price Snapshot (batch)
curl --request POST \
--url https://demo-api.mobula.io/api/2/token/price-at \
--header 'Content-Type: application/json' \
--data '
[
{
"timestamp": 1,
"chainId": "<string>",
"blockchain": "<string>",
"address": "<string>"
}
]
'import requests
url = "https://demo-api.mobula.io/api/2/token/price-at"
payload = [
{
"timestamp": 1,
"chainId": "<string>",
"blockchain": "<string>",
"address": "<string>"
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{timestamp: 1, chainId: '<string>', blockchain: '<string>', address: '<string>'}
])
};
fetch('https://demo-api.mobula.io/api/2/token/price-at', 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://demo-api.mobula.io/api/2/token/price-at",
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([
[
'timestamp' => 1,
'chainId' => '<string>',
'blockchain' => '<string>',
'address' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://demo-api.mobula.io/api/2/token/price-at"
payload := strings.NewReader("[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://demo-api.mobula.io/api/2/token/price-at")
.header("Content-Type", "application/json")
.body("[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/token/price-at")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"timestamp\": 1,\n \"chainId\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"address\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"payload": [
{
"name": "<string>",
"symbol": "<string>",
"logo": "<string>",
"priceUSD": 123,
"marketCapUSD": 123,
"marketCapDilutedUSD": 123,
"timestamp": 123,
"swapTimestamp": 123,
"poolAddress": "<string>"
}
]
}Max 100 items per request. Each item requires its own
timestamp.Request Body
Send an array of items or an object with anitems array:
{
"items": [
{ "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "blockchain": "ethereum", "timestamp": 1700000000 },
{ "address": "So11111111111111111111111111111111111111112", "blockchain": "solana", "timestamp": 1700000000 }
]
}
Response Format
Returns apayload array matching the input order. Each entry contains:
| Field | Type | Description |
|---|---|---|
priceUSD | number | Token price in USD at the closest swap |
timestamp | number | The requested timestamp |
swapTimestamp | number | Actual swap timestamp (ms) used for the price |
poolAddress | string | Pool address where the swap was found |
{ "error": "..." }.
Example Response
{
"payload": [
{
"priceUSD": 2012.66,
"timestamp": 1700000000,
"swapTimestamp": 1699999997000,
"poolAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
},
{
"priceUSD": 85.74,
"timestamp": 1700000000,
"swapTimestamp": 1699999999000,
"poolAddress": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF"
}
]
}
⌘I