DAI OHLC in USD

ohlcv_usd_historic_value

Returns the latest 500 DEX trades by token on BNB Chain, where side currency smart contract is 0x1af3…dbc3, block date since 2022-04-21 and trade price asymmetry is at most 0.01: chain ID, block time, sum of trade amount, price in USD, side currency symbol, currency symbol and count.

By Divyasshree · saved 25 April 2024 · run 5 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $interval: Int, $limit: Int, $from: String, $quoteCurrency: String, $timeframe: OLAP_DateTimeIntervalUnits) {
  EVM(network: $network, dataset: archive) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Time"}
      limit: {count: $limit}
      where: {Trade: {PriceAsymmetry: {le: 0.01}, Side: {Currency: {SmartContract: {is: $quoteCurrency}, Symbol: {}}}, Price: {gt: 0}, Amount: {gt: "0.000000000000000001"}}, Block: {Date: {since: $from}}}
    ) {
      ChainId
      Block {
        Time(interval: {in: $timeframe, count: $interval})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        open: PriceInUSD(minimum: Block_Number)
        close: PriceInUSD(maximum: Block_Number)
        Side {
          Currency {
            Symbol
          }
        }
        Currency {
          Symbol
        }
      }
      count
    }
  }
}

Variables

{
  "network": "bsc",
  "quoteCurrency": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",
  "interval": 1,
  "timeframe": "days",
  "limit": 500,
  "from": "2022-04-21"
}

Similar queries