# Forming candle · HyperCore API · Femtos

> The forming candle, pushed once per block where it changes.

- 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` (or `X-API-KEY: $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/ws-candles

WebSocket: get a ticket (`POST https://api.femtos.xyz/v1/ws-ticket` with your key), connect to `wss://api.femtos.xyz/v1/ws?ticket=$TICKET`, send the frame below; the first message has `"snapshot": true`. Details: https://femtos.xyz/agents.md#websocket

## Forming candle — WS `hc.candles`

The forming candle, pushed once per block where it changes.

| Param | In | Example or values |
|---|---|---|
| `coin` | filter | `BTC` |
| `tf` | filter | `1s`, `15s`, `1m`, `5m`, `15m`, `1h`, `4h`, `1d` |

```json
{"op":"subscribe","channel":"hc.candles","filter":{"coin":"BTC","tf":"1s"}}
```

| Field | Type | Meaning |
|---|---|---|
| `snapshot: true` | Candle[] | last 300 candles at subscribe |
| `data` | Candle | {t,o,h,l,c,v,vq,n,block}, the forming candle |

## 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.
- [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.

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