CBTC API Reference
👥 Audience: App Developers integrating CBTC programmatically via the Canton Ledger API.
⚠️ API Stability Notice: All endpoints and interfaces are subject to change without notice. There is no formal versioning policy today. Breaking changes are communicated via #cbtc-ecosystem and the site changelog.
CBTC SDK Reference: cbtc-lib (Rust)
For most integrations, we recommend using cbtc-lib (Rust) rather than raw API calls:
Repository: github.com/DLC-link/cbtc-lib
Current version: v0.3.1
Crate name:
cbtc(add viacbtc = { git = "https://github.com/DLC-link/cbtc-lib.git", tag = "v0.3.1" })Lower-level library: github.com/DLC-link/canton-lib (v0.3.1)
Code examples: github.com/DLC-link/cbtc-lib/tree/main/examples
💡 Note: cbtc-lib recently underwent a major restructure (December 2025). If you were using an earlier version, you will need to update your imports. See the cleanup PR for migration details.
Overview: Canton Ledger API for CBTC Operations
All CBTC operations (minting, burning, transferring wrapped Bitcoin) are performed through the Canton Ledger API (also called the JSON Ledger API). There is no separate "CBTC API." You interact with CBTC by exercising choices on Daml smart contracts running on your Canton participant node.
Base URL: https://<your-participant-host>/v2/
Authentication: Bearer token (JWT) from your OIDC provider. See the Authentication Guide.
Content-Type: application/json for all requests.
Prerequisites
Before calling any CBTC API:
Canton participant node running and connected to the network
CBTC DAR files installed on your participant — download from GitHub
Valid JWT from your OIDC provider (Keycloak officially supported)
Party ID allocated on your participant
Canton Ledger API Endpoints
For full endpoint documentation covering the Canton Ledger API (including all endpoints used by CBTC operations), refer to the official Canton documentation:
Canton JSON Ledger API Documentation →
CBTC Instrument ID Management: Devnet, Testnet, and Mainnet
CBTC uses the Canton Token Standard. To interact with CBTC programmatically, you need the correct Instrument ID for your target network.
⚠️ Instrument IDs differ across networks (devnet, testnet, mainnet). Always fetch the latest from the metadata URL rather than hardcoding.
Devnet
Metadata: View
Testnet
Metadata: View
Mainnet
Metadata: View
Token Standard API Reference: Canton Token Standard Docs
💡 Polling pattern: Instrument IDs can change due to network dynamics (e.g., DAR upgrades). Query the metadata URL periodically rather than hardcoding values. There is currently no push notification for ID changes — this is a known gap.
Rate Limits
There are no BitSafe-imposed rate limits on the Canton Ledger API. However:
Canton network throughput: Transfers take a few seconds each. Approximately 500 transfers per 10-minute period is near the current practical limit.
Your participant node: Performance depends on your infrastructure. Monitor node resource usage under load.
API Error Handling for CBTC Operations
401 Unauthorized
Invalid or expired JWT
Re-authenticate with your OIDC provider
404 Not Found
Contract ID no longer active
Re-query for current contract IDs
409 Conflict
Duplicate command ID
Use a unique commandId per request
UTXO limit exceeded
Too many UTXOs for a party (max 10)
Consolidate UTXOs using cbtc-lib
Last updated