Home

Get a Block Transaction

POST
https://ada.nownodes.io/block/transaction

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

CHANGELOG — Cardano Rosetta Java 2.3.3 → 2.4.0 Breaking response content: omit zero-value script-withdrawal reward operations; transaction.operations may have fewer entries and shifted operation_identifier.index values.


Get a transaction in a block by its Transaction Identifier. This endpoint should only be used when querying a node for a block does not return all transactions contained within it. All transactions returned by this endpoint must be appended to any transactions returned by the /block method by consumers of this data. Fetching a transaction by hash is considered an Explorer Method (which is classified under the Future Work section). This method can be used to let consumers to paginate results when the block trasactions count is too big to be returned in a single BlockResponse. Calling this endpoint requires reference to a BlockIdentifier because transaction parsing can change depending on which block contains the transaction. For example, in Bitcoin it is necessary to know which block contains a transaction to determine the destination of fee payments. Without specifying a block identifier, the node would have to infer which block to use (which could change during a re-org). Implementations that require fetching previous transactions to populate the response (ex: Previous UTXOs in Bitcoin) may find it useful to run a cache within the Rosetta server in the /data directory (on a path that does not conflict with the node).

Version 2.4.0 (breaking response-content change): Cardano Rosetta Java 2.4.0: zero-value script withdrawals are omitted from the transaction operations array (no reward-withdrawal operation is emitted for them). The array may therefore contain fewer operations than in 2.3.3, and subsequent operation_identifier.index values may shift. Non-zero withdrawals remain represented.

Body

application/json

Request value.

network_identifierNetworkIdentifierrequired

Rosetta network identifier object.

Show child attributes
blockchainstringrequired

Blockchain value.

networkstringrequired

If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet, preprod, or preview.

sub_network_identifierSubNetworkIdentifier

Sub Network Identifier value.

Show child attributes
networkstringrequired

Network value.

metadataobject

Additional metadata object.

block_identifierBlockIdentifierrequired

Rosetta block identifier object.

Show child attributes
indexinteger<int64>required

This is also known as the block height.

hashstringrequired

Cardano transaction hash.

transaction_identifierTransactionIdentifierrequired

Rosetta transaction identifier object.

Show child attributes
hashstringrequired

Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.

Response

200OK

HTTP 200 response for blockTransaction.

400Bad Request

Bad Request. The request is malformed or contains invalid parameters.

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error. The gateway or backend failed while processing the request.