# Running TWAPs | API reference | Femtos

> Running TWAPs of a market or an account with their progress, and the net TWAP pressure per market. GET /v1/hypercore/twaps 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://dashboard.femtos.xyz/signup (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/twaps

## Running TWAPs — GET `/v1/hypercore/twaps`

Running TWAPs of a market or an account with their progress, and the net TWAP pressure per market.

Layers: HyperCore. Not on Elysium or HyperEVM: served on HyperCore only.
Page with live calls: https://femtos.xyz/reference/twaps?layer=hypercore

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `coin` | query | `BTC` | Market (perp name, spot @index, HIP-3 dex:COIN); every market when absent |
| `user` | query | (optional) | Only this account |
| `sort` | query | `(empty)`, `remaining`, `newest`, `ending` | remaining: largest remaining notional first; newest: latest started first; ending: soonest scheduled end first |
| `limit` | query | `50` | TWAPs (the pressure counts every one) |

```bash
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/hypercore/twaps?coin=BTC&limit=50"
```

| Field | Type | Meaning |
|---|---|---|
| `twaps[]` | object | Sorted as asked: {twapId, user, entity, coin, side, status, description, sz, executedSz, executedNtl, avgPx, remainingSz, …} |
| `twaps[].status` | activated \| waitingForTrigger \| finished \| terminated \| stopped \| error | Its last status: activated (running), waitingForTrigger, or how it ended |
| `twaps[].remainingNtl` | decimal \| null | remainingSz × the market's last trade price (`pressure.px`), 15 significant digits; null for an ended TWAP or a market without a price |
| `twaps[].progress` | decimal | executedSz ÷ sz, 0..1 (40 significant digits) |
| `twaps[].endTime` | int \| null | Scheduled end: startTime + minutes (Unix ms); null while waiting for its trigger |
| `pressure[]` | object | One row per market with a running TWAP matching, largest remaining notional first: {coin, px, buy, sell, net, waiting} |
| `pressure[].net` | decimal \| null | buy.remainingNtl − sell.remainingNtl: what the running TWAPs still have to buy (> 0) or sell (< 0), quote units; null without a price |
| `asOf` | ms | Block time of the newest TWAP status or slice read: every one before it is in |

## Related (TWAPs)

- [Running TWAPs stream](https://femtos.xyz/reference/ws/twaps.md) `WS hc.twaps`: The GET /v1/hypercore/twaps answer (running TWAPs, their progress, the net TWAP pressure) of a market or an account, pushed on subscribe, then when one of its TWAPs starts, fills a slice or ends (whole, or as a JSON Patch). (HyperCore)
- [TWAP history](https://femtos.xyz/reference/twap-history.md) `GET /v1/hypercore/twaps/history`: Ended TWAPs of a market or an account, newest first: what executed, at what price, how they ended. (HyperCore)

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