How to Access Kusama via Substrate Sidecar API

Learn how to access Kusama via Substrate Sidecar API.

Step 1: To access Kusama via Substrate Sidecar, use the following native access endpoint:

  • Network: Kusama Mainnet
  • Request Type: GET / POST
https://svc.blockdaemon.com/kusama/mainnet/native

Step 2: Add a Substrate Sidecar method at the end of the query:

https://svc.blockdaemon.com/kusama/mainnet/native/YOUR_METHOD

Step 3: For POST requests, specify the data required by the method in the request body.

Example Request for Substrate Sidecar API

Here is a cURL example for using GET /blocks/head/header to get the header of the most recently finalized block in Kusama Mainnet:

curl -X GET \
https://svc.blockdaemon.com/kusama/mainnet/native/blocks/head/header \
-H 'Authorization: Bearer YOUR_API_KEY'

The following is a typical response you will get:

{
    "parentHash": "0xd2321a7ffc86663a202b57f3db042a6b90ea4617d9fd64ad153af36aa62c9274",
    "number": "14017588",
    "stateRoot": "0x0ad4d1716a77421bb2e254d0df548fc1c5ad6081057be9797534b02ef394daa8",
    "extrinsicsRoot": "0xde3f7437ff01e80efdd23c3172b2171ad40852dc7e881c4fff0072b097f1b650",
    "digest": {
        "logs": [
            {
                "preRuntime": [
                    "0x42414245",
                    "0x03d6000000590b7f1000000000964cad717dc1614e72ea13894665e656e7dc2e16fe8a5397fb7b71170644a300c2344d0914b407b0fd0c7ae72403025946a2be45eeadd9339c516ccf05f5c80bb7e32a535aa0aa82d015b315ebc99d100e512976d9a2c9aba8d7b6d15793cd0b"
                ]
            },
            {
                "seal": [
                    "0x42414245",
                    "0x68778ac227550d204f3c541dd07bc3266b41a0d0ca4dc6e5a06cb4c954585d53a61e56d2be99190fa24d6c8e6cb24ac0870ebb3aa325fae8817c7d46c27ca181"
                ]
            }
        ]
    }
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.