suix_getOwnedObjects - Sui
Example code for the suix_getOwnedObjects JSON-RPC method. Complete guide on how to use suix_getOwnedObjects JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Default/Supported Values
Request Example
curl --location --request POST https://go.getblock.io/<ACCESS-TOKEN>/ \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "suix_getOwnedObjects",
"params": [
"0x94f1a597b4e8f709a396f7f6b1482bdcd65a673d111e49286c527fab7c2d0961",
{
"filter": {"StructType": "0x2::coin::Coin<0x2::sui::SUI>"},
"options": {"showType": true, "showOwner": true}
},
null,
10
],
"id": "getblock.io"
}'import requests
url = "https://go.getblock.io/<ACCESS-TOKEN>/"
payload = {
"jsonrpc": "2.0",
"method": "suix_getOwnedObjects",
"params": ["0x94f1a597b4e8f709a396f7f6b1482bdcd65a673d111e49286c527fab7c2d0961", None, None, 10],
"id": "getblock.io"
}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print("Result:", response.json().get("result"))Response
Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error
Description
Solution
SDK Integration
Last updated
Was this helpful?