Search code examples
blockchainethereumbitcoineconomics

Does a Bitcoin block stores the corresponding dollar value of a transaction?


I am asking this question so that I want to easily know how many transactions occurred at a particular Bitcoin price. For example, at the price of $20T per BTC, how many are they?

There could be other ways finding this correlation, but my question is: Does the block stores this dollar value?


Solution

  • It does not.

    Each block contains a list of transactions and other metadata such as block number, timestamp when it was mined, etc... But the fiat monetary value is not part of the block, nor a part of a transaction.

    You'll also need to define a source of truth for the price. While a specific block was mined on a specific time, the price of Bitcoin at that specific time was slightly different on each exchange.


    Example (values are made up):

    Block number 500,000 was mined on 2022-01-01 00:00:00.

    At this exact time, the highest bid on Binance was $19,990, the lowest ask on Binance was $20,000, the highest bid on Coinbase was $20,050, the lowest ask on Coinbase was $20,070, etc.

    Exchanges and aggregation services (such as Coinmarketcap) often offer some average prices through their API for a specified timeframe. But there's no "one price of Bitcoin at a specified time".