Skip to content

Commit d5afa19

Browse files
alexis-stacksclaude
authored andcommitted
Accuracy and readability pass across all six prose pages
- README: rewrite intro to explain what the API is, how it extends Node RPC, who maintains it, and how it relates to other Stacks APIs - usage: normalize "Stacks API" → "Stacks Blockchain API" for consistency across the section; fix "api-key" → "API key" - architecture: correct inaccurate claim that the API implements Rosetta/Mesh (it was removed; replaced by standalone Mesh API); add repo link to Development Setup for context - pagination: remove misleading empty object {} from sample JSON - nonce-handling: fix grammar "For all transactions go through" → "For all transactions to go through" - requesting-proofs: fix wording "endpoints will request the proof" → "endpoints return the proof" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb66b69 commit d5afa19

6 files changed

Lines changed: 13 additions & 16 deletions

File tree

docs/reference/api/stacks-blockchain-api/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44
For the complete OpenAPI spec, navigate [here](https://raw.githubusercontent.com/hirosystems/stacks-blockchain-api/master/openapi.yaml).
55
{% endhint %}
66

7-
The Stacks API provides comprehensive access to Stacks blockchain data through a high-performance REST interface. Built on cached responses and optimized indexing, it delivers transaction data, smart contract information, account balances, and block details with minimal latency.
7+
The Stacks Blockchain API is a REST API developed and hosted by [Hiro](https://www.hiro.so/) that extends the [Stacks Node RPC API](../stacks-node-rpc/) with additional indexed endpoints. While every Stacks node exposes a minimal set of RPC endpoints (account balances, contract calls, transaction broadcasting), the Blockchain API continuously ingests and indexes on-chain activity into a PostgreSQL database, making it possible to query transaction history, token transfers, smart contract events, and paginated lists of blocks — data that is not directly available from a Stacks node alone.
8+
9+
The public base URL is `https://api.hiro.so`. No infrastructure setup is required, so you can start querying immediately.
810

911
<details>
1012

1113
<summary>Who is this API for?</summary>
1214

13-
The Stacks Blockchain API is a hosted, indexed REST API that caches and indexes on-chain data so you can query it efficiently. It is distinct from the [Stacks Node RPC API](../stacks-node-rpc/), which exposes only the minimal set of endpoints built into every Stacks node.
15+
The Stacks Blockchain API is the recommended API for wallets, dApps, explorers, and general developers who need rich query capabilities without running their own node. It proxies all standard [Stacks Node RPC](../stacks-node-rpc/) endpoints and adds the `/extended/` family of indexed endpoints on top.
1416

15-
If you need rich query capabilities (transaction history, token transfers, smart contract events, paginated lists, etc.) without running your own infrastructure, the Stacks Blockchain API is the right choice.
17+
If you need a more decentralized setup or want direct access to the raw node RPC without a third-party service, see the [Stacks Node RPC API](../stacks-node-rpc/). For exchange or institutional integrations using the Coinbase Mesh standard, see the [Stacks Mesh API](../stacks-mesh-api/).
1618

1719
</details>
1820

19-
{% hint style="info" %}
20-
This API is developed and hosted by [Hiro](https://www.hiro.so/). The public base URL is `https://api.hiro.so`.
21-
{% endhint %}
22-
2321
### Key features
2422

2523
- **Real-time data ingestion** -- Continuously indexes blockchain activity as it happens

docs/reference/api/stacks-blockchain-api/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The `stacks-node` has its own minimal set of http endpoints referred to as `RPC
2424
The Stacks Blockchain API implements additional endpoints that provide data unavailable directly from Stacks nodes due to various constraints.
2525

2626
- The `stacks-node` may not persist certain data or may not serve it efficiently to many clients. For instance, while it can return the current STX balance of an account, it cannot provide a history of account transactions.
27-
- The API implements the [Mesh](https://github.com/coinbase/mesh-specifications) specification (formerly Rosetta) by Coinbase, an open standard designed to simplify blockchain deployment and interaction.
27+
- The API previously included an embedded Rosetta implementation, but this was removed in favor of the standalone [Stacks Mesh API](../stacks-mesh-api/).
2828
- The API includes support for the Blockchain Naming System (BNS) endpoints.
2929
- For Express.js routes, see [`/src/api/routes`](https://github.com/hirosystems/stacks-blockchain-api/tree/master/src/api/routes) in the API repo.
3030

@@ -52,6 +52,6 @@ All http endpoints and responses are defined in OpenAPI and JSON Schema.
5252

5353
## Development Setup
5454

55-
The easiest/quickest way to develop in this repo is using the VS Code debugger. It uses docker-compose to set up a stacks-node and Postgres instance.
55+
To contribute to the [Stacks Blockchain API codebase](https://github.com/hirosystems/stacks-blockchain-api), the easiest way to get started is using the VS Code debugger. It uses docker-compose to set up a stacks-node and Postgres instance.
5656

5757
Alternatively, you can run `npm run dev:integrated` which does the same thing but without a debugger.

docs/reference/api/stacks-blockchain-api/nonce-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ The `possible_next_nonce` property is the nonce suggested for a given principal'
2424

2525
The `detected_missing_nonces` property finds any non-contiguous nonces after inspecting transactions from blocks and the mempool. For example, for a given principal, if the latest transaction included in a block has a nonce of 5, and there's only one transaction in the mempool with nonce 7, then it indicates that something likely went wrong with transaction with nonce 6 (either it was not created or broadcasted correctly by a client, or it was dropped for whatever reason). This is a strong indication that the mempool transaction with nonce 7 will never be mined since the previous nonce is missing.
2626

27-
Clients that continue to broadcast transactions with the `possible_next_nonce` property of 8, then 9, then 10, will likely result in all of their pending/mempool transactions never going through. For all transactions go through, clients should first use any missing nonces before using the suggested `possible_next_nonce`.
27+
Clients that continue to broadcast transactions with the `possible_next_nonce` property of 8, then 9, then 10, will likely result in all of their pending/mempool transactions never going through. For all transactions to go through, clients should first use any missing nonces before using the suggested `possible_next_nonce`.

docs/reference/api/stacks-blockchain-api/pagination.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Here is a sample response:
4444
"events": [],
4545
"tx_type": "coinbase",
4646
"coinbase_payload": {}
47-
},
48-
{}
47+
}
4948
]
5049
}
5150
```

docs/reference/api/stacks-blockchain-api/requesting-proofs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Understand proof requests from API endpoints.
44

55
# Requesting proofs
66

7-
Several endpoints will request the [MARF Merkle Proof](https://github.com/stacksgov/sips/blob/main/sips/sip-004/sip-004-materialized-view.md#marf-merkle-proofs) by default.
7+
Several endpoints return the [MARF Merkle Proof](https://github.com/stacksgov/sips/blob/main/sips/sip-004/sip-004-materialized-view.md#marf-merkle-proofs) by default.
88

99
Provided with the proof, a client can verify the value, cumulative energy spent, and the number of confirmations for the response value provided by the API.
1010

docs/reference/api/stacks-blockchain-api/usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn the basics of using the Stacks Blockchain API.
44

55
# Basic usage
66

7-
The Stacks API is built on REST principles, enforcing HTTPS for all requests to ensure data security, integrity, and privacy.
7+
The Stacks Blockchain API is built on REST principles, enforcing HTTPS for all requests to ensure data security, integrity, and privacy.
88

99
## Base URL
1010

@@ -23,7 +23,7 @@ curl -L 'https://api.hiro.so/extended' \
2323

2424
## Authentication
2525

26-
If you are using an api-key, replace `$HIRO_API_KEY` with your secret API key.
26+
If you are using an API key, replace `$HIRO_API_KEY` with your secret API key.
2727

2828
```bash
2929
curl -L 'https://api.hiro.so/extended' \
@@ -33,7 +33,7 @@ curl -L 'https://api.hiro.so/extended' \
3333

3434
## Response codes
3535

36-
The Stacks API uses standard HTTP response codes to indicate request success or failure.
36+
The Stacks Blockchain API uses standard HTTP response codes to indicate request success or failure.
3737

3838
| Code | Description |
3939
|------|-------------|

0 commit comments

Comments
 (0)