Skip to content

Widen order/TWAP status enums (OrderProcessingStatus, twapHistory, FrontendOpenOrder) #100

Description

@joeblau

Problem

Several status enums are narrower than the current API (upstream nktkas#175, nktkas#179):

  • OrderProcessingStatus is missing "outcomeSettledCanceled", "internalCancel", "tooManyOpenOrdersRejected" — affects src/api/info/_methods/orderStatus.ts, historicalOrders.ts, src/api/info/_methods/_base/_schemas.ts:345-379, and src/api/subscription/_methods/orderUpdates.ts.
  • twapHistory status (src/api/info/_methods/twapHistory.ts:43) is missing "waitingForTrigger" and "stopped".
  • TwapState.trigger is typed unknown (_schemas.ts:245) — now settable via the new twapOrder.details param; establish the real shape from the upstream schema.
  • FrontendOpenOrder.orderType (_schemas.ts:161) is missing "Twap Slice", "Vault Close", "Spot Dust Conversion".

Impact: valibot parsing will reject valid responses carrying the new statuses.

Fix

Widen the unions, type TwapState.trigger, add tests for the new variants.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-syncSync with latest Hyperliquid API surface/schemas

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions