Latest price of multiple currency

Returns the latest DEX trades by token on Ethereum, where currency smart contract is 0x5149…86CA, 0x1f98…F984 or 1 more and side currency smart contract is 0xdac1…1ec7: price in USD, smart contract, currency symbol, block date and block time.

By Vishal · saved 11 June 2024 · run 7 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: eth) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {in: 
        ["0x514910771AF9Ca656af840dff83E8264EcF986CA", 
        "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", 
        "0x72e4f9f808c49a2a61de9c5896298920dc4eeea9"]}}, Side: {Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}}}
      orderBy: {descending: Block_Time}
      limitBy: {by: Trade_Currency_SmartContract, count: 1}
    ) {
      Trade {
        PriceInUSD
        Currency {
          SmartContract
          Symbol
        }
      }
      Block {
        Date
        Time
      }
    }
  }
}

Similar queries