Ethereum DEX Trades

Returns the latest 2 DEX trades on Ethereum, where protocol is Curve, date since 2021-07-01 and date till 2021-10-01: transaction hash, timestamp time, block height, trade index, side, count, protocol and 29 more fields.

By Sergey · saved 19 August 2021 · Bitquery API v1

What it returns

Filters

The query

query ($from: ISO8601DateTime, $till: ISO8601DateTime, $dex_exchange: String!) {
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 2, offset: 0}
      date: {since: $from, till: $till}
      protocol: {is: $dex_exchange}
    ) {
      transaction {
        hash
      }
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      side
      count
      protocol
      __typename
      price
      exchange {
        address {
          address
          annotation
        }
        fullName
        fullNameWithId
        name
      }
      smartContract {
        currency {
          name
        }
        contractType
        address {
          address
          annotation
        }
      }
      buyAmount
      buyCurrency {
        address
        symbol
        decimals
        tokenId
        tokenType
        __typename
      }
      sellAmount
      sellCurrency {
        address
        symbol
        decimals
        tokenId
        tokenType
        __typename
      }
      baseAmount
      baseCurrency {
        address
        symbol
        decimals
        tokenId
        tokenType
        __typename
      }
      quoteAmount
      quoteCurrency {
         address
        symbol
        decimals
        tokenId
        tokenType
        __typename
      }
      
      maker {
        address
        annotation
        smartContract {
          contractType
        }
      }
      taker {
        address
        annotation
        smartContract {
          contractType
        }
      }
      gas
      gasPrice
      gasValue
      timeInterval {
        hour(format: "%Y-%m-%d %H:%M:%S")
      }
    }
  }
}

Variables

{
  "dex_exchange": "Curve",
  "from": "2021-07-01",
  "till": "2021-10-01",
  "currency_token_address": "USDC"
}

Similar queries