Home

Stacks Blockchain API

vv8.11.4
Base URLs
https://stacks.nownodes.io
https://stacks.nownodes.ioLocal

Authentication

api-keyAuthapiKey

API Key: api-key in header

Node

Accounts

Read-only endpoints to obtain Stacks account details

Get account assets

GET
https://stacks.nownodes.io/extended/v1/address/{principal}/assets

Retrieves a list of all assets events associated with an account or a Contract Identifier. This includes Transfers, Mints.

Parameters

limitinteger[0, 100]20query

Results per page

offsetinteger>= 00query

Result offset

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

until_blockstringquery

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.

principalstring | stringrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get inbound STX transfers

GET
https://stacks.nownodes.io/extended/v1/address/{principal}/stx_inbound

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.

Parameters

limitinteger[0, 50]20query

Results per page

offsetinteger>= 00query

Result offset

heightintegerquery

Filter for transactions only at this given block height

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

until_blockstringquery

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.

principalstring | stringrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get the latest nonce used by an account

GET
https://stacks.nownodes.io/extended/v1/address/{principal}/nonces

Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions.

Parameters

block_heightinteger>= 1query

Optionally get the nonce at a given block height.

block_hashstringquery

Optionally get the nonce at a given block hash. Note - Use either of the query parameters but not both at a time.

principalstring | stringrequiredpath

Response

200OK

The latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get principal STX balance

GET
https://stacks.nownodes.io/extended/v2/addresses/{principal}/balances/stx

Retrieves STX account balance information for a given Address or Contract Identifier.

Parameters

include_mempoolbooleanfalsequery

Include pending mempool transactions in the balance calculation

principalstring | stringrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get principal FT balances

GET
https://stacks.nownodes.io/extended/v2/addresses/{principal}/balances/ft

Retrieves Fungible-token account balance information for a given Address or Contract Identifier.

Parameters

limitinteger[0, 200]100query

Results per page

offsetinteger>= 00query

Result offset

principalstring | stringrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get principal FT balance

GET
https://stacks.nownodes.io/extended/v2/addresses/{principal}/balances/ft/{token}

Retrieves a specific fungible-token balance for a given principal.

Parameters

principalstring | stringrequiredpath
tokenstringrequiredpath

fungible token identifier

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Blocks

Read-only endpoints to obtain Stacks block details

Get blocks

GET
https://stacks.nownodes.io/extended/v2/blocks

Retrieves a list of recently mined blocks

Parameters

limitinteger[0, 30]20query

Results per page

offsetinteger[-300, 300]0query

Result offset

cursorstringquery

Cursor for block pagination

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get average block times

GET
https://stacks.nownodes.io/extended/v2/blocks/average-times

Retrieves average block times (in seconds)

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get block

GET
https://stacks.nownodes.io/extended/v2/blocks/{height_or_hash}

Retrieves a single block

Parameters

height_or_hashstring | string | integerrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get signer signatures for block

GET
https://stacks.nownodes.io/extended/v2/blocks/{height_or_hash}/signer-signatures

Retrieves the signer signatures (an array of signature byte strings) in a single block

Parameters

limitinteger[0, 1000]500query

Results per page

offsetinteger>= 00query

Result offset

height_or_hashstring | string | integerrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get blocks by tenure

GET
https://stacks.nownodes.io/extended/v2/block-tenures/{tenure_height}/blocks

Retrieves blocks confirmed in a block tenure

Parameters

limitinteger[0, 30]20query

Results per page

offsetinteger[-300, 300]0query

Result offset

cursorstringquery

Cursor for block pagination

tenure_heightinteger>= 0requiredpath

Block tenure height

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Burn Blocks

Read-only endpoints to obtain burn block details

Get burn blocks

GET
https://stacks.nownodes.io/extended/v2/burn-blocks

Retrieves a list of recent burn blocks

Parameters

limitinteger[0, 30]20query

Results per page

offsetinteger>= 00query

Result offset

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get burn block

GET
https://stacks.nownodes.io/extended/v2/burn-blocks/{height_or_hash}

Retrieves a single burn block

Parameters

height_or_hashstring | string | integerrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get blocks by burn block

GET
https://stacks.nownodes.io/extended/v2/burn-blocks/{height_or_hash}/blocks

Retrieves a list of blocks confirmed by a specific burn block

Parameters

limitinteger[0, 30]20query

Results per page

offsetinteger>= 00query

Result offset

height_or_hashstring | string | integerrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Faucets

Endpoints to request STX or BTC tokens (not possible on Mainnet)

Add regtest BTC tokens to address

POST
https://stacks.nownodes.io/extended/v1/faucets/btc

Add 0.01 BTC token to the specified regtest BTC address.

Copied!
    The endpoint returns the transaction ID, which you can use to view the transaction in a regtest Bitcoin block
    explorer. The tokens are delivered once the transaction has been included in a block.

    **Note:** This is a Bitcoin regtest-only endpoint. This endpoint will not work on the Bitcoin mainnet.

Body

application/json
Any of
addressstring

A valid regtest BTC address

Parameters

addressstringquery

A valid regtest BTC address

largebooleanfalsequery

Request a large amount of regtest BTC than the default

xlargebooleanfalsequery

Request an extra large amount of regtest BTC than the default

Response

200OK

POST request that initiates a transfer of tokens to a specified Bitcoin regtest address

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get BTC balance for address

GET
https://stacks.nownodes.io/extended/v1/faucets/btc/{address}

Parameters

addressstringrequiredpath

A valid regtest BTC address

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get STX testnet tokens

POST
https://stacks.nownodes.io/extended/v1/faucets/stx

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.

Copied!
    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.

Body

application/json
Any of
addressstring

[Deprecated -- use query param rather than POST body] A valid testnet STX address

Parameters

addressstringquery

A valid testnet STX address

stackingbooleanfalsequery

Request the amount of STX tokens needed for individual address stacking

Response

200OK

POST request that initiates a transfer of tokens to a specified testnet address

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Info

Read-only endpoints to obtain network, Proof-of-Transfer, Stacking, STX token, and node information

API status

GET
https://stacks.nownodes.io/extended

Retrieves the running status of the Stacks Blockchain API, including the server version and current chain tip information.

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get total and unlocked STX supply

GET
https://stacks.nownodes.io/extended/v1/stx_supply

