Copy of Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for solana token pair

Returns one DEX trade by token on Solana, where block time since 2024-12-30: currency name, currency mint address, currency symbol, price in USD, protocol name, protocol family, program address and 5 more fields.

By farmiq · saved 30 December 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($time_5min_ago: DateTime!, $time_1h_ago: DateTime!) {
  Solana(dataset: realtime) {
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Block: {Time: {since: $time_1h_ago}}}
      limit: {count: 1}
    ) {
      Trade {
        Currency {
          Name
          MintAddress
          Symbol
        }
        start: PriceInUSD(minimum: Block_Time)
        min5: PriceInUSD(
          minimum: Block_Time
          if: {Block: {Time: {after: $time_5min_ago}}}
        )
        end: PriceInUSD(maximum: Block_Time)
        Dex {
          ProtocolName
          ProtocolFamily
          ProgramAddress
        }
        Market {
          MarketAddress
        }
        Side {
          Currency {
            Symbol
            Name
            MintAddress
          }
        }
      }
      traded_volume: sum(of: Trade_Side_AmountInUSD, selectWhere: {gt: "100000"})
      traded_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        selectWhere: {gt: "100000"}
        if: {Block: {Time: {after: $time_5min_ago}}}
      )
    }
  }
}

Variables

{
  "time_5min_ago":"2024-12-30T15:24:00Z",
  "time_1h_ago": "2024-12-30T14:18:00Z"
}

Similar queries