usd_prices_multiple_currencies

trying to get (reliable) latest usd prices of multiple currencies

Returns DEX trades by token on BNB Chain, where currency smart contract is 0xd6fD…44ec or 0xbb4c…095c, block date since 2022-04-21 and trade price is above 0: chain ID, block time, sum of trade amount, count, price in USD, side currency symbol and currency symbol.

By gaurav · saved 25 April 2024 · run 16 times · Bitquery API v2

What it returns

Filters

The query

query getTokenCandles($network: evm_network, $baseCurrency: [String!], $from: String) {
  EVM(network: $network, dataset: realtime) {
    DEXTradeByTokens(
      orderBy: [{descending: Block_Time}, {ascendingByField: "count"}]
      where: {Trade: {Currency: {SmartContract: {in: $baseCurrency}, Symbol: {}}, Price: {gt: 0}, Amount: {lt: "0.1"}}, Block: {Date: {since: $from}}}
      limitBy: {by: Trade_Currency_SmartContract, count: 1}
    ) {
      ChainId
      Block {
        Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      count
      Trade {
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        open: PriceInUSD(minimum: Block_Number)
        close: PriceInUSD(maximum: Block_Number)
        Side {
          Currency {
            Symbol
          }
        }
        Currency {
          Symbol
        }
      }
    }
  }
}

Variables

{
  "network": "bsc",
  "baseCurrency": [
    "0xd6fDDe76B8C1C45B33790cc8751D5b88984c44ec",
    "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
  ],
  "from": "2022-04-21"
}

Similar queries