For the complete documentation index, see llms.txt. This page is also available as Markdown.

Full transaction for block

Returns a full blockchain transaction with all balance updates for a specific block. Results are limited to the last 30 days for Community users.

get
/blockchain-v2/{asset}/blocks/{block_hash}/transactions/{txid}
Authorizations
api_keystringRequired

Coin Metrics API key can be specified as ?api_key= query parameter.

Path parameters
assetstringRequired

Asset name.

block_hashstringRequired

Block hash.

txidstringRequired

Transaction identifier (txid).

Query parameters
include_sub_accountsbooleanOptional

Boolean indicating if the response should contain sub-accounts.
This parameter is disabled for Community users.

Default: false
prettybooleanOptional

Human-readable formatting of JSON responses.

Default: false
ignore_unsupported_errorsbooleanOptional

Ignore "unsupported" errors for not currently supported by Coin Metrics items.

Default: false
Responses
200

Blockchain full transaction.

application/json

Blockchain full transaction response.

txidstringRequired

Identifier (txid) of the transaction.

consensus_timestring · date-timeRequired

The time in ISO 8601 date-time format. Always with nanoseconds precision.

miner_timestring · date-timeOptional

The time in ISO 8601 date-time format. Always with nanoseconds precision.

tx_positionstring · int64Required

Transaction position.

min_chain_sequence_numberstring · int64Optional

Chain sequence number.

max_chain_sequence_numberstring · int64Optional

Chain sequence number.

n_balance_updatesstring · int64Required

Number of balance updates.

amountstring · decimalRequired

Sum of all debits in the transaction.

stalestringOptional

This field is set to true if the corresponding block is stale. Otherwise omitted.

block_hashstringRequired

Hash of the block.

heightstring · int64Required

Height of the block.

versionstringOptional

Version of the transaction.

physical_sizestring · decimalOptional

Physical size of the transaction, bytes.

consensus_sizestring · decimalOptional

Consensus size of the transaction.

feestring · decimalOptional

Fee of the transaction.

get/blockchain-v2/{asset}/blocks/{block_hash}/transactions/{txid}
# Gets block data and balance updates for a specific Litecoin block, specified by the hash of the block
curl --compressed "https://api.coinmetrics.io/v4/blockchain-v2/ltc/blocks/885f0ba526e9a683f64c8fdb83c5e8cbc0d6e74fb93f2351941ee409a924b7a8/transactions/3345cbbcc53b8a0113951b69f98a72a84b5a094af84842b46ed931c242c09597?pretty=true&api_key=<your_key>"
{
  "txid": "16262dacdac04f41b50dd4174d3bd0d133916a325e5244b3febcb760a8d3975f",
  "consensus_time": "2022-10-14T04:17:24.000000000Z",
  "miner_time": "2022-10-14T04:17:24.000000000Z",
  "tx_position": 10095861795127296,
  "n_balance_updates": 4,
  "amount": 12.5480776,
  "block_hash": "b5f4f41003c656a8cf7deaa8555e3240bfd24244672397b3c544bd8bd9bed036",
  "height": 2350626,
  "min_chain_sequence_number": 10095861795127296,
  "max_chain_sequence_number": 10095861795127300,
  "balance_updates": [
    {
      "chain_sequence_number": 10095861795127296,
      "account": "FEES",
      "account_creation_height": 0,
      "change": -0.0480776,
      "rebasing_numerator": 1,
      "rebasing_denominator": 1,
      "rebasing_rounding_mode": "DOWN",
      "previous_balance": 0,
      "new_balance": -0.0480776,
      "transaction_sequence_number": 0,
      "n_debits": 2350627,
      "n_credits": 128653555,
      "previous_debit_height": 2350625,
      "previous_credit_height": 2350625,
      "previous_chain_sequence_number": 10095857500165790
    },
    {
      "chain_sequence_number": 10095861795127296,
      "account": "ISSUANCE",
      "account_creation_height": 0,
      "change": -12.5,
      "rebasing_numerator": 1,
      "rebasing_denominator": 1,
      "rebasing_rounding_mode": "DOWN",
      "previous_balance": -71380870.73347135,
      "new_balance": -71380883.23347135,
      "transaction_sequence_number": 0,
      "n_debits": 2350627,
      "n_credits": 0,
      "previous_debit_height": 2350625,
      "previous_chain_sequence_number": 10095857500160000
    },
    {
      "chain_sequence_number": 10095861795127300,
      "account": "LaYPLuQEanVCYM9TztR9FuT3ZbTJM6wHEZ",
      "account_creation_height": 1785846,
      "change": 12.5480776,
      "rebasing_numerator": 1,
      "rebasing_denominator": 1,
      "rebasing_rounding_mode": "DOWN",
      "previous_balance": 588.96230971,
      "new_balance": 601.51038731,
      "transaction_sequence_number": 0,
      "n_debits": 10123,
      "n_credits": 10171,
      "previous_debit_height": 2348134,
      "previous_credit_height": 2350581,
      "previous_chain_sequence_number": 10095668521598980
    }
  ]
}

Last updated