Skip to main content

sui_getObject

Return the object information for a specified object

Return the object information for a specified object

Parameters

  • object_id : <ObjectID> - the ID of the queried object
  • options : <ObjectDataOptions> - options for specifying the content to be returned

Returns

  • SuiObjectResponse : <SuiObjectResponse>
    • data : <[ObjectData]>
    • error : <[ObjectResponseError]>

Example Request and Result for sui_getObject

Request

curl --location 'https://sui-testnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getObject",
"params": [
"0x125d701cc584f5aba71a1f73c52b0ef08493f1ac9801e8e6d9f0f5c1cc1bcfc4",
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
}'

Result:

{
"jsonrpc": "2.0",
"result": {
"data": {
"objectId": "0x125d701cc584f5aba71a1f73c52b0ef08493f1ac9801e8e6d9f0f5c1cc1bcfc4",
"version": "8241435",
"digest": "FkzYC7YoJZ1jDHszxVYeSYoqss5jkHwrCmWXcLhq4y5W",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0xdd944d0d5418aeb64ceeda8b57d7481f1e03d10bca3595d17bf12bc78bd3fa98"
},
"previousTransaction": "4gJLfT5fEXBFB3SVKBqeuheFM7depHVKbLpjngoAVXrX",
"storageRebate": "988000",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "422286508",
"id": {
"id": "0x125d701cc584f5aba71a1f73c52b0ef08493f1ac9801e8e6d9f0f5c1cc1bcfc4"
}
}
}
}
},
"id": 1
}