resolveSymbol-matic-example

Returns 10 DEX trades on Ethereum and Polygon, where base currency is 0x0000…fa1c and quote currency is 0x0d50…1270, sorted by block height transaction index, highest first: block height, timestamp time, transaction index, base currency name, base currency symbol, decimals, quote currency name and 2 more fields.

By Sayon · saved 12 August 2021 · Bitquery API v1

What it returns

Filters

The query

query ($tokenAddress: String) {
  ethereum(network: matic) {
    dexTrades(
      options: {desc: ["block.height", "transaction.index"], limit: 10}
      baseCurrency: {is: $tokenAddress}
      quoteCurrency: {is: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      transaction {
        index
      }
      baseCurrency {
        name
        symbol
        decimals
      }
      quoteCurrency {
        name
        symbol
        decimals
      }
      quotePrice
    }
  }
}

Variables

{
  "tokenAddress": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
}

Similar queries