checking

Returns one DEX trade on Ethereum, where smart contract address is 0x4476…e529, time after 2023-08-17 and time before 2023-08-17, sorted by block height trade index: address address, full name, full name with ID, exchange name, decimals, currency name, currency symbol and 15 more fields.

By Omkar Acharekar · saved 17 August 2023 · Bitquery API v1

What it returns

Filters

The query

query ($from: ISO8601DateTime!, $to: ISO8601DateTime!) {
  ethereum(network: ethereum) {
    dexTrades(
      time: {after: $from, before: $to}
      smartContractAddress: {is: "0x4476fc21ee9a44c34ec34dd7ac4cfbb5a986e529"}
      options: {limit: 1, asc: ["block.height", "tradeIndex"]}
    ) {
      exchange {
        address {
          address
        }
        fullName
        fullNameWithId
        name
      }
      smartContract {
        address {
          address
        }
        currency {
          decimals
          name
          symbol
          tokenType
        }
        protocolType
        contractType
      }
      buyAmount
      buyAmountUSD: buyAmount(in: USD)
      buyCurrency {
        symbol
        address
        name
        tokenType
        decimals
      }
      sellAmount
      sellAmountUSD: sellAmount(in: USD)
      sellCurrency {
        symbol
        address
        name
        tokenType
        decimals
      }
      usdPrice: expression(get: "buyAmountUSD / sellAmount")
      usdPrice1: expression(get: "sellAmountUSD / buyAmount")
      block {
        height
        timestamp {
          iso8601
        }
      }
      tradeIndex
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "from": "2023-08-17",
  "to": "2023-08-17T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries