钱包 API

SUI Object#

查询SUI 链上的所有对象。

请求路径#

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

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYes链唯一标识
addressStringYes钱包地址
tokenAddressStringYes代币地址
limitStringNo游标位置,默认为第一个
cursorObjectNo每次查询多少条,默认值为 50,最大 50

响应参数#

ParameterTypeDescription
tokenAddressString币种合约地址
objectsArrayobject 列表
>amountString币种余额
>digestString32字节事务摘要,指示上次将此对象作为输出包含在内的交易
>versionString8字节无符号整数版本,随着每次修改它的事务而单调递增
>objectIdString32字节的全局唯一ID。对象ID是从创建对象的交易的摘要和编码交易生成的ID数量的计数器派生的
cursorString下一个游标位置

请求示例#

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' 

响应示例#

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"
                }
            ]
        }
    ]
}