OHLC in SOL with USD price

Returns DEX trades by token on Solana, where currency mint address is FafBTi…pump, sorted by block time: block time, protocol name, protocol family, currency symbol, currency name, currency mint address, trade price and 2 more fields.

By Aleksey · saved 21 June 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  Solana {
    DEXTradeByTokens(
      orderBy: {
        ascendingByField: "Block_Time"
      }
      where: { 
        Trade: {
          Currency: {
            MintAddress: {
              is: "FafBTifo6vyJbFXN5jPZQymorGWoLzro8TY8sFJWpump"
            }
          }
        }
        Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Time(interval: {count: 5 in: minutes})
      }
      
      Trade {
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Currency {
          Symbol
          Name
          MintAddress
        }
        
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        min: Price(maximum: Trade_Price)
        max: Price(minimum: Trade_Price)
        closeUsd: PriceInUSD(maximum: Trade_PriceInUSD)
       }
      
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Similar queries