Wallet API

SUI Object#

Retrieve all objects on the SUI network.

Request Path#

POST https://www.okx.com/api/v5/wallet/pre-transaction/sui-object

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique identifier for the chain
addressStringYesWallet address
tokenAddressStringYesToken address
limitStringNoNumber of entries per query, default is 50, maximum is 50
cursorObjectNoCursor position, defaults to the first entry

Response Parameters#

ParameterTypeDescription
tokenAddressStringToken address
objectsArrayObject list
>amountStringtoken balance
>digestStringA 32-byte transaction summary indicating the last transaction that included this object as an output
>versionString8-byte unsigned integer version, monotonically increasing with each transaction that modifies it
>objectIdStringA 32-byte globally unique ID. The object ID is derived from the digest of the transaction that created the object and a counter of the number of IDs generated by the encoding transaction.
cursorStringNext cursor

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/pre-transaction/sui-object?chainIndex=784&address=0x935029ca5219502a47ac9b69f556ccf6e2198b5e7815cf50f68846f723739cbd&cursor=0x00b6bbf25a188b36c9307909d99449b95d15e08c3a6f0333814d5bddccff5176' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z' 

Response Example#

200
{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "tokenAddress": "0x2::sui::SUI",
            "cursor": "0x014f206e9de4bf4fbfc4dcc4bca0e2a8e58ff066beb33f7ff64d6ad5beb48419",
            "objects": [
                {
                    "amount": "10000004114400",
                    "digest": "2izKmAEDZ4dRMPSJaxycRJMuaMVnWBtKSCg24Hx7KwoE",
                    "version": "368758084",
                    "objectId": "0x014e81bf02d343f87fda11814bca88ee775c1721a61dbc1910f18ea5b13a53c2"
                },
                {
                    "amount": "500019226840",
                    "digest": "5sMxZk5MvJDCGxjdT8uCkDbEPXRwyhh8zRWuLzDjqsqJ",
                    "version": "333512928",
                    "objectId": "0x014f206e9de4bf4fbfc4dcc4bca0e2a8e58ff066beb33f7ff64d6ad5beb48419"
                }
            ]
        }
    ]
}