Fibswap Search query

Returns the latest 100000 DEX trades on Ethereum, where base currency is 0x2b59…eb39, date since 2021-05-18 and date till 2022-05-18: quote currency symbol, quote currency name, quote currency address, block height, address address, count, trade amount and 2 more fields.

By Abhishek · saved 7 June 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $from: ISO8601DateTime, $till: ISO8601DateTime, $baseCurrency: String, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    dexTrades(
      baseCurrency: {is: $baseCurrency}
      date: {since: $from, till: $till}
      options: {desc: ["block.height", "trades"], limit: $limit, offset: $offset, limitBy: {each: "quoteCurrency.address", limit: 100}}
    ) {
      quoteCurrency {
        symbol
        name
        address
      }
      block {
        height
      }
      pair_contract: smartContract {
        address {
          address
        }
      }
      trades: count
      tradeAmount(calculate: sum, in: USD)
      quotePrice
      exchange {
        name
      }
    }
  }
}

Variables

{
  "limit": 100000,
  "offset": 0,
  "network": "ethereum",
  "baseCurrency": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39",
  "from": "2021-05-18",
  "till": "2022-05-18",
  "dateFormat": "%Y-%m-%d"
}

Similar queries