dex chart

Returns DEX trades on Ethereum and BNB Chain, where smart contract address is 0xa527…f5a6 and exchange name is Pancake or Pancake v2: minute, base currency name, base currency symbol, quote currency name, quote currency symbol, base currency address, token ID and 7 more fields.

By Santhosh · saved 13 September 2021 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($from: ISO8601DateTime!, $to: ISO8601DateTime!, $interval: Int) {
  ethereum(network: bsc) {
    dexTrades(
      smartContractAddress: 
      {is:"0xa527a61703d82139f8a06bc30097cc9caa2df5a6"}
      date: {between: [$from, $to]}      
      exchangeName: {in:["Pancake","Pancake v2"]}
      
    ) {
      timeInterval {
        minute(format: "%FT%TZ", count: $interval)
      }
      baseCurrency{
        name
        symbol
      }
      quoteCurrency{
        name
        symbol
      }
      buyCurrency: baseCurrency {
        symbol
        address
        tokenId
      }
      buyAmount: baseAmount
      sellCurrency: quoteCurrency {
        symbol
        address
      }
      volume: quoteAmount
      trades: count
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
    }
  }
}

Variables

{
  "from": "2021-09-12T21:52:30+03:00",
  "to": "2021-09-13T05:53:30+03:00",
  "interval": 30
}

Similar queries