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 API
  • ord_* - Ordinals protocol (inscriptions, runes, sats)
  • metashrew_* - Metashrew indexer views
  • alkanes_* - Alkanes protocol methods
  • btc_* - Bitcoin Core RPC passthrough
  • lua_* - Server-side Lua script execution

Authentication

Subfrost supports multiple authentication methods:

  1. API Keys - Use /v4/<apikey> path or x-subfrost-api-key header
  2. CORS - Register your domain for browser-based access
  3. Alias Routes - Use /v4/<alias> with your custom endpoint alias

See the Authentication guide for details.

Next Steps