Gets Blocks by Height
Get block data by the provided height range or list of heights.
query Parameters
Array of strings or strings (BlockHeight) non-empty unique A comma-separated list of block heights to get. This parameter is incompatible with | |
string or string (BlockHeight) The start height of the block range to get. Must be used together with | |
string or string (BlockHeight) The ending height of the block range to get. Must be used together with | |
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
[- {
- "header": {
- "id": "string",
- "parent_id": "string",
- "height": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "parent_voter_signature": "string"
}, - "payload": {
- "collection_guarantees": [
- {
- "collection_id": "string",
- "signer_ids": [
- "string"
], - "signature": "string"
}
], - "block_seals": [
- {
- "block_id": "string",
- "result_id": "string",
- "final_state": "string",
- "aggregated_approval_signatures": [
- {
- "verifier_signatures": [
- "string"
], - "signer_ids": [
- "string"
]
}
]
}
]
}, - "execution_result": {
- "id": "string",
- "block_id": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "chunks": [
- {
- "block_id": "string",
- "collection_index": "string",
- "start_state": "string",
- "end_state": "string",
- "event_collection": "string",
- "index": "string",
- "number_of_transactions": "string",
- "total_computation_used": "string"
}
], - "previous_result_id": "string",
- "_links": {
- "_self": "string"
}
}, - "_links": {
- "_self": "string"
}
}
]
Get Blocks by ID.
Get a block data or list of blocks by the provided ID or list of IDs.
path Parameters
id required | Array of strings <hexadecimal> (Identifier) [ 1 .. 50 ] items unique [[a-fA-F0-9]{64}] A block ID or comma-separated list of block IDs. |
query Parameters
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
[- {
- "header": {
- "id": "string",
- "parent_id": "string",
- "height": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "parent_voter_signature": "string"
}, - "payload": {
- "collection_guarantees": [
- {
- "collection_id": "string",
- "signer_ids": [
- "string"
], - "signature": "string"
}
], - "block_seals": [
- {
- "block_id": "string",
- "result_id": "string",
- "final_state": "string",
- "aggregated_approval_signatures": [
- {
- "verifier_signatures": [
- "string"
], - "signer_ids": [
- "string"
]
}
]
}
]
}, - "execution_result": {
- "id": "string",
- "block_id": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "chunks": [
- {
- "block_id": "string",
- "collection_index": "string",
- "start_state": "string",
- "end_state": "string",
- "event_collection": "string",
- "index": "string",
- "number_of_transactions": "string",
- "total_computation_used": "string"
}
], - "previous_result_id": "string",
- "_links": {
- "_self": "string"
}
}, - "_links": {
- "_self": "string"
}
}
]
Get Block Payload by Block ID.
Get a block payload data by the provided block ID.
path Parameters
id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A block ID. |
query Parameters
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "collection_guarantees": [
- {
- "collection_id": "string",
- "signer_ids": [
- "string"
], - "signature": "string"
}
], - "block_seals": [
- {
- "block_id": "string",
- "result_id": "string",
- "final_state": "string",
- "aggregated_approval_signatures": [
- {
- "verifier_signatures": [
- "string"
], - "signer_ids": [
- "string"
]
}
]
}
]
}
Get a Transaction by ID.
Get a transaction data by the provided transaction ID.
path Parameters
id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The ID of the transaction to get. |
query Parameters
block_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A block ID optional parameter |
collection_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A collection ID optional parameter. |
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "id": "string",
- "script": "string",
- "arguments": [
- "string"
], - "reference_block_id": "string",
- "gas_limit": "string",
- "payer": "string",
- "proposal_key": {
- "address": "string",
- "key_index": "string",
- "sequence_number": "string"
}, - "authorizers": [
- "string"
], - "payload_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "envelope_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "result": {
- "block_id": "string",
- "collection_id": "string",
- "execution": "Pending",
- "status": "Pending",
- "status_code": 0,
- "error_message": "string",
- "computation_used": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "_links": {
- "_self": "string"
}
}, - "_links": {
- "_self": "string"
}
}
Get a Transaction Result by ID.
Get transaction result by the transaction result ID.
path Parameters
transaction_id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The transaction ID of the transaction result. |
query Parameters
block_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A block ID optional parameter |
collection_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A collection ID optional parameter. |
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "block_id": "string",
- "collection_id": "string",
- "execution": "Pending",
- "status": "Pending",
- "status_code": 0,
- "error_message": "string",
- "computation_used": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "_links": {
- "_self": "string"
}
}
Submit a Transaction
Send a new signed transaction payload to the network with required transaction fields.
Request Body schema: application/jsonrequired
The transaction to submit.
script required | string <base64> Base64 encoded content of the Cadence script. |
arguments required | Array of strings <base64> [ items <base64 > ] A list of arguments each encoded as Base64 passed in the JSON-Cadence interchange format. |
reference_block_id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} A 32-byte unique identifier for an entity. |
gas_limit required | string <uint64> The limit on the amount of computation a transaction is allowed to preform. |
payer required | string <hexadecimal> (Address) [a-fA-F0-9]{16} The 8-byte address of an account. |
required | object (ProposalKey) |
authorizers required | Array of strings <hexadecimal> (Address) [[a-fA-F0-9]{16}] |
required | Array of objects (TransactionSignature) A list of Base64 encoded signatures. |
required | Array of objects (TransactionSignature) A list of Base64 encoded signatures. |
Responses
Request samples
- Payload
{- "script": "string",
- "arguments": [
- "string"
], - "reference_block_id": "string",
- "gas_limit": "string",
- "payer": "string",
- "proposal_key": {
- "address": "string",
- "key_index": "string",
- "sequence_number": "string"
}, - "authorizers": [
- "string"
], - "payload_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "envelope_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
]
}
Response samples
- 201
- 400
- 500
{- "id": "string",
- "script": "string",
- "arguments": [
- "string"
], - "reference_block_id": "string",
- "gas_limit": "string",
- "payer": "string",
- "proposal_key": {
- "address": "string",
- "key_index": "string",
- "sequence_number": "string"
}, - "authorizers": [
- "string"
], - "payload_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "envelope_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "result": {
- "block_id": "string",
- "collection_id": "string",
- "execution": "Pending",
- "status": "Pending",
- "status_code": 0,
- "error_message": "string",
- "computation_used": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "_links": {
- "_self": "string"
}
}, - "_links": {
- "_self": "string"
}
}
Gets a Collection by ID
Get a collection by provided collection ID.
path Parameters
id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The collection ID. |
query Parameters
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "id": "string",
- "transactions": [
- {
- "id": "string",
- "script": "string",
- "arguments": [
- "string"
], - "reference_block_id": "string",
- "gas_limit": "string",
- "payer": "string",
- "proposal_key": {
- "address": "string",
- "key_index": "string",
- "sequence_number": "string"
}, - "authorizers": [
- "string"
], - "payload_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "envelope_signatures": [
- {
- "address": "string",
- "key_index": "string",
- "signature": "string"
}
], - "result": {
- "block_id": "string",
- "collection_id": "string",
- "execution": "Pending",
- "status": "Pending",
- "status_code": 0,
- "error_message": "string",
- "computation_used": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "_links": {
- "_self": "string"
}
}, - "_links": {
- "_self": "string"
}
}
], - "_links": {
- "_self": "string"
}
}
Get Execution Results by Block ID
Get execution result by provided block ID or multiple block IDs provided as comma-seperated list.
query Parameters
block_id required | Array of strings <hexadecimal> (Identifier) non-empty unique [[a-fA-F0-9]{64}] Single ID or comma-separated list of block IDs. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
[- {
- "id": "string",
- "block_id": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "chunks": [
- {
- "block_id": "string",
- "collection_index": "string",
- "start_state": "string",
- "end_state": "string",
- "event_collection": "string",
- "index": "string",
- "number_of_transactions": "string",
- "total_computation_used": "string"
}
], - "previous_result_id": "string",
- "_links": {
- "_self": "string"
}
}
]
Get Execution Result by ID
Get execution result by provided execution result ID.
path Parameters
id required | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The ID of the execution result. |
query Parameters
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "id": "string",
- "block_id": "string",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "chunks": [
- {
- "block_id": "string",
- "collection_index": "string",
- "start_state": "string",
- "end_state": "string",
- "event_collection": "string",
- "index": "string",
- "number_of_transactions": "string",
- "total_computation_used": "string"
}
], - "previous_result_id": "string",
- "_links": {
- "_self": "string"
}
}
Get an Account By Address
Get an account data by provided address in latest "sealed" block or by provided block height.
path Parameters
address required | string <hexadecimal> (Address) [a-fA-F0-9]{16} The address of the account. |
query Parameters
string or string (BlockHeight) The block height to query for the account details at the "sealed" is used by default. | |
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "address": "string",
- "balance": "string",
- "keys": [
- {
- "index": "string",
- "public_key": "string",
- "signing_algorithm": "BLSBLS12381",
- "hashing_algorithm": "SHA2_256",
- "sequence_number": "string",
- "weight": "string",
- "revoked": true
}
], - "contracts": {
- "property1": "string",
- "property2": "string"
}, - "_expandable": {
- "keys": "string",
- "contracts": "string"
}, - "_links": {
- "_self": "string"
}
}
Get an individual Account Key By Address and Index
Get an account data by provided address in latest "sealed" block or by provided block height.
path Parameters
address required | string <hexadecimal> (Address) [a-fA-F0-9]{16} The address of the account. |
index required | string <uint64> The index of the account key. |
query Parameters
string or string (BlockHeight) The block height to query for the account details at the "sealed" is used by default. | |
expand | Array of strings non-empty unique A comma-separated list indicating which properties of the content to expand. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "index": "string",
- "public_key": "string",
- "signing_algorithm": "BLSBLS12381",
- "hashing_algorithm": "SHA2_256",
- "sequence_number": "string",
- "weight": "string",
- "revoked": true
}
Execute a Cadence Script
Executes a read-only Cadence script against the execution state at the given block height or ID. If block height or ID is not specified, then the script is executed at the latest sealed block height.
query Parameters
block_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The ID of the block to execute the script against. For a specific block height, use |
string or string (BlockHeight) The height of the block to execute the script against. This parameter is incompatible with |
Request Body schema: application/jsonrequired
The script to execute.
script | string <base64> Base64 encoded content of the Cadence script. |
arguments | Array of strings <byte> [ items <byte > ] An list of arguments each encoded as Base64 passed in the JSON-Cadence interchange format. |
Responses
Request samples
- Payload
{- "script": "string",
- "arguments": [
- "string"
]
}
Response samples
- 200
- 400
- 500
{- "value": "string"
}
Get Events
Query on-chain events by their name in the specified blocks heights or block IDs.
query Parameters
type required | string (EventType) The event type is identifier of the event as defined here. |
string or string (BlockHeight) The start height of the block range for events. Must be used together with | |
string or string (BlockHeight) The end height of the block range for events. Must be used together with | |
block_ids | Array of strings <hexadecimal> (Identifier) [ 1 .. 50 ] items unique [[a-fA-F0-9]{64}] List of block IDs. Either provide this parameter or both height parameters. This parameter is incompatible with heights parameters. |
select | Array of strings non-empty unique A comma-separated list indicating which properties of the content to return. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "block_id": "string",
- "block_height": "string",
- "block_timestamp": "2019-08-24T14:15:22Z",
- "events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
], - "_links": {
- "_self": "string"
}
}
Get Node Version Information
Get node version information, such as semver, commit, sporkID and protocol version.
Responses
Response samples
- 200
- 400
- 404
- 500
{- "semver": "string",
- "commit": "string",
- "spork_id": "string",
- "protocol_version": "string",
- "spork_root_block_height": "string",
- "node_root_block_height": "string",
- "compatible_range": {
- "start_height": "string",
- "end_height": "string"
}
}
Subscribe events
IMPORTANT NOTE: This is a WebSocket connection, so the ws://
or wss://
schema should be used to subscribe to this endpoint.
This endpoint streams on-chain events for all blocks starting at the requested start block, up until the latest available block. Once the latest block is reached, the stream will remain open, and responses will be sent for each new block as it becomes available.
query Parameters
string or string (BlockHeight) The block height of the events being streamed. Either provide this parameter or | |
start_block_id | string <hexadecimal> (Identifier) [a-fA-F0-9]{64} The block id of the events being streamed. Either provide this parameter or |
heartbeat_interval | string <uint64> Interval in block heights at which the server should return a heartbeat message to the client. |
event_types | Array of strings (EventType) non-empty unique A comma-separated list of events type to include. |
addresses | Array of strings non-empty unique A comma-separated list of addresses who's events should be included. |
contracts | Array of strings non-empty unique A comma-separated list of contracts who's events should be included. |
Responses
Response samples
- 200
- 400
- 408
- 500
- 503
{- "BlockId": "string",
- "Height": "string",
- "Events": [
- {
- "type": "string",
- "transaction_id": "string",
- "transaction_index": "string",
- "event_index": "string",
- "payload": "string"
}
]
}