Block Endpoints
Block endpoints provide access to all block data on SwssChain mainnet and testnet. SwssChain produces one block per second, so block data updates continuously. All historical block data is permanently available with no archival cutoff. All requests require a valid API key in the X-API-Key header.
Base URL: https://swssscan.swss.io/api/v1
GET /blocks/latest
Returns the most recently finalised block.
curl https://swssscan.swss.io/api/v1/blocks/latest -H "X-API-Key: your_api_key"
{
"blockNumber": 1234567,
"blockHash": "0xblock9f2a...",
"parentHash": "0xparent8b1c...",
"timestamp": "2026-05-15T10:00:01Z",
"validator": "0xvalidator...",
"transactionCount": 42,
"deedCount": 3,
"gasUsed": "8500000",
"gasLimit": "30000000",
"baseFeePerGas": "1000000000",
"size": 12480
}
GET /blocks/{blockNumber}
Returns a specific block by its sequential block number.
curl https://swssscan.swss.io/api/v1/blocks/1234567 -H "X-API-Key: your_api_key"
GET /blocks/{blockHash}
Returns a block by its 32-byte hash. The hash must be a full 66-character hex string prefixed with 0x.
curl https://swssscan.swss.io/api/v1/blocks/0xblock9f2a... -H "X-API-Key: your_api_key"
GET /blocks/range
Returns a range of blocks. Maximum 100 blocks per request. Both from and to are required.
curl "https://swssscan.swss.io/api/v1/blocks/range?from=1234500&to=1234599" -H "X-API-Key: your_api_key"
{
"blocks": [ /* array of block objects */ ],
"count": 100,
"from": 1234500,
"to": 1234599
}
Block Object Fields Reference
| Field | Type | Description |
blockNumber | integer | Sequential block height |
blockHash | string | 32-byte block hash (0x-prefixed) |
parentHash | string | Hash of the preceding block |
timestamp | string | ISO 8601 block production timestamp |
validator | string | Address of the block-producing validator |
transactionCount | integer | Total transactions in the block |
deedCount | integer | Deed transactions in the block |
gasUsed | string | Total gas consumed (in wei string form) |
gasLimit | string | Block gas limit |
baseFeePerGas | string | EIP-1559 base fee in wei |
size | integer | Block size in bytes |
Next Steps