Polkadot via Substrate RPC API
Step 1: To access Polkadot via Substrate RPC, use the native access endpoint with /http-rpc at the end:
- Network: Polkadot Mainnet
 - Request Type: POST
 
https://svc.blockdaemon.com/polkadot/mainnet/native/http-rpc
- Network: Polkadot Westend
 - Request Type: POST
 
https://svc.blockdaemon.com/polkadot/westend/native/http-rpc
- Network: Polkadot Mainnet Asset Hub
 - Request Type: POST
 
https://svc.blockdaemon.com/polkadot/mainnet/native/assethub/http-rpc
- Network:* Polkadot Westend Asset Hub
 - Request Type: POST
 
https://svc.blockdaemon.com/polkadot/westend/native/assethub/http-rpc
Step 2: Authenticate your request using your API key. You can include the API key using either of the following headers:
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEYStep 3: Specify a Substrate RPC method in the request body:
Learn more about Polkadot methods here.
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "YOUR_METHOD",
    "params": []
}Example Request for Substrate RPC API
Here is a cURL example for using system_syncState to get the chainspec running the node, with a sync state, in Polkadot Mainnet:
curl -X POST \
https://svc.blockdaemon.com/polkadot/mainnet/native/http-rpc \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "id": 1, "method": "system_syncState", "params": []}'The following is a typical response you will get:
{
    "jsonrpc": "2.0",
    "result": {
        "startingBlock": 11614877,
        "currentBlock": 11615160
    },
    "id": 1
}👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.
Updated 5 days ago
