Trade metrics for a particular pair on Solana network

Returns 10 DEX trades on Solana, where buy currency mint address is So1111…1112 and sell currency mint address is Es9vMF…wNYB, sorted by block time field, highest first: block time, median of trade buy price, count, sum of trade buy amount and sum of trade sell amount.

By Akshat · saved 17 May 2024 · run 21 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery { 
  Solana {
    DEXTrades(
      limit: {count: 10}
      orderBy: {descendingByField: "Block_Time_Field"}
      where: {Trade: {Buy: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}, Sell: {Currency: {MintAddress: {is: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"}}}}}
    ) {
      Block {
        Time_Field: Time(interval: {in: minutes, count: 5})
      }
      Price: median(of: Trade_Buy_Price)
      Unique_Buyers: count(distinct: Trade_Buy_Account_Address)
      Unique_sellers: count(distinct: Trade_Sell_Account_Address)
      total_transactions: count(distinct: Transaction_Signature)
      buy_volume: sum(of: Trade_Buy_Amount)
      sell_volume: sum(of: Trade_Sell_Amount)
    }
  }
}

Similar queries