SUI JSON-RPC read API for object and coin data

Authentication, rate limits, and error handling

See our JSON-RPC API overview doc.

Reading Object Data

sui_getObject

Description
Return the object data for a specified object.

Params

  • id : the ID of the queried object
  • options : SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned. All options default to false if not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_getObject",
        "params":[
            "{{objectId}}",
            {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": false,
                "showBcs": false,
                "showStorageRebate": true 
            }
    
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getObject({
    id: "{{objectId}}",
    options: {
        showBcs: false,
        showContent: false,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    }
});

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "data": {
            "objectId": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1",
            "version": "1",
            "digest": "A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw",
            "type": "package",
            "owner": "Immutable",
            "previousTransaction": "9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi",
            "storageRebate": "75924000",
            "display": {
                "data": null,
                "error": null
            }
        }
    },
    "id": 1
}
{
    "jsonrpc": "2.0",
    "result": {
        "error": {
            "code": "notExists",
            "object_id": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2"
        }
    },
    "id": 1
}
{
    data: {
        objectId: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1',
        version: '1',
        digest: 'A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw',
        type: 'package',
        owner: 'Immutable',
        previousTransaction: '9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi',
        storageRebate: '75924000',
        display: { data: null, error: null }
    }
}
{
    error: {
        code: 'notExists',
        object_id: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2'
    }
}

Response Data


sui_multiGetObjects

Description
Return the object data for a list of objects.

Params

  • ids : A list of object ids to be queried
  • options : SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned for each id. All options default to false if not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_multiGetObjects",
        "params":[
            [
                "{{objectId}}",
                "{{objectId2}}"
            ],
            {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": false,
                "showBcs": false,
                "showStorageRebate": true 
            }
    
        ],
        "id":1
    }' 
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.multiGetObjects({
    ids: [
             "{{objectId}}",
             "{{objectId2}}"
    ],
    options: {
        showBcs: false,
        showContent: false,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    }
});

Example Response

{
    "jsonrpc": "2.0",
    "result": [
        {
            "data": {
                "objectId": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1",
                "version": "1",
                "digest": "A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw",
                "type": "package",
                "owner": "Immutable",
                "previousTransaction": "9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi",
                "storageRebate": "75924000",
                "display": {
                    "data": null,
                    "error": null
                }
            }
        }, 
        {
            "error": {
                "code": "notExists",
                "object_id": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2"
            }
        }
    ],
    "id": 1
}
[
    {
        data: {
            objectId: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1',
            version: '1',
            digest: 'A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw',
            type: 'package',
            owner: 'Immutable',
            previousTransaction: '9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi',
            storageRebate: '75924000',
            display: [Object]
        }
    },
    {
        error: {
            code: 'notExists',
            object_id: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2'
        }
    }
]

Response Data
A list of type SuiObjectResponse, whose elements can be either of:


sui_tryGetPastObject

Description
Return the object information for a specified version. Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. We store full object history on Mainnet but no object history on Testnet, as explained here.

Request Parameters

NameTypeDescription
object_idstringThe ID of the object you want historical information about.
versionnumberThe version of the object you wish to retrieve.
options(Optional) SuiObjectDataOptions for specifying the object content to be returned

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: NODE_SERVICE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ 
      "jsonrpc":"2.0", 
      "method":"sui_tryGetPastObject",
      "params":[
                  "0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088be",
                  1,   
                  {        
      			        "showType": false,
      			        "showOwner": true,
      			        "showPreviousTransaction": true,
      			        "showDisplay": false,
      			        "showContent": false,
      			        "showBcs": false,
      			        "showStorageRebate": false
                  }
            ],
      "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient(NODE_SERVICE_API_KEY);

const resp = await nodeClient.tryGetPastObject({
    id: "0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd",
    version: 25907362,
    options: {
        showContent: true,
        showPreviousTransaction: true
    }
});

Example Response

// Version found example
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "details" : {
         "digest" : "6RWWWsPnPuozKWKyKPAYTATX846theRymgRo5tbFb27E",
         "objectId" : "0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd",
         "owner" : {
            "AddressOwner" : "0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0"
         },
         "previousTransaction" : "7Aje5hgRyGvJJxsqUKxBtFf34z3Mveq9LsjvwcUF58Mh",
         "version" : "25907363"
      },
      "status" : "VersionFound"
   }
}

