post https://api.infstones.com/sui/mainnet/
Coin Query API
Return metadata(e.g., symbol, decimals) for a coin
Parameters
Key | Required | Type | Detail |
---|---|---|---|
coin_type | ✅ | String | type 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
}