# Position changes · HyperCore API · Femtos

> Each perp position change, one per block, account and coin.

- 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-positions

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

## Position changes — WS `hc.positions`

Each perp position change, one per block, account and coin.

| Param | In | Example or values |
|---|---|---|
| `coin` | filter | `BTC` |
| `min_notional` | filter | `100000` |

```json
{"op":"subscribe","channel":"hc.positions","filter":{"coin":"BTC","min_notional":"100000"}}
```

| Field | Type | Meaning |
|---|---|---|
| `data` | object | {coin, user, kind, dir, start_position, end_position, sz, px, notional, liquidation} |
| `kind` | string | open, increase, reduce, close, flip |
| `min_notional` | filter | default 100000, "0" for all |

## Related (Liquidations & positions)

- [Liquidations](https://femtos.xyz/hypercore/liquidations.md): Perp liquidations, newest first, one row per account, coin and block.
- [Liquidation stats](https://femtos.xyz/hypercore/liquidation-stats.md): Totals, per coin, per time bucket and the largest, over a window.
- [Liquidations stream](https://femtos.xyz/hypercore/ws-liquidations.md): Each liquidation fill, the block it happens.
- [Positions](https://femtos.xyz/hypercore/positions.md): Open positions of one perp with leverage and liquidation price.
- [Open interest](https://femtos.xyz/hypercore/positions-overview.md): Open interest, accounts and unrealized PnL per perp.
- [Liquidation map](https://femtos.xyz/hypercore/liqmap.md): Notional that would be liquidated at each price around the mark.

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