curl --get "https://data.solanatracker.io/trades/{tokenAddress}" \
--header "x-api-key: YOUR_API_KEY" \
--data-urlencode "events=liquidity" \
--data-urlencode "enrich=identity" \
--data-urlencode "limit=50"import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
currency: 'usd', // Adds a per-token price to each swap: 'usd', 'eur' or 'sol'.
marketCap: true,
limit: 100,
sortDirection: 'DESC',
});
import requests
url = "https://data.solanatracker.io/trades/{tokenAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/trades/{tokenAddress}', 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://data.solanatracker.io/trades/{tokenAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/trades/{tokenAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/trades/{tokenAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/trades/{tokenAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"tx": "5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW",
"amount": 90,
"priceUsd": 6,
"volume": 540,
"volumeSol": 3,
"type": "sell",
"wallet": "F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi",
"time": 1789722000000,
"program": "pumpfun-amm",
"pools": [
"9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2"
]
}
],
"nextCursor": null,
"hasNextPage": false,
"sortDirection": "DESC"
}Solana Token Trades API
Deprecated. Use Get Token Trades in Trades V2 for Solana token trades. Liquidity events stay on this route.
curl --get "https://data.solanatracker.io/trades/{tokenAddress}" \
--header "x-api-key: YOUR_API_KEY" \
--data-urlencode "events=liquidity" \
--data-urlencode "enrich=identity" \
--data-urlencode "limit=50"import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
currency: 'usd', // Adds a per-token price to each swap: 'usd', 'eur' or 'sol'.
marketCap: true,
limit: 100,
sortDirection: 'DESC',
});
import requests
url = "https://data.solanatracker.io/trades/{tokenAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/trades/{tokenAddress}', 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://data.solanatracker.io/trades/{tokenAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/trades/{tokenAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/trades/{tokenAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/trades/{tokenAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"tx": "5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW",
"amount": 90,
"priceUsd": 6,
"volume": 540,
"volumeSol": 3,
"type": "sell",
"wallet": "F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi",
"time": 1789722000000,
"program": "pumpfun-amm",
"pools": [
"9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2"
]
}
],
"nextCursor": null,
"hasNextPage": false,
"sortDirection": "DESC"
}GET /v2/trades/{token} instead. With the SDK, use client.getTokenTradesV2(token). Liquidity events (events=liquidity and events=all) are only on this route.
wallet is the trader: the owner of the swap, or the fee payer when the owner is a program vault. A page can come back short or empty with hasNextPage: true: keep following nextCursor.
Retrieve token activity within this route’s token, pool and wallet scope. Use events=all to combine swaps with liquidity additions/removals, or events=liquidity for liquidity only. Omit events for the existing trades-only response. Add enrich=identity to identify wallets on either event type.
Liquidity rows use type: add_liquidity | remove_liquidity, a single pool, and exact string amounts in tokens[]; they do not contain swap prices, volume or PnL. See the liquidity guide for REST examples, pagination and live rooms.
SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
currency: 'usd', // Adds a per-token price to each swap: 'usd', 'eur' or 'sol'.
marketCap: true,
limit: 100,
sortDirection: 'DESC',
});
Query Parameters
Pass identity to attach wallet identity to every returned trade or liquidity event, using the same enrichment as token holders. Includes available KOL profiles, tags, trading platforms and profiles, developer/pool labels, curated labels, and SNS names. Unknown wallets return identity: null. Omit for unchanged responses and no identity lookups. all and * also enable identity; pool and developer are compatibility aliases.
Adds price (per token) to every swap, in this currency at the time of the trade. sol: trades against SOL use the swap's own SOL and token amounts; other trades divide the USD price by the SOL/USD rate at that second. eur: the USD price divided by the EUR/USD rate at the time of the trade. price is null when the trade has no USD price or no rate is available. Liquidity rows are unchanged. Invalid values return HTTP 400.
usd, eur, sol Response
Successful response
Was this page helpful?