Tx list in specific timeframe

Returns DEX trades on Ethereum, where base currency is 0xc02a…6cc2, quote currency is 0x6b17…1d0f and date since 2021-01-29: transaction hash, trade index, protocol, exchange name, base currency symbol, base currency address, base amount and 7 more fields.

By Aleksey · saved 29 January 2021 · Bitquery API v1

What it returns

Filters

The query

query ($baseAddress: String, 
  $quoteAddress: String, $from: ISO8601DateTime!) {
  ethereum(network: ethereum) {
    dexTrades(
      time: {between: ["2021-01-29T11:00:00Z","2021-01-29T11:05:00Z"]}
      baseCurrency: {is: $baseAddress}, quoteCurrency: {is: $quoteAddress}, date: {since: $from}, priceAsymmetry: {lt: 0.7}, any: [{tradeAmountUsd: {gt: 0.00001}}, {tradeAmountUsd: {is: 0}}]) {
      
      transaction {
        hash
      }
      tradeIndex
      
      protocol
      exchange{name}
      buyCurrency: baseCurrency {
        symbol
        address
      }
      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-01-29T09:24:09.000Z",
  "baseAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "quoteAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
}

Similar queries