Home

Batch get objects

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns multiple objects in one request.

gRPC method: sui.rpc.v2.LedgerService.BatchGetObjects (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 '{"requests": [{"objectId": "0xOBJECT_ID_1"}, {"objectId": "0xOBJECT_ID_2"}]}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.BatchGetObjects

Body

application/json
requestsArray<GetObjectRequest>
Show child attributes
objectIdstring

Required. The ObjectId of the requested object.

versionstring<uint64>

Request a specific version of the object. If no version is specified, and the object is live, then the latest version of the object is returned.

readMaskobject

Mask specifying which fields to read. If no mask is specified, defaults to object_id,version,digest. Read mask: list of field paths to return, in snake_case (e.g. "object_id", "version", "digest"). Nested fields use dots (e.g. "effects.status").

Show child attributes
pathsArray<string>required

Field paths to return.

readMaskobject

Mask specifying which fields to read. If no mask is specified, defaults to object_id,version,digest. Read mask: list of field paths to return, in snake_case (e.g. "object_id", "version", "digest"). Nested fields use dots (e.g. "effects.status").

Show child attributes
pathsArray<string>required

Field paths to return.

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.