Download OpenAPI specification:Download
Welcome to the API reference overview for the Stacks Blockchain API.
[Download Postman collection](https://hirosystems.github.io/stacks-blockchain-api/collection.json)
Retrieves STX token balance for a given Address or Contract Identifier.
required | STX Address (string) or Smart Contract ID (string) |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "balance": "string",
- "estimated_balance": "string",
- "total_sent": "string",
- "total_received": "string",
- "total_fees_sent": "string",
- "total_miner_rewards_received": "string",
- "lock_tx_id": "string",
- "locked": "string",
- "lock_height": 0,
- "burnchain_lock_height": 0,
- "burnchain_unlock_height": 0,
- "token_offering_locked": {
- "total_locked": "string",
- "total_unlocked": "string",
- "unlock_schedule": [
- {
- "amount": "string",
- "block_height": 0
}
]
}
}
Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
required | STX Address (string) or Smart Contract ID (string) |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "stx": {
- "balance": "string",
- "estimated_balance": "string",
- "total_sent": "string",
- "total_received": "string",
- "total_fees_sent": "string",
- "total_miner_rewards_received": "string",
- "lock_tx_id": "string",
- "locked": "string",
- "lock_height": 0,
- "burnchain_lock_height": 0,
- "burnchain_unlock_height": 0
}, - "fungible_tokens": {
- "property1": {
- "balance": "string",
- "total_sent": "string",
- "total_received": "string"
}, - "property2": {
- "balance": "string",
- "total_sent": "string",
- "total_received": "string"
}
}, - "non_fungible_tokens": {
- "property1": {
- "count": "string",
- "total_sent": "string",
- "total_received": "string"
}, - "property2": {
- "count": "string",
- "total_sent": "string",
- "total_received": "string"
}
}, - "token_offering_locked": {
- "total_locked": "string",
- "total_unlocked": "string",
- "unlock_schedule": [
- {
- "amount": "string",
- "block_height": 0
}
]
}
}
NOTE: This endpoint is deprecated in favor of Get address transactions.
Retrieves a list of all Transactions for a given Address or Contract Identifier. More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types).
If you need to actively monitor new transactions for an address or contract id, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
height | integer Filter for transactions only at this given block height |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
NOTE: This endpoint is deprecated in favor of Get events for an address transaction.
Retrieves transaction details for a given Transaction Id `tx_id`, for a given account or contract Identifier.
required | STX Address (string) or Smart Contract ID (string) |
tx_id required | string Example: 0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448 Transaction ID |
{- "tx": {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}, - "stx_sent": "string",
- "stx_received": "string",
- "stx_transfers": [
- {
- "amount": "string",
- "sender": "string",
- "recipient": "string"
}
], - "ft_transfers": [
- {
- "amount": "string",
- "asset_identifier": "string",
- "sender": "string",
- "recipient": "string"
}
], - "nft_transfers": [
- {
- "value": {
- "hex": "string",
- "repr": "string"
}, - "asset_identifier": "string",
- "sender": "string",
- "recipient": "string"
}
]
}
Retrieve all transactions for an account or contract identifier including STX transfers for each transaction.
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
height | integer Filter for transactions only at this given block height |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx": {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}, - "stx_sent": "string",
- "stx_received": "string",
- "stx_transfers": [
- {
- "amount": "string",
- "sender": "string",
- "recipient": "string"
}
], - "ft_transfers": [
- {
- "amount": "string",
- "asset_identifier": "string",
- "sender": "string",
- "recipient": "string"
}
], - "nft_transfers": [
- {
- "value": {
- "hex": "string",
- "repr": "string"
}, - "asset_identifier": "string",
- "sender": "string",
- "recipient": "string"
}
]
}
]
}
Retrieves a list of all assets events associated with an account or a Contract Identifier. This includes Transfers, Mints.
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 100 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
]
}
Retrieves a list of STX transfers with memos to the given principal. This includes regular transfers from a stx-transfer transaction type,
and transfers from contract-call transactions a the send-many-memo
bulk sending contract.
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
height | integer Filter for transactions only at this given block height |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
until_block | string Examples:
Block hash or block height. Return data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time. |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "sender": "string",
- "amount": "string",
- "memo": "string",
- "block_height": 0,
- "tx_id": "string",
- "transfer_type": "bulk-send",
- "tx_index": 0
}
]
}
Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions.
required | STX Address (string) or Smart Contract ID (string) |
block_height | integer >= 1 Example: block_height=66119 Optionally get the nonce at a given block height. |
block_hash | string Example: block_hash=0x72d53f3cba39e149dcd42708e535bdae03d73e60d2fe853aaf61c0b392f521e9 Optionally get the nonce at a given block hash. Note - Use either of the query parameters but not both at a time. |
{- "last_mempool_tx_nonce": 0,
- "last_executed_tx_nonce": 0,
- "possible_next_nonce": 0,
- "detected_missing_nonces": [
- 0
], - "detected_mempool_nonces": [
- 0
]
}
NOTE: This endpoint is deprecated in favor of Get blocks.
Retrieves a list of recently mined blocks
If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
limit | integer (Limit) [ 0 .. 30 ] Default: 20 max number of blocks to fetch |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "txs": [
- "string"
], - "parent_microblock_hash": "string",
- "parent_microblock_sequence": 0,
- "microblocks_accepted": [
- "string"
], - "microblocks_streamed": [
- "string"
], - "microblock_tx_count": {
- "property1": 0,
- "property2": 0
}
}
]
}
NOTE: This endpoint is deprecated in favor of Get block.
Retrieves block details of a specific block at a given block height
height required | integer >= 0 Example: 10000 Height of the block |
{- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "txs": [
- "string"
], - "parent_microblock_hash": "string",
- "parent_microblock_sequence": 0,
- "microblocks_accepted": [
- "string"
], - "microblocks_streamed": [
- "string"
], - "microblock_tx_count": {
- "property1": 0,
- "property2": 0
}
}
NOTE: This endpoint is deprecated in favor of Get blocks.
Retrieves block details of a specific block for a given burn chain height
burn_block_height required | integer >= 0 Example: 744603 Height of the burn chain block |
{- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "txs": [
- "string"
], - "parent_microblock_hash": "string",
- "parent_microblock_sequence": 0,
- "microblocks_accepted": [
- "string"
], - "microblocks_streamed": [
- "string"
], - "microblock_tx_count": {
- "property1": 0,
- "property2": 0
}
}
NOTE: This endpoint is deprecated in favor of Get block.
Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block ('get_block_list' API) to get your block details.
hash required | string Example: 0x4839a8b01cfb39ffcc0d07d3db31e848d5adf5279d529ed5062300b9f353ff79 Hash of the block |
{- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "txs": [
- "string"
], - "parent_microblock_hash": "string",
- "parent_microblock_sequence": 0,
- "microblocks_accepted": [
- "string"
], - "microblocks_streamed": [
- "string"
], - "microblock_tx_count": {
- "property1": 0,
- "property2": 0
}
}
NOTE: This endpoint is deprecated in favor of Get blocks.
Retrieves block details of a specific block for a given burnchain block hash
burn_block_hash required | string Example: 0x00000000000000000002bba732926cf68b6eda3e2cdbc2a85af79f10efeeeb10 Hash of the burnchain block |
{- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "txs": [
- "string"
], - "parent_microblock_hash": "string",
- "parent_microblock_sequence": 0,
- "microblocks_accepted": [
- "string"
], - "microblocks_streamed": [
- "string"
], - "microblock_tx_count": {
- "property1": 0,
- "property2": 0
}
}
Retrieves a list of recently mined blocks
limit | integer (Limit) [ 0 .. 30 ] Default: 20 Results per page |
offset | integer (Offset) [ -300 .. 300 ] Default: 0 Result offset |
cursor | string Cursor for pagination |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "next_cursor": "string",
- "prev_cursor": "string",
- "cursor": "string",
- "results": [
- {
- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "parent_index_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "tx_count": 0,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0
}
]
}
Retrieves a single block
required | string or Block hash (string) or Block height (integer) |
{- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "parent_index_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "tx_count": 0,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0
}
Retrieves the signer signatures (an array of signature byte strings) in a single block
required | string or Block hash (string) or Block height (integer) |
limit | integer (Limit) [ 0 .. 1000 ] Default: 500 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- "string"
]
}
Retrieves a list of recent burn blocks
limit | integer (Limit) [ 0 .. 30 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "stacks_blocks": [
- "string"
], - "avg_block_time": 0,
- "total_tx_count": 0
}
]
}
Retrieves a single burn block
required | string or Burn block hash (string) or Burn block height (integer) |
{- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "stacks_blocks": [
- "string"
], - "avg_block_time": 0,
- "total_tx_count": 0
}
Retrieves a list of blocks confirmed by a specific burn block
required | string or Burn block hash (string) or Burn block height (integer) |
limit | integer (Limit) [ 0 .. 30 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "canonical": true,
- "height": 0,
- "hash": "string",
- "block_time": 0,
- "block_time_iso": "string",
- "tenure_height": 0,
- "index_block_hash": "string",
- "parent_block_hash": "string",
- "parent_index_block_hash": "string",
- "burn_block_time": 0,
- "burn_block_time_iso": "string",
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "miner_txid": "string",
- "tx_count": 0,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0
}
]
}
Add 1 BTC token to the specified testnet BTC address.
The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block
explorer. The tokens are delivered once the transaction has been included in a block.
**Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
address | string Example: address=2N4M94S1ZPt8HfxydXzL2P7qyzgVq7MHWts A valid testnet BTC address |
address | string A valid testnet BTC address |
null
{- "success": true,
- "txid": "string",
- "raw_tx": "string"
}
Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with ST
. If the stacking
parameter is set to true
, the faucet will add the required number of tokens for individual stacking to the
specified testnet address.
The endpoint returns the transaction ID, which you can use to view the transaction in the
[Stacks Explorer](https://explorer.hiro.so/?chain=testnet). The tokens are delivered once the transaction has
been included in an anchor block.
A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing
failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat).
**Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
address | string Example: address=ST3M7N9Q9HDRM7RVP1Q26P0EE69358PZZAZD7KMXQ A valid testnet STX address |
stacking | boolean Default: false Request the amount of STX tokens needed for individual address stacking |
address | string [Deprecated -- use query param rather than POST body] A valid testnet STX address |
null
{- "success": true,
- "txId": "string",
- "txRaw": "string"
}
NOTE: This endpoint is deprecated in favor of Get approximate fees for a given transaction.
Retrieves estimated fee rate.
Request to fetch fee for a transaction
transaction required | string A serialized transaction |
{- "transaction": "string"
}
{- "fee_rate": 0
}
Read-only endpoints to obtain network, Proof-of-Transfer, Stacking, STX token, and node information
Retrieves the running status of the Stacks Blockchain API, including the server version and current chain tip information.
{- "server_version": "string",
- "status": "string",
- "pox_v1_unlock_height": 0,
- "pox_v2_unlock_height": 0,
- "pox_v3_unlock_height": 0,
- "chain_tip": {
- "block_height": 0,
- "block_hash": "string",
- "index_block_hash": "string",
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "burn_block_height": 0
}
}
Retrieves the total and unlocked STX supply. More information on Stacking can be found [here] (https://docs.stacks.co/understand-stacks/stacking).
height | integer (Block height) >= 0 Example: height=777678 Supply details are queried from specified block height. If the block height is not specified, the latest block height is taken as default value. Note that the |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "unlocked_percent": "string",
- "total_stx": "string",
- "total_stx_year_2050": "string",
- "unlocked_stx": "string",
- "block_height": 0
}
Retrieves total supply of STX tokens including those currently in circulation that have been unlocked.
height | integer (Block height) >= 0 Example: height=777678 Supply details are queried from specified block height. If the block height is not specified, the latest block height is taken as default value. Note that the |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "unlockedPercent": "string",
- "totalStacks": "string",
- "totalStacksFormatted": "string",
- "totalStacksYear2050": "string",
- "totalStacksYear2050Formatted": "string",
- "unlockedSupply": "string",
- "unlockedSupplyFormatted": "string",
- "blockHeight": "string"
}
Retrieves the target block times for mainnet and testnet. The block time is hardcoded and will change throughout the implementation phases of the testnet.
{- "mainnet": {
- "target_block_time": 0
}, - "testnet": {
- "target_block_time": 0
}
}
Retrieves the target block time for a given network. The network can be mainnet or testnet. The block time is hardcoded and will change throughout the implementation phases of the testnet.
required | string or string |
{- "target_block_time": 0
}
Retrieves a list of microblocks.
If you need to actively monitor new microblocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
limit | integer (Limit) [ 0 .. 200 ] Default: 20 Max number of microblocks to fetch |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "canonical": true,
- "microblock_canonical": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_parent_hash": "string",
- "block_height": 0,
- "parent_block_height": 0,
- "parent_block_hash": "string",
- "parent_burn_block_hash": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "parent_burn_block_height": 0,
- "block_hash": "string",
- "txs": [
- "string"
]
}
]
}
Retrieves a specific microblock by hash
hash required | string Example: 0x3bfcdf84b3012adb544cf0f6df4835f93418c2269a3881885e27b3d58eb82d47 Hash of the microblock |
{- "canonical": true,
- "microblock_canonical": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_parent_hash": "string",
- "block_height": 0,
- "parent_block_height": 0,
- "parent_block_hash": "string",
- "parent_burn_block_hash": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "parent_burn_block_height": 0,
- "block_hash": "string",
- "txs": [
- "string"
]
}
Retrieves transactions that have been streamed in microblocks but not yet accepted or rejected in an anchor block
{- "total": 0,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Read-only endpoints realted to the Blockchain Naming System on Stacks
Retrieves the historical zonefile specified by the username and zone hash.
name required | string Example: muneeb.id fully-qualified name |
zoneFileHash required | string Example: b100a68235244b012854a95f9114695679002af9 zone file hash |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "zonefile": "string"
}
Retrieves the list of subdomains for a specific name
name required | string Example: id.blockstack fully-qualified name |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
[- "address_test.id.blockstack",
- "previous_subdomain.id.blockstack",
- "subdomain.id.blockstack",
- "zonefile_test.id.blockstack",
- "zone_test.id.blockstack"
]
Retrieves a user's raw zone file. This only works for RFC-compliant zone files. This method returns an error for names that have non-standard zone files.
name required | string Example: bar.test fully-qualified name |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "zonefile": "$ORIGIN bar.test\n$TTL 3600\n_https._tcp URI 10 1 \"https://gaia.blockstack.org/hub/17Zijx61Sp7SbVfRTdETo7PhizJHYEUxbY/profile.json\"\n"
}
Retrieves a list of all names known to the node.
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
page | integer >= 0 Default: 0 names are defaulted to page 1 with 100 results. You can query specific page results by using the 'page' query parameter. |
"aldenquimby.id"
Retrieves details of a given name including the address
, status
and last transaction id - last_txid
.
name required | string Example: muneeb.id fully-qualified name |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "address": "1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs",
- "blockchain": "stacks",
- "expire_block": 599266,
- "grace_period": false,
- "last_txid": "1edfa419f7b83f33e00830bc9409210da6c6d1db60f99eda10c835aa339cad6b",
- "renewal_deadline": 604266,
- "resolver": null,
- "status": "registered",
- "zonefile": "$ORIGIN muneeb.id\n$TTL 3600\n_http._tcp IN URI 10 1 \"https://gaia.blockstack.org/hub/1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs/0/profile.json\"\n",
- "zonefile_hash": "37aecf837c6ae9bdc9dbd98a268f263dacd00361"
}
Retrieves a list of names within a given namespace.
tld required | string Example: id the namespace to fetch names from. |
page | number Example: page=22 namespace values are defaulted to page 1 with 100 results. You can query specific page results by using the 'page' query parameter. |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
[- "aldenquimby.id",
- "aldeoryn.id",
- "alderete.id",
- "aldert.id",
- "aldi.id",
- "aldighieri.id"
]
Retrieves a list of names owned by the address provided.
blockchain required | string Example: stacks the layer-1 blockchain for the address |
address required | string Example: SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7 the address to lookup |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "names": [
- "muneeb.id"
]
}
Retrieves the price of a namespace. The amount
given will be in the smallest possible units of the currency.
tld required | string Example: id the namespace to fetch price for |
{- "units": "string",
- "amount": "string"
}
Retrieves the price of a name. The amount
given will be in the smallest possible units of the currency.
name required | string Example: muneeb.id the name to query price information for |
{- "units": "string",
- "amount": "string"
}
Read-only endpoints to obtain non-fungible token details
Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token.
More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
required | STX Address (string) or Smart Contract ID (string) |
asset_identifiers | Array of strings |
limit | integer (Limit) [ 0 .. 200 ] Default: 50 max number of tokens to fetch |
offset | integer (Offset) >= 0 Default: 0 index of first tokens to fetch |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
tx_metadata required | boolean Default: false whether or not to include the complete transaction metadata instead of just |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "asset_identifier": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}, - "block_height": 0,
- "tx_id": "string"
}
]
}
Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset.
More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
asset_identifier required | string Example: asset_identifier=SP2X0TZ59D5SZ8ACQ6YMCHHNR2ZN51Z32E2CJ173.the-explorer-guild::The-Explorer-Guild asset class identifier |
value required | string Example: value=0x0100000000000000000000000000000803 hex representation of the token's unique value |
limit | integer (Limit) [ 0 .. 200 ] Default: 50 max number of events to fetch |
offset | integer (Offset) >= 0 Default: 0 index of first event to fetch |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
tx_metadata required | boolean Default: false whether or not to include the complete transaction metadata instead of just |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "sender": "string",
- "recipient": "string",
- "event_index": 0,
- "asset_event_type": "string",
- "tx_id": "string"
}
]
}
Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed.
More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
asset_identifier required | string Example: asset_identifier=SP2X0TZ59D5SZ8ACQ6YMCHHNR2ZN51Z32E2CJ173.the-explorer-guild::The-Explorer-Guild asset class identifier |
limit | integer (Limit) [ 0 .. 200 ] Default: 50 max number of events to fetch |
offset | integer (Offset) >= 0 Default: 0 index of first event to fetch |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
tx_metadata required | boolean Default: false whether or not to include the complete transaction metadata instead of just |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "recipient": "string",
- "event_index": 0,
- "value": {
- "hex": "string",
- "repr": "string"
}, - "tx_id": "string"
}
]
}
Endpoints to support the Rosetta API open blockchain standard
Search blocks, transactions, contracts, or accounts by hash/ID
id required | string Example: 0xcf8b233f19f6c07d2dc1963302d2436efd36e9afac127bf6582824a13961c06d The hex hash string for a block or transaction, account address, or contract address |
include_metadata | boolean Default: false This includes the detailed data for purticular hash in the response |
{- "found": true,
- "result": {
- "entity_id": "string",
- "entity_type": "standard_address",
- "metadata": {
- "balance": "string",
- "estimated_balance": "string",
- "total_sent": "string",
- "total_received": "string",
- "total_fees_sent": "string",
- "total_miner_rewards_received": "string",
- "lock_tx_id": "string",
- "locked": "string",
- "lock_height": 0,
- "burnchain_lock_height": 0,
- "burnchain_unlock_height": 0,
- "token_offering_locked": {
- "total_locked": "string",
- "total_unlocked": "string",
- "unlock_schedule": [
- {
- "amount": "string",
- "block_height": 0
}
]
}
}
}
}
Read-only endpoints to obtain Clarity smart contract details
Retrieves a list of contracts based on the following traits listed in JSON format - functions, variables, maps, fungible tokens and non-fungible tokens
trait_abi required | string JSON abi of the trait. |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 max number of contracts fetch |
offset | integer (Offset) >= 0 Default: 0 index of first contract event to fetch |
{- "limit": 20,
- "offset": 0,
- "results": [
- {
- "tx_id": "string",
- "canonical": true,
- "contract_id": "string",
- "block_height": 0,
- "clarity_version": 0,
- "source_code": "string",
- "abi": "string"
}
]
}
Retrieves details of a contract with a given contract_id
contract_id required | string Example: SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles Contract identifier formatted as |
{- "tx_id": "string",
- "canonical": true,
- "contract_id": "string",
- "block_height": 0,
- "clarity_version": 0,
- "source_code": "string",
- "abi": "string"
}
Retrieves a list of events that have been triggered by a given contract_id
contract_id required | string Example: SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles Contract identifier formatted as |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 max number of events to fetch |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 0,
- "offset": 0,
- "results": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
]
}
Retrieves the deployment status of multiple smart contracts.
required | Array of Smart Contract ID (strings) or Smart Contract ID (string) |
{- "property1": {
- "found": true,
- "result": {
- "status": "string",
- "tx_id": "string",
- "contract_id": "string",
- "block_height": 0
}
}, - "property2": {
- "found": true,
- "result": {
- "status": "string",
- "tx_id": "string",
- "contract_id": "string",
- "block_height": 0
}
}
}
Read-only endpoints to obtain Stacking reward details
Retrieves a list of the Bitcoin addresses that would validly receive Proof-of-Transfer commitments.
limit | integer (Limit) [ 0 .. 250 ] Default: 96 max number of items to fetch |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "canonical": true,
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "address": "string",
- "slot_index": 0
}
]
}
Retrieves a list of the Bitcoin addresses that would validly receive Proof-of-Transfer commitments for a given reward slot holder recipient address.
address required | string Example: 36hQtSEXBMevo5chpxhfAGiCTSC34QKgda Reward slot holder recipient address. Should either be in the native burnchain's format (e.g. B58 for Bitcoin), or if a STX principal address is provided it will be encoded as into the equivalent burnchain format |
limit | integer (Limit) [ 0 .. 250 ] Default: 96 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "canonical": true,
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "address": "string",
- "slot_index": 0
}
]
}
Retrieves a list of recent burnchain (e.g. Bitcoin) reward recipients with the associated amounts and block info
limit | integer (Limit) [ 0 .. 250 ] Default: 96 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 0,
- "offset": 0,
- "results": [
- {
- "canonical": true,
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "burn_amount": "string",
- "reward_recipient": "string",
- "reward_amount": "string",
- "reward_index": 0
}
]
}
Retrieves a list of recent burnchain (e.g. Bitcoin) rewards for the given recipient with the associated amounts and block info
address required | string Example: 36hQtSEXBMevo5chpxhfAGiCTSC34QKgda Reward recipient address. Should either be in the native burnchain's format (e.g. B58 for Bitcoin), or if a STX principal address is provided it will be encoded as into the equivalent burnchain format |
limit | integer (Limit) [ 0 .. 250 ] Default: 96 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 0,
- "offset": 0,
- "results": [
- {
- "canonical": true,
- "burn_block_hash": "string",
- "burn_block_height": 0,
- "burn_amount": "string",
- "reward_recipient": "string",
- "reward_amount": "string",
- "reward_index": 0
}
]
}
Retrieves the total burnchain (e.g. Bitcoin) rewards for a given recipient address
address required | string Example: 36hQtSEXBMevo5chpxhfAGiCTSC34QKgda Reward recipient address. Should either be in the native burnchain's format (e.g. B58 for Bitcoin), or if a STX principal address is provided it will be encoded as into the equivalent burnchain format |
{- "reward_recipient": "string",
- "reward_amount": "string"
}
Endpoints to obtain transaction details and to broadcast transactions to the network
Retrieves all recently mined transactions
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
Array of strings or strings or strings or strings or strings or strings | |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
string or string | |
string or string or string Default: "block_height" Option to sort results by block height, timestamp, or fee | |
from_address | string Option to filter results by sender address |
to_address | string Option to filter results by recipient address |
start_time | integer Example: start_time=1704067200 Filter by transactions after this timestamp (unix timestamp in seconds) |
end_time | integer Example: end_time=1706745599 Filter by transactions before this timestamp (unix timestamp in seconds) |
contract_id | string Example: contract_id=SP000000000000000000002Q6VF78.pox-4 Option to filter results by contract ID |
function_name | string Example: function_name=delegate-stx Filter by contract call transactions involving this function name |
nonce | integer [ 0 .. 9007199254740991 ] Example: nonce=123 Filter by transactions with this nonce |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Retrieves a list of transactions for a given list of transaction IDs
tx_id required | Array of strings (Transaction ID) [^(0x)?[a-fA-F0-9]{64}$] |
event_limit | integer (Limit) [ 0 .. 100 ] Default: 20 Results per page |
event_offset | integer (Offset) >= 0 Default: 0 Result offset |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "property1": {
- "found": true,
- "result": {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
}, - "property2": {
- "found": true,
- "result": {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
}
}
Retrieves all transactions that have been recently broadcast to the mempool. These are pending transactions awaiting confirmation.
If you need to monitor new transactions, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
sender_address | string (STX Address) ^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41} Example: sender_address=SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP STX Address |
recipient_address | string (STX Address) ^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41} Example: recipient_address=SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP STX Address |
address | string (STX Address) ^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41} Example: address=SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP STX Address |
Order By (string) or Order By (string) or Order By (string) (Order By) Option to sort results by transaction age, size, or fee rate. | |
Order (string) or Order (string) (Order) Results order | |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "tx_status": "pending",
- "receipt_time": 0,
- "receipt_time_iso": "string",
- "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Retrieves all recently-broadcast transactions that have been dropped from the mempool.
Transactions are dropped from the mempool if:
* they were stale and awaiting garbage collection or,
* were expensive, or
* were replaced with a new fee
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "tx_status": "pending",
- "receipt_time": 0,
- "receipt_time_iso": "string",
- "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Queries for transactions counts, age (by block height), fees (simple average), and size. All results broken down by transaction type and percentiles (p25, p50, p75, p95).
{- "tx_type_counts": {
- "property1": 0,
- "property2": 0
}, - "tx_simple_fee_averages": {
- "property1": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}, - "property2": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}
}, - "tx_ages": {
- "property1": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}, - "property2": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}
}, - "tx_byte_sizes": {
- "property1": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}, - "property2": {
- "p25": 0,
- "p50": 0,
- "p75": 0,
- "p95": 0
}
}
}
Retrieves the list of events filtered by principal (STX address or Smart Contract ID), transaction id or event types. The list of event types is ('smart_contract_log', 'stx_lock', 'stx_asset', 'fungible_token_asset', 'non_fungible_token_asset').
tx_id | string (Transaction ID) ^(0x)?[a-fA-F0-9]{64}$ Example: tx_id=0xf6bd5f4a7b26184a3466340b2e99fd003b4962c0e382a7e4b6a13df3dd7a91c6 Transaction ID |
STX Address (string) or Smart Contract ID (string) | |
Array of strings or strings or strings or strings or strings | |
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 100 ] Default: 20 Results per page |
{- "limit": 20,
- "offset": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
]
}
Retrieves transaction details for a given transaction ID
tx_id required | string (Transaction ID) ^(0x)?[a-fA-F0-9]{64}$ Example: 0xf6bd5f4a7b26184a3466340b2e99fd003b4962c0e382a7e4b6a13df3dd7a91c6 Transaction ID |
event_limit | integer (Limit) [ 0 .. 100 ] Default: 20 Results per page |
event_offset | integer (Offset) >= 0 Default: 0 Result offset |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "tx_status": "pending",
- "receipt_time": 0,
- "receipt_time_iso": "string",
- "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
Retrieves a hex encoded serialized transaction for a given ID
tx_id required | string (Transaction ID) ^(0x)?[a-fA-F0-9]{64}$ Example: 0xf6bd5f4a7b26184a3466340b2e99fd003b4962c0e382a7e4b6a13df3dd7a91c6 Transaction ID |
event_limit | integer (Limit) [ 0 .. 100 ] Default: 20 Results per page |
event_offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "raw_tx": "string"
}
NOTE: This endpoint is deprecated in favor of Get transactions by block.
Retrieves a list of all transactions within a block for a given block hash.
block_hash required | string |
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 200 ] Default: 20 Results per page |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
NOTE: This endpoint is deprecated in favor of Get transactions by block.
Retrieves all transactions within a block at a given height
height required | integer (Block height) >= 0 Example: 777678 Block height |
offset | integer (Offset) >= 0 Default: 0 Result offset |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Retrieves all transactions for a given address that are currently in mempool
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "tx_status": "pending",
- "receipt_time": 0,
- "receipt_time_iso": "string",
- "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Retrieves transactions confirmed in a single block
required | string or Block hash (string) or Block height (integer) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}
]
}
Retrieves a paginated list of confirmed transactions sent or received by a STX address or Smart Contract ID, alongside the total amount of STX sent or received and the number of STX, FT and NFT transfers contained within each transaction.
More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types).
required | STX Address (string) or Smart Contract ID (string) |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "tx": {
- "tx_id": "string",
- "nonce": 0,
- "fee_rate": "string",
- "sender_address": "string",
- "sponsor_nonce": 0,
- "sponsored": true,
- "sponsor_address": "string",
- "post_condition_mode": "allow",
- "post_conditions": [
- {
- "principal": {
- "type_id": "principal_origin"
}, - "condition_code": "sent_equal_to",
- "amount": "string",
- "type": "stx"
}
], - "anchor_mode": "on_chain_only",
- "block_hash": "string",
- "block_height": 0,
- "block_time": 0,
- "block_time_iso": "string",
- "burn_block_time": 0,
- "burn_block_height": 0,
- "burn_block_time_iso": "string",
- "parent_burn_block_time": 0,
- "parent_burn_block_time_iso": "string",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "string",
- "repr": "string"
}, - "event_count": 0,
- "parent_block_hash": "string",
- "is_unanchored": true,
- "microblock_hash": "string",
- "microblock_sequence": 0,
- "microblock_canonical": true,
- "execution_cost_read_count": 0,
- "execution_cost_read_length": 0,
- "execution_cost_runtime": 0,
- "execution_cost_write_count": 0,
- "execution_cost_write_length": 0,
- "events": [
- {
- "event_index": 0,
- "event_type": "smart_contract_log",
- "tx_id": "string",
- "contract_log": {
- "contract_id": "string",
- "topic": "string",
- "value": {
- "hex": "string",
- "repr": "string"
}
}
}
], - "tx_type": "token_transfer",
- "token_transfer": {
- "recipient_address": "string",
- "amount": "string",
- "memo": "string"
}
}, - "stx_sent": "string",
- "stx_received": "string",
- "events": {
- "stx": {
- "transfer": 0,
- "mint": 0,
- "burn": 0
}, - "ft": {
- "transfer": 0,
- "mint": 0,
- "burn": 0
}, - "nft": {
- "transfer": 0,
- "mint": 0,
- "burn": 0
}
}
}
]
}
Retrieves a paginated list of all STX, FT and NFT events concerning a STX address or Smart Contract ID within a specific transaction.
required | STX Address (string) or Smart Contract ID (string) |
tx_id required | string (Transaction ID) ^(0x)?[a-fA-F0-9]{64}$ Example: 0xf6bd5f4a7b26184a3466340b2e99fd003b4962c0e382a7e4b6a13df3dd7a91c6 Transaction ID |
limit | integer (Limit) [ 0 .. 50 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "type": "stx",
- "event_index": 0,
- "data": {
- "type": "transfer",
- "amount": "string",
- "sender": "string",
- "recipient": "string"
}
}
]
}
Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
{- "all": {
- "no_priority": 0,
- "low_priority": 0,
- "medium_priority": 0,
- "high_priority": 0
}, - "token_transfer": {
- "no_priority": 0,
- "low_priority": 0,
- "medium_priority": 0,
- "high_priority": 0
}, - "contract_call": {
- "no_priority": 0,
- "low_priority": 0,
- "medium_priority": 0,
- "high_priority": 0
}, - "smart_contract": {
- "no_priority": 0,
- "low_priority": 0,
- "medium_priority": 0,
- "high_priority": 0
}
}
Retrieves a list of PoX cycles
limit | integer (Limit) [ 0 .. 60 ] Default: 20 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "block_height": 0,
- "index_block_hash": "string",
- "cycle_number": 0,
- "total_weight": 0,
- "total_stacked_amount": "string",
- "total_signers": 0
}
]
}
Retrieves details for a PoX cycle
cycle_number required | integer PoX cycle number |
{- "block_height": 0,
- "index_block_hash": "string",
- "cycle_number": 0,
- "total_weight": 0,
- "total_stacked_amount": "string",
- "total_signers": 0
}
Retrieves a list of signers in a PoX cycle
cycle_number required | integer PoX cycle number |
limit | integer (Limit) [ 0 .. 250 ] Default: 100 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "signing_key": "string",
- "signer_address": "string",
- "weight": 0,
- "stacked_amount": "string",
- "weight_percent": 0,
- "stacked_amount_percent": 0,
- "solo_stacker_count": 0,
- "pooled_stacker_count": 0
}
]
}
Retrieves details for a signer in a PoX cycle
cycle_number required | integer PoX cycle number |
signer_key required | string Example: 0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d Signer key |
{- "signing_key": "string",
- "signer_address": "string",
- "weight": 0,
- "stacked_amount": "string",
- "weight_percent": 0,
- "stacked_amount_percent": 0,
- "solo_stacker_count": 0,
- "pooled_stacker_count": 0
}
Retrieves a list of stackers for a signer in a PoX cycle
cycle_number required | integer PoX cycle number |
signer_key required | string Example: 0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d Signer key |
limit | integer (Limit) [ 0 .. 200 ] Default: 100 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "stacker_address": "string",
- "stacked_amount": "string",
- "pox_address": "string",
- "stacker_type": "solo"
}
]
}
Retrieves the list of Fungible Token holders for a given token ID. Specify stx
for the token
parameter to get the list of STX holders.
token required | string Examples:
fungible token identifier |
limit | integer (Limit) [ 0 .. 200 ] Default: 100 max number of holders to fetch |
offset | integer (Offset) >= 0 Default: 0 index of first holder to fetch |
{- "total_supply": "5817609278457",
- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "address": "SP3G2QZHYDZPJ2FBN2V2MB74T5ZQ6FQK2P5QJ2K6",
- "balance": "174823763"
}
]
}
Retrieves the list of stacking pool members for a given delegator principal.
required | string or string or string |
pool_principal required | string Example: SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11 Address principal of the stacking pool delegator |
limit | integer (Limit) [ 0 .. 200 ] Default: 100 Results per page |
offset | integer (Offset) >= 0 Default: 0 Result offset |
after_block | integer >= 1 If specified, only delegation events after the given block will be included |
height | integer >= 1 |
unanchored | boolean Default: false Example: unanchored=true Include data from unanchored (i.e. unconfirmed) microblocks |
{- "limit": 20,
- "offset": 0,
- "total": 1,
- "results": [
- {
- "stacker": "string",
- "pox_addr": "string",
- "amount_ustx": "string",
- "burn_block_unlock_height": 0,
- "block_height": 0,
- "tx_id": "string"
}
]
}