Home

Get epoch

POST
https://sui-grpc.nownodes.io/sui.rpc.v2.LedgerService/GetEpoch

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns epoch information.

If no epoch is provided, the current epoch is returned.

The response may include transaction boundaries and end-of-epoch totals and commitments when available. An epoch not yet served returns NOT_FOUND.

gRPC method: sui.rpc.v2.LedgerService.GetEpoch (unary).

This is a gRPC method (HTTP/2, Protocol Buffers), not a REST endpoint. The request and response bodies below are shown in the proto3 JSON form that tools such as grpcurl and Postman accept and print. Pass your NOWNodes API key as the api-key gRPC metadata header. Proto files: sui/rpc/v2/ledger_service.proto.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.GetEpoch

Body

application/json
epochstring<uint64>

The requested epoch. If no epoch is provided the current epoch will be returned.

readMaskstring

Comma-separated protobuf FieldMask in lowerCamelCase; nested paths use dots. Defaults to epoch,firstCheckpoint,lastCheckpoint,start,end,referenceGasPrice,protocolConfig.protocolVersion.

Response

200OK

Successful response.

default

gRPC error. The status code (e.g. UNAUTHENTICATED, INVALID_ARGUMENT, NOT_FOUND) is returned in the grpc-status trailer, details in grpc-message. A node that does not support the requested operation returns UNIMPLEMENTED (NOT_SERVED_HERE); a node not ready to serve it returns UNAVAILABLE (NOT_READY). An unserved epoch returns NOT_FOUND.