ohlc

Returns the latest 20 DEX trades by token on Solana, where currency mint address is 8hB5Wj…pump, side currency mint address is So1111…1112 and DEX program address is 675kPX…1Mp8: block time, sum of trade side amount in USD and trade price.

By Akshat · saved 8 July 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  Solana {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Timefield"}
      limit: {count: 20}
      where: {Trade: {Currency: {MintAddress: {is: "8hB5Wj9pZrnK58y2xBm6FVcyQ35rTxdavv9fVHgopump"}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}, Dex: {ProgramAddress: {is: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"}}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 15})
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
      }
    }
  }
}

Similar queries