Retrieves the total and unlocked STX supply. More information on Stacking can be found [here] (https://docs.stacks.co/understand-stacks/stacking).

Parameters

heightinteger>= 0query

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 block height is referred to the stacks blockchain.

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

Response

200OK

GET request that returns network target block times

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get the network target block time

GET
https://stacks.nownodes.io/extended/v1/info/network_block_times

Retrieves the target block times for mainnet and testnet. The block time is hardcoded and will change throughout the implementation phases of the testnet.

Response

200OK

GET request that returns network target block times

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get a given network's target block time

GET
https://stacks.nownodes.io/extended/v1/info/network_block_time/{network}

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.

Parameters

networkstring | stringrequiredpath

Response

200OK

GET request that target block time for a given network

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Microblocks

Read-only endpoints to obtain microblocks details

Get recent microblocks

GET
https://stacks.nownodes.io/extended/v1/microblock

Retrieves a list of microblocks.

Copied!
      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.

Parameters

limitinteger[0, 200]20query

Max number of microblocks to fetch

offsetinteger>= 00query

Result offset

Response

200OK

GET request that returns microblocks

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get microblock

GET
https://stacks.nownodes.io/extended/v1/microblock/{hash}

Retrieves a specific microblock by hash

Parameters

hashstringrequiredpath

Hash of the microblock

Response

200OK

A microblock

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get the list of current transactions that belong to unanchored microblocks

GET
https://stacks.nownodes.io/extended/v1/microblock/unanchored/txs

Retrieves transactions that have been streamed in microblocks but not yet accepted or rejected in an anchor block

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Names

Read-only endpoints realted to the Blockchain Naming System on Stacks

Get Historical Zone File

GET
https://stacks.nownodes.io/v1/names/{name}/zonefile/{zoneFileHash}

Retrieves the historical zonefile specified by the username and zone hash.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

namestringrequiredpath

fully-qualified name

zoneFileHashstringrequiredpath

zone file hash

Response

200OK

Fetches the historical zonefile specified by the username and zone hash.

400Bad Request

Error

Authorization

api-keyAuthapiKey in header

Get Name Subdomains

GET
https://stacks.nownodes.io/v1/names/{name}/subdomains

Retrieves the list of subdomains for a specific name

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

namestringrequiredpath

fully-qualified name

Response

200OK

Fetch a list of subdomains in a name.

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get Zone File

GET
https://stacks.nownodes.io/v1/names/{name}/zonefile

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.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

namestringrequiredpath

fully-qualified name

Response

200OK

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

400Bad Request

Error

Authorization

api-keyAuthapiKey in header

Get All Names

GET
https://stacks.nownodes.io/v1/names

Retrieves a list of all names known to the node.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

pageinteger>= 00query

names are defaulted to page 1 with 100 results. You can query specific page results by using the 'page' query parameter.

Response

200OK

Fetch a list of all names known to the node.

400Bad Request

Error

Authorization

api-keyAuthapiKey in header

Get Name Details

GET
https://stacks.nownodes.io/v1/names/{name}

Retrieves details of a given name including the address, status and last transaction id - last_txid.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

namestringrequiredpath

fully-qualified name

Response

200OK

Get name details

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get All Namespaces

GET
https://stacks.nownodes.io/v1/namespaces

Retrieves a list of all namespaces known to the node.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get Namespace Names

GET
https://stacks.nownodes.io/v1/namespaces/{tld}/names

Retrieves a list of names within a given namespace.

Parameters

pagenumberquery

namespace values are defaulted to page 1 with 100 results. You can query specific page results by using the 'page' query parameter.

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

tldstringrequiredpath

the namespace to fetch names from.

Response

200OK

Fetch a list of names from the namespace.

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get Names Owned by Address

GET
https://stacks.nownodes.io/v1/addresses/{blockchain}/{address}

Retrieves a list of names owned by the address provided.

Parameters

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

blockchainstringrequiredpath

the layer-1 blockchain for the address

addressstringrequiredpath

the address to lookup

Response

200OK

Retrieves a list of names owned by the address provided.

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get Namespace Price

GET
https://stacks.nownodes.io/v2/prices/namespaces/{tld}

Retrieves the price of a namespace. The amount given will be in the smallest possible units of the currency.

Parameters

tldstringrequiredpath

the namespace to fetch price for

Response

200OK

Fetch price for namespace.

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get Name Price

GET
https://stacks.nownodes.io/v2/prices/names/{name}

Retrieves the price of a name. The amount given will be in the smallest possible units of the currency.

Parameters

namestringrequiredpath

the name to query price information for

Response

200OK

Fetch price for name.

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Non-Fungible Tokens

Read-only endpoints to obtain non-fungible token details

Non-Fungible Token holdings

GET
https://stacks.nownodes.io/extended/v1/tokens/nft/holdings

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.

Copied!
    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).

Parameters

principalstring | stringrequiredquery
asset_identifiersArray<string>query
limitinteger[0, 200]50query

max number of tokens to fetch

offsetinteger>= 00query

index of first tokens to fetch

tx_metadatabooleanfalserequiredquery

whether or not to include the complete transaction metadata instead of just tx_id. Enabling this option can affect performance and response times.

Response

200OK

List of Non-Fungible Token holdings

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Non-Fungible Token history

GET
https://stacks.nownodes.io/extended/v1/tokens/nft/history

Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset.

Copied!
    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).

Parameters

asset_identifierstringrequiredquery

asset class identifier

valuestringrequiredquery

hex representation of the token's unique value

limitinteger[0, 200]50query

max number of events to fetch

offsetinteger>= 00query

index of first event to fetch

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

tx_metadatabooleanfalserequiredquery

whether or not to include the complete transaction metadata instead of just tx_id. Enabling this option can affect performance and response times.

Response

200OK

List of Non-Fungible Token history events

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Non-Fungible Token mints

GET
https://stacks.nownodes.io/extended/v1/tokens/nft/mints

Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed.

Copied!
    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).

Parameters

asset_identifierstringrequiredquery

asset class identifier

limitinteger[0, 200]50query

max number of events to fetch

offsetinteger>= 00query

index of first event to fetch

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

tx_metadatabooleanfalserequiredquery

whether or not to include the complete transaction metadata instead of just tx_id. Enabling this option can affect performance and response times.

Response

200OK

List of Non-Fungible Token mint events for an asset identifier

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Search

GET
https://stacks.nownodes.io/extended/v1/search/{id}

Search blocks, transactions, contracts, or accounts by hash/ID

Parameters

include_metadatabooleanfalsequery

This includes the detailed data for purticular hash in the response

idstringrequiredpath

The hex hash string for a block or transaction, account address, or contract address

Response

200OK

Default Response

400Bad Request

Error Response

404Not Found

Default Response

Authorization

api-keyAuthapiKey in header

Smart Contracts

Read-only endpoints to obtain Clarity smart contract details

Get contracts by trait

GET
https://stacks.nownodes.io/extended/v1/contract/by_trait

