v1

latestOpenAPI 3.0.02026-07-26268286602.5 KB
legacy

Get block number by time stamp

Returns the block number created closest to a provided timestamp.

Required:

  • timestamp
  • closest
get/{chain_id}/api/legacy/block/get-block-number-by-time

Path parameters

chain_idstring required

The ID of the blockchain

Query parameters

timestampstring

Unix timestamp in seconds.

closest'before' | 'after'

Whether to return the block before or after the timestamp.

Response

Block number

messagestring required

Human-readable status string — OK on success, a descriptive error message otherwise.

status'0' | '1' | '2' required

1 = OK, 0 = error, 2 = pending.