API reference, TWAPs
Running TWAPs
Running TWAPs of a market or an account with their progress, and the net TWAP pressure per market.
- Elysium: not served
- HyperCore
- HyperEVM: not served
- Not on Elysium or HyperEVM: served on HyperCore only
GET https://api.femtos.xyz/v1/hypercore/twaps
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 |
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) |
Example
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/hypercore/twaps?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 | 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 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). - TWAP history GET /v1/hypercore/twaps/history HyperCore
Ended TWAPs of a market or an account, newest first: what executed, at what price, how they ended.
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