trading in a transaction

Returns the latest 10 DEX trades on Ethereum, where tx hash is 0x8167…8863: timestamp time, block height, trade index, protocol, full name, address address, annotation and 6 more fields.

By gaurav · saved 20 March 2024 · run 4 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $hash: 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}
      txHash: {is: $hash}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      buyAmount
      buy_amount_usd: buyAmount(in: USD)
      buyCurrency {
        address
        symbol
      }
      sellAmount
      sell_amount_usd: sellAmount(in: USD)
      sellCurrency {
        address
        symbol
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "hash": "0x81670e745bcbbd31bcc25a39bb322081f225009a26445beee6cb5e21f76a8863"
}

Similar queries