Retrieves a list of contracts based on the following traits listed in JSON format - functions, variables, maps, fungible tokens and non-fungible tokens

Parameters

trait_abistringrequiredquery

JSON abi of the trait.

limitinteger[0, 50]20query

max number of contracts fetch

offsetinteger>= 00query

index of first contract event to fetch

Response

200OK

GET list of contracts

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get contract info

GET
https://stacks.nownodes.io/extended/v1/contract/{contract_id}

Retrieves details of a contract with a given contract_id

Parameters

contract_idstringrequiredpath

Contract identifier formatted as <contract_address>.<contract_name>

Response

200OK

A Smart Contract Detail

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get contract events

GET
https://stacks.nownodes.io/extended/v1/contract/{contract_id}/events

Retrieves a list of events that have been triggered by a given contract_id

Parameters

limitinteger[0, 50]20query

max number of events to fetch

offsetinteger>= 00query

Result offset

contract_idstringrequiredpath

Contract identifier formatted as <contract_address>.<contract_name>

Response

200OK

List of events

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get smart contracts status

GET
https://stacks.nownodes.io/extended/v2/smart-contracts/status

Retrieves the deployment status of multiple smart contracts.

Parameters

contract_idArray<string> | stringrequiredquery

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Stacking Rewards

Read-only endpoints to obtain Stacking reward details

Get recent reward slot holders

GET
https://stacks.nownodes.io/extended/v1/burnchain/reward_slot_holders

Retrieves a list of the Bitcoin addresses that would validly receive Proof-of-Transfer commitments.

Parameters

limitinteger[0, 250]96query

max number of items to fetch

offsetinteger>= 00query

Result offset

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get recent reward slot holder entries for the given address

GET
https://stacks.nownodes.io/extended/v1/burnchain/reward_slot_holders/{address}

Retrieves a list of the Bitcoin addresses that would validly receive Proof-of-Transfer commitments for a given reward slot holder recipient address.

Parameters

limitinteger[0, 250]96query

Results per page

offsetinteger>= 00query

Result offset

addressstringrequiredpath

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

Response

200OK

List of burnchain reward recipients and amounts

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get recent burnchain reward recipients

GET
https://stacks.nownodes.io/extended/v1/burnchain/rewards

Retrieves a list of recent burnchain (e.g. Bitcoin) reward recipients with the associated amounts and block info

Parameters

limitinteger[0, 250]96query

Results per page

offsetinteger>= 00query

Result offset

Response

200OK

List of burnchain reward recipients and amounts

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get recent burnchain reward for the given recipient

GET
https://stacks.nownodes.io/extended/v1/burnchain/rewards/{address}

Retrieves a list of recent burnchain (e.g. Bitcoin) rewards for the given recipient with the associated amounts and block info

Parameters

limitinteger[0, 250]96query

Results per page

offsetinteger>= 00query

Result offset

addressstringrequiredpath

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

Response

200OK

List of burnchain reward recipients and amounts

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get total burnchain rewards for the given recipient

GET
https://stacks.nownodes.io/extended/v1/burnchain/rewards/{address}/total

Retrieves the total burnchain (e.g. Bitcoin) rewards for a given recipient address

Parameters

addressstringrequiredpath

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

Response

200OK

Total burnchain rewards made to a recipient

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Transactions

Endpoints to obtain transaction details and to broadcast transactions to the network

Get recent transactions

GET
https://stacks.nownodes.io/extended/v1/tx

Retrieves all recently mined transactions

Parameters

offsetinteger>= 00query

Result offset

limitinteger[0, 50]20query

Results per page

typeArray<string | string | string | string | string | string>query
unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

orderstring | stringquery
sort_bystring | string | stringblock_heightquery

Option to sort results by block height, timestamp, or fee

from_addressstringquery

Option to filter results by sender address

to_addressstringquery

Option to filter results by recipient address

start_timeintegerquery

Filter by transactions after this timestamp (unix timestamp in seconds)

end_timeintegerquery

Filter by transactions before this timestamp (unix timestamp in seconds)

contract_idstringquery

Option to filter results by contract ID

function_namestringquery

Filter by contract call transactions involving this function name

nonceinteger[0, 9007199254740991]query

Filter by transactions with this nonce

Response

200OK

List of transactions

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get list of details for transactions

GET
https://stacks.nownodes.io/extended/v1/tx/multiple

Retrieves a list of transactions for a given list of transaction IDs

Parameters

tx_idArray<string>requiredquery
event_limitinteger[0, 100]20query

Results per page

event_offsetinteger>= 00query

Result offset

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get mempool transactions

GET
https://stacks.nownodes.io/extended/v1/tx/mempool

Retrieves all transactions that have been recently broadcast to the mempool. These are pending transactions awaiting confirmation.

Copied!
    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.

Parameters

sender_addressstringquery

STX Address

recipient_addressstringquery

STX Address

addressstringquery

STX Address

order_bystring | string | stringquery

Option to sort results by transaction age, size, or fee rate.

orderstring | stringquery

Results order

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

offsetinteger>= 00query

Result offset

limitinteger[0, 50]20query

Results per page

Response

200OK

List of mempool transactions

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get statistics for mempool transactions

GET
https://stacks.nownodes.io/extended/v1/tx/mempool/stats

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

Response

200OK

GET request that returns stats on mempool transactions

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Transaction Events

GET
https://stacks.nownodes.io/extended/v1/tx/events

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').

Parameters

tx_idstringquery

Transaction ID

addressstring | stringquery
typeArray<string | string | string | string | string>query
offsetinteger>= 00query

Result offset

limitinteger[0, 100]20query

Results per page

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get transaction

GET
https://stacks.nownodes.io/extended/v1/tx/{tx_id}

Retrieves transaction details for a given transaction ID

Parameters

event_limitinteger[0, 100]20query

Results per page

event_offsetinteger>= 00query

Result offset

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

tx_idstringrequiredpath

Transaction ID

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get raw transaction

GET
https://stacks.nownodes.io/extended/v1/tx/{tx_id}/raw

Retrieves a hex encoded serialized transaction for a given ID

Parameters

event_limitinteger[0, 100]20query

Results per page

event_offsetinteger>= 00query

Result offset

tx_idstringrequiredpath

Transaction ID

Response

200OK

GET raw transaction

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Transactions for address

GET
https://stacks.nownodes.io/extended/v1/address/{principal}/mempool

Retrieves all transactions for a given address that are currently in mempool

Parameters

limitinteger[0, 50]20query

Results per page

offsetinteger>= 00query

Result offset

unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

principalstring | stringrequiredpath

Response

200OK

List of mempool transactions

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get transactions by block

