ℹ️ Introduction To Stacks RPCs and RPC Nodes
Stacks provides powerful tools for developers to interact with the blockchain through Remote Procedure Call (RPC) APIs. These RPCs allow you to query blockchain data, interact with smart contracts, and even run your own decentralized infrastructure.
⚙️ Use Cases for RPCs
- Read blockchain data (accounts, transactions, contract state)
- Broadcast transactions
- Deploy and interact with smart contracts
- Run local development with a self-hosted node
Whether you're a dApp developer, protocol researcher, or infrastructure provider, using Stacks RPCs gives you the freedom to build scalable, trust-minimized applications powered by Bitcoin.
There are two main types of APIs in the Stacks ecosystem:
1. Stacks Node RPC API
Every Stacks node exposes a native RPC API that developers can use to interact directly with the blockchain. This allows for a fully self-hosted, decentralized setup—ideal for builders who want full control over their node and data.
- No authentication required
- Base URL (Testnet):
https://api.testnet.hiro.so/
- Base URL (Mainnet): Replace
testnetwithmainnet
- Local node access:
http://localhost:20443/v2/info
This API gives low-level access to the Stacks protocol and is suitable for advanced users and developers running full nodes.
2. Hiro Stacks API
The Hiro API is a centralized, developer-friendly proxy that wraps the native RPC API and offers additional features such as pagination, enhanced endpoints, and simplified queries.
- Run by Hiro Systems, a core contributor to the Stacks ecosystem
- Makes onboarding easier for new developers
- Still connects to the Stacks blockchain under the hood
You can also run your own instance of the Hiro API if you want added flexibility with centralized convenience.