Time SeventeenDocs

Errors

Time Seventeen HTTP error codes, frame refusals and order reject reasons, with what causes each one and how to recover.

There are three layers of failure. Handle each separately.

1. HTTP errors

JSON body {"error": "<CODE>"}.

StatusCodeMeaning
400EMPTY_BATCH, INVALID_ACCOUNT, INVALID_MARKET, INVALID_PUBLIC_KEY, INVALID_ENROLL, BODY_READ_FAILEDMalformed request
401SIGNATURE_REQUIRED, SIGNATURE_INVALIDMissing or bad signed read (check the 30 s clock window)
401INVALID_INVITE, WRONG_PASSWORDEnrollment or session password
403NOT_PERMITTEDThis entry or account may not send the command
404UNKNOWN_MARKET, UNKNOWN_ACCOUNT, NOT_FOUNDUnknown id or path
409ENROLL_ON_COREEnrollment sent to an edge gateway; use the site proxy
413BODY_TOO_LARGEBody above 64 KiB
429RATE_LIMITED, TOO_MANY_FAILED_SIGN_INSSlow down; back off and retry
503BUSY, SERVICE_CLOSED, CORE_*Temporarily unavailable; retry with backoff
504REQUEST_TIMEOUTNo result in time; re-read state before retrying

2. Refusals

{"Refused": "<reason>"} in results. The command was not sequenced; nothing changed.

ReasonFix
UnknownKeyRegister a key (or the key was replaced)
BadSignatureCheck the signed bytes against the test vectors
ReplayUse a fresh nonce; one lane per process
WrongAccountCommand account must equal frame account
IdNamespaceOrder id must be account × 2^32 + local
MalformedWrong length or field
KeyChangedKey rotated during the request; retry with the new key
RateLimited, Overloaded, ClosedBack off; retry later
NotPermittedThis entry may not send this command

3. Rejects

The command was sequenced and refused by the engine: a Rejected event with a reason. State is unchanged; a rejected cancel or amend leaves the order as it was.

ReasonMeaning
InsufficientCashNot enough available cash for price × quantity
InsufficientPositionSelling more contracts than you hold
ReduceOnlyExceedsPositionReduce-only order larger than the position
MarketNotOpenMarket halted, closed or settled
UnknownMarket, UnknownOrderUnknown id, or the order already left the book
PriceOutOfBounds, QtyOutOfBounds, QtyStep, BelowMinNotionalOutside the market terms
WouldCrossPostOnlyPost-only order would trade
FokUnfillableNot enough liquidity for fill-or-kill
NoLiquidityMarket-to-limit with an empty opposite side
SelfTradeWould trade against your own order
DuplicateOrderIdOrder id already used
OpenOrderLimit, PositionLimitAccount risk limits
NoPermissionAccount may not trade
InvalidOrderInconsistent fields (e.g. post-only with a non-limit kind)