Polkadot: Migration guide to the v1 REST API
Tatum serves Polkadot REST endpoints on /v1 (Polkadot REST API); replace /substrateapi with /v1, as substrate-api-sidecar is deprecated upstream.
The underlying Polkadot network infrastructure is transitioning from the legacy Node.js substrate-api-sidecar to the new Rust-based Polkadot REST API. This change follows the upstream deprecation of substrate-api-sidecar by Parity and its replacement with polkadot-rest-api.
AttentionTatum has deployed support for the new
/v1REST API paths for Polkadot, Kusama, Westend, and Asset Hub networks. The legacy/substrateapipaths remain available in parallel for the time being to give customers time to migrate. However, becausesubstrate-api-sidecaris deprecated upstream, we recommend updating your integrations to the new/v1paths as soon as possible.For complete technical details, see the Official Parity Migration Guide.
What is changing?
Polkadot-based REST API endpoints are moving from the legacy /substrateapi path to the new /v1 path.
For example, the current endpoint:
GET https://polkadot-mainnet.gateway.tatum.io/substrateapi/accounts/15XQrm3X1UtiBF1qBpwb5y9kMMyfK7PxgWhotAJPqv2r6YCD/asset-balances
should be updated to:
GET https://polkadot-mainnet.gateway.tatum.io/v1/accounts/15XQrm3X1UtiBF1qBpwb5y9kMMyfK7PxgWhotAJPqv2r6YCD/asset-balances
In most cases, the migration requires replacing:
/substrateapi
with:
/v1
Affected networks
This migration applies to Polkadot-based REST API endpoints, including:
- Polkadot Mainnet
- Polkadot Asset Hub
- Polkadot Westend
- Kusama Mainnet
- Kusama Asset Hub
Required actions
If your application uses Polkadot, Kusama, Westend, or Asset Hub REST API endpoints through Tatum Gateway, please update your integration.
- Identify all API calls using
/substrateapi. - Replace
/substrateapiwith/v1. - Test the updated endpoints in your application.
- Review response parsing logic for compatibility with the new API.
- Update Postman collections, SDK wrappers, monitoring, and internal documentation where applicable.
Backward compatibilityTatum plans to run both the legacy
/substrateapiendpoints and the new/v1endpoints in parallel for the time being.However, since the underlying
substrate-api-sidecarproject is deprecated upstream, the legacy implementation should not be treated as long-term stable infrastructure. We strongly recommend migrating to the new/v1endpoints as soon as possible.
Polkadot Asset Hub: /runtime/metadata error 500
/runtime/metadata error 500On the legacy paths, calling /substrateapi/runtime/metadata on Polkadot Asset Hub can return a 500 error. It is caused by a known compatibility issue in Substrate API Sidecar.
Example response (stack trace shortened):
{
"code": 500,
"message": "createType(PalletUtilityCall):: Unable to create Enum via index 80, in batch, as_derivative, batch_all, dispatch_as, force_batch, with_weight, if_else, dispatch_as_fallible",
"stack": "Error: createType(PalletUtilityCall):: Unable to create Enum via index 80, in batch, as_derivative, batch_all, dispatch_as, force_batch, with_weight, if_else, dispatch_as_fallible\n at createTypeUnsafe ..."
}Cause: A runtime upgrade on Polkadot introduced changes that are not compatible with the Substrate API Sidecar version in use. Because of this, requests to /substrateapi/runtime/metadata fail when no specific metadata version is set.
Solution: Specify the metadata version in the endpoint. Either of these versions works:
/substrateapi/runtime/metadata/v15/substrateapi/runtime/metadata/v16
Example request:
curl --location 'https://polkadot-assethub.gateway.tatum.io/substrateapi/runtime/metadata/v15' \
--header 'x-api-key: {YOUR_API_KEY}'
NoteFor additional context, see the related GitHub issues #1668 and #1790.
Updated 5 days ago