// Version not found example: the version is invalid or the FullNode is not storing it
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "details" : [
         "0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd",
         1
      ],
      "status" : "VersionNotFound"
   }
}

// Object not found example: check that you are requesting for the correct network and object id
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "details" : "0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088be",
      "status" : "ObjectNotExists"
   }
}
// Verison found example:
{
  status: 'VersionFound',
  details: {
    objectId: '0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd',
    version: '25907363',
    digest: '6RWWWsPnPuozKWKyKPAYTATX846theRymgRo5tbFb27E',
    previousTransaction: '7Aje5hgRyGvJJxsqUKxBtFf34z3Mveq9LsjvwcUF58Mh',
    content: {
      dataType: 'moveObject',
      type: '0x607df06bc57d6e12111a44ea6f62b738c11ef207c5ecc201f103bbf7d79ed3e3::hero::Hero',
      hasPublicTransfer: true,
      fields: [Object]
    }
  }
}

// Version not found example: the version is invalid or the FullNode is not storing it
{
  status: 'VersionNotFound',
  details: [
    '0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd',
    25907362
  ]
}

// Object not found example: check that you are requesting for the correct network and object id

{
  status: 'ObjectNotExists',
  details: '0x0638aeb661190695126f978fa8b8ef54096d3dc73334e92ccc8b5ca9d69088bd'
}

Response Data

TypeDescription
ObjectReadContents vary based on the status. Statuses include "VersionFound", "ObjectNotExists", "ObjectDeleted", "VersionNotFound", and "VersionTooHigh". Some examples are shown in the example responses. Click the link on the type to learn more about the possible data shapes.


sui_tryMultiGetPastObjects

Description
Return object information for a vector of objects and versions. Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. We store full object history on Mainnet but no object history on Testnet, as explained here.

Params

  • past_objects : <[GetPastObjectRequest]> - a vector of objects and versions to be queried
  • options : <ObjectDataOptions> - Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_tryMultiGetPastObjects",
      "params":["{{past_objects}}",
      			"showType": true,
      			"showOwner": true,
      			"showPreviousTransaction": true,
      			"showDisplay": false,
      			"showContent": true,
      			"showBcs": false,
      			"showStorageRebate": true],
      "id":1}'

Result
Vec<SuiPastObjectResponse> : <[ObjectRead]>


suix_getDynamicFieldObject

Description
Return the dynamic field object information for a specified object.

Params

  • parent_object_id : String - the ID of the queried parent object
  • name : type DynamicFieldName with elements:
    • type: String- the type of the object
    • value: additional identifying information (see example below)

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFieldObject",
        "params":[
            "{{parentObjectId}}",
            "type" : "objectType",
            "value" : {{theValue}}
        ],
        "id":1
    }'
    
