API Reference
Block Endpoints
Pre-launch
Section
API Reference
Documentation category
Type
Guide
Technical reference
Summary
Complete reference for SwssChain block API endpoints: latest block, block by number or hash, and block range queries with full response shapes.
SWSS Foundation Notice

This documentation is restricted to authorised members of the SWSS Developer Community. Access is granted exclusively through SWSS DevHub, after KYB and SWSS Foundation approval.

All SwssChain GitHub repositories are private. Significant updates are currently deploying across the full SWSS Ecosystem. SDK and API specifications are subject to change at any time in accordance with security requirements and SwssChain Foundation governance decisions.

Join SWSS DevHub →Have a question? Use the Need Help? button below.
SDK Update Notice

SWSS SDK v2.1 is deploying across the ecosystem. API signatures may change during this period. Ensure your integration uses the latest schema from SWSS DevHub.

Article Content

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

FieldTypeDescription
blockNumberintegerSequential block height
blockHashstring32-byte block hash (0x-prefixed)
parentHashstringHash of the preceding block
timestampstringISO 8601 block production timestamp
validatorstringAddress of the block-producing validator
transactionCountintegerTotal transactions in the block
deedCountintegerDeed transactions in the block
gasUsedstringTotal gas consumed (in wei string form)
gasLimitstringBlock gas limit
baseFeePerGasstringEIP-1559 base fee in wei
sizeintegerBlock size in bytes

Next Steps