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

ParamInExample or valuesMeaning
coinqueryBTCMarket (perp name, spot @index, HIP-3 dex:COIN); every market when absent
userquery(optional)Only this account
sortquery(empty), remaining, newest, endingremaining: largest remaining notional first; newest: latest started first; ending: soonest scheduled end first
limitquery50TWAPs (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

FieldTypeMeaning
twaps[]objectSorted as asked: {twapId, user, entity, coin, side, status, description, sz, executedSz, executedNtl, avgPx, remainingSz, …}
twaps[].statusactivated | waitingForTrigger | finished | terminated | stopped | errorIts last status: activated (running), waitingForTrigger, or how it ended
twaps[].remainingNtldecimal | nullremainingSz × the market's last trade price (`pressure.px`), 15 significant digits; null for an ended TWAP or a market without a price
twaps[].progressdecimalexecutedSz ÷ sz, 0..1 (40 significant digits)
twaps[].endTimeint | nullScheduled end: startTime + minutes (Unix ms); null while waiting for its trigger
pressure[]objectOne row per market with a running TWAP matching, largest remaining notional first: {coin, px, buy, sell, net, waiting}
pressure[].netdecimal | nullbuy.remainingNtl − sell.remainingNtl: what the running TWAPs still have to buy (> 0) or sell (< 0), quote units; null without a price
asOfmsBlock 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

Agent guide (agents.md)llms.txtOpenAPIMCP serverGet an API keyChangelog