solana ohlc

Returns 2 DEX trades by token on Solana, where currency mint address is 5m6rFm…pump, sorted by block timefield: block time, block height, sum of trade amount, currency name, side currency name and trade price.

By gaurav · saved 12 August 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    DEXTradeByTokens(
      limit: {count: 2}
      orderBy: {ascendingByField: "Block_timefield"}
      where: {
        Transaction:{Result:{Success:true}}
        Trade: {Currency: {MintAddress: {is: "5m6rFmP28HSsmmNC6ngmNwbT2FKg1j2n9QT1vYeqpump"}}}}
    ) {
      Block {
        timefield: Time(interval: {in: minutes, count: 10})
        lastTradeTime: Time(maximum: Block_Time)
        FirstTradeTime: Time(minimum: Block_Time)
        LastTradeBlock: Height(maximum: Block_Slot)
        FirstTradeBlock: Height(minimum: Block_Slot)
      }
      volume: sum(of: Trade_Amount)
      Trade {
        Currency {
          Name
        }
        Side {
          Currency {
            Name
          }
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
      }
    }
  }
}

Similar queries