Joyetta Ware

Streams the latest 50 DEX trades by token and balance updates on Solana as they happen, where side currency mint address is So1111…1112, currency mint address is 8A8xc4…W7TX and side amount is above 0: quantile of trade price in USD, sum of trade side amount in USD, block time, transaction signature, currency symbol, currency name, market address and 10 more fields.

By Joyetta ware · saved 8 June 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades($token: String, $base: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time, ascending: Instruction_Program_Address}
      limit: {count: 50}
      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 {
        Currency {
          Symbol
          Name
        }
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        PriceInUSD
        close: PriceInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
    BalanceUpdates
  }
}

Variables

{
  "network": "solana",
  "base": "8A8xc4nwxAkF47ZTcwQJJ9uxzzPDrUefKbXu2fy7W7TX",
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2025-06-05T19:31:46Z",
  "dataset": "archive",
  "interval": 60,
  "from": "2025-06-08T08:03:47.000Z",
  "to": "2025-06-08T14:03:47.000Z"
}

Similar queries