How To Access Acala via Substrate Sidecar API

Learn how to access Acala via Substrate Sidecar API.

Step 1: To access the available Substrate Sidecar methods, use the native access endpoint with/parachain at the end:

  • Network: Acala Mainnet
  • Request Type: GET / POST
https://svc.blockdaemon.com/acala/mainnet/native/parachain

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

https://svc.blockdaemon.com/acala/mainnet/native/parachain/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 Acala Mainnet:

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

The following is a typical response you will get:

{
    "parentHash": "0xe4d87b0d0330fc9e765c8f3b14dddb9805c653aa4e8b9a3f6c3431070d5f2db6",
    "number": "1655012",
    "stateRoot": "0x5950ea6023e98916c9ed60ec942553a9932a8733b1dfd8f52a52c1d9e37fd60d",
    "extrinsicsRoot": "0xa391d3be412cc8328f8b007ae2829335320293a589abfce0046ee58a4d6b8e3b",
    "digest": {
        "logs": [
            {
                "preRuntime": [
                    "0x61757261",
                    "0x6a9d3f0800000000"
                ]
            },
            {
                "seal": [
                    "0x61757261",
                    "0x9e7d3c52bc61abcf7560292ce41bb2da5242d84bab8365a5e54770f0a38fd15cb622cfe1d48844e2832ff314cb8376803185d33cc2283c4f39bc4922496ed58b"
                ]
            }
        ]
    }
}