GET
https://stacks.nownodes.io/extended/v2/blocks/{height_or_hash}/transactions

Retrieves transactions confirmed in a single block

Parameters

limitinteger[0, 50]20query

Results per page

offsetinteger>= 00query

Result offset

height_or_hashstring | string | integerrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get address transactions

GET
https://stacks.nownodes.io/extended/v2/addresses/{address}/transactions

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.

Copied!
    More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types).

Parameters

limitinteger[0, 50]20query

Results per page

offsetinteger>= 00query

Result offset

addressstring | stringrequiredpath

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get events for an address transaction

GET
https://stacks.nownodes.io/extended/v2/addresses/{address}/transactions/{tx_id}/events

Retrieves a paginated list of all STX, FT and NFT events concerning a STX address or Smart Contract ID within a specific transaction.

Parameters

limitinteger[0, 50]20query

Results per page

offsetinteger>= 00query

Result offset

addressstring | stringrequiredpath
tx_idstringrequiredpath

Transaction ID

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Mempool

Endpoints to obtain Mempool information

Get mempool transaction fee priorities

GET
https://stacks.nownodes.io/extended/v2/mempool/fees

Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Proof of Transfer

Endpoints to get information about the Proof of Transfer consensus mechanism

Get PoX cycles

GET
https://stacks.nownodes.io/extended/v2/pox/cycles

Retrieves a list of PoX cycles

Parameters

limitinteger[0, 60]20query

Results per page

offsetinteger>= 00query

Result offset

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get PoX cycle

GET
https://stacks.nownodes.io/extended/v2/pox/cycles/{cycle_number}

Retrieves details for a PoX cycle

Parameters

cycle_numberintegerrequiredpath

PoX cycle number

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get signers in PoX cycle

GET
https://stacks.nownodes.io/extended/v2/pox/cycles/{cycle_number}/signers

Retrieves a list of signers in a PoX cycle

Parameters

limitinteger[0, 250]100query

Results per page

offsetinteger>= 00query

Result offset

cycle_numberintegerrequiredpath

PoX cycle number

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get signer in PoX cycle

GET
https://stacks.nownodes.io/extended/v2/pox/cycles/{cycle_number}/signers/{signer_key}

Retrieves details for a signer in a PoX cycle

Parameters

cycle_numberintegerrequiredpath

PoX cycle number

signer_keystringrequiredpath

Signer key

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Get stackers for signer in PoX cycle

GET
https://stacks.nownodes.io/extended/v2/pox/cycles/{cycle_number}/signers/{signer_key}/stackers

Retrieves a list of stackers for a signer in a PoX cycle

Parameters

limitinteger[0, 200]100query

Results per page

offsetinteger>= 00query

Result offset

cycle_numberintegerrequiredpath

PoX cycle number

signer_keystringrequiredpath

Signer key

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Fungible Tokens

Fungible token holders

GET
https://stacks.nownodes.io/extended/v1/tokens/ft/{token}/holders

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.

Parameters

limitinteger[0, 200]100query

max number of holders to fetch

offsetinteger>= 00query

index of first holder to fetch

tokenstringrequiredpath

fungible token identifier

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Stacking

Get latest PoX events

GET
https://stacks.nownodes.io/extended/v1/{pox}/events

Parameters

limitinteger[0, 200]96query

Results per page

offsetinteger>= 00query

Result offset

poxstring | string | stringrequiredpath

Response

200OK

Default Response

Authorization

api-keyAuthapiKey in header

Get PoX events for a transaction

GET
https://stacks.nownodes.io/extended/v1/{pox}/tx/{tx_id}

Parameters

poxstring | string | stringrequiredpath
tx_idstringrequiredpath

Response

200OK

Default Response

Authorization

api-keyAuthapiKey in header

Get events for a stacking address

GET
https://stacks.nownodes.io/extended/v1/{pox}/stacker/{principal}

Parameters

poxstring | string | stringrequiredpath
principalstring | stringrequiredpath

Response

200OK

Default Response

Authorization

api-keyAuthapiKey in header

Stacking pool members

GET
https://stacks.nownodes.io/extended/v1/{pox}/{pool_principal}/delegations

Retrieves the list of stacking pool members for a given delegator principal.

Parameters

limitinteger[0, 200]100query

Results per page

offsetinteger>= 00query

Result offset

after_blockinteger>= 1query

If specified, only delegation events after the given block will be included

heightinteger>= 1query
unanchoredbooleanfalsequery

Include data from unanchored (i.e. unconfirmed) microblocks

poxstring | string | stringrequiredpath
pool_principalstringrequiredpath

Address principal of the stacking pool delegator

Response

200OK

Default Response

400Bad Request

Error Response

Authorization

api-keyAuthapiKey in header

Stacks

Accounts

Read-only endpoints to obtain Stacks account details

Get account info

GET
https://stacks.nownodes.io/v2/accounts/{principal}

Get the account data for the provided principal

Where balance is the hex encoding of a unsigned 128-bit integer (big-endian), nonce is a unsigned 64-bit integer, and the proofs are provided as hex strings.

For non-existent accounts, this does not 404, rather it returns an object with balance and nonce of 0.

Parameters

principalstringrequiredpath

Stacks address or a Contract identifier (e.g. SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info)

proofintegerquery

Returns object without the proof field if set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Blocks

Read-only endpoints to obtain Stacks block details

Fetch a Nakamoto block

GET
https://stacks.nownodes.io/v3/blocks/{block_id}

Fetch a Nakamoto block by its index block hash.

Parameters

block_idstringrequiredpath

The block's ID hash

Response

200OK

The raw SIP-003-encoded block will be returned.

404Not Found

The block could not be found

Authorization

api-keyAuthapiKey in header

Fetch a Nakamoto block by its height and optional tip

GET
https://stacks.nownodes.io/v3/blocks/height/{block_height}

Fetch a Nakamoto block by its height and optional tip.

Parameters

block_heightintegerrequiredpath

The block's height

tipstringquery

The Stacks chain tip to query from. If tip == latest or empty, the query will be run from the latest known tip.

Response

200OK

The raw SIP-003-encoded block will be returned.

404Not Found

The block could not be found

Authorization

api-keyAuthapiKey in header

Simulate a block

POST
https://stacks.nownodes.io/v3/blocks/simulate/{block_hash}

Simulates the processing of a block identified by its hash. The node will apply the block's transactions to the current chain state in a temporary context and return the resulting block information, including the expected state changes and fees, without persisting anything to the actual chain.

Parameters

block_hashstringrequiredpath

The hex-encoded hash of the block to simulate (as typically returned by the miner or proposer).

Response

200OK

