All historical trades count solana

Returns DEX trades by token on Solana, where side currency mint address is So1111…1112, currency mint address is JUPyiw…DvCN and block time after 2024-08-04: count and sum of trade side amount in USD.

By gaurav · saved 3 December 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String, $time_ago: DateTime, $time_before: DateTime) {
  Solana(dataset: archive) {
    DEXTradeByTokens(
      where: {Block: {Time: {after: $time_ago, before: $time_before}, Date: {}}, Trade: {Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Amount: {gt: "0"}}, Currency: {MintAddress: {is: $token}}}}
    ) {
      count
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "token": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
  "time_ago": "2024-08-04T00:00:00.000Z",
  "time_before": "2024-10-31T00:00:00.000Z",
  "space": 1,
  "resolution": "days"
}

Similar queries