##
## Real-world mainnet example:
##
curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFieldObject",
        "params":[
             "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd",
             {
                 "type" : "0x2::kiosk::Listing",
                 "value" : {
                     "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                     "is_exclusive" : true
                 }
             }
         ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getDynamicFieldObject({
    parentId: "{{parentObjectId}}",
    name: {
        "type" : "{{objectType}}",
        "value" : {{value}}
     }
});

//
// Real-world mainnet example:
//
await nodeClient.getDynamicFieldObject({
    parentId: "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd",
    name: {
        "type" : "0x2::kiosk::Listing",
        "value" : {
            "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
            "is_exclusive" : true
        }
     }
});

Example Response

{
     "id" : 1,
     "jsonrpc" : "2.0",
     "result" : {
         "data" : {
             "content" : {
                 "dataType" : "moveObject",
                 "fields" : {
                      "id" : {
                          "id" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be"
                      },
                      "name" : {
                          "fields" : {
                              "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                              "is_exclusive" : true
                          },
                      "type" : "0x2::kiosk::Listing"
                      },
                      "value" : "650000000"
                 },
                 "hasPublicTransfer" : false,
                 "type" : "0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>"
            },
            "digest" : "DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X",
            "objectId" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be",
            "owner" : {
                "ObjectOwner" : "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd"
            },
            "previousTransaction" : "4fPHcSzMb5W1xK3zN79hKDrzYxR35ksQF1HZb1QGpDc9",
            "storageRebate" : "2014000",
            "type" : "0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>",
            "version" : "46057077"
        }
    }
}
{
    data: {
        objectId: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
        version: '46057077',
        digest: 'DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X',
        type: '0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>',
        owner: {
            ObjectOwner: '0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd'
        },
        previousTransaction: '4fPHcSzMb5W1xK3zN79hKDrzYxR35ksQF1HZb1QGpDc9',
        storageRebate: '2014000',
        content: {
            dataType: 'moveObject',
            type: '0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>',
            hasPublicTransfer: false,
            fields: [Object]
    }
}

Result


suix_getDynamicFields

Description
Return the list of dynamic field objects owned by an object.

Params

  • parent_object_id : String - the ID of the queried parent object
  • cursor : String - optional paging cursor
  • limit : <uint> - maximum number of items per page; defaults to maximum possible if not specified, which is 50.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeServiceAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFields",
        "params":[
            "{{parentObjectId}}",
            "{{cursor}}",           
            {{limit}}
            ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getDynamicFields({
    parentId: "{{parentObjectId}}",
    cursor: "{{cursor}}"
    limit: {{limit}}
});

Example Response

{
    "id" : 1,
    "jsonrpc" : "2.0",
    "result" : {
        "data" : [
            {
                "bcsName" : "49k8ctZtQ8wZoXT8BRc8JBEYZNRDbGJqRCQ9xpycG2rr",
                "digest" : "ZypNDZSBfSB9wNqgqGtjxfBDXM3ARr7x7GxxWhWMGpu",
                "name" : {
                    "type" : "0x2::kiosk::Lock",
                    "value" : {
                        "id" : "0x2ed079dd5b52f5d96238972907db0108de0f9af62e2786935bc2b5706a06f637"
                    }
                },
                "objectId" : "0x0055d940a0c04e0d9a620915c00d62f7059d4cf191e9e9b59177e0288c926485",
                "objectType" : "bool",
                "type" : "DynamicField",
                "version" : 29685770
            },
            {
                "bcsName" : "2AjnSJjsS2VtXpqshETPsk3dUMmfHzyzUZ3c7QmJPmFADN",
                "digest" : "DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X",
                "name" : {
                    "type" : "0x2::kiosk::Listing",
                    "value" : {
                        "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                        "is_exclusive" : true
                    }
                },
                "objectId" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be",
                "objectType" : "u64",
                "type" : "DynamicField",
                "version" : 46057077
            }
        ],
        "hasNextPage" : true,
        "nextCursor" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be"
    }
}
{
    data: [
        {
            name: [Object],
            bcsName: '49k8ctZtQ8wZoXT8BRc8JBEYZNRDbGJqRCQ9xpycG2rr',
            type: 'DynamicField',
            objectType: 'bool',
            objectId: '0x0055d940a0c04e0d9a620915c00d62f7059d4cf191e9e9b59177e0288c926485',
            version: 29685770,
            digest: 'ZypNDZSBfSB9wNqgqGtjxfBDXM3ARr7x7GxxWhWMGpu'
        },
        {
            name: [Object],
            bcsName: '2AjnSJjsS2VtXpqshETPsk3dUMmfHzyzUZ3c7QmJPmFADN',
            type: 'DynamicField',
            objectType: 'u64',
            objectId: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
            version: 46057077,
            digest: 'DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X'
        }
    ],
    nextCursor: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
    hasNextPage: true
}

Result
DynamicFieldPage : type DynamicFieldPage with elements:

  • data : Array of type DynamicFieldInfo
  • nextCursor: String | null
  • hasNextPage: Boolean

suix_getOwnedObjects

Description
Return the list of objects owned by an address.

Params

  • owner : the owner's Sui address
  • SuiObjectResponseQuery
    • filter : SuiObjectDataFilter - Optional. Object query criteria.
    • options: SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned. All options default to false if not provided.
  • cursor : <CheckpointedObjectID> - 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.
  • limit : <uint> - optional limit of items per page; default to maximum limit of 50 if not specified.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getOwnedObjects",
        "params":[
            "{{ownersSuiAddress}}",
            {
            {{SuiObjectDataFilter}}, # e.g. "Package": "0xc8ada8b9d295379f5c8128fa796b76ddfd8ab78be669463520a6df57d20e5719"
            "options": {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": true,
                "showBcs": true,
                "showStorageRebate": true 
            }
        }
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getOwnedObjects({
    owner: "{{ownersSuiAddress}}",
    filter: {
      {{SuiObjectDataFilter}} // e.g. Package: "0xc8ada8b9d295379f5c8128fa796b76ddfd8ab78be669463520a6df57d20e5719"
    },
    options:{
        showBcs: true,
        showContent: true,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    },
   cursor: null,
   limit: null
});

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "data": [{
            "data": {
                "objectId": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
                "version": "36175593",
                "digest": "Gn4n9ZvoUuTmMhUSyb6JfuLjvEvX6xnpmnCydtaLG35n",
                "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                "owner": {
                    "AddressOwner": "0x4da016bcfd074d7419afa7b9168dd3bc4b6dcfdbe76465bbb34aac299857562a"
                },
                "previousTransaction": "Hpx6kbrtGD4RXa4to7zwJrrbnXs3ovmHZCEfPEnjr7uH",
                "storageRebate": "1816400",
                "display": {
                    "data": {
                        "creator": "Worlds Beyond Creator",
                        "description": "The Infinity Passport is a loyalty program that rewards players for playing games in our ecosystem. Players earn Infinity Credits on their Infinity Passports for playing Worlds Beyond games, winning competitions, completing challenges and more. These Infinity Credits can be redeemed for a variety of rewards, including WBITS mining keys, in-game items, exclusive content, and real-world prizes. Be sure to follow news in our Discord and Twitter for the most updated information.",
                        "image_url": "https://cdn.worldsbeyondnft.com/nft/loyalty-boxes/0.png",
                        "infinity_credits": "27630",
                        "link": "https://worldsbeyondnft.com/loyalty-boxes/0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
                        "name": "Infinity Passport #81430",
                        "project_url": "https://worldsbeyondnft.com"
                    },
                    "error": null
                },
                "content": {
                    "dataType": "moveObject",
                    "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                    "hasPublicTransfer": false,
                    "fields": {
                        "attributes": {
                            "type": "0xbc3df36be17f27ac98e3c839b2589db8475fa07b20657b08e8891e3aaf5ee5f9::attributes::Attributes",
                            "fields": {
                                "map": {
                                    "type": "0x2::vec_map::VecMap<0x1::ascii::String, 0x1::ascii::String>",
                                    "fields": {
                                        "contents": [{
                                            "type": "0x2::vec_map::Entry<0x1::ascii::String, 0x1::ascii::String>",
                                            "fields": {
                                                "key": "ID",
                                                "value": "81430"
                                            }
                                        }, {
                                            "type": "0x2::vec_map::Entry<0x1::ascii::String, 0x1::ascii::String>",
                                            "fields": {
                                                "key": "Infinity Credits",
                                                "value": "900"
                                            }
                                        }]
                                    }
                                }
                            }
                        },
                        "id": {
                            "id": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371"
                        },
                        "infinity_credits": "27630",
                        "name": "Infinity Passport #81430",
                        "type": "0"
                    }
                },
                "bcs": {
                    "dataType": "moveObject",
                    "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                    "hasPublicTransfer": false,
                    "version": 36175593,
                    "bcsBytes": "W3mVY0OqbTwJ42LdIPl7ZQJ+DGTnXoioiqWW5F06I3EAAAAAAAAAABhJbmZpbml0eSBQYXNzcG9ydCAjODE0MzDuawAAAAAAAAICSUQFODE0MzAQSW5maW5pdHkgQ3JlZGl0cwM5MDA="
                }
            }
        }],
        "nextCursor": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
        "hasNextPage": false ## since this is false, you should not follow the cursor
    },
    "id": 1
}
{
    data: [ { data: [Object] } ],
    nextCursor: '0x163672be5eceb498c45a6e92e57e8da19f20c30edbd67dd9d9e8db91796991e1',
    hasNextPage: false // Since this is false, you should not follow the cursor as there
                     // are no more objects owned by the address that match the filter.
}

Response Data
PaginatedObjectsResponse containing:

  • data: list of type SuiObjectResponse
  • hasNextPage: boolean - if false, there are no more results to fetch
  • nextCursor?: String - if hasNextPage is true use this cursor in the subsequent request to fetch additional objects.

Reading Coin Data

suix_getBalance

Description
Return the total Coin balance owned by an address for one coin type.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • coin_type : <string> - (optional) fully qualified type names for the coin. Defaults to 0x2::sui::SUI if not specified.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getBalance",
        "params":[
            "{{ownerAddress}}",
            "{{coinType}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getBalance({
  owner: "{{ownerAddress}}",
  coinType: "{{coinType}}"
});

