github stx-labs/stacks-blockchain-api v9.0.0

one hour ago

v9.0.0 is a major release that adds forward support for pox-5 (Bitcoin Staking) and the upcoming Stacks 4.0 hard fork.

It also introduces a cleaner, cursor-paginated /extended/v3 API surface, begins the deprecation of a large set of legacy v1/v2 endpoints, and removes the Rosetta API implementation completely.

More information about new features, deprecations, and how to upgrade below.

Warning

Upgrading to v9 is MANDATORY for all API node operators. Failing to do so before the hard fork will result in a chainstate stall and API crash once the Stacks 4.0 activation block height is reached.

New Features

New v3 endpoints

These new endpoints are optimized for performance and efficient handling of large result sets and directly replace old /extended/v1 and /extended/v2 endpoints. Visit the Stacks Blockchain API reference for details on the new endpoints and their responses, as well as migration guides for these new endpoints.

Transactions & blocks

  • GET /extended/v3/transactions, /transactions/{tx_id}, /transactions/{tx_id}/events
  • GET /extended/v3/mempool/transactions
  • GET /extended/v3/blocks/{height_or_hash}/transactions

Principals (per-account)

  • GET /extended/v3/principals/{principal}/transactions
  • GET /extended/v3/principals/{principal}/transactions/{tx_id}/balance-changes
  • GET /extended/v3/principals/{principal}/balance-changes
  • GET /extended/v3/principals/{principal}/mempool/transactions
  • GET /extended/v3/principals/{principal}/nonces
  • GET /extended/v3/principals/{principal}/balances/stx
  • GET /extended/v3/principals/{principal}/balances/ft
  • GET /extended/v3/principals/{principal}/balances/ft/{asset_identifier}
  • GET /extended/v3/principals/{principal}/balances/nft
  • GET /extended/v3/principals/{principal}/staking and /staking/bonds

Staking (pox-5)

  • GET /extended/v3/staking/bonds (+ /{bond_index}, /allowlist, /registrations)
  • GET /extended/v3/staking/signers (+ /{principal})
  • GET /extended/v3/staking/signers/{principal}/stakers

Deprecations

Deprecated v1/v2 endpoints

Although still functional in our public API nodes, endpoints with a direct v3 successor are now marked deprecated and will be shut down at a later date to be announced.

Deprecated endpoints:

  • are omitted from the published openapi.yaml (but retained in the client library),
  • return a Warning HTTP header on every response
  • may be throttled for performance reasons

Rosetta API

The Rosetta API implementation that used to exist in this repository is now removed. To continue using a Rosetta-compatible API for stacks, consider using the new Stacks Mesh API.

Documentation is available here.

How to upgrade

Upgrading to v9 can be achieved in two ways:

  • Full genesis sync: Starting the v9 API with a clean database paired with a new Stacks node (Extremely slow. Not recommended)
  • Restoring from a Hiro archive: Using one of our public v9 snapshots. How to guide is available here (Very fast. Recommended)

Don't miss a new stacks-blockchain-api release

NewReleases is sending notifications on new releases.