Aliasing example

Returns 1000 DEX trades and address details on Ethereum and BNB Chain, where base currency is 0xda8c…04cf and address is 0xda8c…04cf, sorted by trades, highest first: address address, full name, base currency address, base currency symbol, decimals, count, quote currency symbol and 8 more fields.

By gaurav · saved 8 April 2022 · run 7 times · Bitquery API v1

What it returns

Filters

The query

query GetPoolsOfToken($network: EthereumNetwork!, $tokenAddress: String!) {
  ethereum(network: $network) {
    dexTrades(
      baseCurrency: {is: $tokenAddress}
      options: {desc: "trades", limit: 1000}
    ) {
      poolToken: smartContract {
        address {
          address
        }
      }
      exchange {
        fullName
        address {
          address
        }
      }
      baseCurrency {
        address
        symbol
        decimals
      }
      trades: count
      pair: quoteCurrency {
        symbol
        address
        decimals
      }
      tradeAmount(in: USD)
      transaction {
        hash
      }
      quotePrice(calculate: maximum)
    }
    balance: address(address: {is: $tokenAddress}) {
      balances {
        currency {
          address
          name
          symbol
        }
        value
      }
    }
  }
}

Variables

{
  "network": "bsc",
  "tokenAddress": "0xda8ceb724a06819c0a5cdb4304ea0cb27f8304cf"
}

Similar queries