all tokens OHLC subscription

Streams DEX trades by token on Solana as they happen, sorted by block time: block time, quantile of trade price in USD, sum of trade side amount in USD, market address, currency mint address, side currency mint address and price in USD.

By Divyasshree · saved 2 December 2024 · run 3 times · Bitquery API v2

What it returns

The subscription

subscription getTokenOhlcv {
     Solana {
       DEXTradeByTokens(
         orderBy: {ascendingByField: "Block_Time"}
       ) {
         Block {
           Time
         }
         min: quantile(of: Trade_PriceInUSD, level: 0.05)
         max: quantile(of: Trade_PriceInUSD, level: 0.95)
         volume: sum(of: Trade_Side_AmountInUSD)
         Trade {
           Market {
             MarketAddress
           }
           Currency {
             MintAddress
           }
          Side{
            Currency{
              MintAddress
            }
          }
           close: PriceInUSD(maximum: Transaction_Index)
         }
       }
     }
   }

Similar queries