Successful simulation response containing the simulated block details.

Authorization

api-keyAuthapiKey in header

Fetch metadata about the ongoing Nakamoto tenure

GET
https://stacks.nownodes.io/v3/tenures/info

Fetch metadata about the ongoing Nakamoto tenure. This information is sufficient to obtain and authenticate the highest complete tenure, as well as obtain new tenure blocks.

Response

200OK

Metadata about the ongoing tenure

Authorization

api-keyAuthapiKey in header

Fetch a sequence of Nakamoto blocks in a tenure

GET
https://stacks.nownodes.io/v3/tenures/{block_id}

Fetch a sequence of Nakamoto blocks in a tenure. The blocks will be served in order from highest to lowest. The blocks will be encoded in their SIP-003 wire format, and concatenated together.

Parameters

block_idstringrequiredpath

The tenure-start block ID of the tenure to query

stopstringquery

The block ID hash of the highest block in this tenure that is already known to the caller. Neither the corresponding block nor any of its ancestors will be served. This is used to fetch tenure blocks that the caller does not have.

Response

200OK

SIP-003-encoded Nakamoto blocks, concatenated together

Authorization

api-keyAuthapiKey in header

Fetch information about evaluated burnchain blocks (i.e., sortitions).

GET
https://stacks.nownodes.io/v3/sortitions/{lookup_kind}/{lookup}

Fetch sortition information about a burnchain block. If the lookup_kind and lookup parameters are empty, it will return information about the latest burn block.

Parameters

lookup_kindstringpath

The style of lookup that should be performed. If not given, the most recent burn block processed will be returned. Otherwise, the lookup_kind should be one of the following strings:

  • consensus - find the burn block using the consensus hash supplied in the lookup field.
  • burn_height - find the burn block using the burn block height supplied in the lookup field.
  • burn - find the burn block using the burn block hash supplied in the lookup field.
  • latest_and_last - return information about the latest burn block with a winning miner and the previous such burn block
lookupstringpath

The value to use for the lookup if lookup_kind is consensus, burn_height, or burn

Response

200OK

Information for the burn block or in the case of latest_and_last, multiple burn blocks

Authorization

api-keyAuthapiKey in header

Get number of blocks signed by signer during a given reward cycle

GET
https://stacks.nownodes.io/v3/signer/{signer}/{cycle_number}

Get number of blocks signed by signer during a given reward cycle

Parameters

signerstringrequiredpath

Hex-encoded compressed Secp256k1 public key of signer

cycle_numberintegerrequiredpath

Reward cycle number

Response

200OK

Number of blocks signed

Authorization

api-keyAuthapiKey in header

Get tenure blocks by burn block hash

GET
https://stacks.nownodes.io/v3/tenures/blocks/hash/{hash}

Returns information about Stacks blocks that correspond to a specific Bitcoin burn block hash. Tenures represent the relationship between Stacks blocks and Bitcoin blocks in the Proof of Transfer (PoX) consensus.

Parameters

hashstringrequiredpath

Bitcoin burn block hash in hex format. This is the hash of the Bitcoin block that mined the Stacks blocks.

Response

200OK

Successful response with tenure blocks information

400Bad Request

Bad request - invalid burn block hash format

404Not Found

Tenure not found for the specified burn block hash

500Internal Server Error

Internal server error

Authorization

api-keyAuthapiKey in header

Get tenure blocks by burn block height

GET
https://stacks.nownodes.io/v3/tenures/blocks/height/{height}

Returns information about Stacks blocks that correspond to a specific Bitcoin burn block height. Tenures represent the relationship between Stacks blocks and Bitcoin blocks in the Proof of Transfer (PoX) consensus.

Parameters

heightinteger>= 0requiredpath

Bitcoin burn block height (block number in the Bitcoin blockchain). This specifies the position of the Bitcoin block in the chain.

Response

200OK

Successful response with tenure blocks information

400Bad Request

Bad request - invalid burn block height

404Not Found

Tenure not found for the specified burn block height

500Internal Server Error

Internal server error

Authorization

api-keyAuthapiKey in header

Get tip metadata for a specific consensus hash

GET
https://stacks.nownodes.io/v3/tenures/tip_metadata/{consensus_hash}

Returns the anchored header and burn view for the specified consensus hash.

Parameters

consensus_hashstringrequiredpath

Consensus hash identifying the block

Response

200OK

Successful response

Authorization

api-keyAuthapiKey in header

Info

Read-only endpoints to obtain network, Proof-of-Transfer, Stacking, STX token, and node information

Get Core API info

GET
https://stacks.nownodes.io/v2/info

Get Core API information

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get PoX details

GET
https://stacks.nownodes.io/v2/pox

Get Proof of Transfer (PoX) information. Can be used for Stacking.

Parameters

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Smart Contracts

Read-only endpoints to obtain Clarity smart contract details

Get contract interface

GET
https://stacks.nownodes.io/v2/contracts/interface/{contract_address}/{contract_name}

Get contract interface using a contract_address and contract name

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Contract interface

Authorization

api-keyAuthapiKey in header

Get specific data-map inside a contract

POST
https://stacks.nownodes.io/v2/map_entry/{contract_address}/{contract_name}/{map_name}

Attempt to fetch data from a contract data map. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The map is identified with [Map Name].

The key to lookup in the map is supplied via the POST body. This should be supplied as the hex string serialization of the key (which should be a Clarity value). Note, this is a JSON string atom.

In the response, data is the hex serialization of the map response. Note that map responses are Clarity option types, for non-existent values, this is a serialized none, and for all other responses, it is a serialized (some ...) object.

Body

application/json

Hex string serialization of the lookup key (which should be a Clarity value)

string

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

map_namestringrequiredpath

Map name

proofintegerquery

Returns object without the proof field when set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed loading data map

Authorization

api-keyAuthapiKey in header

Get contract source

GET
https://stacks.nownodes.io/v2/contracts/source/{contract_address}/{contract_name}

Returns the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

proofintegerquery

Returns object without the proof field if set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Call read-only function

POST
https://stacks.nownodes.io/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}

Call a read-only public function on a given smart contract.

The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format:

Body

application/json

map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.

senderstringrequired

The simulated tx-sender

argumentsArray<string>required

An array of hex serialized Clarity values

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

function_namestringrequiredpath

Function name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get trait implementation details

GET
https://stacks.nownodes.io/v2/traits/{contract_address}/{contract_name}/{trait_contract_address}/{trait_contract_name}/{trait_name}

Determine whether or not a specified trait is implemented (either explicitly or implicitly) within a given contract.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

trait_contract_addressstringrequiredpath

Trait Stacks address

trait_contract_namestringrequiredpath

