Subfrost API Documentation
Welcome to the Subfrost API documentation.
If you are looking for non-API docs on the SUBFROST protocol, find them here: SUBFROST Official Docs.
What is the Subfrost API?
The Subfrost API is a set of APIs supporting SUBFROST, the Bitcoin-native L0 extension framework. It is a product offering of Subzero Research Inc., used to support our internal infrastructure, but open for developers to use.
The Subfrost API provides:
- JSON-RPC Gateway - Unified access to Bitcoin Core, Esplora, Ord, BRC20 and Alkanes APIs
- Lua Scripting - Execute custom server-side scripts with full RPC access
- REST API - High-level endpoints for Alkanes, BRC20 and other blockchain data
- Real-time Data - Access to mempool, UTXOs, inscriptions, and runes
API Endpoints
JSON-RPC requests are made to:
https://mainnet.subfrost.io/v4/jsonrpc
Or with an API key in the path:
https://mainnet.subfrost.io/v4/<your-api-key>
REST API endpoints use:
https://mainnet.subfrost.io/v4/api/<route>
Quick Example
Here's a simple example to get the current block height:
{
"jsonrpc": "2.0",
"method": "btc_getblockcount",
"params": [],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": 850000,
"id": 1
}
Available Namespaces
esplora_*- Electrs/Esplora block explorer APIord_*- Ordinals protocol (inscriptions, runes, sats)metashrew_*- Metashrew indexer viewsalkanes_*- Alkanes protocol methodsbtc_*- Bitcoin Core RPC passthroughlua_*- Server-side Lua script execution
Authentication
Subfrost supports multiple authentication methods:
- API Keys - Use
/v4/<apikey>path orx-subfrost-api-keyheader - CORS - Register your domain for browser-based access
- Alias Routes - Use
/v4/<alias>with your custom endpoint alias
See the Authentication guide for details.
Next Steps
- Quick Start Guide - Get up and running in minutes
- JSON-RPC Overview - Learn about the RPC interface
- Lua Scripting - Execute custom scripts server-side
- API Platform - Manage API keys and CORS settings