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

# Pricing Data API

> Live price, market cap, and 24h volume for a basket of stablecoins and assets in one call. A managed, drop-in replacement for the CoinGecko markets feed.

# Pricing Data API

The Pricing Data API gives you live market data (price, market cap, 24h volume, 24h high/low, and 24h change) for a list of assets in a single request.

It is designed for partners who today read these fields from CoinGecko's `/coins/markets` endpoint and want a single managed source from Renesis instead. The request and the response use the same asset identifiers and the same field names as CoinGecko, so swapping the data source is a one-line change: point the request at Renesis, keep your existing field mapping.

<Note>
  Renesis supplies the **market data layer** only (the live price, market cap, and volume figures). Your own scoring and metadata (grade, type of backing, type of peg, collateralization, audits, team) stay exactly where they are. This endpoint replaces the part currently labelled "Data provided by CoinGecko".
</Note>

## How it maps to your table

Each row in your stablecoin table maps directly to fields in the response:

| Your column    | CoinGecko field today         | Renesis response field                 |
| -------------- | ----------------------------- | -------------------------------------- |
| Price          | `current_price`               | `current_price`                        |
| Market Cap     | `market_cap`                  | `market_cap`                           |
| 24h Volume     | `total_volume`                | `total_volume`                         |
| 24h change (%) | `price_change_percentage_24h` | `price_change_percentage_24h`          |
| Peg deviation  | derived from `current_price`  | `current_price`, `high_24h`, `low_24h` |

For a fiat-pegged stablecoin, the peg deviation is simply `current_price - 1` (in USD). `high_24h` and `low_24h` give you the intraday peg band.

## Base URL

```
https://api.renesis.fi
```

All paths below are relative to this base URL.

## Authentication

Every request authenticates with a Renesis API key (prefix `ak_`) passed in the `X-API-Key` header. Your key is issued to your account; keep it secret and server-side.

```bash theme={null}
curl -H "X-API-Key: ak_test_xxxxxxxxxxxxxxxxxxxx" \
  "https://api.renesis.fi/data/market-data/multiple-tickers?vs_currency=usd&symbols=usd-coin,tether"
```

The key is scoped to a set of allowed paths and roles when provisioned. For this integration it needs access to `/data/**` with one of the roles `admin`, `trader`, `pms_user`, or `analyst`; a read-only pricing key is sufficient. Contact your Renesis representative to provision a key.

## Asset identifiers (coin IDs)

The `symbols` parameter takes **CoinGecko-style coin IDs** (the lowercase slug), not exchange tickers. For example you pass `usd-coin`, not `USDC`, and `pax-gold`, not `PAXG`. This matches the IDs you already use against CoinGecko, so your existing ID list carries over unchanged.

Common stablecoins and their coin IDs:

| Asset             | Ticker | Coin ID             |
| ----------------- | ------ | ------------------- |
| Tether            | USDT   | `tether`            |
| USD Coin          | USDC   | `usd-coin`          |
| Ripple USD        | RLUSD  | `ripple-usd`        |
| PayPal USD        | PYUSD  | `paypal-usd`        |
| Pax Gold          | PAXG   | `pax-gold`          |
| Gemini Dollar     | GUSD   | `gemini-dollar`     |
| Pax Dollar        | USDP   | `paxos-standard`    |
| Euro Coin         | EURC   | `euro-coin`         |
| Liquity USD       | LUSD   | `liquity-usd`       |
| First Digital USD | FDUSD  | `first-digital-usd` |
| Dai               | DAI    | `dai`               |
| Ethena USDe       | USDe   | `ethena-usde`       |

If an asset is missing from this table, its coin ID is the slug in its CoinGecko page URL (`coingecko.com/en/coins/<id>`). IDs are stable over time, so you only need to look one up when you add a new asset to your watchlist.

## Get prices for multiple assets

Returns market data for every requested asset in one call. This is the endpoint you poll to populate your table.

```
GET /data/market-data/multiple-tickers
```

<ParamField query="vs_currency" type="string" required>
  Quote currency for all returned figures, lowercase (e.g. `usd`, `eur`). Use `usd` for USD-pegged stablecoins and for commodity-backed tokens like PAXG.
</ParamField>

<ParamField query="symbols" type="string" required>
  Comma-separated list of coin IDs (e.g. `usd-coin,tether,paypal-usd`). Case-insensitive and whitespace-tolerant. Send your full watchlist in a single request.
</ParamField>

### Example request

