# Position changes · API reference · Femtos

> Each perp position change, one per block, account and coin. WebSocket channel hc.positions on HyperCore: parameters, response fields and a live call per layer.

- 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/account/new (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/reference/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.

Layers: HyperCore. Not on Elysium or HyperEVM: a channel of HyperCore only.
Page with live calls: https://femtos.xyz/reference/ws/positions?layer=hypercore

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `coin` | filter | `BTC` | HyperCore market (BTC, @107, xyz:TSLA) |
| `user` | filter | (optional) | Account: 0x address or a named wallet's handle |
| `min_notional` | filter | `100000` | Minimum notional, USD: default 100000, "0" for all |

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

| Field | Type | Meaning |
|---|---|---|
| `data` | HcPositionChange | each perp position change, one per block, account and coin: {coin, user, kind, dir, start_position, end_position, sz, px, notional, liquidation, n_fills, tid, …} |
| `data.kind` | open \| increase \| reduce \| close \| flip \| unchanged | open, increase, reduce, close, flip |

## Related (Liquidations & positions)

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

Every page: https://femtos.xyz/reference.md
