v1 latest trade of currency pair

Returns the latest DEX trade on Ethereum and BNB Chain, where base currency is 0x51fd…85c8, quote currency is 0x55d3…7955 and time till 2024-10-23: block height, timestamp time, base currency symbol, quote currency symbol, quote price and full name with ID.

By gaurav · saved 23 October 2024 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      baseCurrency: {is: "0x51fd1845d74eca21b36070bf5ebf04afaa2185c8"}
      quoteCurrency: {in: ["0x55d398326f99059ff775485246999027b3197955"]}
      options: {desc: ["block.height"], limit: 1}
      time: {till: "2024-10-23T00:00:00Z"}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%dT%H:%M:%SZ")
        }
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
      exchange {
        fullNameWithId
      }
    }
  }
}

Similar queries