BIT-1569

Returns the latest address detail on Ethereum and BNB Chain, where address is 0x9732…7de6, quote currency is 0xbb4c…095c and base currency is 0x9732…7de6: annotation, address, contract type, attributes name, attributes value, currency address, decimals and 10 more fields.

By Remach · saved 5 April 2022 · Bitquery API v1

What it returns

Filters

The query


query MarketCap($contract: String!, $base: String!, $stable: String!, $pair: String!, $network: EthereumNetwork!) {
  ethereum(network: $network) {
    address(address: {is: $contract}) {
      annotation
      address
      smartContract {
        contractType
        attributes {
          name
          value
        }
        currency {
          address
          decimals
        }
      }
      balance
    }
    marketCapToken: dexTrades(
      options: {desc: ["block.height","tradeIndex"], limit: 1}
      quoteCurrency: {is: $base}
      baseCurrency: {is: $contract}
      time: {since: "2022-03-31T04:57:33.773Z"}
    ) {
      tradeIndex
      block {
        height
      }
      baseCurrency {
        address
      }
      quoteCurrency {
        address
      }
      quotePrice
    }
    marketCapBase: dexTrades(
      baseCurrency: {is: $base}
      quoteCurrency: {is: $stable}
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      time: {since: "2022-03-31T04:57:33.773Z"}
    ) {
      tradeIndex
      block {
        height
      }
      baseCurrency {
        address
      }
      quoteCurrency {
        address
      }
      quotePrice
    }
    transfers(amount: {gt: 0}) {
      minted: amount(
        calculate: sum
        sender: {is: "0x0000000000000000000000000000000000000000"}
      )
      burned: amount(
        calculate: sum
        receiver: {is: "0x0000000000000000000000000000000000000000"}
      )
      currency(currency: {is: $contract}) {
        address
      }
    }
    twentyFourHourVolume: dexTrades(
      baseCurrency: {is: $contract}
      time: {since: "2022-03-31T04:57:33.773Z"}
    ) {
      twentyFourHourVolume: tradeAmount(in: USD)
    }
    totalTransactions: dexTrades(
      baseCurrency: {is: $contract}
    ) {
      count
    }
    pooledBalances: address(address: {is: $pair}) {
      balances(
        currency: {in: [$base, $contract]}
      ) {
        currency {
          address
          decimals
        }
        pooledBalance: value
      }
      address
    }
  }
}

Variables

{"options":{},"network":"bsc","contract":"0x97329bce201d86bbcbeebbb3b03256abdf7b7de6","base":"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c","stable":"0x55d398326f99059ff775485246999027b3197955","pair":"0xbd9f1171322fce907d8bc3406d867c16ba916c3c"}

Similar queries