API reference, TWAPs
TWAP history
Ended TWAPs of a market or an account, newest first: what executed, at what price, how they ended.
- Elysium: not served
- HyperCore
- HyperEVM: not served
- Not on Elysium or HyperEVM: served on HyperCore only
GET https://api.femtos.xyz/v1/hypercore/twaps/history
Parameters
| 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 |
status | query | (empty), finished, terminated, error | One way of ending; every one when absent |
from | query | (optional) | Window start (Unix ms, default `to` − 24 h) |
to | query | (optional) | Window end (Unix ms, exclusive, default now) |
limit | query | 50 | TWAPs |
Example
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/hypercore/twaps/history?coin=BTC&limit=50"Key: Authorization: Bearer $FEMTOS_KEY. Get a free key, or with no browser through agent onboarding.
Response fields
| Field | Type | Meaning |
|---|---|---|
twaps[] | object | Newest end first: {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[].description | string | null | Why it stopped, for `error` (Hyperliquid's text, e.g. "Insufficient margin to place order."); null otherwise |
twaps[].executedNtl | decimal | Notional executed so far: Σ px × sz of its slices (quote units, USDC on the main dex) |
twaps[].avgPx | decimal | null | executedNtl ÷ executedSz (40 significant digits when it does not terminate); null before its first slice |
twaps[].endedAt | int | null | When it ended (Unix ms, the block of its end status); null while it runs |
from | ms | Start of the window read |
to | ms | End of the window read (exclusive) |
next_cursor | string | null | Opaque cursor of the next page: pass it as `cursor`, unchanged. null on the last page |
Next page: cursor = the next_cursor of the previous answer, the same on every list (pagination).
Related: TWAPs
- Running TWAPs GET /v1/hypercore/twaps HyperCore
Running TWAPs of a market or an account with their progress, and the net TWAP pressure per market. - Running TWAPs stream WS hc.twaps HyperCore
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).
More
- This page as Markdown
- The whole API reference
- What HyperCore serves
- The whole API in one Markdown file
- OpenAPI 3.1 document
Agent guide (agents.md)llms.txtOpenAPIMCP serverGet an API keyChangelog