Skip to main content
Self-hosted HTTP endpoints for validator stake, validation round metadata, and finished round reward distribution.

Formats and conventions

  • All balance, stake, and reward fields are decimal strings in nanoTON. 1 TON = 1,000,000,000 nanoTON.
  • seqno and block values are masterchain block sequence numbers.
  • election_id is the validation round electAt timestamp.
  • election_id and block are mutually exclusive on endpoints that accept both parameters.
  • Error responses use HTTP 400 for invalid query parameters and HTTP 500 for service-side failures.
Define placeholders: <BASE_URL>: base URL of the running service. <SEQNO>: masterchain block sequence number. <BLOCK>: masterchain block sequence number inside the target round. <ELECTION_ID>: election ID of the target round.

Service routes

EndpointResponseDescription
GET /healthJSONReturn {"status":"ok"}.
GET /swaggerHTMLReturn the local Swagger UI.
GET /api/openapi.yamlYAMLReturn the embedded OpenAPI 3.0 document.

Common objects

Validator entry

validators in GET /api/validators and GET /api/round-rewards use the same object shape.
FieldDescription
rankPosition in the validator list, sorted by effective_stake in descending order.
pubkeyValidator public key encoded as lowercase hex.
effective_stakeEffective stake locked in the elector contract.
weightShare of total effective stake in the selected response, from 0 to 1.
rewardReward amount. In GET /api/validators, this is the per-block estimate for the target block. In GET /api/round-rewards, this is the total reward for the selected finished round.
poolPool smart contract address in bounceable base64url form, when available.
pool_typeDetected pool type: nominator-pool-v1.0, single-nominator-pool-v1.0, single-nominator-pool-v1.1, or other.
validator_addressValidator wallet or control address, when available.
owner_addressOwner address for a single nominator pool, when available.
validator_stakeValidator’s own deposited funds. Present for nominator-pool-v1.0.
nominators_stakeSum of nominator deposits. Present for nominator-pool-v1.0.
total_stakeTotal pool funds computed as effective_stake + credit, where credit is the returned stake still held in the elector contract.
validator_reward_shareFraction of rewards kept by the validator, for example 0.3 for 30%. Present for nominator-pool-v1.0.
nominators_countNumber of nominators. Present for nominator-pool-v1.0.
nominatorsArray of nominator entries. Present for nominator-pool-v1.0.
Pool type background:

Nominator entry

FieldDescription
addressNominator wallet address in bounceable base64url form.
weightShare of total nominator deposits in the pool, from 0 to 1.
rewardReward amount assigned to the nominator.
effective_stakeNominator share of the validator’s effective stake.
stakeRaw nominator deposit in the pool contract.

GET /api/validators

Return the active validator set for a target masterchain block. If seqno is not provided, the service uses the latest masterchain block.
curl "<BASE_URL>/api/validators?seqno=<SEQNO>"
Query parameters:
ParameterTypeDescription
seqnouint32Target masterchain block sequence number. Optional.
Response fields:
FieldDescription
response_time_msServer-side response time in milliseconds.
block.seqnoResolved masterchain block sequence number.
block.timeTarget block time in UTC, RFC 3339 format.
validation_round.startValidation round start time for the target block.
validation_round.endValidation round end time for the target block.
validation_round.start_blockFirst masterchain block of the round, when resolved.
validation_round.end_blockLast masterchain block of the round, when the round has already finished.
election_idElection ID of the round active at the target block.
prev_election_idElection ID of the previous round, when resolved.
next_election_idElection ID of the next round, when the selected round has already finished.
elector_balanceElector contract balance at the target block.
total_stakeSum of effective stakes across the active validator set.
reward_per_blockEstimated total reward for the target block, computed as the change in the elector bonuses value between the target block and the previous block.
validatorsArray of validator entries.

GET /api/validation-rounds

Return metadata for the round selected by election_id, block, or the latest masterchain block.
curl "<BASE_URL>/api/validation-rounds?block=<BLOCK>"
Query parameters:
ParameterTypeDescription
election_idint64Return the round that matches this election ID. Optional. Mutually exclusive with block.
blockuint32Return the round that contains this masterchain block. Optional. Mutually exclusive with election_id.
Response fields:
FieldDescription
response_time_msServer-side response time in milliseconds.
roundsArray of validation round entries.
errorOptional top-level error string when round traversal stops early.
Validation round entry fields:
FieldDescription
election_idElection ID of the selected round.
startValidation round start time in UTC, RFC 3339 format.
endValidation round end time in UTC, RFC 3339 format.
start_blockFirst masterchain block of the round.
end_blockLast masterchain block of the round, when the round has finished.
finishedtrue when the round has finished.
prev_election_idElection ID of the previous round, when resolved.
next_election_idElection ID of the next round, when the selected round has finished.
errorOptional per-round error string.

GET /api/round-rewards

Return per-validator and per-nominator reward distribution for a finished validation round.
curl "<BASE_URL>/api/round-rewards?election_id=<ELECTION_ID>"
Exactly one of election_id or block is required. Query parameters:
ParameterTypeDescription
election_idint64Election ID of a finished round. Optional. Mutually exclusive with block.
blockuint32Masterchain block sequence number inside a finished round. Optional. Mutually exclusive with election_id.
Response fields:
FieldDescription
response_time_msServer-side response time in milliseconds.
election_idElection ID of the selected finished round.
prev_election_idElection ID of the previous round, when resolved.
next_election_idElection ID of the next round.
round_startValidation round start time in UTC, RFC 3339 format.
round_endValidation round end time in UTC, RFC 3339 format.
start_blockFirst masterchain block of the round.
end_blockLast masterchain block of the round.
total_bonusesTotal bonuses paid by the elector for the round.
total_stakeTotal stake recorded for the round in past_elections.
validatorsArray of validator entries.
If the selected round has not finished yet, the service returns HTTP 500 with an error message in the response body.