Skip to main content
Returns the latest block Goldsky has for one chain, and how far behind the current time it is. Use it to check how fresh the Blocks data is before you rely on it, or to tell a quiet chain from a stalled one.

Parameters

string
required
The chain’s slug, such as ethereum. Takes the same 21 values as Blocks. Polygon is matic, not polygon.

Response

The response is a single object, with no data array and no pagination.
string
The chain’s slug.
integer
Number of the latest block. Blocks dropped in a reorganization don’t count.
integer
Time of that block, in Unix seconds.
integer
Seconds between the current time and timestamp. Compare it with the chain’s block time: a lag much longer than a few blocks means the data is behind.

How the data behaves

  • It moves every block. Responses carry Cache-Control: public, max-age=2.
  • Lag includes block time. head_lag_seconds counts from the block’s timestamp, so it’s above zero even when Goldsky has the chain’s newest block. It’s never below zero.

Errors

This endpoint returns the same errors as the other feeds. An unsupported chain returns 400 BAD_REQUEST, and error.message lists the supported slugs.

Billing

With an API key, each request is one compute unit, at $10 per million. With x402, each request costs 10 atomic USDC ($0.00001). See Feeds pricing.

Example