trading pairs

Returns 200 DEX trades by token on Solana, where currency mint address is FvGKkS…yX7z and block time after 2024-11-23, sorted by USD, highest first: currency symbol, currency name, currency mint address, fungible, side currency symbol, side currency name, side currency mint address and 4 more fields.

By gaurav · saved 23 November 2024 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query ($token: String, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descendingByField: "usd"}
      where: {Trade: {Currency: {MintAddress: {is: $token}}}, Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}}
      limit: {count: 200}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
          Fungible
        }
        Side {
          Currency {
            Symbol
            Name
            MintAddress
          }
        }
        price_usd: PriceInUSD(maximum: Block_Slot)
        price_last: Price(maximum: Block_Slot)
        price_10min_ago: Price(
          maximum: Block_Slot
          if: {Block: {Time: {before: $time_10min_ago}}}
        )
        price_1h_ago: Price(
          maximum: Block_Slot
          if: {Block: {Time: {before: $time_1h_ago}}}
        )
        price_3h_ago: Price(
          maximum: Block_Slot
          if: {Block: {Time: {before: $time_3h_ago}}}
        )
      }
      usd: sum(of: Trade_AmountInUSD)
      count
    }
  }
}

Variables

{
  "token": "FvGKkS9nC3a4QWVWUazPBk77s4W3RMrMMZRduXXgyX7z",
  "time_10min_ago": "2024-11-23T17:01:01Z",
  "time_1h_ago": "2024-11-23T16:11:01Z",
  "time_3h_ago": "2024-11-23T14:11:01Z",
  "time_ago": "2024-11-23T09:11:01Z"
}

Similar queries