usd_price

Returns one DEX trade on Ethereum, where smart contract address is 0x4476…e529, time after 2023-07-30 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 · run 1 time · 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 / sellAmountUSD")
      usdPrice1: expression(get: "sellAmountUSD / buyAmountUSD")
      block {
        height
        timestamp {
          iso8601
        }
      }
      tradeIndex
    }
  }
}

Variables

{
  "from": "2023-07-30T12:06:59.000Z",
  "to": "2023-08-17T12:07:59.000Z",
  "limit": 10
}

Similar queries