TOKENOHLC

Streams DEX trades by token on Solana as they happen, where currency mint address is FQVNdF…pump and trade amount is above 0, sorted by block time: block time, account address, token owner, market address, protocol name, protocol family, side type and 12 more fields.

By Andrey · saved 4 July 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription TokenOHLC($token: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Time(interval: {count: 5, in: minutes})
        allTime: Time
      }
      Trade {
        Account {
          Address
          Token {
            Owner
          }
        }
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Side {
          Type
          Account {
            Address
            Token {
              Owner
            }
          }
        }
        Currency {
          Symbol
          Name
          MintAddress
        }
        Price
        Amount
        Side {
          AmountInUSD
          Amount
        }
        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)
      }
      volume: sum(of: Trade_Side_Amount)
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{"token": "FQVNdFh4z4HKcEbo9QJ6LxZbjkbZDvB8PKG963Hopump"}

Similar queries