# Guide: Build a stablecoin supply notebook with DeFiLlama on AirnodeHub

Canonical: https://yielddispatch.com/news/3615f6f7-2416-4be8-b9e6-6d4326d9808d
Published: 2026-10-14T12:57:47.953Z
Publisher: Yield Dispatch

An unexecuted workflow for identifying a stablecoin by its API ID, recording chain and date coverage, and keeping price data apart from supply measures.

Imagine a notebook comparing one stablecoin across two chains. This is an unexecuted example workflow. The goal is to keep the asset’s identity, observation date and chain coverage attached to each entry, so repeated records do not become extra supply.

[AirnodeHub’s DeFiLlama listing](https://airnodehub.api3.org/explore/defillama) exposes stablecoin operations through an API3-operated relay. The listing was marked Free on October 13, 2026. Check its current terms before using an operation.

Begin with `listStablecoins`, whose parameters may be empty. Its optional `includePrices` boolean adds current prices, but prices are not needed to discover an asset’s identifier. Take the stablecoin ID from that list, rather than passing its ticker as the identifier. The [static Airnode contract](https://airnode-defillama.fly.dev/) requires an integer `asset` for `getStablecoin`; the upstream [free API reference](https://api-docs.defillama.com/llms-free.txt) also identifies this parameter as a stablecoin ID.

For an asset-wide history, plan `getStablecoinChart` with that ID in the optional integer `stablecoin` parameter. For one chain, use `getStablecoinChartByChain` with a required `chain` string and the same `stablecoin` ID. Obtain the chain name from `listChains`. Omitting `stablecoin` broadens the chart to all stablecoins, so keeping it explicit preserves the intended comparison.

When recording a result, retain the returned `date`, selected chain, asset ID, metric name and any documented unit. Store the retrieval time in UTC separately. A retrieval timestamp does not replace the date of the underlying observation. Keep price data from `getStablecoinPrices` separate from circulating amounts and market-cap series; a price is not a supply count, and those measures should not be added together.

Use one row for each combination of asset ID, chain scope, observation date and metric. Treat a repeated combination as an update or duplicate observation, not extra supply. Retain earlier versions when values change. Keep asset-wide totals separate from their chain breakdowns: adding both as independent contributions would count overlapping coverage. Preserve unfamiliar units or fields rather than silently converting them into an assumed dollar total.

The relay’s attestation identifies the serving Airnode. It does not mean DeFiLlama signed the response or endorsed the integration. Keep the original response, operation parameters and timestamps alongside the notebook’s rows.

## Sources

- [DefiLlama free API reference: Stablecoins](https://api-docs.defillama.com/llms-free.txt) — DefiLlama
- [DefiLlama API over Airnode: static OpenAPI contract](https://airnode-defillama.fly.dev/) — API3-operated DeFiLlama Airnode
- [DefiLlama API documentation](https://api-docs.defillama.com/) — DefiLlama
- [DefiLlama API — AirnodeHub](https://airnodehub.api3.org/explore/defillama) — API3 AirnodeHub

- [Editorial policy](https://yielddispatch.com/editorial-policy)
- [Request a correction](https://yielddispatch.com/corrections)
