Stacks
GetBlock provides fast and reliable access to Stacks nodes via the REST API. Connect to the Stacks network without running your own infrastructure.
Stacks is a Bitcoin Layer-2 that brings smart contracts and decentralized apps to Bitcoin: its Clarity contracts can read Bitcoin state, and through the Nakamoto release and sBTC, Stacks transactions settle with Bitcoin finality. The native token is STX, denominated in microSTX (1 STX = 1,000,000 microSTX). GetBlock exposes Stacks through its node RPC API: a path-addressed HTTP + JSON interface under /v2 where reads use GET and transaction broadcast, read-only contract calls, and fee estimation use POST.
Key Features
Bitcoin Layer-2: Clarity smart contracts that can read Bitcoin state; transactions anchor to Bitcoin
Node RPC API: A path-addressed
/v2HTTP + JSON interface — not a JSON-RPC envelope and noteth_*; the resource is chosen by the URL pathSTX / microSTX: Balances and fees are denominated in microSTX (1 STX = 1,000,000 microSTX); account balances are returned hex-encoded
Clarity Contracts: Read contract interfaces and source, call read-only functions, and read maps, variables, and constants
Decidable Language: Clarity is interpreted and decidable — no compiler, and contract source is readable on-chain
Build-Sign-Broadcast: Estimate fees, sign client-side, then broadcast the serialized transaction
Network Information
Network Name
Stacks Mainnet
Native Currency
STX (1 STX = 1,000,000 microSTX)
Settlement Layer
Bitcoin
Contract Language
Clarity
API
Node RPC API (HTTP + JSON) under /v2
Base URL
Supported Networks
Mainnet
REST (/v2)
✅
✅
✅
Quickstart
Available REST Endpoints
Node & Network
info
GET
Returns core node information: peer and server version, network ID, the current burnchain (Bitcoin) block height, the Stacks chain tip height and hash, tenure height, and sync status.
pox
GET
Returns Proof-of-Transfer (PoX) details: the active PoX contract, cycle lengths, total liquid supply, and the current and next reward cycles with their stacking thresholds.
Accounts & Fees
accounts
GET
Returns an account's STX balance, locked (stacked) balance, unlock height, and next nonce. Balances are hex-encoded microSTX. A principal is a standard address or a contract principal (address.contract-name).
fees-transfer
GET
Returns the estimated fee rate for a standard STX token-transfer transaction, in microSTX per byte.
fees-transaction
POST
Returns approximate fees for a given transaction payload, as low/middle/high estimations, based on the serialized payload and its estimated length.
Transactions
transactions
POST
Broadcasts a signed, serialized transaction to the network. The body is the raw transaction bytes (hex string with application/json, or raw bytes with application/octet-stream). On acceptance the node returns the transaction ID.
Contracts
contract-interface
GET
Returns the interface (ABI) of a deployed Clarity contract: its public and read-only functions, data variables, maps, fungible and non-fungible tokens, and the Clarity version.
contract-source
GET
Returns the Clarity source code of a deployed contract, the block height at which it was published, and (optionally) a MARF proof.
call-read
POST
Calls a read-only Clarity function and returns its result, without creating a transaction. Arguments are hex-encoded Clarity values; the result is a hex-encoded Clarity value.
Contract State
map-entry
POST
Returns the value stored at a key in a contract's data map. The request body is the hex-encoded Clarity value of the key; the response is the hex-encoded Clarity value and an optional MARF proof.
constant-val
GET
Returns the value of a constant defined in a contract, as a hex-encoded Clarity value.
data-var
GET
Returns the current value of a contract data variable, as a hex-encoded Clarity value, with an optional MARF proof.
traits
GET
Reports whether a contract implements a given trait, identified by the trait's deployer, contract, and trait name.
Support
For technical support and questions:
Support: support@getblock.io
See Also
Last updated
Was this helpful?