dex trade for a given currency

Returns 4 DEX trades on Ethereum, where base currency is 0x6710…0312, quote currency is 0xC02a…6Cc2 and time since 2022-02-26, sorted by quote price, highest first: timestamp time, block height, trade index, protocol, full name, address address, annotation and 8 more fields.

By gaurav · saved 8 March 2022 · run 5 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $token: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime, $quoteCurrency: String!) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["quotePrice"], limit: $limit, offset: $offset}
      time: {since: $from, till: $till}
      baseCurrency: {is: $token}
      quoteCurrency: {is: $quoteCurrency}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quotePrice
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 4,
  "offset": 0,
  "network": "ethereum",
  "token": "0x6710c63432a2de02954fc0f851db07146a6c0312",
  "quoteCurrency": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "from": "2022-02-26T00:00:00.000Z",
  "till": "2022-02-27T00:00:00.000Z",
  "dateFormat": "%Y-%m-%d"
}

Similar queries