sidechain_getStatus - Midnight

Example code for the sidechain_getStatus JSON-RPC method. Complete guide on how to use sidechain_getStatus JSON-RPC in GetBlock Web3 documentation.

This method returns the sidechain's operational status, including the current epoch, slot, and Cardano main chain sync status.

Parameters

  • None

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "sidechain_getStatus",
    "params": [],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "sidechain": {
            "epoch": 42,
            "slot": 12345,
            "nextEpochTimestamp": 1737900000
        },
        "mainchain": {
            "epoch": 100,
            "slot": 67890,
            "nextEpochTimestamp": 1737900000
        }
    }
}

Response Parameters

Field
Type
Description

result.sidechain.epoch

integer

Current Midnight epoch

result.sidechain.slot

integer

Current Midnight slot within the epoch

result.sidechain.nextEpochTimestamp

integer

Unix timestamp at which the next sidechain epoch begins

result.mainchain.epoch

integer

Current Cardano (mainchain) epoch

result.mainchain.slot

integer

Current Cardano slot within the epoch

Use Cases

  • Dashboards correlating Midnight and Cardano epoch/slot progression

  • Scheduling tasks aligned with epoch boundaries

  • Validator and infrastructure monitoring

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?