blocks

Returns the latest 500 DEX trades on Ethereum and BNB Chain, where base currency is 0x2170…33f8, quote currency is 0xbb4c…095c and time before 2023-01-21: minute, second, block height, base currency symbol, base currency address, base amount, trade amount and 7 more fields.

By linthertoss · saved 21 February 2023 · run 3 times · Bitquery API v1

What it returns

Filters

The query

query getTradingData($baseAddress: String, $quoteAddress: String, $from: ISO8601DateTime!, $limit: Int, $offset: Int, $network: EthereumNetwork!) {
  ethereum(network: $network) {
    dexTrades(
      baseCurrency: {is: $baseAddress}
      quoteCurrency: {is: $quoteAddress}
      time: {before: $from}
      options: {limit: $limit, offset: $offset, desc: "block.height"}
      
    ) {
     	timeInterval {
        minute
        second
      }
      block{
        height
      }
      buyCurrency: baseCurrency {
        symbol
        address
      }
      buyAmount: baseAmount
      buyAmountUSD: baseAmount(in: USDT)
      tradeAmount(in: USD)
      sellCurrency: quoteCurrency {
        symbol
        address
      }
      volume: quoteAmount(in: USDT)
      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": "2023-01-21T06:40:06.956Z",
  "interval": 30,
  "baseAddress": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
  "quoteAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "limit": 500,
  "offset": 0,
  "network": "bsc"
}

Similar queries