balance_current_price

Returns balance updates and DEX trades by token on Ethereum, where balance update address is 0xcf1D…35f6 and currency smart contract is 0xc02a…6cc2: currency symbol, currency name, sum of balance update amount and price in USD.

By Omkar_BQ · saved 7 November 2024 · Bitquery API v2

What it returns

Filters

The query

query{
  balance: EVM(dataset: combined, network: eth) {
  balance: BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0xcf1DC766Fc2c62bef0b67A8De666c8e67aCf35f6"}}, Currency: {Native: true}}
    ) {
      Currency {
        Symbol
        Name
      }
      sum: sum(of: BalanceUpdate_Amount)
    }
  }
  current_eth_price : EVM(dataset: realtime, network: eth) {
     DEXTradeByTokens(where: {Trade: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}) {
      Trade {
        PriceInUSD(maximum: Block_Number)
      }
    }
  }
}

Similar queries