Example Response

{
    "jsonrpc":"2.0",
    "result":{
        "coinType":"0x2::sui::SUI",
        "coinObjectCount":11,
        "totalBalance":"15822947868",
        "lockedBalance":{}
    },
    "id":1
}
{
  coinType: '0x2::sui::SUI',
  coinObjectCount: 11,
  totalBalance: '15822947868',
  lockedBalance: {}
}

Response Data

A CoinBalance object containing:

  • coinType : <string>
  • coinObjectCount : <uint>
  • totalBalance : <BigInt_for_uint128>
  • lockedBalance : <object>

suix_getAllBalances

Description
Return the balance for all Coin types owned by an address.

Params

  • owner : <SuiAddress> - the owner's Sui address

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getAllBalances",
        "params":[
            "{{ownerAddress}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getAllBalances({
  owner: "{{ownerAddress}}"
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : [
        {
            "coinObjectCount" : 11,
            "coinType" : "0x2::sui::SUI",
            "lockedBalance" : {},
            "totalBalance" : "15822947868"
        }
    ],
    "id" : 1
}
[
  {
    coinType: '0x2::sui::SUI',
    coinObjectCount: 11,
    totalBalance: '15822947868',
    lockedBalance: {}
  }
]

Response Data
An array of type CoinBalance , where a CoinBalance is an object containing:

  • coinType : <string>
  • coinObjectCount : <uint>
  • totalBalance : <BigInt_for_uint128>
  • lockedBalance : <object>