```bash theme={null}
# Pull the full stablecoin watchlist in one call
curl -H "X-API-Key: ak_test_xxxxxxxxxxxxxxxxxxxx" \
  "https://api.renesis.fi/data/market-data/multiple-tickers?vs_currency=usd&symbols=ripple-usd,usd-coin,paypal-usd,pax-gold"
```

### Example response

`data` is an array, one object per resolved asset, in no guaranteed order. Index it by `id` on your side.

<ResponseExample>
  ```json theme={null}
  {
    "isError": false,
    "message": "Success",
    "statusCode": 200,
    "data": [
      {
        "id": "ripple-usd",
        "symbol": "rlusd",
        "name": "Ripple USD",
        "image": "https://coin-images.coingecko.com/coins/images/.../rlusd.png",
        "current_price": 0.999776,
        "market_cap": 1681918852,
        "market_cap_rank": 38,
        "fully_diluted_valuation": 1681918852,
        "total_volume": 137916372,
        "high_24h": 1.001,
        "low_24h": 0.9988,
        "price_change_24h": -0.000112,
        "price_change_percentage_24h": -0.0112,
        "market_cap_change_24h": -1820145,
        "market_cap_change_percentage_24h": -0.108,
        "circulating_supply": 1682295410,
        "total_supply": 1682295410,
        "max_supply": null,
        "ath": 1.02,
        "ath_change_percentage": -2.01,
        "ath_date": "2025-01-14T09:20:11.000Z",
        "atl": 0.984,
        "atl_change_percentage": 1.6,
        "atl_date": "2025-03-04T22:05:40.000Z",
        "last_updated": "2026-06-09T12:30:00.000Z",
        "vs_currency": "usd",
        "fetched_at": "2026-06-09T12:31:05.123456+00:00",
        "source": "fresh"
      },
      {
        "id": "usd-coin",
        "symbol": "usdc",
        "name": "USDC",
        "current_price": 0.9997,
        "market_cap": 76023145200,
        "market_cap_rank": 6,
        "total_volume": 15610247889,
        "high_24h": 1.001,
        "low_24h": 0.9991,
        "price_change_percentage_24h": -0.0145,
        "circulating_supply": 76045231100,
        "vs_currency": "usd",
        "fetched_at": "2026-06-09T12:31:05.123456+00:00",
        "source": "cached"
      },
      {
        "id": "pax-gold",
        "symbol": "paxg",
        "name": "PAX Gold",
        "current_price": 4319.96,
        "market_cap": 1990114502,
        "market_cap_rank": 41,
        "total_volume": 159204881,
        "high_24h": 4332.10,
        "low_24h": 4298.55,
        "price_change_percentage_24h": 0.42,
        "circulating_supply": 460678.2,
        "vs_currency": "usd",
        "fetched_at": "2026-06-09T12:31:05.123456+00:00",
        "source": "fresh"
      }
    ]
  }
  ```
</ResponseExample>

## Response fields

Each object in `data` carries the standard CoinGecko markets fields plus three Renesis fields (`vs_currency`, `fetched_at`, `source`). The fields you are most likely to display:

| Field                              | Type   | Description                                                    |
| ---------------------------------- | ------ | -------------------------------------------------------------- |
| `id`                               | string | Coin ID you requested. Use this as the join key.               |
| `symbol`                           | string | Lowercase ticker (e.g. `usdc`).                                |
| `name`                             | string | Display name (e.g. `USDC`).                                    |
| `current_price`                    | number | Price in `vs_currency`. Full precision for peg monitoring.     |
| `market_cap`                       | number | Market capitalisation in `vs_currency`.                        |
| `total_volume`                     | number | 24h trading volume in `vs_currency`.                           |
| `high_24h`                         | number | Highest price in the last 24h.                                 |
| `low_24h`                          | number | Lowest price in the last 24h.                                  |
| `price_change_24h`                 | number | Absolute price change over 24h.                                |
| `price_change_percentage_24h`      | number | Percent price change over 24h.                                 |
| `market_cap_change_24h`            | number | Absolute market cap change over 24h.                           |
| `market_cap_change_percentage_24h` | number | Percent market cap change over 24h.                            |
| `circulating_supply`               | number | Circulating supply.                                            |
| `total_supply`                     | number | Total supply (may be `null`).                                  |
| `max_supply`                       | number | Max supply (often `null` for stablecoins).                     |
| `ath` / `atl`                      | number | All-time high / low, with `*_change_percentage` and `*_date`.  |
| `last_updated`                     | string | ISO 8601 timestamp from the upstream feed.                     |
| `vs_currency`                      | string | Quote currency the figures are denominated in.                 |
| `fetched_at`                       | string | ISO 8601 timestamp of when Renesis captured the data.          |
| `source`                           | string | Freshness indicator: `fresh`, `cached`, or `stale`. See below. |

