trades using smart contracts

Returns the latest 10 DEX trades on Ethereum, where smart contract address is 0x601c…ec22, date since 2020-04-01 and date till 2022-05-01: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 3 May 2022 · run 1 time · Bitquery API v1

What it returns

Filters

The query

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

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "address": "0x601c32e0580d3aef9437db52d09f5a5d7e60ec22",
  "from": "2020-04-01",
  "till": "2022-05-01T23:59:59",
  "dateFormat": "%Y-%m"
}

Similar queries