> For the complete documentation index, see [llms.txt](https://docs.reya.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reya.xyz/developers/devnet/api-reference/rest-api-reference/wallet-data.md).

# Wallet Data

Accounts, positions, trades, etc.

## GET /wallet/{address}/accounts

> Get wallet accounts

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/accounts":{"get":{"summary":"Get wallet accounts","operationId":"getWalletAccounts","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of accounts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Account":{"title":"Account","type":"object","required":["accountId","name","type"],"properties":{"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/AccountType"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"AccountType":{"title":"AccountType","type":"string","enum":["MAINPERP","SUBPERP","SPOT"],"description":"SPOT = account that can only trade spot, MAINPERP = main perp account, SUBPERP = sub perp account"},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet execution busts

> Returns up to 100 execution busts (failed fills) for a given wallet, covering both spot and perp markets. Use the \`symbol\` suffix to distinguish spot from perp busts.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/executionBusts":{"get":{"summary":"Get wallet execution busts","description":"Returns up to 100 execution busts (failed fills) for a given wallet, covering both spot and perp markets. Use the `symbol` suffix to distinguish spot from perp busts.","operationId":"getWalletExecutionBusts","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"List of execution busts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionBustList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this time (inclusive lower bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this time (inclusive upper bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`. Results are returned newest-first and capped at a maximum that varies by endpoint. Because this bound is inclusive, passing the oldest timestamp from the previous page can repeat boundary rows; clients can deduplicate overlap or subtract 1ms when same-ms boundary ties are not relevant.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"ExecutionBustList":{"title":"ExecutionBustList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionBust"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"ExecutionBust":{"title":"ExecutionBust","type":"object","required":["symbol","takerAccountId","exchangeId","makerAccountId","takerOrderId","makerOrderId","qty","side","price","reason","timestamp","sequenceNumber"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol","description":"Market symbol. Spot symbols end in RUSD (e.g. ETHRUSD); perp symbols end in RUSDPERP (e.g. BTCRUSDPERP). Clients can use the suffix to distinguish spot vs perp."},"takerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Taker account ID"},"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"makerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Maker account ID (counterparty)"},"takerOrderId":{"type":"string","description":"Taker order ID"},"makerOrderId":{"type":"string","description":"Order ID for the maker"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Failed base quantity"},"side":{"$ref":"#/components/schemas/Side"},"price":{"$ref":"#/components/schemas/SignedDecimal"},"reason":{"$ref":"#/components/schemas/ExecutionBustReason","description":"Structured settlement failure reason. Use `reasonName` and the accompanying fields to interpret why the execution was reverted."},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Block timestamp (milliseconds)"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution sequence number, increases by 1 for every execution bust in reya chain"},"fillId":{"type":"string","description":"Stable fill identifier. Use it to correlate the execution bust with its execution and order update."}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"ExecutionBustReason":{"title":"ExecutionBustReason","description":"Machine-readable decoded execution-bust reason. This is a discriminated union keyed by `reasonName`. Known contract errors have strict typed shapes; decoded-but-unmodeled ABI errors use the `ExecutionBustReasonUnmapped` fallback with string-valued `args`.","oneOf":[{"$ref":"#/components/schemas/ExecutionBustReasonNameOnly"},{"$ref":"#/components/schemas/ExecutionBustReasonAccountNotFound"},{"$ref":"#/components/schemas/ExecutionBustReasonExchangeNotFound"},{"$ref":"#/components/schemas/ExecutionBustReasonMarketNotFound"},{"$ref":"#/components/schemas/ExecutionBustReasonUnauthorized"},{"$ref":"#/components/schemas/ExecutionBustReasonUnauthorizedSigner"},{"$ref":"#/components/schemas/ExecutionBustReasonUnauthorizedMatchingEnginePublisher"},{"$ref":"#/components/schemas/ExecutionBustReasonSignerNonceAlreadyUsed"},{"$ref":"#/components/schemas/ExecutionBustReasonMarkPriceStale"},{"$ref":"#/components/schemas/ExecutionBustReasonPriceDeviationTooLarge"},{"$ref":"#/components/schemas/ExecutionBustReasonStalePriceDetected"},{"$ref":"#/components/schemas/ExecutionBustReasonAccountBelowIM"},{"$ref":"#/components/schemas/ExecutionBustReasonReduceOnlyConditionFailed"},{"$ref":"#/components/schemas/ExecutionBustReasonOrderExpired"},{"$ref":"#/components/schemas/ExecutionBustReasonMaxQuantityExceeded"},{"$ref":"#/components/schemas/ExecutionBustReasonMarketTypeMismatch"},{"$ref":"#/components/schemas/ExecutionBustReasonMarketIdMismatch"},{"$ref":"#/components/schemas/ExecutionBustReasonBaseDeltaWrongSpacing"},{"$ref":"#/components/schemas/ExecutionBustReasonPriceWrongSpacing"},{"$ref":"#/components/schemas/ExecutionBustReasonInvalidFillPrice"},{"$ref":"#/components/schemas/ExecutionBustReasonFillExceedsOrderBaseDelta"},{"$ref":"#/components/schemas/ExecutionBustReasonFeatureUnavailable"},{"$ref":"#/components/schemas/ExecutionBustReasonCollateralIsNotQuote"},{"$ref":"#/components/schemas/ExecutionBustReasonCollateralCapExceeded"},{"$ref":"#/components/schemas/ExecutionBustReasonCollateralPoolCollision"},{"$ref":"#/components/schemas/ExecutionBustReasonOpenInterestExceeded"},{"$ref":"#/components/schemas/ExecutionBustReasonAccountType"},{"$ref":"#/components/schemas/ExecutionBustReasonNegativeAccountRealBalance"},{"$ref":"#/components/schemas/ExecutionBustReasonAccountInsolvent"},{"$ref":"#/components/schemas/ExecutionBustReasonSameAccountId"},{"$ref":"#/components/schemas/ExecutionBustReasonDecodedLegacy"},{"$ref":"#/components/schemas/ExecutionBustReasonUnknown"},{"$ref":"#/components/schemas/ExecutionBustReasonUnmapped"}]},"ExecutionBustReasonNameOnly":{"title":"ExecutionBustReasonNameOnly","type":"object","required":["reasonName"],"properties":{"reasonName":{"type":"string","enum":["InvalidSignature","SignatureInvalid","SignatureExpired","SmallOrderSize","DustyOrderSize","InvalidFilledExposures","StorkPayloadOlderThanLatest","ZeroSlTpOrderSize"]}},"additionalProperties":false},"ExecutionBustReasonAccountNotFound":{"title":"ExecutionBustReasonAccountNotFound","type":"object","required":["accountId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["AccountNotFound"]},"accountId":{"type":"integer","description":"Account identifier that does not exist."}},"additionalProperties":false},"ExecutionBustReasonExchangeNotFound":{"title":"ExecutionBustReasonExchangeNotFound","type":"object","required":["exchangeId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["ExchangeNotFound"]},"exchangeId":{"type":"integer","description":"Exchange identifier that does not exist."}},"additionalProperties":false},"ExecutionBustReasonMarketNotFound":{"title":"ExecutionBustReasonMarketNotFound","type":"object","required":["marketId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["MarketNotFound"]},"marketId":{"type":"integer","description":"Market identifier that does not exist."}},"additionalProperties":false},"ExecutionBustReasonUnauthorized":{"title":"ExecutionBustReasonUnauthorized","type":"object","required":["address","reasonName"],"properties":{"reasonName":{"type":"string","enum":["Unauthorized"]},"address":{"type":"string","description":"Address that is not authorized."}},"additionalProperties":false},"ExecutionBustReasonUnauthorizedSigner":{"title":"ExecutionBustReasonUnauthorizedSigner","type":"object","required":["signer","reasonName"],"properties":{"reasonName":{"type":"string","enum":["UnauthorizedSigner"]},"signer":{"type":"string","description":"Signer address that is not authorized to trade for the account."}},"additionalProperties":false},"ExecutionBustReasonUnauthorizedMatchingEnginePublisher":{"title":"ExecutionBustReasonUnauthorizedMatchingEnginePublisher","type":"object","required":["publisher","reasonName"],"properties":{"reasonName":{"type":"string","enum":["UnauthorizedMatchingEnginePublisher"]},"publisher":{"type":"string","description":"Address associated with the publisher authorization failure."}},"additionalProperties":false},"ExecutionBustReasonSignerNonceAlreadyUsed":{"title":"ExecutionBustReasonSignerNonceAlreadyUsed","type":"object","required":["signer","nonce","reasonName"],"properties":{"reasonName":{"type":"string","enum":["SignerNonceAlreadyUsed"]},"signer":{"type":"string","description":"Signer address that already used the nonce."},"nonce":{"type":"string","description":"Signer nonce that was already consumed. Kept as a string because contract nonces are uint256."}},"additionalProperties":false},"ExecutionBustReasonMarkPriceStale":{"title":"ExecutionBustReasonMarkPriceStale","type":"object","required":["marketId","priceTimestamp","blockTimestamp","maxStaleDuration","reasonName"],"properties":{"reasonName":{"type":"string","enum":["MarkPriceStale"]},"marketId":{"type":"integer","description":"Market identifier whose mark price is stale."},"priceTimestamp":{"type":"integer","description":"Timestamp carried by the price update."},"blockTimestamp":{"type":"integer","description":"Block timestamp observed by the contracts."},"maxStaleDuration":{"type":"integer","description":"Maximum allowed price staleness in seconds."}},"additionalProperties":false},"ExecutionBustReasonPriceDeviationTooLarge":{"title":"ExecutionBustReasonPriceDeviationTooLarge","oneOf":[{"$ref":"#/components/schemas/ExecutionBustReasonPassivePerpPriceDeviationTooLarge"},{"$ref":"#/components/schemas/ExecutionBustReasonSpotPriceDeviationTooLarge"}],"description":"PriceDeviationTooLarge has two contract shapes: passive-perp includes marketId/price/referencePrice/maxDeviation, while spot/core includes fillPrice/oraclePrice/oracleDeviation."},"ExecutionBustReasonPassivePerpPriceDeviationTooLarge":{"title":"ExecutionBustReasonPassivePerpPriceDeviationTooLarge","type":"object","required":["marketId","price","referencePrice","maxDeviation","reasonName"],"properties":{"reasonName":{"type":"string","enum":["PriceDeviationTooLarge"]},"marketId":{"type":"integer","description":"Market identifier whose fill price deviated too far."},"price":{"type":"string","description":"Fill price decoded from an 18-decimal fixed-point contract value."},"referencePrice":{"type":"string","description":"Reference price decoded from an 18-decimal fixed-point contract value."},"maxDeviation":{"type":"string","description":"Maximum allowed price deviation decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonSpotPriceDeviationTooLarge":{"title":"ExecutionBustReasonSpotPriceDeviationTooLarge","type":"object","required":["fillPrice","oraclePrice","oracleDeviation","reasonName"],"properties":{"reasonName":{"type":"string","enum":["PriceDeviationTooLarge"]},"fillPrice":{"type":"string","description":"Fill price decoded from an 18-decimal fixed-point contract value."},"oraclePrice":{"type":"string","description":"Oracle price decoded from an 18-decimal fixed-point contract value."},"oracleDeviation":{"type":"string","description":"Oracle deviation threshold decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonStalePriceDetected":{"title":"ExecutionBustReasonStalePriceDetected","type":"object","required":["nodeId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["StalePriceDetected"]},"nodeId":{"type":"string","description":"Oracle node identifier that returned a stale price."}},"additionalProperties":false},"ExecutionBustReasonAccountBelowIM":{"title":"ExecutionBustReasonAccountBelowIM","type":"object","required":["accountId","delta","shortfall","reasonName"],"properties":{"reasonName":{"type":"string","enum":["AccountBelowIM"]},"accountId":{"type":"integer","description":"Account identifier that is below initial margin."},"delta":{"type":"string","description":"Signed initial-margin delta decoded from an 18-decimal fixed-point contract value."},"shortfall":{"type":"string","description":"Absolute initial-margin shortfall decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonReduceOnlyConditionFailed":{"title":"ExecutionBustReasonReduceOnlyConditionFailed","type":"object","required":["marketId","accountId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["ReduceOnlyConditionFailed"]},"marketId":{"type":"integer","description":"Market identifier for the reduce-only check."},"accountId":{"type":"integer","description":"Account identifier for the reduce-only check."}},"additionalProperties":false},"ExecutionBustReasonOrderExpired":{"title":"ExecutionBustReasonOrderExpired","type":"object","required":["expiredAt","reasonName"],"properties":{"reasonName":{"type":"string","enum":["OrderExpired"]},"expiredAt":{"type":"integer","description":"Order expiration timestamp."}},"additionalProperties":false},"ExecutionBustReasonMaxQuantityExceeded":{"title":"ExecutionBustReasonMaxQuantityExceeded","type":"object","required":["updatedQuantity","maxQuantity","reasonName"],"properties":{"reasonName":{"type":"string","enum":["MaxQuantityExceeded"]},"updatedQuantity":{"type":"string","description":"Updated nonce quantity."},"maxQuantity":{"type":"string","description":"Maximum allowed nonce quantity."}},"additionalProperties":false},"ExecutionBustReasonMarketTypeMismatch":{"title":"ExecutionBustReasonMarketTypeMismatch","type":"object","required":["accountMarketType","counterpartyMarketType","reasonName"],"properties":{"reasonName":{"type":"string","enum":["MarketTypeMismatch"]},"accountMarketType":{"type":"integer","description":"Account-side market type."},"counterpartyMarketType":{"type":"integer","description":"Counterparty-side market type."}},"additionalProperties":false},"ExecutionBustReasonMarketIdMismatch":{"title":"ExecutionBustReasonMarketIdMismatch","type":"object","required":["accountMarketId","counterpartyMarketId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["MarketIdMismatch"]},"accountMarketId":{"type":"integer","description":"Account-side market identifier."},"counterpartyMarketId":{"type":"integer","description":"Counterparty-side market identifier."}},"additionalProperties":false},"ExecutionBustReasonBaseDeltaWrongSpacing":{"title":"ExecutionBustReasonBaseDeltaWrongSpacing","type":"object","required":["baseDelta","baseSpacing","reasonName"],"properties":{"reasonName":{"type":"string","enum":["BaseDeltaWrongSpacing"]},"baseDelta":{"type":"string","description":"Base delta decoded from an 18-decimal fixed-point contract value."},"baseSpacing":{"type":"string","description":"Base spacing decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonPriceWrongSpacing":{"title":"ExecutionBustReasonPriceWrongSpacing","type":"object","required":["price","priceSpacing","reasonName"],"properties":{"reasonName":{"type":"string","enum":["PriceWrongSpacing"]},"price":{"type":"string","description":"Price decoded from an 18-decimal fixed-point contract value."},"priceSpacing":{"type":"string","description":"Price spacing decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonInvalidFillPrice":{"title":"ExecutionBustReasonInvalidFillPrice","type":"object","required":["fillPrice","orderPrice","reasonName"],"properties":{"reasonName":{"type":"string","enum":["InvalidFillPrice"]},"fillPrice":{"type":"string","description":"Fill price decoded from an 18-decimal fixed-point contract value."},"orderPrice":{"type":"string","description":"Order limit price decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonFillExceedsOrderBaseDelta":{"title":"ExecutionBustReasonFillExceedsOrderBaseDelta","type":"object","required":["fillAmount","orderBaseDelta","orderRole","reasonName"],"properties":{"reasonName":{"type":"string","enum":["FillExceedsOrderBaseDelta"]},"fillAmount":{"type":"string","description":"Fill amount decoded from an 18-decimal fixed-point contract value."},"orderBaseDelta":{"type":"string","description":"Order base delta decoded from an 18-decimal fixed-point contract value."},"orderRole":{"type":"string","enum":["account","counterparty"],"description":"Whether the failed order was the account or counterparty order."}},"additionalProperties":false},"ExecutionBustReasonFeatureUnavailable":{"title":"ExecutionBustReasonFeatureUnavailable","type":"object","required":["feature","reasonName"],"properties":{"reasonName":{"type":"string","enum":["FeatureUnavailable"]},"feature":{"type":"string","description":"Feature identifier that is disabled."}},"additionalProperties":false},"ExecutionBustReasonCollateralIsNotQuote":{"title":"ExecutionBustReasonCollateralIsNotQuote","type":"object","required":["collateralPoolId","collateral","reasonName"],"properties":{"reasonName":{"type":"string","enum":["CollateralIsNotQuote"]},"collateralPoolId":{"type":"integer","description":"Collateral pool identifier."},"collateral":{"type":"string","description":"Collateral address that is not the quote collateral."}},"additionalProperties":false},"ExecutionBustReasonCollateralCapExceeded":{"title":"ExecutionBustReasonCollateralCapExceeded","type":"object","required":["collateralPoolId","collateral","collateralCap","collateralBalance","reasonName"],"properties":{"reasonName":{"type":"string","enum":["CollateralCapExceeded"]},"collateralPoolId":{"type":"integer","description":"Collateral pool identifier."},"collateral":{"type":"string","description":"Collateral address whose pool cap was exceeded."},"collateralCap":{"type":"string","description":"Collateral cap."},"collateralBalance":{"type":"string","description":"Collateral balance."}},"additionalProperties":false},"ExecutionBustReasonCollateralPoolCollision":{"title":"ExecutionBustReasonCollateralPoolCollision","type":"object","required":["collateralPoolId","counterpartyCollateralPoolId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["CollateralPoolCollision"]},"collateralPoolId":{"type":"integer","description":"Account collateral pool identifier."},"counterpartyCollateralPoolId":{"type":"integer","description":"Counterparty collateral pool identifier."}},"additionalProperties":false},"ExecutionBustReasonOpenInterestExceeded":{"title":"ExecutionBustReasonOpenInterestExceeded","type":"object","required":["marketId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["OpenInterestExceeded"]},"marketId":{"type":"integer","description":"Market identifier whose open-interest cap was exceeded."}},"additionalProperties":false},"ExecutionBustReasonAccountType":{"title":"ExecutionBustReasonAccountType","type":"object","required":["accountId","reasonName"],"properties":{"reasonName":{"type":"string","enum":["SpotAccount","NotSpotAccount"]},"accountId":{"type":"integer","description":"Account identifier whose account type failed the check."}},"additionalProperties":false},"ExecutionBustReasonNegativeAccountRealBalance":{"title":"ExecutionBustReasonNegativeAccountRealBalance","type":"object","required":["accountId","realBalance","reasonName"],"properties":{"reasonName":{"type":"string","enum":["NegativeAccountRealBalance"]},"accountId":{"type":"integer","description":"Account identifier with negative real balance."},"realBalance":{"type":"string","description":"Real balance decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonAccountInsolvent":{"title":"ExecutionBustReasonAccountInsolvent","type":"object","required":["accountId","marginBalance","reasonName"],"properties":{"reasonName":{"type":"string","enum":["AccountInsolvent"]},"accountId":{"type":"integer","description":"Account identifier that is insolvent."},"marginBalance":{"type":"string","description":"Margin balance decoded from an 18-decimal fixed-point contract value."}},"additionalProperties":false},"ExecutionBustReasonSameAccountId":{"title":"ExecutionBustReasonSameAccountId","type":"object","required":["reasonName"],"properties":{"reasonName":{"type":"string","enum":["SameAccountId"]},"accountId":{"type":"integer","description":"Account identifier that matched itself, when emitted by the contract."}},"additionalProperties":false},"ExecutionBustReasonDecodedLegacy":{"title":"ExecutionBustReasonDecodedLegacy","type":"object","required":["message","reasonName"],"properties":{"reasonName":{"type":"string","enum":["DecodedReason"]},"message":{"type":"string","description":"Already-decoded legacy string preserved as a message."}},"additionalProperties":false},"ExecutionBustReasonUnknown":{"title":"ExecutionBustReasonUnknown","type":"object","required":["message","reasonName"],"properties":{"reasonName":{"type":"string","enum":["UnknownReason"]},"message":{"type":"string","description":"Support-facing fallback for undecodable or empty revert bytes."}},"additionalProperties":false},"ExecutionBustReasonUnmapped":{"title":"ExecutionBustReasonUnmapped","type":"object","required":["reasonName","args"],"properties":{"reasonName":{"type":"string","description":"Decoded custom-error name not explicitly modeled by this schema."},"args":{"type":"object","description":"Named ABI inputs, or arg0/arg1 fallback names, encoded as strings to avoid precision loss.","additionalProperties":{"type":"string"}}},"additionalProperties":false},"PaginationMeta":{"title":"PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last result in response order, in milliseconds. Descending endpoints return newest-first, so this is the oldest returned timestamp and can be used as the next page's endTime boundary."},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the first result in response order, in milliseconds. Descending endpoints return newest-first, so this is the newest returned timestamp."}},"additionalProperties":true},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet perp executions

> Returns up to 100 perp executions for a given wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/perpExecutions":{"get":{"summary":"Get wallet perp executions","description":"Returns up to 100 perp executions for a given wallet.","operationId":"getWalletPerpExecutions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"},{"$ref":"#/components/parameters/ExecutionTypeParam"}],"responses":{"200":{"description":"List of perpetual executions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpExecutionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this time (inclusive lower bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this time (inclusive upper bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`. Results are returned newest-first and capped at a maximum that varies by endpoint. Because this bound is inclusive, passing the oldest timestamp from the previous page can repeat boundary rows; clients can deduplicate overlap or subtract 1ms when same-ms boundary ties are not relevant.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"ExecutionTypeParam":{"name":"type","in":"query","required":false,"description":"Filter perp executions by their exact response type. Omit to return executions of all types.","schema":{"type":"string","enum":["ORDER_MATCH","LIQUIDATION","ADL","MARKET_CLOSE"]}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"PerpExecutionList":{"title":"PerpExecutionList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PerpExecution"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"PerpExecution":{"title":"PerpExecution","type":"object","description":"A settled perp execution. Maker-side fields are optional. They are always omitted for ADL and MARKET_CLOSE executions, which are single-sided and have no maker, and can also be absent on legacy executions.","required":["exchangeId","symbol","takerAccountId","qty","side","takerFee","price","type","timestamp","sequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"takerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Taker account ID"},"makerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Maker account ID (counterparty). Absent for ADL and MARKET_CLOSE executions, which have no maker, and when no counterparty is available on a legacy execution."},"takerOrderId":{"type":"string","description":"Order ID for the taker. Absent for legacy V2 executions and omitted when not meaningful."},"makerOrderId":{"type":"string","description":"Order ID for the maker. Absent for legacy V2, ADL, and MARKET_CLOSE executions and omitted when not meaningful."},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"side":{"$ref":"#/components/schemas/Side","description":"Execution side from the taker perspective for ORDER_MATCH executions."},"price":{"$ref":"#/components/schemas/SignedDecimal"},"takerFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Gross taker fee debit in rUSD (signed; positive means the taker paid a fee). When a fee breakdown is present, this equals `protocolFeeCredit + referrerFeeCredit + takerRebateCredit + poolFeeCredit`."},"protocolFeeCredit":{"$ref":"#/components/schemas/SignedDecimal","description":"Protocol component of `takerFee`, in rUSD. Present when the execution includes a fee breakdown; omitted on older executions."},"referrerFeeCredit":{"$ref":"#/components/schemas/SignedDecimal","description":"Referral component of `takerFee`, in rUSD. Zero when the taker has no referrer. Present when the execution includes a fee breakdown; omitted on older executions."},"takerRebateCredit":{"$ref":"#/components/schemas/SignedDecimal","description":"Rebate component of `takerFee`, in rUSD. It is part of the gross taker debit and is not necessarily an immediate credit back to the taker. Present when the execution includes a fee breakdown; omitted on older executions."},"poolFeeCredit":{"$ref":"#/components/schemas/SignedDecimal","description":"Passive-pool component of `takerFee`, in rUSD. Present when the execution includes a fee breakdown; omitted on older executions."},"makerFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Signed net maker fee in rUSD (negative means rebate). Available only on older executions with a recorded maker fee or rebate. Omitted on executions with the current taker-fee breakdown and on ADL and MARKET_CLOSE executions."},"takerOpeningFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Opening fee portion of the taker fee in rUSD. Absent for position-extending executions."},"makerOpeningFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Opening portion of `makerFee`, in rUSD. Omitted when `makerFee` is absent and on position-extending executions."},"type":{"$ref":"#/components/schemas/ExecutionType"},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution timestamp (milliseconds)"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution sequence number, increases by 1 for every perp execution in reya chain"},"fillId":{"type":"string","description":"Stable fill identifier. Use it to correlate the execution with the fill range reported by order responses and order updates."},"takerRealizedPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Realized taker PnL from this execution in rUSD (takerPriceVariationPnl + takerFundingPnl). Absent for position-extending executions."},"makerRealizedPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Realized maker PnL from this execution in rUSD (makerPriceVariationPnl + makerFundingPnl). Absent when counterparty state is unavailable, the execution is position-extending, or the execution is ADL or MARKET_CLOSE."},"takerPriceVariationPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Taker PnL component from price movement in rUSD. Absent for position-extending executions."},"makerPriceVariationPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Maker PnL component from price movement in rUSD. Absent when counterparty state is unavailable, the execution is position-extending, or the execution is ADL or MARKET_CLOSE."},"takerFundingPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Taker PnL component from funding payments in rUSD. Absent for position-extending executions."},"makerFundingPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Maker PnL component from funding payments in rUSD. Absent when counterparty state is unavailable, the execution is position-extending, or the execution is ADL or MARKET_CLOSE."}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"ExecutionType":{"title":"ExecutionType","type":"string","enum":["ORDER_MATCH","LIQUIDATION","ADL","MARKET_CLOSE"],"description":"Type of execution. MARKET_CLOSE is the terminal execution used to close residual positions when a market is force-closed."},"PaginationMeta":{"title":"PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last result in response order, in milliseconds. Descending endpoints return newest-first, so this is the oldest returned timestamp and can be used as the next page's endTime boundary."},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the first result in response order, in milliseconds. Descending endpoints return newest-first, so this is the newest returned timestamp."}},"additionalProperties":true},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet spot executions

> Returns up to 100 spot executions for a given wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/spotExecutions":{"get":{"summary":"Get wallet spot executions","description":"Returns up to 100 spot executions for a given wallet.","operationId":"getWalletSpotExecutions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"List of spot executions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpotExecutionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this time (inclusive lower bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this time (inclusive upper bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`. Results are returned newest-first and capped at a maximum that varies by endpoint. Because this bound is inclusive, passing the oldest timestamp from the previous page can repeat boundary rows; clients can deduplicate overlap or subtract 1ms when same-ms boundary ties are not relevant.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"SpotExecutionList":{"title":"SpotExecutionList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpotExecution"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"SpotExecution":{"title":"SpotExecution","type":"object","required":["symbol","takerAccountId","makerAccountId","qty","side","takerFee","price","type","timestamp","sequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"takerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Taker account ID"},"makerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Maker account ID (counterparty)"},"takerOrderId":{"type":"string","description":"Order ID for the taker"},"makerOrderId":{"type":"string","description":"Order ID for the maker"},"side":{"$ref":"#/components/schemas/Side"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"price":{"$ref":"#/components/schemas/SignedDecimal"},"takerFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Signed taker fee impact in rUSD. Positive means the taker paid a fee."},"type":{"$ref":"#/components/schemas/ExecutionType"},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution timestamp (milliseconds)"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution sequence number, increases by 1 for every spot execution in reya chain"},"fillId":{"type":"string","description":"Stable fill identifier. Use it to correlate the execution with the fill range reported by order responses and order updates."}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"ExecutionType":{"title":"ExecutionType","type":"string","enum":["ORDER_MATCH","LIQUIDATION","ADL","MARKET_CLOSE"],"description":"Type of execution. MARKET_CLOSE is the terminal execution used to close residual positions when a market is force-closed."},"PaginationMeta":{"title":"PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last result in response order, in milliseconds. Descending endpoints return newest-first, so this is the oldest returned timestamp and can be used as the next page's endTime boundary."},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the first result in response order, in milliseconds. Descending endpoints return newest-first, so this is the newest returned timestamp."}},"additionalProperties":true},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet order history

> Returns up to 100 historical order state updates for a wallet, newest first.\
> Each row is one \`Order\` update for one of the wallet's accounts, across spot and perp markets.\
> \
> History is limited and may be unavailable for high-volume accounts. This endpoint is for\
> account-history views; it is not a complete audit log. Market makers should maintain their\
> own order history from the \`orderChanges\` WebSocket stream and reconcile against current\
> open orders after a disconnect.\
> \
> \`startTime\` and \`endTime\` are millisecond Unix timestamps matched against \`lastUpdateAt\`.\
> Results are newest-first: \`meta.startTime\` is the newest returned timestamp and \`meta.endTime\`\
> is the oldest. \`endTime\` is inclusive, so passing the previous \`meta.endTime\` may repeat\
> boundary rows; deduplicate using \`Order.sequenceNumber\`. Clients that do not need to preserve\
> same-millisecond boundary ties may page backward with \`endTime = meta.endTime - 1\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/orderHistory":{"get":{"summary":"Get wallet order history","description":"Returns up to 100 historical order state updates for a wallet, newest first.\nEach row is one `Order` update for one of the wallet's accounts, across spot and perp markets.\n\nHistory is limited and may be unavailable for high-volume accounts. This endpoint is for\naccount-history views; it is not a complete audit log. Market makers should maintain their\nown order history from the `orderChanges` WebSocket stream and reconcile against current\nopen orders after a disconnect.\n\n`startTime` and `endTime` are millisecond Unix timestamps matched against `lastUpdateAt`.\nResults are newest-first: `meta.startTime` is the newest returned timestamp and `meta.endTime`\nis the oldest. `endTime` is inclusive, so passing the previous `meta.endTime` may repeat\nboundary rows; deduplicate using `Order.sequenceNumber`. Clients that do not need to preserve\nsame-millisecond boundary ties may page backward with `endTime = meta.endTime - 1`.\n","operationId":"getWalletOrderHistory","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"Paginated list of order state updates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderHistoryList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this time (inclusive lower bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this time (inclusive upper bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`. Results are returned newest-first and capped at a maximum that varies by endpoint. Because this bound is inclusive, passing the oldest timestamp from the previous page can repeat boundary rows; clients can deduplicate overlap or subtract 1ms when same-ms boundary ties are not relevant.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"OrderHistoryList":{"title":"OrderHistoryList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"Order":{"title":"Order","type":"object","description":"Order state returned by openOrders, orderChanges, and orderHistory. Event streams and history can contain multiple updates for the same order. Field descriptions specify snapshot/event availability; see OrderStatus for lifecycle states.","required":["exchangeId","symbol","accountId","orderId","side","limitPx","orderType","status","createdAt","lastUpdateAt"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"orderId":{"type":"string"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Monotonic order-event sequence. Present on orderHistory REST rows and orderChanges WS event rows; omitted on openOrders and other resting-order snapshots. Use it to deduplicate inclusive orderHistory page-boundary overlap and to splice orderHistory with the orderChanges live stream."},"clientOrderId":{"type":"string","description":"Client-provided order ID, as a decimal string (`uint64`). Present when the order has a non-zero client id; omitted otherwise."},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"execQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Executed quantity in the current order update."},"cumQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Total Executed quantity across all fills where the order is involved."},"firstFillId":{"type":"string","description":"Identifier of the first fill this update represents. Together with fillCount it identifies the fills as a contiguous ID range [firstFillId, firstFillId + fillCount - 1]. For a taker update, the first fill of its matching round; for a maker update, its single fill. Present only on fill updates; absent for non-fill updates and resting-order snapshots."},"fillCount":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of fills this update represents — the length of the contiguous nonce range starting at firstFillId. For a taker update, the fills produced in its matching round; for a maker update, 1. Present only on fill updates; absent otherwise (so it is >= 1 whenever present)."},"side":{"$ref":"#/components/schemas/Side"},"limitPx":{"$ref":"#/components/schemas/SignedDecimal"},"orderType":{"$ref":"#/components/schemas/OrderType"},"triggerPx":{"$ref":"#/components/schemas/SignedDecimal","description":"Price at which TP/SL orders will be triggered, should not be set for other order types."},"triggered":{"type":"boolean","description":"For protective stops, false means armed and true means fired; never true for LIMIT orders. Fired children are cancel-only. Omitted on orderHistory, where absence means unknown: use openOrders or walletOrderChanges to distinguish phases. On those two surfaces, omission on older deployments can be treated as false. See POST /v2/createOrder for firing and child-order behavior."},"timeInForce":{"$ref":"#/components/schemas/TimeInForce","description":"Order time in force. For a `LIMIT` order it shapes execution directly. For a `STOP_LOSS` / `TAKE_PROFIT` it is the time in force the child order takes on when the trigger fires: `IOC` fills what the book offers and cancels the remainder, `GTC` and `GTT` rest the remainder in the book."},"expiresAfter":{"$ref":"#/components/schemas/UnsignedInteger","description":"Unix seconds. Signed GTT expiry (`OrderDetails.expiresAfter`); omitted for GTC and IOC. For a protective stop, the same expiry covers both the armed stop and its fired child; firing does not start a new lifetime. The stop or its resting child can be cancelled before this timestamp to allow settlement, with `cancelReason: GTT_EXPIRED`."},"reduceOnly":{"type":"boolean","description":"Whether this is a reduce-only order, exclusively used for LIMIT IOC orders. `STOP_LOSS` / `TAKE_PROFIT` orders and the children they fire into are reduce-only by construction — they close the position and can never open one — yet still report `false` here, because this field mirrors the signed on-chain `OrderDetails.reduceOnly`. Do not read `false` on a stop as permission to open a position."},"postOnly":{"type":"boolean","description":"Whether this is a post-only (maker-only) order. Mirrors `CreateOrderRequest.postOnly`; updated by `modifyOrder`."},"status":{"$ref":"#/components/schemas/OrderStatus"},"createdAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Creation timestamp (milliseconds)"},"lastUpdateAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Last update timestamp in milliseconds. For orderChanges WebSocket events and orderHistory REST rows this is the order event timestamp used by orderHistory startTime/endTime filters."},"cancelReason":{"$ref":"#/components/schemas/CancelReason","description":"Machine-readable reason the order was cancelled. Present only when `status` is `CANCELLED`; absent otherwise."},"cancelReasonMessage":{"type":"string","description":"Human-readable explanation of `cancelReason`. Present only when `cancelReason` is present."}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"OrderType":{"title":"OrderType","type":"string","enum":["LIMIT","STOP_LOSS","TAKE_PROFIT"],"description":"Order type aligned with the on-chain `OrderDetails.orderType` enum: LIMIT = limit order, STOP_LOSS = stop-loss trigger order, TAKE_PROFIT = take-profit trigger order."},"TimeInForce":{"title":"TimeInForce","type":"string","enum":["IOC","GTC","GTT"],"description":"Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel, GTT = Good Till Time)"},"OrderStatus":{"title":"OrderStatus","type":"string","enum":["OPEN","FILLED","CANCELLED"],"description":"OPEN includes partially filled resting orders, armed protective stops, and their resting children. FILLED and CANCELLED are terminal states. Use Order.triggered to distinguish armed stops from fired children. Requests rejected before order creation return errors, not order-status rows."},"CancelReason":{"title":"CancelReason","type":"string","enum":["NO_LIQUIDITY","IOC_REMAINDER","SELF_TRADE_PREVENTION","PROTECTIVE_SELF_TRADE_SWEEP","GTT_EXPIRED","USER_CANCEL","MASS_CANCEL","CANCEL_ALL_AFTER","FEED_RESET","RISK_CANCELLED","RISK_REJECTED","OCO_SIBLING_FIRED","POSITION_CLOSED"],"description":"Machine-readable cancellation reason. Present only on CANCELLED orders and may be omitted when unavailable. See Cancellation reasons in the REST API Order Entry section for per-code meanings and handling."},"PaginationMeta":{"title":"PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last result in response order, in milliseconds. Descending endpoints return newest-first, so this is the oldest returned timestamp and can be used as the next page's endTime boundary."},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the first result in response order, in milliseconds. Descending endpoints return newest-first, so this is the newest returned timestamp."}},"additionalProperties":true},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## GET /wallet/{address}/positions

