OHLC with usage of quantile values

Returns the latest DEX trades by token on Solana, where currency mint address is 9BB6NF…pump, side currency mint address is So1111…1112 and market market address is Bzc9NZ…5iiw: block time, trade price and price in USD.

By Akshat · saved 20 December 2024 · run 5 times · Bitquery API v2

What it returns

Filters

The query

query ($mainCurrencyAddress: String , $sideCurrencyAddress: String, $pairAddress: String, $lowerBoundPrice: Float, $upperBoundPrice: Float, $timestamp1Hago: DateTime ){
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      where: {Trade: {Currency: {MintAddress: {is: $mainCurrencyAddress}}, Side: {Currency: {MintAddress: {is: $sideCurrencyAddress}}}, Market: {MarketAddress: {is: $pairAddress}}, PriceInUSD: {ge: $lowerBoundPrice, le: $upperBoundPrice}}, Transaction: {Result: {Success: true}}, Block: {Time: {since: $timestamp1Hago}}}
    ) {
      Block {
        Time
      }
      Trade{
        Price
        PriceInUSD
      }
    }
  }
}

Variables

{
  "mainCurrencyAddress": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
  "sideCurrencyAddress": "So11111111111111111111111111111111111111112",
  "pairAddress": "Bzc9NZfMqkXR6fz1DBph7BDf9BroyEf6pnzESP7v5iiw",
  "lowerBoundPrice": "1.0117961082458495",
  "upperBoundPrice": "1.0709270496368408",
  "timestamp1Hago" : "2024-12-19T08:00:00Z"
}

Similar queries