suix_getCoinMetadata

Coin Query API

Return metadata(e.g., symbol, decimals) for a coin

Parameters

KeyRequiredTypeDetail
coin_typeStringtype name for the coin
"params": [
  "0x2::sui::SUI"
]

Result

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

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "suix_getCoinMetadata",
  "params": [
    "0x2::sui::SUI"
  ]
}
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "decimals": 9,
        "name": "Sui",
        "symbol": "SUI",
        "description": "",
        "iconUrl": null,
        "id": "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3"
    },
    "id": 1
}
Language
Click Try It! to start a request and see the response here!