get latest price and liquidity of a token in token pair

Returns balance updates on Ethereum, where balance update address is 0x1bCd…55eE and currency smart contract is 0x6b17…1d0f: sum of balance update amount and price in USD.

By Kshitij Mahajan · saved 26 March 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0x1bCd6B0E97B51D76FD1752111a1fe2b473F655eE"}}, 
        Currency: {SmartContract: {is: "0x6b175474e89094c44da98b954eedeac495271d0f"}}}
    ) {
      dai_liq: sum(of: BalanceUpdate_Amount)
      joinDEXTradeByTokens(
        Trade_Currency_SmartContract: Currency_SmartContract
        orderBy: {descending: Block_Time}
        limit: {count: 1}
      ) {
        Trade {
          PriceInUSD
        }
      }
    }
  }
}

Similar queries