OHLC websocket for Solana

Streams DEX trades by token on Solana as they happen, where currency mint address is BKtAWw…upw1, sorted by block time: block time, block height, sum of trade amount, trade amount, currency name, currency symbol, currency mint address and 7 more fields.

By gaurav · saved 22 April 2024 · run 11 times · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Currency: {MintAddress: {is: "BKtAWw8bpVF3o1BL53kFucFQimZ8mPKs8svX3hp4upw1"}}}}
    ) {
      Block {
        Time(interval: {in: seconds, count: 10})
        lastTradeTime: Time(maximum: Block_Time)
        FirstTradeTime: Time(minimum: Block_Time)
        LastTradeBlock: Height(maximum: Block_Height)
        FirstTradeBlock: Height(minimum: Block_Height)
      }
      volume: sum(of: Trade_Amount)
      Trade {
        Amount
        Currency {
          Name
          Symbol
          MintAddress
        }
        Account {
          Address
        }
        Price
        Side {
          Currency {
            Name
            Symbol
            MintAddress
          }
          Amount
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Height)
        close: Price(maximum: Block_Height)
      }
      count
    }
  }
}

Similar queries