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

# Prices & Data

> Real-time token prices, technical signals, and DeFi yields. 90 tokens, 11 chains, 60 fiat currencies.

Base URL: `https://api.chipipay.com/v1`

## When to use

|                  | `/ai/prices`                                                                  | `/ai/signals`                                                         |
| ---------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **What it does** | Real-time token prices with market data (24h change, volume, ATH, market cap) | Technical indicators (RSI, MACD, Bollinger) + sentiment + DeFi yields |
| **Best for**     | Wallets, portfolio trackers, price displays, fiat conversion                  | Trading bots, AI agents, technical analysis dashboards                |
| **Cost**         | **Free**                                                                      | **Free** up to 100/mo per org, then \$0.0005/call                     |
| **Refresh rate** | Every 30 seconds                                                              | Indicators every 60s, Fear & Greed every 30 min, yields every 5 min   |
| **Coverage**     | 90 tokens, 11 chains, 60 fiat currencies                                      | Per-token signals + global sentiment + chain-filtered yields          |

### What you can build

* **Crypto wallet** — Show balances in local currency. `/prices?tokens=ETH,USDC&fiat=MXN` gives you everything: price, 24h change, market cap, and MXN conversion rate. Free, no credit cost.
* **Portfolio tracker** — `/prices` for all token values + `/prices/currencies` for fiat conversion. Update every 30 seconds.
* **Price alert bot** — Poll `/prices` and notify users when a token crosses a threshold.
* **Trading dashboard** — `/signals?tokens=ETH,BTC` for RSI, MACD, Bollinger Bands, trend classification, and signal strength.
* **DeFi yield aggregator** — `/signals?chain=starknet` returns top DeFi pools with APY and TVL from DefiLlama.
* **Market sentiment widget** — `/signals` includes the Fear & Greed Index (0-100) with a human-readable label.
* **Multi-chain price API** — One call covers Ethereum, Starknet, Solana, Base, Arbitrum, Polygon, and 5 more chains. Filter with `?chain=` to get only the tokens relevant to your app.

***

## GET /ai/prices

Real-time token prices for **90 tokens** across **11 chains**. Refreshed every 30 seconds from CoinGecko. **Free — no credit debit.**

<CodeGroup>
  ```bash Request theme={null}
  curl "https://api.chipipay.com/v1/ai/prices?chain=starknet&tokens=ETH,STRK&fiat=MXN" \
    -H "x-api-key: pk_prod_YOUR_KEY"
  ```

  ```json Response (200) theme={null}
  {
    "tokens": {
      "ETH": {
        "price": 2223.98,
        "change1h": 0.23,
        "change24h": 2.71,
        "change7d": 7.63,
        "high24h": 2234.95,
        "low24h": 2160.40,
        "marketCap": 268231561389,
        "marketCapRank": 2,
        "volume24h": 16297316533,
        "ath": 4946.05,
        "athDate": "2025-08-24",
        "circulatingSupply": 120691091,
        "image": "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png",
        "chains": ["ethereum", "starknet", "base", "arbitrum", "optimism", "polygon", "bnb", "avalanche"]
      }
    },
    "fiat": {
      "rates": {
        "MXN": {"rate": 17.31, "name": "Mexican Peso", "unit": "MX$"}
      },
      "source": "coingecko/exchange_rates",
      "updatedAt": "2026-04-10T08:25:00Z"
    },
    "meta": {
      "totalTokens": 2,
      "source": "coingecko",
      "refreshInterval": 30,
      "updatedAt": "2026-04-10T08:30:15Z"
    }
  }
  ```
</CodeGroup>

### Query parameters

| Param      | Type   | Description                                                                                            |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------ |
| `tokens`   | string | Filter by symbol: `ETH,BTC,STRK`. Omit for all 90 tokens.                                              |
| `chain`    | string | Filter by chain (see supported chains below).                                                          |
| `category` | string | Filter: `core`, `stablecoin`, `defi`, `btc-variant`, `yield`, `meme`, `rwa`, `l1`, `l2`, `governance`. |
| `fiat`     | string | Include fiat rates: `MXN,COP,BRL` or `all` for 60 currencies.                                          |

To compute a price in local currency: `ETH in MXN = 2223.98 x 17.31 = MX$38,497`.

### Related endpoints

| Endpoint                    | Description                                        | Cost |
| --------------------------- | -------------------------------------------------- | ---- |
| `GET /ai/prices/chains`     | List supported chains with token counts            | Free |
| `GET /ai/prices/currencies` | List all 60 fiat currencies with names and symbols | Free |

***

## Supported chains

11 chains tracked. Each token lists which chains it's available on.

| Chain       | Examples                                     |
| ----------- | -------------------------------------------- |
| `ethereum`  | ETH, USDC, WBTC, UNI, AAVE, LINK             |
| `starknet`  | ETH, STRK, USDC, WBTC, USDT, DAI, LBTC, tBTC |
| `base`      | ETH, USDC, cbBTC, AERO                       |
| `arbitrum`  | ETH, ARB, USDC, GMX, PENDLE                  |
| `optimism`  | ETH, OP, USDC, VELO                          |
| `polygon`   | MATIC, USDC, AAVE, QI                        |
| `solana`    | SOL, JUP, RAY, BONK, WIF, JTO                |
| `bnb`       | BNB, CAKE, XVS                               |
| `avalanche` | AVAX, JOE, QI                                |
| `sui`       | SUI, DEEP, CETUS                             |
| `ton`       | TON, STON                                    |

