# Price history · HyperCore API · Femtos

> USD closes per unit of up to 25 tokens over a window, or the price of 100 tokens at one time (at=).

- Base URL: `https://api.femtos.xyz/v1` (REST) · `wss://api.femtos.xyz/v1/ws` (WebSocket) · MCP: `https://api.femtos.xyz/mcp`
- Auth: `Authorization: Bearer $FEMTOS_KEY`. Free key: https://femtos.xyz/accounts/ (browser), or with
  no browser: `GET https://femtos.xyz/accounts/agent/challenge`, solve its proof of work, then `POST https://femtos.xyz/accounts/agent/signup`
  (https://femtos.xyz/agents.md#agent-onboarding)
- Decimals are exact strings, times Unix milliseconds, addresses lowercase `0x`
- Whole API in one file: https://femtos.xyz/agents.md · OpenAPI: https://api.femtos.xyz/v1/openapi.json · Index: https://femtos.xyz/llms.txt
- Page with live calls: https://femtos.xyz/hypercore/price-history

## Price history — GET `/v1/prices/history`

USD closes per unit of up to 25 tokens over a window, or the price of 100 tokens at one time (at=).

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `layer` | query | `hypercore` | Layer: hyperevm / elysium (0x token addresses) or hypercore (token names HYPE, PURR, token ids, perp coins BTC). Absent: hypercore when every token is a name, else hyperevm |
| `tokens` | query | `HYPE,PURR,BTC` | Comma list, at most 100: 0x addresses (hyperevm, elysium) or HyperCore token names / ids / perp coins (hypercore) |
| `from` | query | `1792368000000` | Series start (Unix ms, inclusive, aligned down to the unit) |
| `to` | query | `1792454400000` | Series end (Unix ms, exclusive; default now) |
| `interval` | query | `1m`, `5m`, `15m`, `1h`, `4h`, `1d` | Series unit |
| `at` | query | (optional) | Time (Unix ms): price at or before it |

```bash
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/prices/history?layer=hypercore&tokens=HYPE%2CPURR%2CBTC&from=1792368000000&to=1792454400000&interval=1h"
```

| Field | Type | Meaning |
|---|---|---|
| `series[]` | object | {token, symbol, source, pool, market, points, reason, spam, spamReason} |
| `at` | ms | The time asked |
| `prices[]` | object | {token, symbol, priceUsd, source, t, block, tx, logIndex, pool, market, reason, spam, …} |
| `interval` | string | Unit |
| `from` | ms | First unit |
| `to` | ms | End (exclusive) |
| `billing` | heavy | heavy over 30 days |

## Related (Market data)

- [Markets](https://femtos.xyz/hypercore/markets.md): Every tradable perp, spot, HIP-3 and outcome market with 24 h stats.
- [Candles](https://femtos.xyz/hypercore/candles.md): OHLCV of any HyperCore market down to 1 s, ascending, UTC-aligned.
- [Forming candle](https://femtos.xyz/hypercore/ws-candles.md): The forming candle, pushed once per block where it changes.
- [Trades](https://femtos.xyz/hypercore/trades.md): Latest fills of one market, newest first.
- [Trades stream](https://femtos.xyz/hypercore/ws-trades.md): All trades of one market as they happen: raced between our node and Hyperliquid's public feed, first copy sent, the other dropped.
- [Best bid / offer](https://femtos.xyz/hypercore/ws-bbo.md): Top of book of one market each block: raced between Hyperliquid's public feed and our node (newest block wins, our node corrects the same block).
- [Order book](https://femtos.xyz/hypercore/book.md): L2 book of one market with order counts, from our node.
- [Book stream](https://femtos.xyz/hypercore/ws-book.md): Full-depth book, then the levels each block changes.
- [Order updates](https://femtos.xyz/hypercore/ws-orders.md): Every order status change, filterable by coin, user and status.
- [HYPE price](https://femtos.xyz/hypercore/ws-prices.md): HYPE from the Hyperliquid oracle, perp mark and exchanges.
- [Token prices](https://femtos.xyz/hypercore/prices.md): USD price of up to 100 tokens in one call, each with its source and provenance.
- [Token candles](https://femtos.xyz/hypercore/token-candles.md): OHLCV of a token through its USDC market (a perp coin: the perp).
- [Token metadata](https://femtos.xyz/hypercore/tokens-batch.md): Metadata of up to 100 tokens: supply, creator, logo and socials when indexed, family, spam. Also POST with a JSON body.

All HyperCore endpoints: https://femtos.xyz/hypercore.md
