suix_getCoinMetadata
Return metadata (e.g., symbol, decimals) for a coin. Note that if the coin's metadata was wrapped in the transaction that published its marker type, or the latest version of the metadata object is wrapped or deleted, it will not be found.
Parameters
coin_type·string· requiredtype name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
Result
SuiCoinMetadata·SuiCoinMetadatadecimals·integer(uint8) · requiredNumber of decimal places the coin uses.description·string· requiredDescription of the tokeniconUrl·stringornull· optionalURL for the token logoid·ObjectIDornull· optionalObject id for the CoinMetadata objectname·string· requiredName for the tokensymbol·string· requiredSymbol for the token
Example
Request
bash
curl https://mainnet-api.inodra.com/v1/jsonrpc \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "suix_getCoinMetadata",
"params": [
"0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC"
]
}'Response
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"decimals": 9,
"name": "Usdc",
"symbol": "USDC",
"description": "Stable coin.",
"iconUrl": null,
"id": "0x51ceab2edc89f74730e683ebee65578cb3bc9237ba6fca019438a9737cf156ae"
}
}