***

## Token categories

| Category      | Tokens                                 | Description                   |
| ------------- | -------------------------------------- | ----------------------------- |
| `core`        | ETH, BTC, SOL, BNB, AVAX, SUI, TON...  | Major L1 native tokens        |
| `stablecoin`  | USDC, USDT, DAI                        | USD-pegged stablecoins        |
| `defi`        | UNI, AAVE, LINK, MKR, CRV, PENDLE...   | DeFi protocol tokens          |
| `btc-variant` | WBTC, LBTC, tBTC, SolvBTC, cbBTC, eBTC | BTC wrapped/bridged variants  |
| `yield`       | stETH, wstETH, rETH, cbETH, SFRAX      | Liquid staking / yield tokens |
| `meme`        | DOGE, SHIB, PEPE, BONK, WIF, FLOKI     | Community/meme tokens         |
| `rwa`         | ONDO                                   | Real-world asset tokens       |
| `l1`          | NEAR, FTM, SEI, APT, INJ, TIA          | Alternative L1 chains         |
| `l2`          | STRK, ARB, OP, MATIC, IMX, MANTA       | L2 scaling tokens             |
| `governance`  | AAVE, MKR, UNI, CRV, COMP              | Protocol governance tokens    |

***

<h2 id="technical-signals">
  GET /ai/signals
</h2>

Technical indicators, market sentiment, and DeFi yields. Computed from 30-second price snapshots.

**Cost:** Free up to 100 calls per org per calendar month (UTC). Beyond that, \$0.0005 per call debited from your Chipi credits. DEV-environment API keys (`pk_dev_*` / `sk_dev_*`) are always free and don't count against the quota.

<CodeGroup>
  ```bash Request theme={null}
  curl "https://api.chipipay.com/v1/ai/signals?chain=starknet&tokens=ETH" \
    -H "x-api-key: pk_prod_YOUR_KEY"
  ```

  ```json Response (200) theme={null}
  {
    "tokens": {
      "ETH": {
        "rsi14": 28.3,
        "macd": {"value": -12.5, "signal": -8.2, "histogram": -4.3},
        "bollingerBands": {"upper": 2620, "middle": 2510, "lower": 2400},
        "ema": {"ema20": 2495, "ema50": 2510, "ema200": null},
        "trend": "oversold",
        "signalStrength": 0.82
      }
    },
    "market": {
      "fearGreedIndex": 16,
      "fearGreedLabel": "Extreme Fear"
    },
    "yields": [
      {"pool": "STRK", "protocol": "endur", "chain": "Starknet", "apy": 7.13, "tvlUsd": 3131873},
      {"pool": "ETH", "protocol": "nostra-money-market", "chain": "Starknet", "apy": 1.83, "tvlUsd": 2510408}
    ],
    "definitions": {
      "rsi14": "Relative Strength Index (14 periods). <30 = oversold, >70 = overbought.",
      "signalStrength": "0-1 composite. >0.6 = actionable signal. <0.3 = noise.",
      "fearGreedIndex": "0-100. 0-25 = Extreme Fear (buy zone). 75-100 = Extreme Greed (sell zone)."
    },
    "meta": {
      "sources": ["coingecko", "alternative.me", "defillama"],
      "snapshotsUsed": 100,
      "updatedAt": "2026-04-10T08:30:15Z"
    }
  }
  ```
</CodeGroup>

### Query parameters

| Param    | Type   | Description                      |
| -------- | ------ | -------------------------------- |
| `tokens` | string | Filter by symbol: `ETH,BTC,STRK` |
| `chain`  | string | Filter yields by chain           |

### Signal definitions

| Indicator                 | Source                      | Refresh | Description                                                                |
| ------------------------- | --------------------------- | ------- | -------------------------------------------------------------------------- |
| RSI-14                    | Computed from 30s snapshots | 60s     | Relative Strength Index. Below 30 = oversold, above 70 = overbought.       |
| MACD (12,26,9)            | Computed from 30s snapshots | 60s     | Moving Average Convergence Divergence. Histogram shows momentum direction. |
| Bollinger Bands (20,2)    | Computed from 30s snapshots | 60s     | Price bands. Price near lower band = potential bounce.                     |
| EMA-20 / EMA-50 / EMA-200 | Computed from 30s snapshots | 60s     | Exponential moving averages. EMA-200 requires \~7 days of data.            |
| Signal Strength           | Computed from RSI + MACD    | 60s     | 0-1 composite. Above 0.6 = actionable signal.                              |
| Fear & Greed Index        | alternative.me              | 30 min  | 0-100 market sentiment. 0-25 = Extreme Fear, 75-100 = Extreme Greed.       |
| DeFi Yields               | DefiLlama                   | 5 min   | APY and TVL for top pools per chain.                                       |

<Note>
  Signals need \~7 minutes of price data after server start. If you get a 503, wait and retry.
</Note>
