OHLC subscription

Streams DEX trades by token on Solana as they happen, where currency mint address is Ar5fk7…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 Aleksey · saved 11 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})
                        }
                        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": "Ar5fk7XGtD3nMPeJHKzukFyw6TZQnDxbLpNnNeuupump"
}

Similar queries