> ## Documentation Index
> Fetch the complete documentation index at: https://coinstats.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Real-world assets

> Tokenized stocks, commodities, and ETFs: overview, asset data, tokens, trading markets, and history.

The RWA API provides the same published real-world asset data used by CoinStats.
All seven endpoints require your `X-API-KEY` (or an OAuth Bearer token) and use
`https://api.coinstats.app` as the base URL.

| GET endpoint | What it returns | Credits |
| - | - | - |
| [/v1/rwa/overview](/docs/openapi/get-rwa-overview) | Market totals, asset counts, market leaders and top gainers | 1 |
| [/v1/rwa/assets](/docs/openapi/get-rwa-assets) | Paginated stocks, commodities and ETFs | 2 |
| [/v1/rwa/history](/docs/openapi/get-rwa-history) | Aggregate market cap or volume history, with asset-type breakdowns | 3 |
| [`/v1/rwa/assets/{rwaId}`](/docs/openapi/get-rwa-asset) | Asset data and metadata, markets and history availability | 1 |
| [`/v1/rwa/assets/{rwaId}/tokens`](/docs/openapi/get-rwa-tokens) | Tokens, issuers, networks, contracts and coin mappings | 2 |
| [`/v1/rwa/assets/{rwaId}/markets`](/docs/openapi/get-rwa-markets) | Trading pairs, exchanges, prices and 24h volume | 3 |
| [`/v1/rwa/assets/{rwaId}/history`](/docs/openapi/get-rwa-asset-history) | Per-asset price, market cap or volume history | 3 |

## Find an asset

```bash theme={null}
curl 'https://api.coinstats.app/v1/rwa/assets?assetType=commodity&search=gold&limit=10' \
  -H 'X-API-KEY: YOUR_API_KEY'
```

Use the returned `rwaId`, such as `gold`, for the detail, tokens, markets and
asset-history endpoints. An RWA asset ID is distinct from a cryptocurrency
`coinId`. The tokens endpoint returns a nullable CoinStats `coinId`, which can
be used with the regular coin endpoints when a unique current mapping exists.

## Filters and sorting

All endpoints accept `currency`, defaulting to `USD`. Use an uppercase supported
code from [/currencies](/docs/openapi/get-currencies). Monetary values are converted;
percentages, quantities and timestamps are unchanged. Missing monetary values
remain `null`.

The three list endpoints accept `page=1`, `limit=100` (maximum 100), literal
case-insensitive `search` (up to 100 characters), `sortBy` and
`sortDirection=desc`. Null values sort last in either direction.

| List | Filters | Sort fields | Default sort |
| - | - | - | - |
| Assets | `assetType`: `all`, `stock`, `commodity`, `etf` | `name`, `tokenizedPrice`, `tokenizedMarketCap`, `tokenizedVolume24h`, `change1h`, `change24h`, `change7d`, `change14d`, `change30d`, `change200d`, `change1y` | `tokenizedMarketCap` |
| Tokens | `issuer`, `network` | `name`, `price`, `marketCap`, `volume`, `change24h` | `volume` |
| Markets | `token`, `issuer`, `exchange` | `name` (exchange name), `price`, `volume` | `volume` |

Use filter IDs returned in each response's `filters` object. Market `exchange`
uses CoinStats exchange IDs. Token `id` and market `token` use the token ID
returned by the RWA response; this can differ from its CoinStats `coinId`.

Markets include `isAnomaly`, row freshness and trade links. Spread and order-book
depth are unavailable.

## History

Aggregate and per-asset history have different range values:

| History | Ranges | Metrics | Defaults |
| - | - | - | - |
| `/v1/rwa/history` | `24h`, `7d`, `30d`, `1y`, `all` | `marketCap`, `volume` | `7d`, `marketCap` |
| `/v1/rwa/assets/{rwaId}/history` | `1h`, `24h`, `1w`, `1m`, `3m`, `6m`, `1y`, `all` | `price`, `marketCap`, `volume` | `24h`, `price` |

```bash theme={null}
curl 'https://api.coinstats.app/v1/rwa/assets/gold/history?range=1m&metric=price&currency=EUR' \
  -H 'X-API-KEY: YOUR_API_KEY'
```

Point timestamps use Unix **milliseconds**; update times use ISO 8601 strings.
Aggregate history returns at most 500 sampled points. Per-asset history reports
its `resolution`, `available` and `availableFrom`; missing metric observations
are omitted and long ranges are sampled. Volume represents rolling 24h volume,
so samples should not be summed to calculate traded volume over a range.

## Availability and freshness

Responses preserve `updatedAt` and `isStale`. Detail sections and token/market
lists also report `available`. A known asset awaiting enrichment can return
prices while its metadata or markets are unavailable. An available empty list
is a valid result. Null values remain null.

Unknown assets return `404`, invalid inputs return `400`, unavailable publication
or connection failures return `503`, and request timeouts return `504`. Server
errors retain their upstream status and use the public API's existing credit
refund behavior.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.