Chain API
A public REST API for TensorCash mainnet at https://api.tensorcash.org. No API key is needed. Two open-source services answer under different prefixes; the endpoint pages below are generated from their OpenAPI specs and list only the routes this host serves.
Read-only. The host answers GET and HEAD. Four routes also take POST: POST /esplora/api/tx relays a transaction you signed yourself (no key ever reaches the server), and three batch routes read many addresses in one request. Any other method gets 405.
Endpoints
Base URL and prefixes
| Prefix | Served by |
|---|---|
/v1/* | TSCScan API v1.0.0: blocks, transactions, addresses, mempool, statistics, assets and models. |
/api/v1/mainnet/* | The same TSCScan routes under their mainnet compatibility path. |
/health/live | TSCScan liveness. |
/esplora/api/* | Wallet API v1.0.0, Esplora-compatible: balances, UTXOs, history, fee estimates and broadcast. |
/health | Wallet API index and node tips. |
Any other path gets 404. TSCScan's wallet routes (UTXOs, raw transactions, fee estimates, test transactions, blocks by height) are still under development upstream and are not served here, and neither is explorer search (/v1/search). The wallet API covers UTXOs, raw transactions and fee estimates.
Rate limits and fallback
Limits apply per client IP. Over a limit the API answers 429: back off and retry. A web application firewall in front of the host applies coarser limits of its own.
| Route | Limit |
|---|---|
| All other requests | 20 per second, burst 40 |
POST /esplora/api/tx | 10 per minute, burst 20 |
POST /esplora/api/wallet/addresses | 2 per second, burst 30 |
POST /esplora/api/wallet/history | 2 per second, burst 30 |
POST /v1/addresses/balances | 2 per second, burst 30 |
Request bodies are capped at 16 KB, at 128 KB for the two /esplora/api/wallet routes and at 256 KB for POST /esplora/api/tx.
https://api2.tensorcash.org is a second, independently run site with the same routes. Configure both and fail over between them.
Units
TSCScan amounts are exact objects such as {"units": "175000000", "precision": 8}: units is a decimal integer string in the smallest unit (satoshi for TSC) and precision the number of decimals, so this one is 1.75 TSC. Use integer or decimal arithmetic, never floating point. An amount that is not known carries a state and null units; it never means zero.
The wallet API follows Esplora: amounts are integer satoshis (1 TSC = 100,000,000) and fee rates are in sat/vB.
Responses
TSCScan answers JSON with the resource under data. Lists add page with number, limit, total and total_pages; pass page (default 1) and limit (default 25, at most 100). Errors are application/problem+json with a stable code such as RESOURCE_NOT_FOUND or DATA_NOT_READY. The X-Chain-Height and X-Chain-Hash headers name the indexed block that served the response.
The wallet API answers plain Esplora JSON, or text for heights, hashes, raw hex and txids. Errors are plain text with an HTTP status. While its index catches up with the node, address and transaction routes answer 503 Index syncing.
Credits
TSCScan by rHuhu, MIT License. Explorer: tscscan.xyz.
tensorcash-api by bobponey, MIT License. Source: git.tensorcash.org/bobponey/tensorcash-api.
The endpoint pages are generated from TSCScan v1.0.0 and tensorcash-api v1.0.0. The published specs record each upstream commit and the routes left out.