Skip to main content
POST
/
tokens
/
analytics
/
timeseries
Retrieve timeseries trading stats by token addresses
curl --request POST \
  --url https://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "tokens": [
    {
      "chain": "0x1",
      "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
    },
    {
      "chain": "solana",
      "tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    }
  ]
}
'
import requests

url = "https://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries"

payload = { "tokens": [
{
"chain": "0x1",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
{
"chain": "solana",
"tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
] }
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({
tokens: [
{chain: '0x1', tokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7'},
{chain: 'solana', tokenAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'}
]
})
};

fetch('https://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries', 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://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries",
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([
'tokens' => [
[
'chain' => '0x1',
'tokenAddress' => '0xdac17f958d2ee523a2206206994597c13d831ec7'
],
[
'chain' => 'solana',
'tokenAddress' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
]
]
]),
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://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries"

payload := strings.NewReader("{\n \"tokens\": [\n {\n \"chain\": \"0x1\",\n \"tokenAddress\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n },\n {\n \"chain\": \"solana\",\n \"tokenAddress\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n }\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://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n {\n \"chain\": \"0x1\",\n \"tokenAddress\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n },\n {\n \"chain\": \"solana\",\n \"tokenAddress\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://deep-index.moralis.io/api/v2.2/tokens/analytics/timeseries")

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 \"tokens\": [\n {\n \"chain\": \"0x1\",\n \"tokenAddress\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n },\n {\n \"chain\": \"solana\",\n \"tokenAddress\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "result": [
    {
      "chainId": "0x1",
      "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "timeseries": [
        {
          "timestamp": "2022-02-22T00:00:00Z",
          "buyVolume": 4565,
          "sellVolume": 4565,
          "liquidityUsd": 4565,
          "fullyDilutedValuation": 4565
        }
      ]
    }
  ]
}

Authorizations

X-API-Key
string
header
default:test
required

Query Parameters

timeframe
enum<string>
default:1d
required

The timeframe to query

Available options:
1d,
7d,
30d
Example:

"1d"

Body

application/json

Body

tokens
object[]
required

The tokens to be fetched

Maximum array length: 30
Example:
[
{
"chain": "0x1",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
{
"chain": "solana",
"tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
]

Response

200 - application/json

Successful response

result
object[]