suix_getCoinMetadata
Return metadata(e.g., symbol, decimals) for a coin
Return metadata(e.g., symbol, decimals) for a coin
Parameters
coin_type
: <string>
- fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
Returns
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
Example Request and Result for sui_getCoinMetadata
Request
curl
--location --request POST 'https://sui-testnet.blastapi.io/<project_id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getCoinMetadata",
"params": [
"0x2::sui::SUI"
]
}'
Result
{
"jsonrpc": "2.0",
"result": {
"decimals": 9,
"name": "Sui",
"symbol": "SUI",
"description": "",
"iconUrl": null,
"id": null
},
"id": 1
}