trate

Returns 200 DEX trades by token on Solana, where currency mint address is 3Sx6Zu…pump and block time after 2024-10-27, sorted by USD, highest first: currency symbol, currency name, currency mint address, fungible, side currency symbol, side currency name, side currency mint address and 3 more fields.

By Trenchmachine · saved 27 October 2024 · Bitquery API v2

What it returns

Filters

The query

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

Variables

{
  "token": "3Sx6ZuHGbzi24mhR8QfRNyXQXgJFH5H295rzELwRpump",
  "time_10min_ago": "2024-10-27T18:35:23Z",
  "time_1h_ago": "2024-10-27T17:45:23Z",
  "time_3h_ago": "2024-10-27T15:45:23Z"
}

Similar queries