> Get wallet positions

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/positions":{"get":{"summary":"Get wallet positions","operationId":"getWalletPositions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of positions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Position"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Position":{"title":"Position","type":"object","required":["exchangeId","symbol","accountId","qty","side","avgEntryPrice","avgEntryFundingValue","lastTradeSequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"side":{"$ref":"#/components/schemas/Side"},"avgEntryPrice":{"$ref":"#/components/schemas/SignedDecimal"},"avgEntryFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Average of funding values at the entry times of currently open exposure, which serves as a baseline from which to compute the accrued funding in the position: units x (fundingValue - avgEntryFundingValue)"},"lastTradeSequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Sequence number of last execution taken into account for the position."}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet account balances

> Returns all account real balances for a wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/accountBalances":{"get":{"summary":"Get wallet account balances","description":"Returns all account real balances for a wallet.","operationId":"getWalletAccountBalances","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of account balances","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"AccountBalance":{"title":"AccountBalance","type":"object","required":["accountId","asset","realBalance","balanceDEPRECATED"],"properties":{"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"asset":{"$ref":"#/components/schemas/Asset"},"realBalance":{"$ref":"#/components/schemas/SignedDecimal","description":"Sum of account net deposits (transfers, deposits and withdrawals) and realized pnl from closed positions. Realized pnl only applies to RUSD given it is the only settlement asset"},"balanceDEPRECATED":{"$ref":"#/components/schemas/SignedDecimal","description":"Sum of account net deposits (transfers, deposits and withdrawals). This field is deprecated and will be removed in a future release"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"Asset":{"title":"Asset","type":"string","pattern":"^[A-Za-z0-9]+$"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet transfers

> Return settled collateral movements for every account of a wallet, newest first.\
> The streaming \`walletTransfers\` channel delivers the same entries as live updates.\
> \
> \*\*Coverage\*\*\
> \
> Each entry belongs to one account and asset, with \`amount\` signed from that account's\
> perspective. Moving 100 rUSD between two accounts of the same wallet produces two\
> entries: -100 for the sending account and +100 for the receiving account.\
> \
> This is a history of net deposits, not a complete balance or PnL history. Realized PnL,\
> funding, and ADL cashflows are excluded; closing a profitable position shows its fee\
> movements, not its profit. Use \`accountBalances.realBalance\` for realized balance and\
> \`positions\` / \`perpExecutions\` for position and execution PnL.\
> \
> Zero-amount entries are excluded. Historical coverage varies by environment; movements\
> before the available history begins are absent. Returned entries do not change.\
> \
> \*\*Transfer types\*\*\
> \
> \`type\` describes the purpose of a movement, not its direction; use the sign of \`amount\`\
> for direction. The following meanings apply to REST and WebSocket entries.\
> \
> \| Type | Meaning |\
> \| --- | --- |\
> \| \`DEPOSIT\` / \`WITHDRAWAL\` | Collateral entering or leaving the protocol. |\
> \| \`TRANSFER\` | Transfer between margin accounts of the same owner. |\
> \| \`POOL\_STAKE\` / \`POOL\_UNSTAKE\` | Passive-pool staking or unstaking; entries cover the asset and share token. |\
> \| \`PERP\_TAKER\_FEE\` | Gross fee paid by the taker on a perp fill. |\
> \| \`PERP\_REFERRER\_REBATE\` | Rebate for the taker's referrer. |\
> \| \`PERP\_TAKER\_REBATE\` | Rebate returned to the taker. |\
> \| \`PERP\_POOL\_REBATE\` | Rebate credited to the passive pool. |\
> \| \`PERP\_FEE\` | Perp fee recorded in older execution history. |\
> \| \`SPOT\_EXECUTION\` | Token movements from a spot trade, recorded separately per asset. |\
> \| \`AUTO\_EXCHANGE\` / \`AUTO\_EXCHANGE\_INSURANCE\_FEE\` | Auto-exchange movements and the associated insurance-fund fee. |\
> \| \`LIQUIDATION\_INSURANCE\_FEE\` | Liquidation fee for the insurance fund. |\
> \| \`LIQUIDATION\_BACKSTOP\_FEE\` | Liquidation fee for the backstop liquidity provider. |\
> \| \`LIQUIDATION\_LIQUIDATOR\_REWARD\` / \`LIQUIDATION\_KEEPER\_REWARD\` | Liquidator or keeper reward. |\
> \| \`LIQUIDATION\_BID\_FEE\` | Bid fee for a ranked liquidation. |\
> \| \`INSURANCE\_FUND\_COVERAGE\` / \`POOL\_MERGE\` | Insurance coverage or pool consolidation transfer. |\
> \| \`OTHER\` | Unclassified movement; the reported amounts remain exact. |\
> \
> \*\*Pagination\*\*\
> \
> \- Results are ordered newest first by \`sequenceNumber\`. \`limit\` defaults to 100 and is\
> &#x20; capped at 100 entries per page.\
> \- Omit \`cursor\` for the first page. Pass the returned \`meta.nextCursor\` unchanged for\
> &#x20; the next page, keeping the same filters. Stop when \`nextCursor\` is absent.\
> \- Cursor traversal visits each matching entry once, including when entries share a\
> &#x20; block timestamp. Use cursors rather than timestamps to advance between pages.\
> \- \`startTime\` and \`endTime\` filter the block timestamp in milliseconds. \`type\` filters\
> &#x20; by a comma-separated list of \`TransferType\` values; omit it to include all types.\
> \
> \*\*Reconciliation\*\*\
> \
> For a complete history of one account and asset, process entries in chronological order:\
> \`previous netDepositsAfter + amount = netDepositsAfter\`. Do not use a type-filtered or\
> incomplete history to check that equality. \`netDepositsAfter\` is not the account's\
> \`realBalance\` and should not be displayed as its complete balance.\
> \
> Use \`sequenceNumber\` to merge and deduplicate REST history, the WebSocket snapshot, and\
> live entries. Use \`fillId\` or \`spotExecutionSequenceNumber\`, when present, to associate\
> movements with executions. Optional fields and historical availability are documented\
> on \`Transfer\`; see \`walletTransfers\` for snapshot and live-frame delivery.<br>

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/transfers":{"get":{"summary":"Get wallet transfers","description":"Return settled collateral movements for every account of a wallet, newest first.\nThe streaming `walletTransfers` channel delivers the same entries as live updates.\n\n**Coverage**\n\nEach entry belongs to one account and asset, with `amount` signed from that account's\nperspective. Moving 100 rUSD between two accounts of the same wallet produces two\nentries: -100 for the sending account and +100 for the receiving account.\n\nThis is a history of net deposits, not a complete balance or PnL history. Realized PnL,\nfunding, and ADL cashflows are excluded; closing a profitable position shows its fee\nmovements, not its profit. Use `accountBalances.realBalance` for realized balance and\n`positions` / `perpExecutions` for position and execution PnL.\n\nZero-amount entries are excluded. Historical coverage varies by environment; movements\nbefore the available history begins are absent. Returned entries do not change.\n\n**Transfer types**\n\n`type` describes the purpose of a movement, not its direction; use the sign of `amount`\nfor direction. The following meanings apply to REST and WebSocket entries.\n\n| Type | Meaning |\n| --- | --- |\n| `DEPOSIT` / `WITHDRAWAL` | Collateral entering or leaving the protocol. |\n| `TRANSFER` | Transfer between margin accounts of the same owner. |\n| `POOL_STAKE` / `POOL_UNSTAKE` | Passive-pool staking or unstaking; entries cover the asset and share token. |\n| `PERP_TAKER_FEE` | Gross fee paid by the taker on a perp fill. |\n| `PERP_REFERRER_REBATE` | Rebate for the taker's referrer. |\n| `PERP_TAKER_REBATE` | Rebate returned to the taker. |\n| `PERP_POOL_REBATE` | Rebate credited to the passive pool. |\n| `PERP_FEE` | Perp fee recorded in older execution history. |\n| `SPOT_EXECUTION` | Token movements from a spot trade, recorded separately per asset. |\n| `AUTO_EXCHANGE` / `AUTO_EXCHANGE_INSURANCE_FEE` | Auto-exchange movements and the associated insurance-fund fee. |\n| `LIQUIDATION_INSURANCE_FEE` | Liquidation fee for the insurance fund. |\n| `LIQUIDATION_BACKSTOP_FEE` | Liquidation fee for the backstop liquidity provider. |\n| `LIQUIDATION_LIQUIDATOR_REWARD` / `LIQUIDATION_KEEPER_REWARD` | Liquidator or keeper reward. |\n| `LIQUIDATION_BID_FEE` | Bid fee for a ranked liquidation. |\n| `INSURANCE_FUND_COVERAGE` / `POOL_MERGE` | Insurance coverage or pool consolidation transfer. |\n| `OTHER` | Unclassified movement; the reported amounts remain exact. |\n\n**Pagination**\n\n- Results are ordered newest first by `sequenceNumber`. `limit` defaults to 100 and is\n  capped at 100 entries per page.\n- Omit `cursor` for the first page. Pass the returned `meta.nextCursor` unchanged for\n  the next page, keeping the same filters. Stop when `nextCursor` is absent.\n- Cursor traversal visits each matching entry once, including when entries share a\n  block timestamp. Use cursors rather than timestamps to advance between pages.\n- `startTime` and `endTime` filter the block timestamp in milliseconds. `type` filters\n  by a comma-separated list of `TransferType` values; omit it to include all types.\n\n**Reconciliation**\n\nFor a complete history of one account and asset, process entries in chronological order:\n`previous netDepositsAfter + amount = netDepositsAfter`. Do not use a type-filtered or\nincomplete history to check that equality. `netDepositsAfter` is not the account's\n`realBalance` and should not be displayed as its complete balance.\n\nUse `sequenceNumber` to merge and deduplicate REST history, the WebSocket snapshot, and\nlive entries. Use `fillId` or `spotExecutionSequenceNumber`, when present, to associate\nmovements with executions. Optional fields and historical availability are documented\non `Transfer`; see `walletTransfers` for snapshot and live-frame delivery.\n","operationId":"getWalletTransfers","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/TransfersLimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"},{"$ref":"#/components/parameters/TransferTypeParam"}],"responses":{"200":{"description":"Page of transfer entries, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"TransfersLimitParam":{"name":"limit","in":"query","required":false,"description":"Maximum number of entries per page. The default and the maximum are both 100; larger values are clamped to 100.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"CursorParam":{"name":"cursor","in":"query","required":false,"description":"Opaque page cursor from the previous response's `meta.nextCursor`. Omit for the\nfirst page; otherwise pass it unchanged. Do not construct or parse cursor values.\n","schema":{"type":"string"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this time (inclusive lower bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this time (inclusive upper bound). Millisecond POSIX timestamp, matched against the endpoint's record timestamp. Execution and bust endpoints use on-chain block timestamps; orderHistory uses the order event timestamp exposed as `lastUpdateAt`. Results are returned newest-first and capped at a maximum that varies by endpoint. Because this bound is inclusive, passing the oldest timestamp from the previous page can repeat boundary rows; clients can deduplicate overlap or subtract 1ms when same-ms boundary ties are not relevant.","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"TransferTypeParam":{"name":"type","in":"query","required":false,"description":"Return only entries of these types, as a comma-separated list of `TransferType` values (for example `DEPOSIT,WITHDRAWAL` or `PERP_TAKER_FEE,PERP_TAKER_REBATE`). Omit to return every type.","style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransferType"}}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"TransferType":{"title":"TransferType","type":"string","enum":["DEPOSIT","WITHDRAWAL","TRANSFER","POOL_STAKE","POOL_UNSTAKE","PERP_TAKER_FEE","PERP_REFERRER_REBATE","PERP_TAKER_REBATE","PERP_POOL_REBATE","PERP_FEE","SPOT_EXECUTION","AUTO_EXCHANGE","AUTO_EXCHANGE_INSURANCE_FEE","LIQUIDATION_INSURANCE_FEE","LIQUIDATION_BACKSTOP_FEE","LIQUIDATION_LIQUIDATOR_REWARD","LIQUIDATION_KEEPER_REWARD","LIQUIDATION_BID_FEE","INSURANCE_FUND_COVERAGE","POOL_MERGE","OTHER"],"description":"Purpose of a transfer entry; direction is given by the sign of amount. See GET /v2/wallet/{address}/transfers, Transfer types, for the meaning of each value."},"TransferList":{"title":"TransferList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transfer"}},"meta":{"$ref":"#/components/schemas/CursorPaginationMeta"}},"additionalProperties":true},"Transfer":{"title":"Transfer","type":"object","description":"A settled collateral movement from the perspective of accountId. See GET /v2/wallet/{address}/transfers for coverage, transfer types, pagination, and reconciliation. Field descriptions define signs, units, and optional execution links.","required":["sequenceNumber","accountId","asset","amount","netDepositsAfter","type","timestamp","transactionHash"],"properties":{"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Unique entry ID, increasing in settlement order and never reused. Use it to order and deduplicate entries; do not infer transfer details from its numeric value."},"accountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"The account this entry belongs to."},"asset":{"$ref":"#/components/schemas/Asset"},"amount":{"$ref":"#/components/schemas/SignedDecimal","description":"Amount in asset, signed from this account's perspective: negative for outgoing collateral and positive for incoming collateral."},"netDepositsAfter":{"$ref":"#/components/schemas/SignedDecimal","description":"Net deposits of accountId in asset immediately after this entry, on the same basis as AccountBalance.balanceDEPRECATED. Excludes realized PnL and is not realBalance. See the transfers endpoint's Reconciliation section."},"type":{"$ref":"#/components/schemas/TransferType"},"counterpartyAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"The other account involved in the transfer. Omitted for deposits, withdrawals, pool stakes, and pool unstakes."},"symbol":{"$ref":"#/components/schemas/Symbol","description":"Market of the related execution: the perp market for fee and rebate entries, or the spot market for spot trades and auto-exchanges. Omitted for unrelated movements and may be absent on historical perp fee entries."},"spotExecutionSequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"`SpotExecution.sequenceNumber` of the spot trade or auto-exchange that caused the entry. Spot entries only."},"fillId":{"type":"string","description":"Fill identifier linking this entry to PerpExecution.fillId or SpotExecution.fillId. Omitted for deposits, liquidations, auto-exchanges, and dust settlements; historical perp fee entries may also omit it."},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Block timestamp of the transfer (milliseconds)"},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"Hash of the transaction that emitted the transfer"}},"additionalProperties":true},"Asset":{"title":"Asset","type":"string","pattern":"^[A-Za-z0-9]+$"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"CursorPaginationMeta":{"title":"CursorPaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested, after the server cap"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"nextCursor":{"type":"string","description":"Opaque cursor for the next page. Pass it unchanged as cursor; omitted when no further page is available. See the transfers endpoint's Pagination section for traversal rules."}},"additionalProperties":true},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet open orders

> Returns all pending orders for a wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/openOrders":{"get":{"summary":"Get wallet open orders","description":"Returns all pending orders for a wallet.","operationId":"getWalletOpenOrders","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of open orders","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Order":{"title":"Order","type":"object","description":"Order state returned by openOrders, orderChanges, and orderHistory. Event streams and history can contain multiple updates for the same order. Field descriptions specify snapshot/event availability; see OrderStatus for lifecycle states.","required":["exchangeId","symbol","accountId","orderId","side","limitPx","orderType","status","createdAt","lastUpdateAt"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"orderId":{"type":"string"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Monotonic order-event sequence. Present on orderHistory REST rows and orderChanges WS event rows; omitted on openOrders and other resting-order snapshots. Use it to deduplicate inclusive orderHistory page-boundary overlap and to splice orderHistory with the orderChanges live stream."},"clientOrderId":{"type":"string","description":"Client-provided order ID, as a decimal string (`uint64`). Present when the order has a non-zero client id; omitted otherwise."},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"execQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Executed quantity in the current order update."},"cumQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Total Executed quantity across all fills where the order is involved."},"firstFillId":{"type":"string","description":"Identifier of the first fill this update represents. Together with fillCount it identifies the fills as a contiguous ID range [firstFillId, firstFillId + fillCount - 1]. For a taker update, the first fill of its matching round; for a maker update, its single fill. Present only on fill updates; absent for non-fill updates and resting-order snapshots."},"fillCount":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of fills this update represents — the length of the contiguous nonce range starting at firstFillId. For a taker update, the fills produced in its matching round; for a maker update, 1. Present only on fill updates; absent otherwise (so it is >= 1 whenever present)."},"side":{"$ref":"#/components/schemas/Side"},"limitPx":{"$ref":"#/components/schemas/SignedDecimal"},"orderType":{"$ref":"#/components/schemas/OrderType"},"triggerPx":{"$ref":"#/components/schemas/SignedDecimal","description":"Price at which TP/SL orders will be triggered, should not be set for other order types."},"triggered":{"type":"boolean","description":"For protective stops, false means armed and true means fired; never true for LIMIT orders. Fired children are cancel-only. Omitted on orderHistory, where absence means unknown: use openOrders or walletOrderChanges to distinguish phases. On those two surfaces, omission on older deployments can be treated as false. See POST /v2/createOrder for firing and child-order behavior."},"timeInForce":{"$ref":"#/components/schemas/TimeInForce","description":"Order time in force. For a `LIMIT` order it shapes execution directly. For a `STOP_LOSS` / `TAKE_PROFIT` it is the time in force the child order takes on when the trigger fires: `IOC` fills what the book offers and cancels the remainder, `GTC` and `GTT` rest the remainder in the book."},"expiresAfter":{"$ref":"#/components/schemas/UnsignedInteger","description":"Unix seconds. Signed GTT expiry (`OrderDetails.expiresAfter`); omitted for GTC and IOC. For a protective stop, the same expiry covers both the armed stop and its fired child; firing does not start a new lifetime. The stop or its resting child can be cancelled before this timestamp to allow settlement, with `cancelReason: GTT_EXPIRED`."},"reduceOnly":{"type":"boolean","description":"Whether this is a reduce-only order, exclusively used for LIMIT IOC orders. `STOP_LOSS` / `TAKE_PROFIT` orders and the children they fire into are reduce-only by construction — they close the position and can never open one — yet still report `false` here, because this field mirrors the signed on-chain `OrderDetails.reduceOnly`. Do not read `false` on a stop as permission to open a position."},"postOnly":{"type":"boolean","description":"Whether this is a post-only (maker-only) order. Mirrors `CreateOrderRequest.postOnly`; updated by `modifyOrder`."},"status":{"$ref":"#/components/schemas/OrderStatus"},"createdAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Creation timestamp (milliseconds)"},"lastUpdateAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Last update timestamp in milliseconds. For orderChanges WebSocket events and orderHistory REST rows this is the order event timestamp used by orderHistory startTime/endTime filters."},"cancelReason":{"$ref":"#/components/schemas/CancelReason","description":"Machine-readable reason the order was cancelled. Present only when `status` is `CANCELLED`; absent otherwise."},"cancelReasonMessage":{"type":"string","description":"Human-readable explanation of `cancelReason`. Present only when `cancelReason` is present."}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"OrderType":{"title":"OrderType","type":"string","enum":["LIMIT","STOP_LOSS","TAKE_PROFIT"],"description":"Order type aligned with the on-chain `OrderDetails.orderType` enum: LIMIT = limit order, STOP_LOSS = stop-loss trigger order, TAKE_PROFIT = take-profit trigger order."},"TimeInForce":{"title":"TimeInForce","type":"string","enum":["IOC","GTC","GTT"],"description":"Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel, GTT = Good Till Time)"},"OrderStatus":{"title":"OrderStatus","type":"string","enum":["OPEN","FILLED","CANCELLED"],"description":"OPEN includes partially filled resting orders, armed protective stops, and their resting children. FILLED and CANCELLED are terminal states. Use Order.triggered to distinguish armed stops from fired children. Requests rejected before order creation return errors, not order-status rows."},"CancelReason":{"title":"CancelReason","type":"string","enum":["NO_LIQUIDITY","IOC_REMAINDER","SELF_TRADE_PREVENTION","PROTECTIVE_SELF_TRADE_SWEEP","GTT_EXPIRED","USER_CANCEL","MASS_CANCEL","CANCEL_ALL_AFTER","FEED_RESET","RISK_CANCELLED","RISK_REJECTED","OCO_SIBLING_FIRED","POSITION_CLOSED"],"description":"Machine-readable cancellation reason. Present only on CANCELLED orders and may be omitted when unavailable. See Cancellation reasons in the REST API Order Entry section for per-code meanings and handling."},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet configuration

> Returns trading configuration for a wallet

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"/v2"}],"paths":{"/wallet/{address}/configuration":{"get":{"summary":"Get wallet configuration","description":"Returns trading configuration for a wallet","operationId":"getWalletConfiguration","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"Wallet configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletConfiguration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"WalletConfiguration":{"title":"WalletConfiguration","type":"object","required":["feeTierId","ogStatus","affiliateStatus","refereeStatus"],"properties":{"feeTierId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Fee tier identifier"},"ogStatus":{"type":"boolean","description":"OG status"},"affiliateStatus":{"type":"boolean","description":"Affiliate status"},"refereeStatus":{"type":"boolean","description":"Referee status"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"RequestError":{"title":"RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"},"retryAfterMs":{"type":"integer","minimum":1,"description":"Minimum wait in milliseconds before retrying the rejected operation. Included for `RATE_LIMITED_ERROR`; omitted for errors without a retry hint, including resting-order caps and `CAPACITY_LIMITED_ERROR`. The same field appears in the REST HTTP 400 body and the order-entry WebSocket's `{ ok: false, error }` response. When present, it is a positive integer. Wait at least this long; it does not reserve capacity, and concurrent requests can consume the account's available budget."}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND_ERROR","NO_ACCOUNTS_FOUND_ERROR","NO_PRICES_FOUND_FOR_SYMBOL_ERROR","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR","CANCEL_ALL_AFTER_OTHER_ERROR","ORDER_NOT_FOUND_ERROR","POST_ONLY_WOULD_CROSS_ERROR","MODIFY_QTY_BELOW_FILLED_ERROR","EMPTY_MODIFY_ERROR","MODIFY_ORDER_OTHER_ERROR","RATE_LIMITED_ERROR","INSUFFICIENT_BALANCE_ERROR","PRICE_QTY_BOUNDS_ERROR","SERVICE_DISABLED_ERROR","UNAUTHORIZED_ACCOUNT_ERROR","TRADING_HALTED_ERROR","DUPLICATE_CLIENT_ORDER_ID_ERROR","ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR","ACCOUNT_BELOW_INITIAL_MARGIN_ERROR","OPEN_INTEREST_CAP_ERROR","OPEN_INTEREST_BUDGET_ERROR","REDUCE_ONLY_CONDITION_NOT_MET_ERROR","CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR","TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR","TRIGGER_LIMIT_OUTSIDE_BAND_ERROR","TRIGGER_ALREADY_EXISTS_ERROR","ORDER_EXPIRES_TOO_SOON_ERROR","OPEN_ORDER_COUNT_EXCEEDED_ERROR","OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR","CAPACITY_LIMITED_ERROR","NOT_WHITELISTED_ERROR","ACCOUNT_SUSPENDED_ERROR","UNAVAILABLE_ACCOUNT_OWNER_ERROR"],"description":"Machine-readable request rejection code. REST returns HTTP 400; the order-entry WebSocket returns the same code in its correlated error response. See the REST API HTTP 400 response reference for per-code meanings and retry guidance."},"ServerError":{"title":"ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Standardized error codes for API responses. Branch on `error`, not the free-text\n`message` or HTTP status. Every venue rejection on REST uses HTTP 400 with a\n`RequestError` body. The order-entry WebSocket returns the same code and optional\n`retryAfterMs` in its `{ ok: false, error }` response. HTTP 429 is reserved for\ninfrastructure-level (per-IP) limits in front of the API and is never a venue\nverdict.\n\nValidation and authorization:\n- `INPUT_VALIDATION_ERROR`: correct the request's fields or order-class combination\n  before resubmitting. Immutable fields on a modify must match the existing order.\n- `SYMBOL_NOT_FOUND_ERROR`, `NO_ACCOUNTS_FOUND_ERROR`,\n  `NO_PRICES_FOUND_FOR_SYMBOL_ERROR`: the requested market, account data, or price\n  data is unavailable; check the request and current market/account state.\n- `NUMERIC_OVERFLOW_ERROR`, `PRICE_QTY_BOUNDS_ERROR`: a numeric value is out of\n  range, or price/quantity is invalid for the market. Check price increments and\n  quantity limits.\n- `UNAUTHORIZED_SIGNATURE_ERROR`: the signature is invalid or unauthorized.\n  `UNAUTHORIZED_ACCOUNT_ERROR`: the signer is not permitted to act on the target\n  order. For an armed protective stop, modify and cancel require the signer that\n  created it.\n- `INVALID_NONCE_ERROR`: use a fresh, monotonically increasing nonce for the signer\n  and re-sign.\n- `ORDER_DEADLINE_PASSED_ERROR`, `ORDER_DEADLINE_TOO_HIGH_ERROR`: the signature's\n  `deadline` has passed or is too far in the future. Correct it and re-sign. This\n  deadline controls request acceptance, not the lifetime of an accepted order.\n- `ORDER_EXPIRES_TOO_SOON_ERROR`: a GTT order's `expiresAfter` leaves insufficient\n  time for execution and settlement. Choose a later expiry and re-sign. GTT orders\n  can be cancelled before their signed expiry to allow settlement; for a protective\n  stop this applies to both its armed phase and its fired child.\n- `SERVICE_DISABLED_ERROR`, `TRADING_HALTED_ERROR`: order entry is unavailable for\n  the market. Check market availability before submitting again.\n- `DUPLICATE_CLIENT_ORDER_ID_ERROR`: the client ID belongs to a live order.\n  Reconcile that order before submitting another.\n- `ORDER_NOT_FOUND_ERROR`: the target order was not found. Refresh its state before\n  retrying.\n- `EMPTY_MODIFY_ERROR`: a LIMIT modification makes no change. An armed trigger may\n  be re-signed at unchanged prices.\n- `MODIFY_QTY_BELOW_FILLED_ERROR`: the modified total quantity must exceed the\n  quantity already filled.\n- `POST_ONLY_WOULD_CROSS_ERROR`: the order would execute immediately. Choose a\n  non-crossing price or change the post-only intent and re-sign.\n- The `*_OTHER_ERROR` codes are operation-specific failures without a more specific\n  code. Use `message` for display or troubleshooting; do not parse it as a stable\n  machine-readable contract.\n\nPre-trade risk checks:\n- `ACCOUNT_BELOW_LIQUIDATION_MARGIN_ERROR`: the account does not meet the required\n  liquidation-margin or balance conditions.\n- `ACCOUNT_BELOW_INITIAL_MARGIN_ERROR`: the proposed trade does not meet the\n  account's initial-margin or collateral requirements. An account already below\n  initial margin may trade only when the trade improves its health.\n- `INSUFFICIENT_BALANCE_ERROR`: the account cannot fund the order.\n- `OPEN_INTEREST_CAP_ERROR`, `OPEN_INTEREST_BUDGET_ERROR`: the trade exceeds the\n  market's available open-interest capacity.\n- `REDUCE_ONLY_CONDITION_NOT_MET_ERROR`: the order would not strictly reduce the\n  current position, for example because there is no position, the side is wrong, or\n  the size would reverse it.\n\nA request refused by risk checks is rejected in full. A rejected create produces no\norder; a rejected modify leaves the existing order unchanged. These failures require\na change in account or market state, a smaller order, more collateral, or a user\ndecision; do not automatically retry them unchanged. Resting-order cancellations\nappear separately as `cancelReason: RISK_CANCELLED`. A protective stop whose child\nfails risk checks is cancelled with `RISK_REJECTED`; see `CancelReason`.\n\nProtective stops:\n- `TRIGGER_IOC_MUST_NOT_EXPIRE_ERROR`: an IOC trigger cannot carry `expiresAfter`.\n  Only GTT orders carry an expiry; GTC and IOC must omit it. Invalid\n  time-in-force/expiry combinations can also return `INPUT_VALIDATION_ERROR`.\n  Correct the combination and re-sign.\n- `TRIGGER_LIMIT_OUTSIDE_BAND_ERROR`: the stop's `limitPx` is outside the permitted\n  range around `triggerPx`, or stops are unavailable for the market. Move the limit\n  closer to the trigger and re-sign when the price is out of range. If the message\n  indicates stops are unavailable, changing the price will not resolve it.\n- `TRIGGER_ALREADY_EXISTS_ERROR`: the account already has an armed stop of the same\n  type on that market. At most one stop-loss and one take-profit may be armed per\n  account and market. Modify or cancel the existing stop before replacing it.\n\nRate limits and resting-order caps:\n- `RATE_LIMITED_ERROR`: the account's request budget for this operation is\n  exhausted. Create and modify share a placement budget; single cancels, bulk\n  cancels, and cancel-all-after control have separate budgets. Budgets are shared\n  across markets, signers, REST, and WebSocket requests for the same account. Wait\n  at least `retryAfterMs` milliseconds before retrying. This is a minimum wait, not\n  a reserved request slot; concurrent traffic can use the available budget.\n  Disarming an armed cancel-all-after countdown is never throttled. A disarm when no\n  countdown is armed can be throttled.\n- `OPEN_ORDER_COUNT_EXCEEDED_ERROR`: a new resting order would exceed the account's\n  total or per-market resting-order count. Cancel orders or allow them to fill\n  before placing more. Modifications do not increase the count.\n- `OPEN_ORDER_NOTIONAL_EXCEEDED_ERROR`: the account's combined resting-order\n  notional would exceed its limit. Notional is remaining quantity multiplied by\n  limit price for resting GTC/GTT orders. Creates are checked against the submitted\n  quantity before any immediate fills; modifications are checked against the\n  resulting notional. IOC orders and armed triggers are exempt; fired trigger\n  children that rest count toward the limits. Cancel or shrink resting orders, or\n  submit a smaller order.\n\nResting-order cap errors carry no `retryAfterMs`: waiting alone does not resolve\nthem. `CAPACITY_LIMITED_ERROR` means the venue temporarily cannot accept a create or\nmodify. It carries no retry hint; use backoff with jitter. Cancels and\ncancel-all-after operations are not refused for venue capacity, though their\nseparate account rate limits still apply.\n\nTemporary availability:\n- `CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`: an order that would execute\n  immediately cannot currently pass the required pre-trade checks. Retry after a\n  short delay. Existing resting orders remain in place; non-crossing orders and\n  cancellations remain available.\n- `UNAVAILABLE_MATCHING_ENGINE_ERROR`, `UNAVAILABLE_ACCOUNT_OWNER_ERROR`: the\n  request could not be evaluated and was not accepted. Retry it unchanged after a\n  short delay. These differ from `CAPACITY_LIMITED_ERROR`, which calls for backoff\n  with jitter.\n\nPermission errors such as `NOT_WHITELISTED_ERROR` and `ACCOUNT_SUSPENDED_ERROR` are\nnot resolved by automatic retries. Contact support if an expected operation is\nrefused.\n\nRetry policy: retry unchanged after a short delay for\n`CROSSING_ORDERS_TEMPORARILY_UNAVAILABLE_ERROR`,\n`UNAVAILABLE_MATCHING_ENGINE_ERROR`, and `UNAVAILABLE_ACCOUNT_OWNER_ERROR`; retry\n`RATE_LIMITED_ERROR` after at least `retryAfterMs`; retry `CAPACITY_LIMITED_ERROR`\nusing backoff with jitter. Correct validation failures and re-sign where required.\nReconcile order state before retrying an unanswered request, because a transport\ntimeout or disconnect does not establish that the request was rejected.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```
