Skip to content

Token trades

View as Markdown
GET
/v2/token/{chain_id}/{address}/trades
curl --request GET \
--url 'https://api.chainmetric.io/v2/token/1/c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?sortOrder=desc&type=buy%2Csell&pool=88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&cursor=7184150972001&limit=50' \
--header 'Authorization: <Authorization>'

Returns the latest swaps in one token, newest first by default, optionally in one pool. Use it to answer “who bought or sold this token recently, at what price”. Each trade carries the wallet (maker), pool, exchange, side, amounts, USD value, block and transaction id. Page forward in time with sortOrder=asc and cursor. EVM chains; Solana support in progress.

chain_id
required
integer
Allowed values: 1 56 8453 1399811149

Chain id: 1 Ethereum, 56 BNB Chain, 8453 Base, 1399811149 Solana.

Example

1
address
required
string

Token address. EVM is 40 lowercase hex characters without 0x; Solana is base58.

Example

c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
sortOrder
string
default: desc
Allowed values: desc asc

desc is newest first. asc is oldest first and pages with cursor.

Example

desc
type
string

Comma-separated row types to keep: buy, sell, deposit, withdrawal. Default all.

Example

buy,sell
pool
string

Only this pool’s rows. A pool that is not the token’s gives an empty answer.

Example

88e6a0c2ddd26feeb64f039a2c41296fcb3f5640
cursor
string

The next_cursor of the previous page. Only with sortOrder=asc on trades and liquidity.

Example

7184150972001
limit
integer
default: 100 >= 1 <= 200

Rows per page. Larger values are clamped to 200.

Example

50

A page of trades.

Media typeapplication/json
object
kind
required

The document type, for example token_stats.

string
version
required

The document schema version.

integer
chain_id
required

The chain the document is about.

integer
address

The token or wallet the document is about.

string
subject

The stream topic of this document: <kind>.<chain_id>.<address>.

string
lane
required

fast data is published as soon as a block is seen. safe data is published again once the block is final and replaces it.

string
Allowed values: fast safe
commitment
required

How settled the data is: processed (Solana fast), confirmed (EVM fast) or finalized (safe).

string
Allowed values: processed confirmed finalized
as_of

The block height (or Solana slot) the document reflects.

integer format: int64
seq
required

Increases with every newer version of the document. Keep the highest.

integer format: int64
updated_us

When the document was built, Unix microseconds.

integer format: int64
data
required

The document body. Its shape depends on kind.

object
data
required
object
trades
Array<object>
object
time_us

Block time, Unix microseconds.

integer format: int64
commitment

This row’s settlement level.

string
tx_id

Transaction hash.

string
maker

The wallet the trade belongs to.

string
pool

The pool of the swap.

string
dex

The exchange the pool belongs to.

string
side
string
Allowed values: buy sell
amount_token

Token amount in whole units.

number
amount_quote

Quote-token amount in whole units.

number
price_quote

amount_quote divided by amount_token.

number
price_usd

The token’s USD price in this swap.

number | null
value_usd

The swap’s USD value.

number | null
block

Block height.

integer format: int64
event_index

Log index within the block.

integer
next_cursor

Pass as cursor for the next page. null on the last page and on desc pages.

string | null

Examples

Exampleweth

WETH on Ethereum, limit 3

{
"kind": "token_trades",
"version": 1,
"chain_id": 1,
"address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"subject": "token_trades.1.c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"lane": "fast",
"commitment": "confirmed",
"as_of": 26527763,
"seq": 7184150972001,
"updated_us": 1796037746901662,
"data": {
"next_cursor": null,
"trades": [
{
"time_us": 1796037743000000,
"commitment": "confirmed",
"tx_id": "8450c2fce2e6439abbf8590fa6e7cbe5d5adc4745c57043f86223fccbf01f472",
"maker": "94e13996035c0935f30d930dad4edbcacb8bab45",
"pool": "96d26bd94618b3c7648574ae778e942abbcda698",
"dex": "uniswap_v3",
"side": "sell",
"amount_token": 0.000200658546812349,
"amount_quote": 522.4720084838123,
"price_quote": 2603786.4660328445,
"price_usd": 1663.4658118317714,
"value_usd": 0.3337886324741876,
"block": 26527763,
"event_index": 450
},
{
"time_us": 1796037743000000,
"commitment": "confirmed",
"tx_id": "8450c2fce2e6439abbf8590fa6e7cbe5d5adc4745c57043f86223fccbf01f472",
"maker": "94e13996035c0935f30d930dad4edbcacb8bab45",
"pool": "5a5c7cab5f55c7ea020e97d4fa6dd5d99270e56ce76afa61d8cbddec0af92060",
"dex": "uniswap_v4",
"side": "buy",
"amount_token": 0.000200658546812349,
"amount_quote": 0.333941,
"price_quote": 1664.225149164932,
"price_usd": 1663.9755153925573,
"value_usd": 0.33389090885,
"block": 26527763,
"event_index": 445
}
]
}
}

The request is malformed, for example a bad address, an unknown chain or an out-of-range parameter. Do not retry unchanged.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

ExampleunknownChain
{
"error": "blockchain: unknown chain: \"ethereum\"",
"message": "blockchain: unknown chain: \"ethereum\"",
"statusCode": 400
}

The key is missing (api key missing), unknown (api key unknown) or revoked (api key revoked). Send Authorization: <key>.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Examplemissing
{
"error": "api key missing",
"message": "api key missing",
"statusCode": 401
}

The chain is not served, or the token or resource is not known.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Example generated

{
"error": "example",
"message": "example",
"statusCode": 1
}

The key’s request rate limit is reached. No Retry-After is sent; back off and retry.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Examplelimited
{
"error": "api key rate limit reached",
"message": "api key rate limit reached",
"statusCode": 429
}

The read failed. Retry with backoff.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Examplesolana

Trades on Solana, captured 2026-11-30

{
"error": "Internal Server Error",
"message": "Internal Server Error",
"statusCode": 500
}

The service is busy or catching up. Wait for the Retry-After header’s seconds when present (5 or 10), then retry. Without it, retry with exponential backoff.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Exampleunavailable
{
"error": "Service Unavailable",
"message": "Service Unavailable",
"statusCode": 503
}
Retry-After
integer

Seconds to wait before retrying.