Market data

Get token metadata and supply

Before you render a token amount you need its decimals and symbol. The metadata endpoint returns name, symbol, decimals and supply in a single C1 read that is cheap enough to cache aggressively.

はじめる前に
  • A live API key
  • The token id you want to describe

1Call the metadata endpoint

Request metadata by token id. This is a C1 read — one of the cheapest calls on the surface — so treat it as reference data.

curl https://api.1st-node.com/v1/market/token/eth/metadata \
  -H "Authorization: Bearer sk_live_..."

2Read name, symbol, decimals and supply

Use decimals to format raw on-chain balances into human amounts, and symbol/name to label them. Supply figures give you the denominator for market-cap math.

> { "name": "Ether", "symbol": "ETH",
>   "decimals": 18, "supply": "120280000" }

3Cache it — metadata rarely changes

Name, symbol and decimals are effectively immutable and supply moves slowly, so cache the response for long TTLs instead of fetching per request.

よくある質問

How cheap is a metadata read?

It is a C1 read, the lowest tier on the surface. Combined with caching it costs almost nothing to keep token reference data on hand.

Why do I need decimals?

On-chain balances are integers in the token's smallest unit. Decimals let you convert them to human-readable amounts without guessing.

続けて読む

チャージして、キーを取得し、リリース。

セルフサーブ。暗号資産またはカードで支払い。クレジットで従量課金——重いプリミティブは高く、単純なものは安価。

APIキーを取得