Token Traders Leaderboard
Returns a leaderboard of the top traders for a specified SPL token, ranked by trade count and buy/sell/total volume across major Solana DEXs over a recent lookback interval. Supports front-end sorting on `total_volume`, `buy_volume`, `sell_volume`, and `trade_count`.
GET
https://api.cambrian.org/solana/traders/leaderboard
Parameters
token_address* (string)
SPL token mint address (base58)
interval* (string)
Lookback window for trades (SQL Interval, e.g. '24 HOUR', '12 HOUR', '1 HOUR', '30 MINUTE')
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"columns": [
{
"name": "trader",
"type": "FixedString(44)"
},
{
"name": "tradeCount",
"type": "UInt64"
},
{
"name": "sellVolume",
"type": "UInt128"
},
{
"name": "buyVolume",
"type": "UInt128"
},
{
"name": "totalVolume",
"type": "UInt128"
}
],
"data": [
[
"48Mp1KAiD8BoLEh9p1DudCuKRoPVpmkvzhygj9mAqv25",
1,
10780040,
0,
10780040
],
[
"H61ukuFZwQgCm2oMfBPkRxv8keTCr7JfXSGGZ9EnaYsz",
1,
0,
60260280,
60260280
],
[
"CZ7mTtg9rjtWz7CXSUuRU9ecjfyFekixQSn3ffHEuhZh",
1,
20580077,
0,
20580077
],
[
"Amn7NaWDsor2dvXN4pqH2h4HyuAnp1rbLtDHiyjfdWAr",
1,
5675348,
0,
5675348
],
[
"9d5H8CnxtqzfB373tcdyqdg829mLBHMe6yriKsdCVCPN",
6,
7872529,
59391009,
67263538
],
[
"77nDwqMiFmKDUhe7J6TVscvgkG68iXQYSufyvHohEW3v",
1,
0,
29402692,
29402692
],
[
"6452cmt8gS9gWMFGiBzVWjtSMmKiJ3WgsczBcqBEzthp",
1,
0,
8111709,
8111709
],
[
"GSQ3dijmF3TUAvGXffY8sfb5Gf4USAWLTKDTMUda8g6i",
1,
0,
66957,
66957
],
[
"6SyEc5vGePVXkHKx21sitsYmMHzS2GGiRqWuqY6FDwHv",
1,
24500099,
0,
24500099
],
[
"6w91mtDw46YBmHHhWmcRTNREUgLKcgmPxtC7Yz7VMyfh",
1,
0,
546500,
546500
]
],
"rows": 38553
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
Examples
1. Get Top Traders for USDC over 24 Hours
Retrieves the trader leaderboard for USDC over the last 24 hours, ranked by activity.
curl
curl -X GET "https://api.cambrian.org/solana/traders/leaderboard?token_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&interval=24%2BHOUR" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
JSON
1[
2 {
3 "columns": [
4 {
5 "name": "trader",
6 "type": "FixedString(44)"
7 },
8 {
9 "name": "tradeCount",
10 "type": "UInt64"
11 },
12 {
13 "name": "sellVolume",
14 "type": "UInt128"
15 },
16 {
17 "name": "buyVolume",
18 "type": "UInt128"
19 },
20 {
21 "name": "totalVolume",
22 "type": "UInt128"
23 }
24 ],
25 "data": [
26 [
27 "48Mp1KAiD8BoLEh9p1DudCuKRoPVpmkvzhygj9mAqv25",
28 1,
29 10780040,
30 0,
31 10780040
32 ],
33 [
34 "H61ukuFZwQgCm2oMfBPkRxv8keTCr7JfXSGGZ9EnaYsz",
35 1,
36 0,
37 60260280,
38 60260280
39 ],
40 [
41 "CZ7mTtg9rjtWz7CXSUuRU9ecjfyFekixQSn3ffHEuhZh",
42 1,
43 20580077,
44 0,
45 20580077
46 ],
47 [
48 "Amn7NaWDsor2dvXN4pqH2h4HyuAnp1rbLtDHiyjfdWAr",
49 1,
50 5675348,
51 0,
52 5675348
53 ],
54 [
55 "9d5H8CnxtqzfB373tcdyqdg829mLBHMe6yriKsdCVCPN",
56 6,
57 7872529,
58 59391009,
59 67263538
60 ],
61 [
62 "77nDwqMiFmKDUhe7J6TVscvgkG68iXQYSufyvHohEW3v",
63 1,
64 0,
65 29402692,
66 29402692
67 ],
68 [
69 "6452cmt8gS9gWMFGiBzVWjtSMmKiJ3WgsczBcqBEzthp",
70 1,
71 0,
72 8111709,
73 8111709
74 ],
75 [
76 "GSQ3dijmF3TUAvGXffY8sfb5Gf4USAWLTKDTMUda8g6i",
77 1,
78 0,
79 66957,
80 66957
81 ],
82 [
83 "6SyEc5vGePVXkHKx21sitsYmMHzS2GGiRqWuqY6FDwHv",
84 1,
85 24500099,
86 0,
87 24500099
88 ],
89 [
90 "6w91mtDw46YBmHHhWmcRTNREUgLKcgmPxtC7Yz7VMyfh",
91 1,
92 0,
93 546500,
94 546500
95 ]
96 ],
97 "rows": 38553
98 }
99]
2 {
3 "columns": [
4 {
5 "name": "trader",
6 "type": "FixedString(44)"
7 },
8 {
9 "name": "tradeCount",
10 "type": "UInt64"
11 },
12 {
13 "name": "sellVolume",
14 "type": "UInt128"
15 },
16 {
17 "name": "buyVolume",
18 "type": "UInt128"
19 },
20 {
21 "name": "totalVolume",
22 "type": "UInt128"
23 }
24 ],
25 "data": [
26 [
27 "48Mp1KAiD8BoLEh9p1DudCuKRoPVpmkvzhygj9mAqv25",
28 1,
29 10780040,
30 0,
31 10780040
32 ],
33 [
34 "H61ukuFZwQgCm2oMfBPkRxv8keTCr7JfXSGGZ9EnaYsz",
35 1,
36 0,
37 60260280,
38 60260280
39 ],
40 [
41 "CZ7mTtg9rjtWz7CXSUuRU9ecjfyFekixQSn3ffHEuhZh",
42 1,
43 20580077,
44 0,
45 20580077
46 ],
47 [
48 "Amn7NaWDsor2dvXN4pqH2h4HyuAnp1rbLtDHiyjfdWAr",
49 1,
50 5675348,
51 0,
52 5675348
53 ],
54 [
55 "9d5H8CnxtqzfB373tcdyqdg829mLBHMe6yriKsdCVCPN",
56 6,
57 7872529,
58 59391009,
59 67263538
60 ],
61 [
62 "77nDwqMiFmKDUhe7J6TVscvgkG68iXQYSufyvHohEW3v",
63 1,
64 0,
65 29402692,
66 29402692
67 ],
68 [
69 "6452cmt8gS9gWMFGiBzVWjtSMmKiJ3WgsczBcqBEzthp",
70 1,
71 0,
72 8111709,
73 8111709
74 ],
75 [
76 "GSQ3dijmF3TUAvGXffY8sfb5Gf4USAWLTKDTMUda8g6i",
77 1,
78 0,
79 66957,
80 66957
81 ],
82 [
83 "6SyEc5vGePVXkHKx21sitsYmMHzS2GGiRqWuqY6FDwHv",
84 1,
85 24500099,
86 0,
87 24500099
88 ],
89 [
90 "6w91mtDw46YBmHHhWmcRTNREUgLKcgmPxtC7Yz7VMyfh",
91 1,
92 0,
93 546500,
94 546500
95 ]
96 ],
97 "rows": 38553
98 }
99]
x402 Payment Option
This endpoint supports pay-per-use access via the x402 payment protocol (v2): pay $0.05 USDC per request using blockchain micropayments. No API key required.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/traders/leaderboard"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/traders/leaderboard"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/traders/leaderboard")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/traders/leaderboard")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with payment details
- The x402 SDK automatically signs a payment authorization with your wallet
- The SDK resubmits the request with the signed payment
- Server verifies payment and returns the API response
The x402 SDK handles steps 2 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request