sui_accountPortfolio
Get the account's coin and NFT assets on the Sui chain.
Through sui_accountPortfolio, you can fetch the broad data of coin and NFT assets owned by certain holders, such as the objectId, type, name and transactionId value, etc.,
account
is necessary. Using this API, you could acknowledge the coin and NFT possession of certain holders. Some investigation and buying strategies could be made by calling this API. Object
- An object with the following fields (required):account(hex string, required)
- the account address you want to query.
Object
- An object with the following fields:id(integer number)
- JSON-RPC id.jsonrpc(string)
- JSON-RPC version.result(object)
- an object with the following fields:coinList(array of object, defined below)
objectId(hex string)
- object unique identifier.version(integer number)
- the auto-increment number.digest(string)
- the sha3-256 digest of the coin object.type(string)
- the type of the coin, for distinguishing coin or nft or so on.transactionId(string)
- transaction's id.name(string)
- the name.balance(integer number)
the balance of the account address.
nftList(array of object, defined below)
objectId(hex string)
- object unique identifier.version(integer number)
- the version of the nft.digest(string)
- the sha3-256 digest of the nft object.type(string)
- the type of the nft, for distinguishing coin or nft or so on.transactionId(string)
- transaction's id.description(string)
- nft description.name(string)
- nft name.url(string)
- the link of the nft.
curl
curl --location --request POST 'apis.blockvision.org/v1/<api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "sui_accountPortfolio",
"params": {
"account": "0x8724333d4d540340e57d71e554dff10e4c72c998"
}
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"coinList": [
{
"objectId": "0x06f9170500566eef72e4ca916006438e337ea575",
"version": 2,
"digest": "zgbSpg4v42NQAQ+Xree+VyGTFm1lP03Ssv85hvuEe5w=",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"transactionId": "Svmlr9Lrq2wSlMM3Qiqn7heGQsJC9zABpkdkuB/Guhk=",
"name": "SUI",
"balance": 9998723
},
{
"objectId": "0x405eec58e90ae87805755e9b4817a959c013962f",
"version": 1,
"digest": "JRqUPr5bdLYaU0V6dkIt3DhM5jwgJ8jkqOSAOuWTWL4=",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"transactionId": "JJxRYMSXlZ4HZsEgxtNknQLN529r2FNsyg+htwjuZac=",
"name": "SUI",
"balance": 10000000
}
// ...
],
"nftList": [
{
"objectId": "0x948ab0e882ad8cf7f1c32cd4f8dd0fdedb33e2f4",
"version": 1,
"digest": "ZAfnzcSXQ6lO82bD1bHupksHTCis50SBMrEN5tHkQv4=",
"type": "0x2::devnet_nft::DevNetNFT",
"transactionId": "Svmlr9Lrq2wSlMM3Qiqn7heGQsJC9zABpkdkuB/Guhk=",
"description": "An NFT created by Suiet",
"name": "Suiet NFT",
"url": "https://xc6fbqjny4wfkgukliockypoutzhcqwjmlw2gigombpp2ynufaxa.arweave.net/uLxQwS3HLFUailocJWHupPJxQsli7aMgzmBe_WG0KC4"
}
// ...
]
}
}
Last modified 7d ago