<Note>
  Field coverage follows the upstream markets feed. Numeric fields can be `null` when the upstream source has no value for that asset (common for `total_supply` / `max_supply` on some stablecoins). Guard for `null` before formatting.
</Note>

## Data freshness and caching

Renesis maintains a warm cache so you can poll aggressively without hitting upstream rate limits. The `source` field on every asset tells you where that specific value came from:

| `source` | Meaning                                                                                                                                          |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fresh`  | Just fetched live from the upstream feed on this request.                                                                                        |
| `cached` | Served from the warm cache (refreshed within the last 15 minutes).                                                                               |
| `stale`  | A fallback: the upstream feed was momentarily rate-limited, so the last known good value was returned. Still usable; just older than 15 minutes. |

A single response can mix sources across assets. The cache TTL is **15 minutes**, so polling more frequently than that mostly returns `cached` values and is served instantly. For a live table, polling every 30 to 60 seconds is a good balance.

## Get price for a single asset

Same data as above for one asset. `data` is a single object rather than an array.

```
GET /data/market-data/single-ticker
```

<ParamField query="vs_currency" type="string" required>
  Quote currency, lowercase (e.g. `usd`).
</ParamField>

<ParamField query="symbol" type="string" required>
  A single coin ID (e.g. `ripple-usd`).
</ParamField>

```bash theme={null}
curl -H "X-API-Key: ak_test_xxxxxxxxxxxxxxxxxxxx" \
  "https://api.renesis.fi/data/market-data/single-ticker?vs_currency=usd&symbol=ripple-usd"
```

<ResponseExample>
  ```json theme={null}
  {
    "isError": false,
    "message": "Success",
    "statusCode": 200,
    "data": {
      "id": "ripple-usd",
      "symbol": "rlusd",
      "name": "Ripple USD",
      "current_price": 0.999776,
      "market_cap": 1681918852,
      "total_volume": 137916372,
      "vs_currency": "usd",
      "fetched_at": "2026-06-09T12:31:05.123456+00:00",
      "source": "fresh"
    }
  }
  ```
</ResponseExample>

For a watchlist, prefer `/multiple-tickers`: one request for the whole basket is faster and friendlier on rate limits than many single-ticker calls.

## Error responses

Errors follow the standard envelope, with `isError: true` and a human-readable `message`.

### Missing parameters (400)

```json theme={null}
{
  "isError": true,
  "message": "vs_currency and symbols are required.",
  "statusCode": 400
}
```

### Unauthorized (401)

Returned when the `X-API-Key` header is missing or the key is invalid or revoked.

```json theme={null}
{
  "isError": true,
  "message": "Unauthorized - Invalid or missing API key.",
  "statusCode": 401
}
```

### Forbidden (403)

Returned when the key is valid but not scoped for this resource (missing `/data` path access or lacking one of the roles `admin`, `trader`, `pms_user`, `analyst`).

```json theme={null}
{
  "isError": true,
  "message": "Forbidden - Insufficient permissions.",
  "statusCode": 403
}
```

### Asset not found (404)

Returned by `/single-ticker` when the coin ID cannot be priced. On `/multiple-tickers`, unknown IDs are simply omitted from the `data` array rather than failing the whole request, so always check which IDs came back.

```json theme={null}
{
  "isError": true,
  "message": "Price not found",
  "statusCode": 404
}
```

## Recommended integration

A simple, robust loop for a live stablecoin table:

1. **Collect IDs once.** For each asset on your watchlist, take its coin ID from the table above (or the CoinGecko page URL) and store it. IDs rarely change, so this is a one-time (or on-add) step.
2. **Poll the basket.** On your refresh interval (30 to 60 seconds is plenty), call `/multiple-tickers` with `vs_currency=usd` and your full comma-separated ID list. One request covers the whole table.
3. **Join by `id`.** Map each returned object onto your row by `id`. Read `current_price` into Price, `market_cap` into Market Cap, `total_volume` into 24h Volume.
4. **Handle gaps.** If an ID is missing from `data`, keep the last known value and flag it. If `source` is `stale`, the value is older than 15 minutes but still safe to display.
5. **Keep your own metadata.** Grade, type of backing, type of peg, collateralization, and audits remain yours; only the live market figures come from this API.
