Skip to main content

Access API (1.0.0)

Download OpenAPI specification:Download

Blocks

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 start_height and end_height.

string or string (BlockHeight)

The start height of the block range to get. Must be used together with end_height. This parameter is incompatible with height.

string or string (BlockHeight)

The ending height of the block range to get. Must be used together with start_height. This parameter is incompatible with height.

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

Content type
application/json
[
  • {
    }
]

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 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

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "collection_guarantees": [
    ],
  • "block_seals": [
    ]
}

Transactions

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

Content type
application/json
{
  • "id": "string",
  • "script": "string",
  • "arguments": [
    ],
  • "reference_block_id": "string",
  • "gas_limit": "string",
  • "payer": "string",
  • "proposal_key": {
    },
  • "authorizers": [
    ],
  • "payload_signatures": [
    ],
  • "envelope_signatures": [
    ],
  • "result": {
    },
  • "_expandable": {},
  • "_links": {
    }
}

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

Content type
application/json
{
  • "block_id": "string",
  • "collection_id": "string",
  • "execution": "Pending",
  • "status": "Pending",
  • "status_code": 0,
  • "error_message": "string",
  • "computation_used": "string",
  • "events": [
    ],
  • "_links": {
    }
}

Submit a Transaction

Send a new signed transaction payload to the network with required transaction fields.

Request Body schema: application/json

The transaction to submit.

script
required
string <base64>

Base64 encoded content of the Cadence script.

arguments
required
Array of strings <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)
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

Content type
application/json
{
  • "script": "string",
  • "arguments": [
    ],
  • "reference_block_id": "string",
  • "gas_limit": "string",
  • "payer": "string",
  • "proposal_key": {
    },
  • "authorizers": [
    ],
  • "payload_signatures": [
    ],
  • "envelope_signatures": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "script": "string",
  • "arguments": [
    ],
  • "reference_block_id": "string",
  • "gas_limit": "string",
  • "payer": "string",
  • "proposal_key": {
    },
  • "authorizers": [
    ],
  • "payload_signatures": [
    ],
  • "envelope_signatures": [
    ],
  • "result": {
    },
  • "_expandable": {},
  • "_links": {
    }
}

Collections

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

Content type
application/json
{
  • "id": "string",
  • "transactions": [
    ],
  • "_expandable": {},
  • "_links": {
    }
}

Execution Results

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

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

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "id": "string",
  • "block_id": "string",
  • "events": [
    ],
  • "chunks": [
    ],
  • "previous_result_id": "string",
  • "_links": {
    }
}

Accounts

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

Content type
application/json
{
  • "address": "string",
  • "balance": "string",
  • "keys": [
    ],
  • "contracts": {
    },
  • "_expandable": {
    },
  • "_links": {
    }
}

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

Content type
application/json
{
  • "index": "string",
  • "public_key": "string",
  • "signing_algorithm": "BLSBLS12381",
  • "hashing_algorithm": "SHA2_256",
  • "sequence_number": "string",
  • "weight": "string",
  • "revoked": true
}

Scripts

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 block_height instead.

string or string (BlockHeight)

The height of the block to execute the script against. This parameter is incompatible with block_id.

Request Body schema: application/json

The script to execute.

script
string <base64>

Base64 encoded content of the Cadence script.

arguments
Array of strings <byte>

An list of arguments each encoded as Base64 passed in the JSON-Cadence interchange format.

Responses

Request samples

Content type
application/json
{
  • "script": "string",
  • "arguments": [
    ]
}

Response samples

Content type
application/json
{
  • "value": "string"
}

Events

Get Events

Query on-chain events by their name in the specified blocks heights or block IDs.

query Parameters
type
required
string (EventType)
string or string (BlockHeight)

The start height of the block range for events. Must be used together with end_height. This parameter is incompatible with block_ids.

string or string (BlockHeight)

The end height of the block range for events. Must be used together with start_height. This parameter is incompatible with block_ids.

block_ids
Array of strings <hexadecimal> (Identifier) [ 1 .. 50 ] items unique

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

Content type
application/json
{
  • "block_id": "string",
  • "block_height": "string",
  • "block_timestamp": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "_links": {
    }
}

Network

Get Network Parameters

Get network-wide parameters of the blockchain

Responses

Response samples

Content type
application/json
{
  • "chain_id": "string"
}

NodeVersionInfo

Get Node Version Information

Get node version information, such as semver, commit, sporkID and protocol version.

Responses

Response samples

Content type
application/json
{
  • "semver": "string",
  • "commit": "string",
  • "spork_id": "string",
  • "protocol_version": "string",
  • "spork_root_block_height": "string",
  • "node_root_block_height": "string"
}