Skip to main content

suix_getOwnedObjects

POST

Return the list of objects owned by an address. Note that if the address owns more than QUERY_MAX_RESULT_LIMIT objects, the pagination is not accurate, because previous page may have been updated when the next page is fetched. Please use suix_queryObjects if this is a concern.
param[0]
addressstringrequired
The owner's Sui address
param[1]
queryobjectrequired
The objects query criteria.
filteroneOf
If None, no filter will be applied
MatchAllarrayrequired
optionsobject
config which fields to include in the response, by default only digest is included
showBcsboolean
Whether to show the content in BCS format. Default to be False
showContentboolean
Whether to show the content(i.e., package content or Move struct content) of the object. Default to be False
showDisplayboolean
Whether to show the Display metadata of the object for frontend rendering. Default to be False
showOwnerboolean
Whether to show the owner of the object. Default to be False
showPreviousTransactionboolean
Whether to show the previous transaction digest of the object. Default to be False
showStorageRebateboolean
Whether to show the storage rebate of the object. Default to be False
showTypeboolean
Whether to show the type of the object. Default to be False
param[2]
cursorstringrequired
An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.
param[3]
limitintegerrequired
Max number of items returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.
Responses
jsonrpcstring
idinteger
next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.
bcsoneOf
Move object content or package content in BCS, default to be None unless SuiObjectDataOptions.showBcs is set to true
bcsBytesstringrequired
Base64 encoding
dataTypestringrequired
hasPublicTransferbooleanrequired
typestringrequired
versionstringrequired
contentoneOf
Move object content or package content, default to be None unless SuiObjectDataOptions.showContent is set to true
dataTypestringrequired
fieldsstringrequired
hasPublicTransferbooleanrequired
typestringrequired
digestobjectrequired
The Display metadata for frontend UI rendering, default to be None unless SuiObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined See more details in <https://forums.sui.io/t/nft-object-display-proposal/4872>
dataobject
erroroneOf
codestringrequired
object_idobjectrequired
objectIdobjectrequired
owneroneOf
The owner of this object. Default to be None unless SuiObjectDataOptions.showOwner is set to true
Object is exclusively owned by a single address, and is mutable.
AddressOwnerobjectrequired
previousTransactionobject
storageRebatestring
The amount of SUI we would rebate if this object gets deleted. This number is re-calculated each time the object is mutated based on the present storage gas price.
typestring
The type of the object. Default to be None unless SuiObjectDataOptions.showType is set to true
versionobjectrequired
erroroneOf
codestringrequired
object_idobjectrequired
hasNextPagebooleanrequired
nextCursorobject
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Bad Request"
}
cURL
curl -X POST 'https://sui-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "suix_getOwnedObjects",
"params": [
"0xdbc9abc01a87906b033a75750e741edb2df5ea5d55c96a611371d22799d26827",
{
"filter": {
"MatchAll": [
{
"StructType": "0x2::coin::Coin<0x2::sui::SUI>"
},
{
"AddressOwner": "0xdbc9abc01a87906b033a75750e741edb2df5ea5d55c96a611371d22799d26827"
},
{
"Version": "13488"
}
]
},
"options": {
"showBcs": false,
"showContent": false,
"showDisplay": false,
"showOwner": true,
"showPreviousTransaction": true,
"showStorageRebate": false,
"showType": true
}
},
"0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f",
3
]
}'