Skip to main content

GetCoinInfo

gRPC
RPC Methodsui.rpc.v2.StateService/GetCoinInfo

Retrieves the metadata and treasury information for the specified coin type.

Proto files required

Running the examples below requires the official Sui proto files. Download the proto files, then set the example's -import-path relative to the proto root (the -proto path in the examples is relative to the proto root).

github.com/MystenLabs/sui-apis/tree/main/proto

Request Message
coin_typestring
The coin type to request information about.
Response Message
coin_typestring
Required. The coin type.
This field will be populated with information about this coin type's 0x2::coin::CoinMetadata if it exists and has not been wrapped.
idstring
CoinMetadata or Currency ObjectId.
decimalsinteger
Number of decimal places.
namestring
Token name.
symbolstring
Token symbol.
descriptionstring
Description of the coin.
icon_urlstring
Logo/icon URL.
metadata_cap_idstring
MetadataCap ObjectId.
metadata_cap_statestring
State of the metadata cap.
This field will be populated with information about this coin type's 0x2::coin::TreasuryCap if it exists and has not been wrapped.
idstring
TreasuryCap ObjectId.
total_supplyinteger
Total supply of the coin.
supply_statestring
State of the supply.
If this coin type is a regulated coin, this field will be populated with information from its Currency object in the CoinRegistry, or from its 0x2::coin::RegulatedCoinMetadata object for coins not yet migrated. If the coin is not known to be regulated, only the coin_regulated_state field will be populated.
idstring
RegulatedCoinMetadata ObjectId.
coin_metadata_objectstring
CoinMetadata or CoinData ID.
deny_cap_objectstring
DenyCap ID.
allow_global_pauseboolean
Whether global pause is allowed.
variantinteger
Variant of the regulated metadata.
coin_regulated_statestring
Regulated state of the coin.
grpcurl
grpcurl \
-import-path . \
-proto sui/rpc/v2/state_service.proto \
-H 'X-API-KEY: nodit-demo' \
-d '{
"coin_type": "0x2::sui::SUI"
}' \
sui-mainnet.nodit.io:443 \
sui.rpc.v2.StateService/GetCoinInfo