TradeConnection uses opaque cursor pagination. When hasMore is true, pass nextCursor back as cursor on the next call.
All three trades* queries below share the same fromTime / toTime time-window arguments. Both accept either milliseconds since epoch as a decimal string ("1776180666000") or ISO-8601 / RFC-3339 ("2026-04-14T00:00:00Z"). fromTime is inclusive, toTime is exclusive. The bounds are optional and independent — pass only fromTime to get “everything since T”, only toTime for “everything before T”, or both for a strict window. The filters compose with cursor for paginating inside the window.
tradesByMint
Trades for a single token mint, ordered by timestamp.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
mint | String | yes | Token mint address (≥ 32 chars). |
limit | Int | no | Default 100, max 1000. |
sort | String | no | "desc" (default) or "asc". |
cursor | String | no | Opaque cursor from a prior response. |
fromTime | String | no | Inclusive lower bound. Ms-since-epoch or ISO-8601. |
toTime | String | no | Exclusive upper bound. Ms-since-epoch or ISO-8601. |
Example
tradesBySigner
Trades for one or many signers, merged and sorted across the whole list. The batch form is the recommended way to fetch trades across large cohorts (up to 1000 wallets) in a single round trip.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
signer | String | one of | Single wallet address (≥ 32 chars). Mutually exclusive with signers. |
signers | [String!] | one of | Array of 1-1000 wallet addresses. Malformed entries (< 32 chars) are silently dropped. |
limit | Int | no | Default 100, max 1000. Applies to the merged result, not per-signer. |
sort | String | no | "desc" (default) or "asc". |
cursor | String | no | Opaque cursor from a prior response. |
fromTime | String | no | Inclusive lower bound. Ms-since-epoch or ISO-8601. |
toTime | String | no | Exclusive upper bound. Ms-since-epoch or ISO-8601. |
signer or signers.
Single-signer example
Batch example
signers and the returned nextCursor back together until hasMore is false.
Time-window example (3-day rolling history)
fromTime lets ClickHouse prune partitions outside the window — strictly faster than paginating until you see old rows on the client.
Limits & behavior
- Max signers per call: 1000.
- Empty/unknown signers: contribute zero rows, do not fail the query.
- Latency: ~100-400 ms p50, ~1-2 s p99 for 500 signers at
limit ≤ 200.
tradesBySignerAndMint
Trades for a specific (signer, mint) pair — one wallet’s history on one specific token.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
signer | String | yes | Wallet address (≥ 32 chars). |
mint | String | yes | Token mint address (≥ 32 chars). |
limit | Int | no | Default 100, max 1000. |
sort | String | no | "desc" (default) or "asc". |
cursor | String | no | Opaque cursor. |
fromTime | String | no | Inclusive lower bound. Ms-since-epoch or ISO-8601. |
toTime | String | no | Exclusive upper bound. Ms-since-epoch or ISO-8601. |
Example
tradingVolume
Aggregate trading activity for a single mint over a rolling window. Returns a free-form JSON payload (not a typed object).
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
mint | String | yes | Token mint address (≥ 32 chars). |
hours | Int | no | Rolling window. Default 24, max 720 (30 days). |
Example
trades, buys, sells, volume_sol, unique_traders.