M31 price

Latest trade of a token

Returns the latest DEX trade on Ethereum, where base currency is 0xf4d2…421e: quote price, timestamp time, block height, trade index, protocol, full name, address address and 8 more fields.

By DataPrincess · saved 28 January 2022 · Bitquery API v1

What it returns

Filters

The query

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

Variables

{
  "limit": 1,
  "network": "ethereum",
  "address": "0xf4d2888d29d722226fafa5d9b24f9164c092421e"

}

Similar queries