Skip to main content

Batch Get Objects

Get specific staking position objects by ID using LedgerService/BatchGetObjects. Useful for portfolio tracking and rewards calculation.

Service

sui.rpc.v2.LedgerService

Parity

Direct

This method has a direct mapping from the JSON-RPC method suix_getStakesByIds.

Request

Parameters

{
"requests": [
{
"object_id": "0x3938a73bc8f258ca3e60a30e443c62ed3ad0248864df7035d2074c89d4b932f7"
}
],
"read_mask": {
"paths": [
"object_id",
"version",
"owner",
"object_type",
"bcs"
]
}
}

Example (grpcurl)

grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{"requests":[{"object_id":"0x3938a73bc8f258ca3e60a30e443c62ed3ad0248864df7035d2074c89d4b932f7"}],"read_mask":{"paths":["object_id","version","owner","object_type","bcs"]}}' \
grpc.surflux.dev:443 \
sui.rpc.v2.LedgerService/BatchGetObjects
Run in Playground

Response

The response structure is defined by the sui/rpc/v2/ledger_service.proto definition.

Response Fields

FieldTypeDescription
objectsGetObjectResultSee proto definition
info

For full field definitions, please refer to the Sui Protobuf definitions.