suix_getCoins

Description
Return all Coin objects owned by an address of a given Coin type.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • coin_type : <string> - (optional) fully qualified type names for the coin. Defaults to 0x2::sui::SUI if not specified.
  • cursor : <ObjectID> - (optional) paging cursor of the coin Object to start after when returning results for the next request
  • limit : <uint> - (optional) maximum number of items per page

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getCoins",
        "params":[
            "{{ownerAddress}}",
            "{{coinType}}",
            "{{cursor}}",
            {{limit}}
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getCoins({
  owner: "{{ownerAddress}}",
  cursor: "{{cursor}}",
  limit: {{limit}},
  coinType: "{{coinType}}"
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : {
        "data" : [
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07",
                "coinType" : "0x2::sui::SUI",
                "digest" : "62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct",
                "previousTransaction" : "32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz",
                "version" : "1191782"
            },
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x3eb0bace095a1703998be4c8cf243a709ae3ef86bc5a6ebcd165c7d72279eea0",
                "coinType" : "0x2::sui::SUI",
                "digest" : "BQdrF9DYTU4tjfiqxW21DfFkcMENDSuWmA2cuELzeT8j",
                "previousTransaction" : "74xn4rX8hbN1dYEbhHz7jCctatVbdLXcgBXbtZ7WQbxj",
                "version" : "1074085"
            },
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727",
                "coinType" : "0x2::sui::SUI",
                "digest" : "6eB7ssJnR8wR45LqvpMcSqUnYvja4ZhqZh8H2fAeWjKG",
                "previousTransaction" : "8FhkCTwj7toJ4E9mYq6gsvG6Gbi547Sxtf1ew9t9czxk",
                "version" : "1046394"
            }
        ],
        "hasNextPage" : true,
        "nextCursor" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727"
    },
    "id" : 1
}
{
  data: [
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x1c709e5b04848d0d8bff33f704cc13e1850e89e436aa39006efb1542aae63662',
      version: '23580100',
      digest: '6LSuGqMeapf3QEer5GQP6dYbt6qnU7Syf5hDVjURmqLF',
      balance: '2822947868',
      previousTransaction: 'DWmo9FQKTjTj99jBwGcC56fKn7CzjGguEZffT62V2QS'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07',
      version: '1191782',
      digest: '62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct',
      balance: '1000000000',
      previousTransaction: '32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
      version: '629073',
      digest: 'J5bVLnhArLZYd8qp8hGeNX5iR9Y7ZjWxFTbHNmN5d2aA',
      balance: '1000000000',
      previousTransaction: '5hB7axMVtZ7dNWaZW77nR8zYsY1HMAJRAdG5rz59p9Tp'
    }
  ],
  nextCursor: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
  hasNextPage: false
}

