Skip to content

StateService.GetCoinInfo ​

Get coin info through sui.rpc.v2.StateService/GetCoinInfo on Inodra's Sui gRPC endpoint.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.StateService/GetCoinInfo. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: GetCoinInfoRequest ​

Request message for NodeService.GetCoinInfo.

FieldTypeDescription
coin_typestringThe coin type to request information about

Response: GetCoinInfoResponse ​

Response message for NodeService.GetCoinInfo.

FieldTypeDescription
coin_typestringRequired. The coin type.
metadataCoinMetadataThis field will be populated with information about this coin type's 0x2::coin::CoinMetadata if it exists and has not been wrapped.
treasuryCoinTreasuryThis field will be populated with information about this coin type's 0x2::coin::TreasuryCap if it exists and has not been wrapped.
regulated_metadataRegulatedCoinMetadataIf this coin type is a regulated coin, this field will be populated with information either from its Currency object in the CoinRegistry, or from its 0x2::coin::RegulatedCoinMetadata object for coins that have not been migrated to the CoinRegistry If this coin is not known to be regulated, only the coin_regulated_state field will be populated.

CoinMetadata ​

Metadata for a coin type

FieldTypeDescription
idstringObjectId of the 0x2::coin::CoinMetadata object or 0x2::sui::coin_registry::Currency object (when registered with CoinRegistry).
decimalsuint32Number of decimal places to coin uses.
namestringName for the token
symbolstringSymbol for the token
descriptionstringDescription of the token
icon_urlstringURL for the token logo
metadata_cap_idstringThe MetadataCap ID if it has been claimed for this coin type. This capability allows updating the coin's metadata fields. Only populated when metadata is from CoinRegistry.
metadata_cap_stateCoinMetadata.MetadataCapStateState of the MetadataCap for this coin type.

CoinTreasury ​

Information about a coin type's 0x2::coin::TreasuryCap and its total available supply

FieldTypeDescription
idstringObjectId of the 0x2::coin::TreasuryCap object.
total_supplyuint64Total available supply for this coin type.
supply_stateCoinTreasury.SupplyStateSupply state indicating if the supply is fixed or can still be minted

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "coin_type": "0x2::sui::SUI"
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.StateService/GetCoinInfo

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { coinMetadata } = await client.getCoinMetadata({ coinType: '0x2::sui::SUI' })
console.log(coinMetadata?.symbol, coinMetadata?.decimals)

Uses the typed SuiGrpcClient method from @mysten/sui v2 that calls this RPC. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per call. See credits and billing for the full table.

JSON-RPC equivalent ​

Replaces suix_getCoinMetadata. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.