# Forced flow · HyperCore API · Femtos

> Stop-loss / take-profit orders and liquidations on the same buckets: the cascade (stops + liquidations, with the move) and the take-profits (against it) at each price.

- 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/forced-flow

## Forced flow — GET `/v1/hypercore/forced-flow`

Stop-loss / take-profit orders and liquidations on the same buckets: the cascade (stops + liquidations, with the move) and the take-profits (against it) at each price.

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `coin` | query | `BTC` | HyperCore perp coin: BTC, xyz:TSLA |
| `buckets` | query | `40` | Most buckets (width rounded up to a round number); not with step |
| `step` | query | (optional) | Bucket width in price units, instead of buckets (at most 400 buckets) |
| `range_pct` | query | `10` | Half-width of the grid around the mark, percent, (0, 100] |

```bash
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/hypercore/forced-flow?coin=BTC&buckets=40&range_pct=10"
```

| Field | Type | Meaning |
|---|---|---|
| `buckets[]` | object | Ascending price: {pxLo, pxHi, stops, liquidations, cascade, forced, cumCascadeSell, cumCascadeBuy, cumSell, cumBuy} |
| `buckets[].cascade` | object | Fires with the move: sell = sell stop-losses + long liquidations; buy = buy stop-losses + short liquidations: {sell, buy} |
| `buckets[].forced` | object | cascade + take-profits: sell = sell stops / take-profits + long liquidations; buy = buy ones + short liquidations: {sell, buy} |
| `buckets[].cumCascadeSell` | decimal \| null | Buckets at or under the mark's: cascade sell notional from the mark down to this bucket; null over it |
| `buckets[].cumSell` | decimal \| null | Buckets at or under the mark's: forced sell notional from the mark down to this bucket; null over it |
| `summary` | object | Inside the grid: cascade selling at or under the mark's bucket and buying at or over it; sell take-profits at or over it and buy ones at or under it; forced = cascade + take-profits on each side: {cascadeSellBelow, cascadeBuyAbove, takeProfitSellAbove, takeProfitBuyBelow, sellBelow, buyAbove} |
| `stops` | object | Cut of the stops: {asOf, height, positions} |
| `liquidations` | object | Cut of the liquidation prices: {asOf, height, coverage} |
| `markPx` | decimal \| null | Mark: last trade |
| `rangePct` | decimal | range_pct applied |
| `step` | decimal \| null | Bucket width |

## Related (Price-level maps)

- [Liquidation price map](https://femtos.xyz/hypercore/liquidation-map.md): Liquidation prices of every open position, from Hyperliquid's formula on each account's state, bucketed like the stop map.
- [Stop map stream](https://femtos.xyz/hypercore/ws-stops-map.md): The GET /api/hypercore/stops map, pushed whole on subscribe and every 5 s when it changes.
- [Liquidation map stream](https://femtos.xyz/hypercore/ws-liquidations-map.md): The GET /api/hypercore/liquidation-map map, pushed whole on subscribe and every 5 s when it changes.
- [Forced flow stream](https://femtos.xyz/hypercore/ws-forced-flow.md): The GET /api/hypercore/forced-flow map, pushed whole on subscribe and every 5 s when it changes.

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