realtime ohlc

Streams DEX trades by token on Solana as they happen, where side currency mint address is So1111…1112, currency mint address is AZyBFq…pump and side amount is above 0: quantile of trade price in USD, sum of trade side amount in USD, block time, transaction signature, market address, protocol name, protocol family and 8 more fields.

By Divyasshree · saved 4 March 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades($token: String, $base: String) {
  Solana {
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Currency: {MintAddress: {is: $base}}}}
    ) {
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      volume: sum(of: Trade_Side_AmountInUSD)
      Block {
        Time
      }
      Transaction {
        Signature
      }
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Side {
          Type
        }
        PriceInUSD
        close: PriceInUSD
        Amount
        Side {
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "base": "AZyBFqNp2G7eVsyEKwYyWJnMgj2wcxxJA2ftQDqQpump",
  "token": "So11111111111111111111111111111111111111112",
  "interval": 5,
  "dataset": "combined",
  "time_ago": "2025-02-02T12:37:13Z"
}

Similar queries