price of multiple tokens at once

Returns the latest DEX trades by token on Ethereum, where currency smart contract is 0x95aD…C4cE or 0x6982…1933 and side currency smart contract is 0xa0b8…eb48: block time, currency symbol, currency name, trade price, price in USD, side currency symbol, side currency name and 2 more fields.

By Akshat · saved 20 June 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {in: ["0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE", "0x6982508145454Ce325dDbE47a25d4ec3d2311933"]}}, Side: {Currency: {SmartContract: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}}}}
      orderBy: {descending: Block_Time}
      limitBy: {count: 1, by: Trade_Currency_SmartContract}
    ) {
      Block {
        Time
      }
      Trade {
        Currency {
          Symbol
          Name
        }
        Price_against_sell_currency: Price
        PriceInUSD
        Side {
          Currency {
            Symbol
            Name
          }
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
      }
    }
  }
}

Similar queries