Base amount USD Wrong

Returns the latest 50 DEX trades on Ethereum and BNB Chain, where base currency is 0xb27a…97cc and date since 2023-01-22: side, timestamp time, block height, trade index, full name, address address, annotation and 7 more fields.

By linthertoss · saved 21 February 2023 · run 15 times · Bitquery API v1

What it returns

Filters

The query


query (
  $network: EthereumNetwork!
  $baseAddress: String!
  $limit: Int!
  $offset: Int!
  $from: ISO8601DateTime
) {
  ethereum(network: $network) {
    dexTrades(
      options: {
        desc: ["block.height", "tradeIndex"]
        limit: $limit
        offset: $offset,
      }
      date: { since: $from }
      baseCurrency: { is: $baseAddress }
    ) {
      side
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseAmountUSD: baseAmount(in: USD)
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteAmountUSD: quoteAmount(in: USD)
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "baseAddress": "0xb27adaffb9fea1801459a1a81b17218288c097cc",
  "quoteAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "from": "2023-01-22T13:22:19.022Z",
  "limit": 50,
  "offset": 0,
  "network": "bsc"
}

Similar queries