Response Data
PaginatedCoins object with fields:

  • data: Array of type CoinStruct with fields:
    • balance: String
    • coinObjectId: String
    • coinType: String
    • digest: String
    • previousTransaction: String
    • version: String
  • hasNextPage: Boolean
  • nextCursor?: String | null

suix_getAllCoins

Description
Return all Coin objects owned by an address.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • cursor : <ObjectID> - (optional) paging cursor
  • limit : <uint> - (optional) maximum number of items per page

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getAllCoins",
        "params":[
            "{{ownerAddress}}",
            "{{cursor}}",
            {{limit}}
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients/sui";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getAllCoins({
  owner: "{{ownerAddress}}",
  cursor: "{{cursor}}",
  limit: {{limit}}
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : {
       "data" : [
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07",
               "coinType" : "0x2::sui::SUI",
               "digest" : "62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct",
               "previousTransaction" : "32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz",
               "version" : "1191782"
           },
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x3eb0bace095a1703998be4c8cf243a709ae3ef86bc5a6ebcd165c7d72279eea0",
               "coinType" : "0x2::sui::SUI",
               "digest" : "BQdrF9DYTU4tjfiqxW21DfFkcMENDSuWmA2cuELzeT8j",
               "previousTransaction" : "74xn4rX8hbN1dYEbhHz7jCctatVbdLXcgBXbtZ7WQbxj",
               "version" : "1074085"
           },
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727",
               "coinType" : "0x2::sui::SUI",
               "digest" : "6eB7ssJnR8wR45LqvpMcSqUnYvja4ZhqZh8H2fAeWjKG",
               "previousTransaction" : "8FhkCTwj7toJ4E9mYq6gsvG6Gbi547Sxtf1ew9t9czxk",
               "version" : "1046394"
           }
       ],
       "hasNextPage" : true,
       "nextCursor" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727"
    },
    "id" : 1
}
{
  data: [
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x1c709e5b04848d0d8bff33f704cc13e1850e89e436aa39006efb1542aae63662',
      version: '23580100',
      digest: '6LSuGqMeapf3QEer5GQP6dYbt6qnU7Syf5hDVjURmqLF',
      balance: '2822947868',
      previousTransaction: 'DWmo9FQKTjTj99jBwGcC56fKn7CzjGguEZffT62V2QS'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07',
      version: '1191782',
      digest: '62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct',
      balance: '1000000000',
      previousTransaction: '32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
      version: '629073',
      digest: 'J5bVLnhArLZYd8qp8hGeNX5iR9Y7ZjWxFTbHNmN5d2aA',
      balance: '1000000000',
      previousTransaction: '5hB7axMVtZ7dNWaZW77nR8zYsY1HMAJRAdG5rz59p9Tp'
    }
  ],
  nextCursor: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
  hasNextPage: false
}

Response Data
PaginatedCoins object with fields:

  • data: Array of type CoinStruct with fields:
    • balance: String
    • coinObjectId: String
    • coinType: String
    • digest: String
    • previousTransaction: String
    • version: String
  • hasNextPage: Boolean
  • nextCursor?: String | null

suix_getCoinMetadata

Description
Return metadata(e.g., symbol, decimals) for a coin.

Params

  • coin_type : <string> - fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCoinMetadata", "params":["{{coin_type}}"], "id":1}'

Result

  • SuiCoinMetadata : <SuiCoinMetadata>
  • decimals : <uint8> - Number of decimal places the coin uses
  • description : <string> - Description of the token
  • iconUrl : <string,null> - URL for the token logo
  • id : <[ObjectID]> - Object id for the CoinMetadata object
  • name : <string> - Name for the token
  • symbol : <string> - Symbol for the token

suix_getTotalSupply

Description
Return total supply for a coin.

Params

  • coin_type : <string> - fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getTotalSupply", "params":["{{coin_type}}"], "id":1}'

Result

  • Supply : <Supply>
  • value : <BigInt_for_uint64>