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.

Başlamadan önce
  • 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.

Sıkça sorulanlar

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.

Okumaya devam et

Bakiye yükle, anahtarını al, yayına çık.

Self servis. Kripto ya da kartla öde. Krediyle ölçümlenir — ağır ilkel yapılar daha pahalı, basitler ucuz.

API anahtarı al