Skip to content

StateService.ListOwnedObjects ​

List owned objects through sui.rpc.v2.StateService/ListOwnedObjects on Inodra's Sui gRPC endpoint.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.StateService/ListOwnedObjects. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: ListOwnedObjectsRequest ​

FieldTypeDescription
ownerstringRequired. The address of the account that owns the objects.
page_sizeuint32The maximum number of entries return. The service may return fewer than this value. If unspecified, at most 50 entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_tokenbytesA page token, received from a previous ListOwnedObjects call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListOwnedObjects must match the call that provided the page token.
read_maskgoogle.protobuf.FieldMaskMask specifying which fields to read. If no mask is specified, defaults to object_id,version,object_type.
object_typestringOptional type filter to limit the types of objects listed. Providing an object type with no type params will return objects of that type with any type parameter, e.g. 0x2::coin::Coin will return all Coin<T> objects regardless of the type parameter T. Providing a type with a type param will restrict the returned objects to only those objects that match the provided type parameters, e.g. 0x2::coin::Coin<0x2::sui::SUI> will only return Coin<SUI> objects.

Response: ListOwnedObjectsResponse ​

FieldTypeDescription
objectsrepeated ObjectPage of dynamic fields owned by the specified parent.
next_page_tokenbytesA token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Object ​

An object on the Sui blockchain.

FieldTypeDescription
bcsBcsThis Object serialized as BCS.
object_idstringObjectId for this object.
versionuint64Version of the object.
digeststringThe digest of this Object.
ownerOwnerOwner of the object.
object_typestringThe type of this object. This will be 'package' for packages and a StructTag for move structs.
has_public_transferboolDEPRECATED this field is no longer used to determine whether a tx can transfer this object. Instead, it is always calculated from the objects type when loaded in execution. Only set for Move structs
contentsBcsBCS bytes of a Move struct value. Only set for Move structs
packagePackagePackage information for Move Packages
previous_transactionstringThe digest of the transaction that created or last mutated this object
storage_rebateuint64The amount of SUI to rebate if this object gets deleted. This number is re-calculated each time the object is mutated based on the present storage gas price.
jsongoogle.protobuf.ValueJSON rendering of the object.
balanceuint64Current balance if this object is a 0x2::coin::Coin<T>
displayDisplayJSON rendering of the object based on an on-chain template. This will not be set if the value's type does not have an associated Display template.

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "owner": "0x0000000000000000000000000000000000000000000000000000000000000002",
  "page_size": 20,
  "read_mask": {
    "paths": [
      "object_id",
      "version",
      "object_type"
    ]
  }
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.StateService/ListOwnedObjects

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { objects, cursor } = await client.listOwnedObjects({
  owner: '0x0000000000000000000000000000000000000000000000000000000000000002',
  limit: 20
})
console.log(objects, cursor)

Uses the typed SuiGrpcClient method from @mysten/sui v2 that calls this RPC. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per item actually returned; an empty page bills the 1-credit minimum. See credits and billing for the full table.

JSON-RPC equivalent ​

Replaces suix_getOwnedObjects and suix_getCoins and suix_getAllCoins. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.