latest OHLC. info

Streams the latest 10 DEX trades by token on Solana as they happen, where currency mint address is So1111…1112, side currency mint address is EPjFWd…Dt1v and DEX program address is 83v8iP…5d6d: block date, sum of trade amount, trade price, currency name, protocol name, program address, side currency name and 2 more fields.

By Akshat · saved 11 April 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Date}
      where: {Trade: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Side: {Currency: {MintAddress: {is: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}}, Dex: {ProgramAddress: {is: "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d"}}}}
      limit: {count: 10}
    ) {
      Block {
        Date(interval: {in: days, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Height)
        close: Price(maximum: Block_Height)
        Currency {
          Name
        }
        Dex {
          ProtocolName
          ProgramAddress
        }
        Side {
          Currency {
            Name
            MintAddress
          }
        }
      }
      count
    }
  }
}

Similar queries