Trait contract name

trait_namestringrequiredpath

Trait name

tipstringquery

The Stacks chain tip to query from. If tip == "latest", the query will be run from the latest known tip (includes unconfirmed state). If the tip is left unspecified, the stacks chain tip will be selected (only includes confirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get the MARF value for a given key

POST
https://stacks.nownodes.io/v2/clarity/marf/{clarity_marf_key}

Attempt to fetch the value of a MARF key.

In the response, data is the hex serialization of the value.

Parameters

clarity_marf_keystringrequiredpath

MARF key

proofintegerquery

Returns object without the proof field when set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve MARF key

Authorization

api-keyAuthapiKey in header

Get the contract metadata for the metadata key

POST
https://stacks.nownodes.io/v2/clarity/metadata/{contract_address}/{contract_name}/{clarity_metadata_key}

Attempt to fetch the metadata of a contract. The contract is identified with [Contract Address] and [Contract Name] in the URL path. The metadata key is identified with [Clarity Metadata Key].

In the response, data is formatted as JSON.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

clarity_metadata_keystringrequiredpath

Metadata key

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve constant value from contract

Authorization

api-keyAuthapiKey in header

Get the value of a constant inside a contract

POST
https://stacks.nownodes.io/v2/constant_val/{contract_address}/{contract_name}/{constant_name}

Attempt to fetch the value of a constant inside a contract. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The constant is identified with [Constant Name].

In the response, data is the hex serialization of the constant value.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

constant_namestringrequiredpath

Constant name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve constant value from contract

Authorization

api-keyAuthapiKey in header

Transactions

Endpoints to obtain transaction details and to broadcast transactions to the network

Broadcast raw transaction

POST
https://stacks.nownodes.io/v2/transactions

Broadcast raw transactions on the network. You can use the @stacks/transactions project to generate a raw transaction payload.

Body

application/octet-stream
string<binary>

Response

200OK

Transaction ID of successful post of a raw tx to the node's mempool

400Bad Request

Rejections result in a 400 error

Authorization

api-keyAuthapiKey in header

Retrieve transaction details by TXID

POST
https://stacks.nownodes.io/v3/transaction/{txid}

Returns detailed information about a specific Stacks transaction, including the raw transaction bytes, execution result, and block metadata.

Parameters

tx_idstringrequiredpath

The transaction ID (hash) identifying the Stacks transaction.

Response

200OK

Transaction successfully retrieved

Authorization

api-keyAuthapiKey in header

Fees

Read-only endpoints to obtain fee details

Get approximate fees for the given transaction

POST
https://stacks.nownodes.io/v2/fees/transaction

Get an estimated fee for the supplied transaction. This estimates the execution cost of the transaction, the current fee rate of the network, and returns estimates for fee amounts.

  • transaction_payload is a hex-encoded serialization of the TransactionPayload for the transaction.
  • estimated_len is an optional argument that provides the endpoint with an estimation of the final length (in bytes) of the transaction, including any post-conditions and signatures

If the node cannot provide an estimate for the transaction (e.g., if the node has never seen a contract-call for the given contract and function) or if estimation is not configured on this node, a 400 response is returned. The 400 response will be a JSON error containing a reason field which can be one of the following:

  • DatabaseError - this Stacks node has had an internal database error while trying to estimate the costs of the supplied transaction.
  • NoEstimateAvailable - this Stacks node has not seen this kind of contract-call before, and it cannot provide an estimate yet.
  • CostEstimationDisabled - this Stacks node does not perform fee or cost estimation, and it cannot respond on this endpoint.

The 200 response contains the following data:

  • estimated_cost - the estimated multi-dimensional cost of executing the Clarity VM on the provided transaction.
  • estimated_cost_scalar - a unitless integer that the Stacks node uses to compare how much of the block limit is consumed by different transactions. This value incorporates the estimated length of the transaction and the estimated execution cost of the transaction. The range of this integer may vary between different Stacks nodes. In order to compute an estimate of total fee amount for the transaction, this value is multiplied by the same Stacks node's estimated fee rate.
  • cost_scalar_change_by_byte - a float value that indicates how much the estimated_cost_scalar value would increase for every additional byte in the final transaction.
  • estimations - an array of estimated fee rates and total fees to pay in microSTX for the transaction. This array provides a range of estimates (default: 3) that may be used. Each element of the array contains the following fields:
    • fee_rate - the estimated value for the current fee rates in the network
    • fee - the estimated value for the total fee in microSTX that the given transaction should pay. These values are the result of computing: fee_rate x estimated_cost_scalar. If the estimated fees are less than the minimum relay fee (1 ustx x estimated_len), then that minimum relay fee will be returned here instead.

Note: If the final transaction's byte size is larger than supplied to estimated_len, then applications should increase this fee amount by:

fee_rate x cost_scalar_change_by_byte x (final_size - estimated_size)

Body

application/json

POST request for estimated fee

transaction_payloadstringrequired
estimated_leninteger

Response

200OK

Estimated fees for the transaction

Authorization

api-keyAuthapiKey in header

Get estimated fee

GET
https://stacks.nownodes.io/v2/fees/transfer

Get an estimated fee rate for STX transfer transactions. This a a fee rate / byte, and is returned as a JSON integer

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Mining

Validate a proposed Stacks block

POST
https://stacks.nownodes.io/v3/block_proposal

Used by stackers to validate a proposed Stacks block from a miner.

This API endpoint requires a basic Authorization header.

Body

application/json

Response

202Accepted

Block proposal has been accepted for processing. The result will be returned via the event observer.

400Bad Request

Endpoint not enabled.

401Unauthorized

Unauthorized.

429Too Many Requests

There is an ongoing proposal validation being processed, the new request cannot be accepted until the prior request has been processed.

Authorization

api-keyAuthapiKey in header

Fetch the stacker and signer set information for a given cycle.

GET
https://stacks.nownodes.io/v3/stacker_set/{cycle_number}

Used to get stacker and signer set information for a given cycle.

This will only return information for cycles started in Epoch-2.5 where PoX-4 was active and subsequent cycles.

Parameters

cycle_numberintegerrequiredpath

reward cycle number

Response

200OK

Information for the given reward cycle

400Bad Request

Could not fetch the given reward set

Authorization

api-keyAuthapiKey in header

Signers

Get number of blocks signed by signer during a given reward cycle

GET
https://stacks.nownodes.io/v3/signer/{signer}/{cycle_number}

Get number of blocks signed by signer during a given reward cycle

Parameters

signerstringrequiredpath

Hex-encoded compressed Secp256k1 public key of signer

cycle_numberintegerrequiredpath

Reward cycle number

Response

200OK

Number of blocks signed

Authorization

api-keyAuthapiKey in header

STX

Accounts

Read-only endpoints to obtain Stacks account details

Get account info

GET
https://stacks.nownodes.io/v2/accounts/{principal}

Get the account data for the provided principal

Where balance is the hex encoding of a unsigned 128-bit integer (big-endian), nonce is a unsigned 64-bit integer, and the proofs are provided as hex strings.

For non-existent accounts, this does not 404, rather it returns an object with balance and nonce of 0.

Parameters

principalstringrequiredpath

Stacks address or a Contract identifier (e.g. SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info)

proofintegerquery

Returns object without the proof field if set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Blocks

Read-only endpoints to obtain Stacks block details

Fetch a Nakamoto block

GET
https://stacks.nownodes.io/v3/blocks/{block_id}

Fetch a Nakamoto block by its index block hash.

Parameters

block_idstringrequiredpath

The block's ID hash

Response

200OK

The raw SIP-003-encoded block will be returned.

404Not Found

The block could not be found

Authorization

api-keyAuthapiKey in header

Fetch a Nakamoto block by its height and optional tip

GET
https://stacks.nownodes.io/v3/blocks/height/{block_height}

Fetch a Nakamoto block by its height and optional tip.

Parameters

block_heightintegerrequiredpath

The block's height

tipstringquery

The Stacks chain tip to query from. If tip == latest or empty, the query will be run from the latest known tip.

Response

200OK

The raw SIP-003-encoded block will be returned.

404Not Found

The block could not be found

Authorization

api-keyAuthapiKey in header

Fetch metadata about the ongoing Nakamoto tenure

GET
https://stacks.nownodes.io/v3/tenures/info

Fetch metadata about the ongoing Nakamoto tenure. This information is sufficient to obtain and authenticate the highest complete tenure, as well as obtain new tenure blocks.

Response

200OK

Metadata about the ongoing tenure

Authorization

api-keyAuthapiKey in header

Fetch a sequence of Nakamoto blocks in a tenure

GET
https://stacks.nownodes.io/v3/tenures/{block_id}

Fetch a sequence of Nakamoto blocks in a tenure. The blocks will be served in order from highest to lowest. The blocks will be encoded in their SIP-003 wire format, and concatenated together.

Parameters

block_idstringrequiredpath

The tenure-start block ID of the tenure to query

stopstringquery

The block ID hash of the highest block in this tenure that is already known to the caller. Neither the corresponding block nor any of its ancestors will be served. This is used to fetch tenure blocks that the caller does not have.

Response

200OK

SIP-003-encoded Nakamoto blocks, concatenated together

Authorization

api-keyAuthapiKey in header

Fetch information about evaluated burnchain blocks (i.e., sortitions).

GET
https://stacks.nownodes.io/v3/sortitions/{lookup_kind}/{lookup}

Fetch sortition information about a burnchain block. If the lookup_kind and lookup parameters are empty, it will return information about the latest burn block.

Parameters

lookup_kindstringpath

The style of lookup that should be performed. If not given, the most recent burn block processed will be returned. Otherwise, the lookup_kind should be one of the following strings:

  • consensus - find the burn block using the consensus hash supplied in the lookup field.
  • burn_height - find the burn block using the burn block height supplied in the lookup field.
  • burn - find the burn block using the burn block hash supplied in the lookup field.
  • latest_and_last - return information about the latest burn block with a winning miner and the previous such burn block
lookupstringpath

The value to use for the lookup if lookup_kind is consensus, burn_height, or burn

Response

200OK

Information for the burn block or in the case of latest_and_last, multiple burn blocks

Authorization

api-keyAuthapiKey in header

Get number of blocks signed by signer during a given reward cycle

GET
https://stacks.nownodes.io/v3/signer/{signer}/{cycle_number}

Get number of blocks signed by signer during a given reward cycle

Parameters

signerstringrequiredpath

Hex-encoded compressed Secp256k1 public key of signer

cycle_numberintegerrequiredpath

Reward cycle number

Response

200OK

Number of blocks signed

Authorization

api-keyAuthapiKey in header

Info

Read-only endpoints to obtain network, Proof-of-Transfer, Stacking, STX token, and node information

Get Core API info

GET
https://stacks.nownodes.io/v2/info

Get Core API information

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get PoX details

GET
https://stacks.nownodes.io/v2/pox

Get Proof of Transfer (PoX) information. Can be used for Stacking.

Parameters

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Smart Contracts

Read-only endpoints to obtain Clarity smart contract details

Get contract interface

GET
https://stacks.nownodes.io/v2/contracts/interface/{contract_address}/{contract_name}

Get contract interface using a contract_address and contract name

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Contract interface

Authorization

api-keyAuthapiKey in header

Get specific data-map inside a contract

POST
https://stacks.nownodes.io/v2/map_entry/{contract_address}/{contract_name}/{map_name}

Attempt to fetch data from a contract data map. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The map is identified with [Map Name].

The key to lookup in the map is supplied via the POST body. This should be supplied as the hex string serialization of the key (which should be a Clarity value). Note, this is a JSON string atom.

In the response, data is the hex serialization of the map response. Note that map responses are Clarity option types, for non-existent values, this is a serialized none, and for all other responses, it is a serialized (some ...) object.

Body

application/json

Hex string serialization of the lookup key (which should be a Clarity value)

string

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

map_namestringrequiredpath

Map name

proofintegerquery

Returns object without the proof field when set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed loading data map

Authorization

api-keyAuthapiKey in header

Get contract source

GET
https://stacks.nownodes.io/v2/contracts/source/{contract_address}/{contract_name}

Returns the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

proofintegerquery

Returns object without the proof field if set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Call read-only function

POST
https://stacks.nownodes.io/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}

Call a read-only public function on a given smart contract.

The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format:

Body

application/json

map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.

senderstringrequired

The simulated tx-sender

argumentsArray<string>required

An array of hex serialized Clarity values

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

function_namestringrequiredpath

Function name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get trait implementation details

GET
https://stacks.nownodes.io/v2/traits/{contract_address}/{contract_name}/{trait_contract_address}/{trait_contract_name}/{trait_name}

Determine whether or not a specified trait is implemented (either explicitly or implicitly) within a given contract.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

trait_contract_addressstringrequiredpath

Trait Stacks address

trait_contract_namestringrequiredpath

Trait contract name

trait_namestringrequiredpath

Trait name

tipstringquery

The Stacks chain tip to query from. If tip == "latest", the query will be run from the latest known tip (includes unconfirmed state). If the tip is left unspecified, the stacks chain tip will be selected (only includes confirmed state).

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Get the MARF value for a given key

POST
https://stacks.nownodes.io/v2/clarity/marf/{clarity_marf_key}

Attempt to fetch the value of a MARF key.

In the response, data is the hex serialization of the value.

Parameters

clarity_marf_keystringrequiredpath

MARF key

proofintegerquery

Returns object without the proof field when set to 0

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve MARF key

Authorization

api-keyAuthapiKey in header

Get the contract metadata for the metadata key

POST
https://stacks.nownodes.io/v2/clarity/metadata/{contract_address}/{contract_name}/{clarity_metadata_key}

Attempt to fetch the metadata of a contract. The contract is identified with [Contract Address] and [Contract Name] in the URL path. The metadata key is identified with [Clarity Metadata Key].

In the response, data is formatted as JSON.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

clarity_metadata_keystringrequiredpath

Metadata key

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve constant value from contract

Authorization

api-keyAuthapiKey in header

Get the value of a constant inside a contract

POST
https://stacks.nownodes.io/v2/constant_val/{contract_address}/{contract_name}/{constant_name}

Attempt to fetch the value of a constant inside a contract. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The constant is identified with [Constant Name].

In the response, data is the hex serialization of the constant value.

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

constant_namestringrequiredpath

Constant name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success

400Bad Request

Failed to retrieve constant value from contract

Authorization

api-keyAuthapiKey in header

Transactions

Endpoints to obtain transaction details and to broadcast transactions to the network

Broadcast raw transaction

POST
https://stacks.nownodes.io/v2/transactions

Broadcast raw transactions on the network. You can use the @stacks/transactions project to generate a raw transaction payload.

Body

application/octet-stream
string<binary>

Response

200OK

Transaction ID of successful post of a raw tx to the node's mempool

400Bad Request

Rejections result in a 400 error

Authorization

api-keyAuthapiKey in header

Retrieve transaction details by TXID

GET
https://stacks.nownodes.io/v3/transaction/{txid}

Get a JSON with the transaction details including the index_block_hash, the hex-encoded transaction body, and the result.

Parameters

txidstringrequiredpath

Transaction ID

Response

200OK

Transaction JSON with index_block_hash, transaction body and result

404Not Found

Transaction not found

501Not Implemented

Transaction indexing not enabled

Authorization

api-keyAuthapiKey in header

Fees

Read-only endpoints to obtain fee details

Get approximate fees for the given transaction

POST
https://stacks.nownodes.io/v2/fees/transaction

Get an estimated fee for the supplied transaction. This estimates the execution cost of the transaction, the current fee rate of the network, and returns estimates for fee amounts.

  • transaction_payload is a hex-encoded serialization of the TransactionPayload for the transaction.
  • estimated_len is an optional argument that provides the endpoint with an estimation of the final length (in bytes) of the transaction, including any post-conditions and signatures

If the node cannot provide an estimate for the transaction (e.g., if the node has never seen a contract-call for the given contract and function) or if estimation is not configured on this node, a 400 response is returned. The 400 response will be a JSON error containing a reason field which can be one of the following:

  • DatabaseError - this Stacks node has had an internal database error while trying to estimate the costs of the supplied transaction.
  • NoEstimateAvailable - this Stacks node has not seen this kind of contract-call before, and it cannot provide an estimate yet.
  • CostEstimationDisabled - this Stacks node does not perform fee or cost estimation, and it cannot respond on this endpoint.

The 200 response contains the following data:

  • estimated_cost - the estimated multi-dimensional cost of executing the Clarity VM on the provided transaction.
  • estimated_cost_scalar - a unitless integer that the Stacks node uses to compare how much of the block limit is consumed by different transactions. This value incorporates the estimated length of the transaction and the estimated execution cost of the transaction. The range of this integer may vary between different Stacks nodes. In order to compute an estimate of total fee amount for the transaction, this value is multiplied by the same Stacks node's estimated fee rate.
  • cost_scalar_change_by_byte - a float value that indicates how much the estimated_cost_scalar value would increase for every additional byte in the final transaction.
  • estimations - an array of estimated fee rates and total fees to pay in microSTX for the transaction. This array provides a range of estimates (default: 3) that may be used. Each element of the array contains the following fields:
    • fee_rate - the estimated value for the current fee rates in the network
    • fee - the estimated value for the total fee in microSTX that the given transaction should pay. These values are the result of computing: fee_rate x estimated_cost_scalar. If the estimated fees are less than the minimum relay fee (1 ustx x estimated_len), then that minimum relay fee will be returned here instead.

Note: If the final transaction's byte size is larger than supplied to estimated_len, then applications should increase this fee amount by:

fee_rate x cost_scalar_change_by_byte x (final_size - estimated_size)

Body

application/json

POST request for estimated fee

transaction_payloadstringrequired
estimated_leninteger

Response

200OK

Estimated fees for the transaction

Authorization

api-keyAuthapiKey in header

Get estimated fee

GET
https://stacks.nownodes.io/v2/fees/transfer

Get an estimated fee rate for STX transfer transactions. This a a fee rate / byte, and is returned as a JSON integer

Response

200OK

Success

Authorization

api-keyAuthapiKey in header

Mining

Validate a proposed Stacks block

POST
https://stacks.nownodes.io/v3/block_proposal

Used by stackers to validate a proposed Stacks block from a miner.

This API endpoint requires a basic Authorization header.

Body

application/json

Response

202Accepted

Block proposal has been accepted for processing. The result will be returned via the event observer.

400Bad Request

Endpoint not enabled.

401Unauthorized

Unauthorized.

429Too Many Requests

There is an ongoing proposal validation being processed, the new request cannot be accepted until the prior request has been processed.

Authorization

api-keyAuthapiKey in header

Fetch the stacker and signer set information for a given cycle.

GET
https://stacks.nownodes.io/v3/stacker_set/{cycle_number}

Used to get stacker and signer set information for a given cycle.

This will only return information for cycles started in Epoch-2.5 where PoX-4 was active and subsequent cycles.

Parameters

cycle_numberintegerrequiredpath

reward cycle number

Response

200OK

Information for the given reward cycle

400Bad Request

Could not fetch the given reward set

Authorization

api-keyAuthapiKey in header

Signers

Get number of blocks signed by signer during a given reward cycle

GET
https://stacks.nownodes.io/v3/signer/{signer}/{cycle_number}

Get number of blocks signed by signer during a given reward cycle

Parameters

signerstringrequiredpath

Hex-encoded compressed Secp256k1 public key of signer

cycle_numberintegerrequiredpath

Reward cycle number

Response

200OK

Number of blocks signed

Authorization

api-keyAuthapiKey in header