Skip to main content
All trade queries return rows with a common shape:
type Trade {
  signature: String!
  timestamp: String!
  tokenMint: String!
  signer: String!
  transactionType: String!      # "buy" | "sell"
  solAmount: String!
  solAmountUsd: String!
  tokensAmount: String!
  avgPrice: String!
  avgPriceUsd: String!
  fee: String!
  slot: String
  proTrade: Boolean
  isBundle: Boolean
  isSniper: Boolean
}

type TradeConnection {
  data: [Trade!]!
  count: Int!
  hasMore: Boolean!
  nextCursor: String
}
Every 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

NameTypeRequiredDescription
mintStringyesToken mint address (≥ 32 chars).
limitIntnoDefault 100, max 1000.
sortStringno"desc" (default) or "asc".
cursorStringnoOpaque cursor from a prior response.
fromTimeStringnoInclusive lower bound. Ms-since-epoch or ISO-8601.
toTimeStringnoExclusive upper bound. Ms-since-epoch or ISO-8601.

Example

query {
  tradesByMint(mint: "So11111111111111111111111111111111111111112", limit: 50) {
    count hasMore nextCursor
    data { signature timestamp signer transactionType solAmountUsd }
  }
}

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

NameTypeRequiredDescription
signerStringone ofSingle wallet address (≥ 32 chars). Mutually exclusive with signers.
signers[String!]one ofArray of 1-1000 wallet addresses. Malformed entries (< 32 chars) are silently dropped.
limitIntnoDefault 100, max 1000. Applies to the merged result, not per-signer.
sortStringno"desc" (default) or "asc".
cursorStringnoOpaque cursor from a prior response.
fromTimeStringnoInclusive lower bound. Ms-since-epoch or ISO-8601.
toTimeStringnoExclusive upper bound. Ms-since-epoch or ISO-8601.
Provide exactly one of signer or signers.

Single-signer example

query {
  tradesBySigner(signer: "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA", limit: 50) {
    count hasMore nextCursor
    data { signature timestamp tokenMint transactionType solAmountUsd }
  }
}

Batch example

query TradesForCohort($signers: [String!]!, $cursor: String) {
  tradesBySigner(signers: $signers, limit: 200, cursor: $cursor) {
    count hasMore nextCursor
    data { signature timestamp signer tokenMint transactionType solAmountUsd }
  }
}
{
  "signers": [
    "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA",
    "4wuudpdbJzUFpsu1MgwbGEWg93NQcb9Wxyoaya9i7FMF"
  ],
  "cursor": null
}
Drive pagination from the merged cursor — pass signers and the returned nextCursor back together until hasMore is false.

Time-window example (3-day rolling history)

query RecentTradesForCohort($signers: [String!]!, $from: String) {
  tradesBySigner(signers: $signers, fromTime: $from, limit: 200) {
    count hasMore nextCursor
    data { signature timestamp signer tokenMint transactionType solAmountUsd }
  }
}
{
  "signers": ["3ixt...", "4wuu...", "…"],
  "fromTime": "2026-04-14T00:00:00Z"
}
Using 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

NameTypeRequiredDescription
signerStringyesWallet address (≥ 32 chars).
mintStringyesToken mint address (≥ 32 chars).
limitIntnoDefault 100, max 1000.
sortStringno"desc" (default) or "asc".
cursorStringnoOpaque cursor.
fromTimeStringnoInclusive lower bound. Ms-since-epoch or ISO-8601.
toTimeStringnoExclusive upper bound. Ms-since-epoch or ISO-8601.

Example

query {
  tradesBySignerAndMint(
    signer: "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA"
    mint:   "So11111111111111111111111111111111111111112"
    limit: 100
  ) {
    count hasMore nextCursor
    data { signature timestamp transactionType solAmountUsd avgPriceUsd }
  }
}

tradingVolume

Aggregate trading activity for a single mint over a rolling window. Returns a free-form JSON payload (not a typed object).

Arguments

NameTypeRequiredDescription
mintStringyesToken mint address (≥ 32 chars).
hoursIntnoRolling window. Default 24, max 720 (30 days).

Example

query { tradingVolume(mint: "So11111111111111111111111111111111111111112", hours: 24) }
Typical response fields: trades, buys, sells, volume_sol, unique_traders.