Latest OHLC info

Returns the latest 10 DEX trades by token on opBNB, where currency smart contract is 0x4200…0006, side currency smart contract is 0x9e5a…96f3 and DEX smart contract is 0x706f…e91d: block date, sum of trade amount, trade price, currency name, protocol name, smart contract, side currency name and 2 more fields.

By Akshat · saved 10 April 2024 · run 19 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: opbnb) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Date}
      where: {Trade: {Currency: {SmartContract: {is: "0x4200000000000000000000000000000000000006"}}, Side: {Currency: {SmartContract: {is: "0x9e5aac1ba1a2e6aed6b32689dfcf62a509ca96f3"}}}, Dex: {SmartContract: {is: "0x706f7257e78b6f2404a1afb5c480645a6f5be91d"}}}}
      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_Number)
        close: Price(maximum: Block_Number)
        Currency {
          Name
        }
        Dex {
          ProtocolName
          SmartContract
        }
        Side {
          Currency {
            Name
            SmartContract
          }
        }
      }
      count
    }
  }
}

Similar queries