Copy of GetTokenPairQuotePrice

Cake Currency Price using Cake-USDT Pair

Returns one DEX trade on Ethereum and Polygon, where base currency is 0xBbf2…3234 and quote currency is 0x0d50…1270, sorted by block height transaction index, highest first: block height, timestamp time, transaction index, base currency symbol, base currency name, quote currency symbol, quote currency name and quote price.

By Tyler · saved 22 March 2022 · run 156 times · Bitquery API v1

What it returns

Filters

The query

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

Variables

{
  "baseCurrency": "0xBbf282E1DCB6836e005C85Ec8b3d2D0913b93234",
  "quoteCurrency": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"
}

Similar queries