Copy of New Query

Streams the latest 50 DEX trades by token on Solana as they happen, where currency mint address is So1111…1112 and side currency mint address is So1111…1112, EPjFWd…Dt1v or 3 more: quantile of trade price in USD, sum of trade side amount in USD, block time, transaction signature, market address, protocol name, protocol family and 9 more fields.

By USDC · saved 9 February 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades($token: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {in: ["", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm"]}}}}}
    ) {
      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
        }
        AmountInUSD
        PriceInUSD
        close: PriceInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2025-01-10T08:38:30Z",
  "interval": 5,
  "dataset": "combined"
}

Similar queries