> 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/market-data.md).

# Market Data

Prices, market-level trades, depth, candles, etc.

## Get spot market summaries

> Statistics and throttled market data for all spot markets. Recalculated every 0.5s

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/spotMarkets/summary":{"get":{"summary":"Get spot market summaries","description":"Statistics and throttled market data for all spot markets. Recalculated every 0.5s","operationId":"getSpotMarketsSummary","tags":["Market Data"],"responses":{"200":{"description":"List of spot market summaries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpotMarketSummary"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"schemas":{"SpotMarketSummary":{"title":"SpotMarketSummary","type":"object","required":["symbol","updatedAt","volume24h"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Time when the spot market summary was last calculated (milliseconds)"},"volume24h":{"$ref":"#/components/schemas/UnsignedDecimal","description":"24-hour trading volume in USD"},"pxChange24h":{"$ref":"#/components/schemas/SignedDecimal","description":"Absolute 24-hour price change"},"oraclePrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Current oracle price: the Stork price for the market's base token, quoted in USDC (also called rUSD in reya network)"},"throttledMidPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Last spot orderbook mid price, at the moment of the last market summary update. Omitted when the book is empty or one-sided."}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"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 spot market summary

> Statistics and throttled market data for a specific spot market. Recalculated every 0.5s

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/spotMarket/{symbol}/summary":{"get":{"summary":"Get spot market summary","description":"Statistics and throttled market data for a specific spot market. Recalculated every 0.5s","operationId":"getSpotMarketSummary","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"}],"responses":{"200":{"description":"Spot market summary data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpotMarketSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}}},"schemas":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"SpotMarketSummary":{"title":"SpotMarketSummary","type":"object","required":["symbol","updatedAt","volume24h"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Time when the spot market summary was last calculated (milliseconds)"},"volume24h":{"$ref":"#/components/schemas/UnsignedDecimal","description":"24-hour trading volume in USD"},"pxChange24h":{"$ref":"#/components/schemas/SignedDecimal","description":"Absolute 24-hour price change"},"oraclePrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Current oracle price: the Stork price for the market's base token, quoted in USDC (also called rUSD in reya network)"},"throttledMidPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Last spot orderbook mid price, at the moment of the last market summary update. Omitted when the book is empty or one-sided."}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"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 perp market summaries

> Perp market summary route mirroring the \`/spotMarkets/summary\` naming. Statistics and throttled market data for all perp markets. Recalculated every 0.5s

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/perpMarkets/summary":{"get":{"summary":"Get perp market summaries","description":"Perp market summary route mirroring the `/spotMarkets/summary` naming. Statistics and throttled market data for all perp markets. Recalculated every 0.5s","operationId":"getPerpMarketsSummary","tags":["Market Data"],"responses":{"200":{"description":"List of perp market summaries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketSummary"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"schemas":{"MarketSummary":{"title":"MarketSummary","type":"object","required":["symbol","updatedAt","oiQty","fundingRate","longFundingValue","shortFundingValue","volume24h"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Time when the market summary was last calculated (milliseconds)"},"oiQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Total open interest quantity"},"fundingRate":{"$ref":"#/components/schemas/SignedDecimal","description":"Current hourly funding rate"},"longFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)"},"shortFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)"},"volume24h":{"$ref":"#/components/schemas/UnsignedDecimal"},"pxChange24h":{"$ref":"#/components/schemas/SignedDecimal"},"markPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Mark price at the last market summary update: the median of available impact-price, index-plus-premium, and CEX-mark values. Used for PnL, margin, and liquidation calculations."},"oraclePrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Stork index price for the market's underlying, sourced from CEX feeds. Absent when no fresh index tick is available."},"throttledMidPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Last mid price, at the moment of the last market summary update. Absent on an empty or one-sided book."},"pricesUpdatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last price update (milliseconds)"}},"additionalProperties":true},"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"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 perp market summary

> Perp market summary route mirroring the \`/spotMarket/{symbol}/summary\` naming. Statistics and throttled data for a specific perp market. Recalculated every 0.5s

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/perpMarket/{symbol}/summary":{"get":{"summary":"Get perp market summary","description":"Perp market summary route mirroring the `/spotMarket/{symbol}/summary` naming. Statistics and throttled data for a specific perp market. Recalculated every 0.5s","operationId":"getPerpMarketSummary","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"}],"responses":{"200":{"description":"Market summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}}},"schemas":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"MarketSummary":{"title":"MarketSummary","type":"object","required":["symbol","updatedAt","oiQty","fundingRate","longFundingValue","shortFundingValue","volume24h"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Time when the market summary was last calculated (milliseconds)"},"oiQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Total open interest quantity"},"fundingRate":{"$ref":"#/components/schemas/SignedDecimal","description":"Current hourly funding rate"},"longFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)"},"shortFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)"},"volume24h":{"$ref":"#/components/schemas/UnsignedDecimal"},"pxChange24h":{"$ref":"#/components/schemas/SignedDecimal"},"markPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Mark price at the last market summary update: the median of available impact-price, index-plus-premium, and CEX-mark values. Used for PnL, margin, and liquidation calculations."},"oraclePrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Stork index price for the market's underlying, sourced from CEX feeds. Absent when no fresh index tick is available."},"throttledMidPrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Last mid price, at the moment of the last market summary update. Absent on an empty or one-sided book."},"pricesUpdatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of the last price update (milliseconds)"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"UnsignedDecimal":{"title":"UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"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 asset oracle prices

> Asset Stork oracle prices. This feed deliberately omits the AMM-era \`poolPrice\` field.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/assetOraclePrices":{"get":{"summary":"Get asset oracle prices","description":"Asset Stork oracle prices. This feed deliberately omits the AMM-era `poolPrice` field.","operationId":"getAssetOraclePrices","tags":["Market Data"],"responses":{"200":{"description":"List of asset oracle prices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetOraclePrice"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"schemas":{"AssetOraclePrice":{"title":"AssetOraclePrice","type":"object","required":["asset","updatedAt","oraclePrice"],"properties":{"asset":{"$ref":"#/components/schemas/Asset"},"oraclePrice":{"$ref":"#/components/schemas/SignedDecimal","description":"Asset oracle price supplied by Stork."},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Last update timestamp (milliseconds)"}},"additionalProperties":true},"Asset":{"title":"Asset","type":"string","pattern":"^[A-Za-z0-9]+$"},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"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"}}}}}}}
```

## Get perp executions for market

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

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/market/{symbol}/perpExecutions":{"get":{"summary":"Get perp executions for market","description":"Returns up to 100 perp executions for a given market.","operationId":"getMarketPerpExecutions","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"},{"$ref":"#/components/parameters/ExecutionTypeParam"}],"responses":{"200":{"description":"List of perp executions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpExecutionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}},"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":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"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},"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 market depth snapshot

> Returns an L2 order book snapshot with aggregated price levels for the specified market.\
> Supports both spot and perp markets.\
> \
> By default the top 100 aggregated price levels per side are returned. Pass the optional\
> \`limit\` query parameter to request between 1 and 1,000 levels per side — the \`limit\` best\
> (highest) bids and the \`limit\` best (lowest) asks. Values above 1,000 are clamped to 1,000;\
> other out-of-contract values fall back to the default of 100.<br>

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/market/{symbol}/depth":{"get":{"summary":"Get market depth snapshot","description":"Returns an L2 order book snapshot with aggregated price levels for the specified market.\nSupports both spot and perp markets.\n\nBy default the top 100 aggregated price levels per side are returned. Pass the optional\n`limit` query parameter to request between 1 and 1,000 levels per side — the `limit` best\n(highest) bids and the `limit` best (lowest) asks. Values above 1,000 are clamped to 1,000;\nother out-of-contract values fall back to the default of 100.\n","operationId":"getMarketDepth","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"},{"$ref":"#/components/parameters/DepthLimitParam"}],"responses":{"200":{"description":"Depth snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthSnapshot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}},"DepthLimitParam":{"name":"limit","in":"query","required":false,"description":"Optional cap on the number of aggregated price levels returned per side. The default is 100 and the maximum is 1,000. When set to N within the declared range, the response contains the top N levels on each side — the N best (highest) bids and the N best (lowest) asks. Values above the maximum are clamped to 1,000; other out-of-contract values are not rejected and instead fall back to the default of 100.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}}},"schemas":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"DepthSnapshot":{"title":"DepthSnapshot","description":"A bounded depth snapshot. Each side contains at most the 1,000 best price levels.","additionalProperties":true,"allOf":[{"$ref":"#/components/schemas/DepthBase"},{"type":"object","required":["type","bids","asks"],"properties":{"type":{"$ref":"#/components/schemas/DepthSnapshotType"},"bids":{"type":"array","description":"At most the 1,000 highest bid levels, aggregated by price and sorted descending","maxItems":1000,"items":{"$ref":"#/components/schemas/Level"}},"asks":{"type":"array","description":"At most the 1,000 lowest ask levels, aggregated by price and sorted ascending","maxItems":1000,"items":{"$ref":"#/components/schemas/Level"}}}}]},"DepthBase":{"title":"DepthBase","type":"object","required":["symbol","updatedAt"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"updatedAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp in milliseconds associated with the latest depth state. Comparable across markets. It is not a feed-liveness signal: a quiet market may retain an old timestamp."}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"DepthSnapshotType":{"title":"DepthSnapshotType","type":"string","enum":["SNAPSHOT"],"description":"Literal discriminator for a bounded depth snapshot."},"Level":{"title":"Level","type":"object","required":["px","qty"],"properties":{"px":{"$ref":"#/components/schemas/SignedDecimal","description":"Price level"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Aggregated quantity at this price level"}},"additionalProperties":true},"SignedDecimal":{"title":"SignedDecimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"UnsignedDecimal":{"title":"UnsignedDecimal","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 spot executions for market

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

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/market/{symbol}/spotExecutions":{"get":{"summary":"Get spot executions for market","description":"Returns up to 100 spot executions for a given market.","operationId":"getMarketSpotExecutions","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"},{"$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":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}},"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":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"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},"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 execution busts for market

> Returns up to 100 execution busts (failed fills) for a given market, covering both spot and perp markets.\
> Clients can distinguish spot vs perp entries from the \`symbol\` suffix (\`\*RUSDPERP\` for perp, \`\*RUSD\` for spot).<br>

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/market/{symbol}/executionBusts":{"get":{"summary":"Get execution busts for market","description":"Returns up to 100 execution busts (failed fills) for a given market, covering both spot and perp markets.\nClients can distinguish spot vs perp entries from the `symbol` suffix (`*RUSDPERP` for perp, `*RUSD` for spot).\n","operationId":"getMarketExecutionBusts","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"},{"$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":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}},"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":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"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},"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 historical candles

> Returns up to 200 candles for a given market, sorted by time in descending order, and ending at the specified end time.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Market Data","description":"Prices, market-level trades, depth, candles, etc."}],"servers":[{"url":"/v2"}],"paths":{"/candleHistory/{symbol}/{resolution}":{"get":{"summary":"Get historical candles","description":"Returns up to 200 candles for a given market, sorted by time in descending order, and ending at the specified end time.","operationId":"getCandles","tags":["Market Data"],"parameters":[{"$ref":"#/components/parameters/SymbolParam"},{"$ref":"#/components/parameters/ResolutionParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"Historical candle data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandleHistoryData"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"SymbolParam":{"name":"symbol","in":"path","required":true,"description":"Trading symbol (e.g., BTCRUSDPERP)","schema":{"$ref":"#/components/schemas/Symbol"}},"ResolutionParam":{"name":"resolution","in":"path","required":true,"description":"Candle resolution","schema":{"type":"string","enum":["1m","5m","15m","30m","1h","4h","1d"]}},"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":{"Symbol":{"title":"Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedInteger":{"title":"UnsignedInteger","type":"integer","minimum":0},"CandleHistoryData":{"title":"CandleHistoryData","type":"object","required":["t","o","h","l","c"],"properties":{"t":{"type":"array","items":{"$ref":"#/components/schemas/UnsignedInteger"},"description":"Array of timestamps (seconds)"},"o":{"type":"array","items":{"$ref":"#/components/schemas/SignedDecimal"},"description":"Array of opening prices"},"h":{"type":"array","items":{"$ref":"#/components/schemas/SignedDecimal"},"description":"Array of high prices"},"l":{"type":"array","items":{"$ref":"#/components/schemas/SignedDecimal"},"description":"Array of low prices"},"c":{"type":"array","items":{"$ref":"#/components/schemas/SignedDecimal"},"description":"Array of closing prices"}},"additionalProperties":true},"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"}}}}}}}
```
