safemoon

Streams DEX trades by token on Solana as they happen, where side currency mint address is So1111…1112, currency mint address is 2kGfWR…pump and side amount is above 0, sorted by block time: block time, price in USD, quantile of trade price in USD and sum of trade side amount in USD.

By Jeremy Levit · saved 24 January 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription ($token: String, $base: String, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Currency: {MintAddress: {is: $base}}}, Block: {Time: {after: $time_ago}}}
    ) {
      Block {
        Time
      }
      Trade {
        close: PriceInUSD(maximum: Transaction_Index)
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "base": "2kGfWRgNp1QaxUMFCX9CMN78E1iCbgjBAZuQNUjWpump",
  "token": "So11111111111111111111111111111111111111112"
}

Similar queries