Multiple Crypto price

Get price of multiple cryptocurrencies

Returns the latest output on Bitcoin, Solana and Ethereum, where date is 2024-03-13: value, expression, block height, transaction fee and amount.

By Ayush Thakur · saved 15 March 2024 · run 10 times · Bitquery API v1

What it returns

Filters

The query

query MyQuery {
  bitcoin {
    outputs(options: {desc: ["block.height"], limit: 1}, date: {is: "2024-03-13"}) {
      balanceInUSD: value(in: USD)
      value
      price: expression(get: "balanceInUSD / value")
      block {
        height
      }
    }
  }
  solana {
    transactions(
      options: {desc: ["block.height"], limit: 1}
      date: {is: "2024-03-13"}
    ) {
      amountInUSD: transactionFee(in: USD)
      amount: transactionFee
      price: expression(get: "amountInUSD / amount")
      block {
        height
      }
    }
  }
  ethereum {
    transactions(
      options: {desc: ["block.height"], limit: 1}
      date: {is: "2024-03-13"}
    ) {
      total:amount(in: USD)
      quantity:amount
      price: expression(get: "total/quantity")
      block {
        height
      }
      
    }
  }
}

Similar queries