Copy of token latest swaps

token latest swaps

Returns the latest 5 DEX trades on Ethereum and BNB Chain, where buy currency is 0x3c0b…8222 and sell currency is 0x3c0b…8222: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By Alex · saved 16 August 2022 · run 6 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $token: String!, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      buyCurrency: {is: $token}
      sellCurrency: {is: $token}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      buyAmount
      buyCurrency {
        address
        symbol
      }
      sellAmount
      sellCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 5,
  "offset": 0,
  "network": "bsc",
  "token": "0x3c0b6fcb2f62990f477d9af611e4da3ff1f08222",
  "dateFormat": "%Y-%m-%d"
}

Similar queries