sui_multiGetObjects - Sui

Example code for the sui_multiGetObjects JSON-RPC method. Complete guide on how to use sui_multiGetObjects JSON-RPC in GetBlock Web3 documentation.

This method returns object data for a list of objects on the SUI network in a single request. This batch method is more efficient than making individual sui_getObject calls when you need data for multiple objects.

Parameters

Parameter
Type
Required
Description

object_ids

array

Yes

Array of object IDs to query

options

ObjectDataOptions

No

Options for response content

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "sui_multiGetObjects",
  "params": [
    [
      "0x53e4567ccafa5f36ce84c80aa8bc9be64e0d5ae796884274aef3005ae6733809",
      "0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760"
    ],
    {
      "showType": true,
      "showOwner": true,
      "showContent": true
    }
  ]
}'

Response Example

Response Parameters

Parameter
Type
Description

result

array

Array of object responses

Use Cases

  • Fetch multiple NFTs efficiently

  • Load coin objects for transaction building

  • Batch validate object existence

  • Optimize API calls for large datasets

Error Handling

Error Code
Description

-32602

Invalid params - malformed object IDs

-32603

Internal error - node issues

SDK Integration

Last updated

Was this helpful?