{"components":{"responses":{"InternalServerError":{"content":{"application/json":{"example":{"errors":[{"detail":"an unexpected error occurred while processing the request","title":"Internal Server Error"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unexpected error while processing the request."},"TooManyRequests":{"content":{"application/json":{"example":{"errors":[{"detail":"Rate limit exceeded. Retry after 7 seconds.","meta":{"limit":600,"remaining":0,"reset_at":"2026-05-27T12:00:07Z","retry_after_s":7,"scope":"tenant"},"title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/TooManyRequests"}}},"description":"Rate limit exceeded.","headers":{"RateLimit":{"description":"IETF draft-11: \"<policy>\";r=<remaining>;t=<seconds-until-reset>","schema":{"type":"string"},"style":"simple"},"RateLimit-Policy":{"description":"IETF draft-11: \"<policy>\";q=<limit>;w=<window-seconds>","schema":{"type":"string"},"style":"simple"},"Retry-After":{"description":"Seconds until the current window resets.","schema":{"example":7,"type":"integer"},"style":"simple"},"X-RateLimit-Limit":{"description":"Total tokens in the active bucket.","schema":{"example":600,"type":"integer"},"style":"simple"},"X-RateLimit-Remaining":{"description":"Tokens remaining in the current window.","schema":{"example":0,"type":"integer"},"style":"simple"},"X-RateLimit-Reset":{"description":"Unix epoch seconds at which the window resets.","schema":{"example":1748347207,"type":"integer"},"style":"simple"}}},"ValidationError":{"content":{"application/json":{"example":{"errors":[{"detail":"Invalid format. Expected ~r/^-?\\d+(\\.\\d+)?$/","source":{"pointer":"/quantity/value"},"title":"Invalid value"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request did not match the schema."}},"schemas":{"Timestamp":{"description":"ISO-8601 datetime in UTC with millisecond precision and `Z` suffix.\n","example":"2026-05-01T12:34:56.789Z","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","title":"Timestamp","type":"string"},"QuoteQuoted":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"status":{"enum":["quoted"],"type":"string"}},"type":"object"}],"title":"QuoteQuoted"},"SettlementAmount":{"description":"Positive decimal string. It must match the asset's precision exactly and\ncontain at most 64 characters. Invalid values return `422`.\n","example":"1000.00","maxLength":64,"pattern":"^\\d+(\\.\\d+)?$","title":"SettlementAmount","type":"string"},"SettlementRequest":{"additionalProperties":false,"description":"Announce a deposit or request a withdrawal. The settlement starts as\n`pending`. Extra properties return `422`.\n","properties":{"amount":{"$ref":"#/components/schemas/SettlementAmount"},"asset":{"description":"Asset to settle. Unsupported assets return `422`.\n","example":"USD","type":"string"},"direction":{"description":"`deposit` adds money to cash. `withdrawal` pays money out of cash.\n","enum":["deposit","withdrawal"],"example":"deposit","type":"string"}},"required":["direction","asset","amount"],"title":"SettlementRequest","type":"object"},"QuoteRequest":{"properties":{"amount":{"$ref":"#/components/schemas/Amount"},"client_quote_id":{"description":"Optional unique quote ID. If omitted, we create one. Duplicate IDs\nreturn `409`; they do not return the existing quote.\n","type":"string"},"settlement_hours":{"description":"Optional expected settlement duration in hours.","example":0,"minimum":0,"type":"integer"},"side":{"allOf":[{"$ref":"#/components/schemas/QuoteSide"}],"description":"Send `buy` or `sell` for a one-way quote. Omit it for a two-way quote\nwith both `bid_price` and `offer_price`.\n"},"symbol":{"$ref":"#/components/schemas/Symbol"},"ttl_seconds":{"description":"Optional requested time-to-live for the quote in seconds.","example":30,"minimum":1,"type":"integer"}},"required":["symbol","amount"],"title":"QuoteRequest","type":"object"},"CashAccount":{"description":"One cash account for an asset. Cash accounts cover all desks and venues.\n","properties":{"asset":{"description":"The asset this cash account holds.","example":"USD","type":"string"},"balance":{"description":"Posted value after pending outflows. Pending inflows are not included.\nPending withdrawals appear in `GET /settlements`. A pending transfer\nto trading is not listed separately until it completes.\n","example":"1000","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"debits_pending":{"description":"Pending inflows. This value is not included in `balance`.\n","example":"0","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"human_readable_balance":{"description":"Display-ready balance with currency, such as `US$187.62` or `0.5 BTC`.\n","example":"US$187.62","type":"string"},"withdrawable":{"description":"Amount currently available to withdraw. It cannot exceed `balance`\nand includes only cleared funds. It is `0` before the first clearing.\n","example":"1000","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["asset","balance","debits_pending","withdrawable","human_readable_balance"],"title":"CashAccount","type":"object"},"QuoteCancelled":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"status":{"enum":["cancelled"],"type":"string"}},"type":"object"}],"title":"QuoteCancelled"},"Symbol":{"description":"Instrument ID. Use `CCY1-CCY2` for spot and append `.CFD` for contracts.","example":"BTC-USD","pattern":"^[A-Z]+-[A-Z]+(\\.CFD)?$","title":"Symbol","type":"string"},"FundingEventsPage":{"description":"Funding events, newest funding date first, then by symbol. Pass\n`next_cursor` as `cursor` until it is `null`.\n","properties":{"funding_events":{"description":"The events in this page, newest funding date first, then by symbol.","items":{"$ref":"#/components/schemas/FundingEvent"},"type":"array"},"next_cursor":{"description":"Opaque keyset cursor to resume from. Pass it back as the `cursor` query\nparameter to fetch the next page. `null` marks the end of the data.\n","example":"MjAyNi0wOC0yNwkwMThmOWUyYS0zYjRjLTdkOGUtOWYxMC01ZTZmNzA4MTkyMDMJQlRDLVVTRC5DRkQ","nullable":true,"type":"string"}},"required":["funding_events","next_cursor"],"title":"FundingEventsPage","type":"object"},"QuoteStatus":{"description":"Quote state. `rejected` means the quote request failed. `failed` means\nexecution failed; request a new quote before retrying. `cancelled` is final.\n\nTransitions:\n\n```\nrequested  → quoted | rejected\nquoted     → processing | expired\nprocessing → executed | failed | cancelled\n```\n","enum":["requested","quoted","rejected","processing","executed","failed","expired","cancelled"],"title":"QuoteStatus","type":"string"},"QuoteExecuted":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"executed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the trade was completed at the quoted price."},"settlement_date":{"allOf":[{"$ref":"#/components/schemas/SettlementDate"}],"description":"UTC date of the first clearing cut-off after execution. Use it to\nmatch clearing reports. It is not related to `settlement_hours`.\nOlder quotes may omit it.\n"},"status":{"enum":["executed"],"type":"string"}},"required":["executed_at"],"type":"object"}],"title":"QuoteExecuted"},"LedgerTransaction":{"description":"One posted movement on one of your accounts. Transfers return two records\nwith opposite signs and the same `transaction_id`. Settlements return one\ncash record.\n","properties":{"account_id":{"description":"The touched account.","example":"018f9e2a-3b4c-7d8e-9f10-2b3c4d5e6f70","type":"string"},"account_type":{"description":"The touched account's type. Only `cash` and `trading` are ever returned.","enum":["cash","trading"],"example":"cash","type":"string"},"amount":{"description":"**Signed** decimal string from this account's perspective: positive increases the balance.","example":"1000.00","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"asset":{"description":"The touched account's asset.","example":"USD","type":"string"},"created_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Post timestamp — when the movement took effect. ISO-8601 UTC."},"desk_id":{"description":"Desk that owns the account. `null` for cash and older trading records.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","nullable":true,"type":"string"},"entry_id":{"description":"Groups the legs of one atomic ledger operation.","example":"018f9e2a-3b4c-7d8e-9f10-0a1b2c3d4e5f","type":"string"},"reason":{"description":"The entry's business reason — see the reason registry in the endpoint description.","example":"settlement/deposit","type":"string"},"ref_id":{"description":"ID of the related object. Use trade data to match executions.","example":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","nullable":true,"type":"string"},"ref_type":{"description":"The kind of business object the entry points at (settlement id, quote id, trade id, reference id, transaction-request id).","example":"settlement","nullable":true,"type":"string"},"reference":{"description":"Text for `ledger/reference` records. `null` for other `ref_type` values.\n","example":"Agreement ACME-2026-04","nullable":true,"type":"string"},"transaction_id":{"description":"Identity of the physical transaction. The two sides of a transfer share it.","example":"018f9e2a-3b4c-7d8e-9f10-1a2b3c4d5e6f","type":"string"},"venue_id":{"description":"The trading account's venue (accounts are venue-bound for life); `null` for `cash` rows.","example":"gcp-europe-west1","nullable":true,"type":"string"}},"required":["transaction_id","entry_id","account_id","account_type","asset","amount","reason","created_at"],"title":"LedgerTransaction","type":"object"},"Error":{"description":"JSON:API-shaped error envelope. Returned for all 4xx responses.\nMay contain one or more error objects.\n","properties":{"errors":{"items":{"properties":{"code":{"description":"Optional stable code. `desk_token_required` means `desk_id` is\nmissing. `desk_token_not_allowed` means it must be omitted.\n","example":"desk_token_not_allowed","type":"string"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string"},"source":{"description":"Where in the request the error originated. Optional.","properties":{"pointer":{"description":"JSON Pointer (RFC 6901) to the offending field.","type":"string"}},"type":"object"},"title":{"description":"Short, human-readable summary of the problem.","type":"string"}},"required":["title","detail"],"type":"object"},"minItems":1,"type":"array"}},"required":["errors"],"title":"Error","type":"object"},"PredictedFunding":{"description":"One open position's estimated funding charge for the day in progress,\nassuming the position is still held at the coming cutoff.\n\nWhen `status` is `unavailable` every field from `mark_price` down is\n`null`: an input the estimate needs could not be read, and a partial\nestimate would be a worse answer than none.\n","properties":{"amount":{"description":"The money this charge would move, at `quote_asset`'s precision — what\nthe coming cutoff would book if the position is still held. **Positive\nis a charge against you**; negative is a funding credit.\n","example":"18.91","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"desk_id":{"description":"The desk holding the position, and the one that will be charged.","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","type":"string"},"mark_captured_at":{"description":"When the oldest market observation that mark rests on was captured.","example":"2026-08-28T09:14:02.310Z","format":"date-time","nullable":true,"type":"string"},"mark_price":{"description":"The contract's current mark, which values the position. It is the same\nfor longs and shorts.\n","example":"42000.123456789","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"notional":{"description":"Marked notional the rate is applied to, in `quote_asset`.","example":"63000.185185184","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"quantity":{"description":"Signed number of contracts held right now.","example":"-1.5","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"quote_asset":{"description":"Currency of `notional` and `amount`.","example":"USD","nullable":true,"type":"string"},"rate":{"description":"The rate as of now, as an exact percentage for one day: `0.03` means\n0.03%. A negative rate is a funding credit.\n","example":"0.03","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"side":{"description":"Side of the position, which selects the long or short rate.","enum":["long","short"],"example":"long","type":"string"},"status":{"description":"`estimated` when the charge could be computed, `unavailable` when an\ninput could not be read — see `unavailable_reason`.\n","enum":["estimated","unavailable"],"example":"estimated","type":"string"},"symbol":{"allOf":[{"$ref":"#/components/schemas/Symbol"}],"description":"The contract held."},"unavailable_reason":{"description":"Why no estimate could be made, or `null` when one was.\n`mark_unavailable`: the contract has no usable mark at this instant.\n`not_fundable`: the contract carries no funding configuration\nhere. `rate_unavailable`: no funding rate applies to that contract for\nyou. Treat unknown values as opaque.\n","enum":["mark_unavailable","not_fundable","rate_unavailable"],"example":"mark_unavailable","nullable":true,"type":"string"},"venue_id":{"description":"The venue the position is held on.","example":"gcp-europe-west1","type":"string"}},"required":["desk_id","venue_id","symbol","side","quantity","status","unavailable_reason","mark_price","mark_captured_at","notional","rate","amount","quote_asset"],"title":"PredictedFunding","type":"object"},"QuoteSide":{"enum":["buy","sell"],"title":"QuoteSide","type":"string"},"QuoteRejected":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"properties":{"reason":{"type":"string"},"status":{"enum":["rejected"],"type":"string"}},"required":["reason"],"type":"object"}],"description":"The quote request was rejected. Review the reason before retrying.\n","title":"QuoteRejected"},"QuotedFields":{"properties":{"bid_commission":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Sell-side commission in `commission_currency`. Present only on two-way\nquotes. `\"0\"` means none.\n"},"bid_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Total price at which you may sell. Present only on two-way quotes.\n"},"commission":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Execution commission in `commission_currency`. `\"0\"` means none.\nUnresolved two-way quotes use the per-side commission fields.\n"},"commission_currency":{"description":"Asset the commission is denominated in — the symbol's quote currency.","example":"USD","type":"string"},"expires_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the quoted price stops being valid."},"offer_commission":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Buy-side commission in `commission_currency`. Present only on two-way\nquotes. `\"0\"` means none.\n"},"offer_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Total price at which you may buy. Present only on two-way quotes.\n"},"price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"description":"Total price for one-way quotes and executed two-way quotes. Unresolved\ntwo-way quotes use `bid_price` and `offer_price`.\n"},"quoted_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the price was determined for the request."},"settlement_hours":{"minimum":0,"type":"integer"},"ttl_seconds":{"description":"Quote lifetime in whole seconds.","minimum":1,"type":"integer"}},"required":["commission_currency","quoted_at","expires_at","ttl_seconds","settlement_hours"],"title":"QuotedFields","type":"object"},"TooManyRequests":{"description":"Rate limit exceeded. The response headers carry the authoritative\nrate-limit state; the body is for humans.\n","properties":{"errors":{"items":{"properties":{"detail":{"example":"Rate limit exceeded. Retry after 7 seconds.","type":"string"},"meta":{"properties":{"limit":{"description":"Total tokens in the active bucket.","example":600,"type":"integer"},"remaining":{"description":"Tokens remaining in the current window.","example":0,"type":"integer"},"reset_at":{"description":"UTC timestamp at which the window resets.","example":"2026-05-27T12:00:07Z","format":"date-time","type":"string"},"retry_after_s":{"description":"Seconds until the window resets.","example":7,"type":"integer"},"scope":{"description":"Which bucket was exhausted.","enum":["tenant"],"type":"string"}},"required":["limit","remaining","reset_at","retry_after_s","scope"],"type":"object"},"title":{"example":"Too Many Requests","type":"string"}},"required":["title","detail","meta"],"type":"object"},"minItems":1,"type":"array"}},"required":["errors"],"title":"TooManyRequests","type":"object"},"TradingPair":{"example":{"base_asset":"BTC","quote_asset":"USD","symbol":"BTC-USD"},"properties":{"base_asset":{"$ref":"#/components/schemas/Asset"},"quote_asset":{"$ref":"#/components/schemas/Asset"},"symbol":{"$ref":"#/components/schemas/Symbol"}},"required":["symbol","base_asset","quote_asset"],"title":"TradingPair","type":"object"},"TradeReport":{"description":"An order export job. Poll `GET /trade-reports/{report_id}` until it\n`succeeded` or `failed`.\n","properties":{"client_job_id":{"description":"The caller-supplied idempotency handle, if one was given.","nullable":true,"type":"string"},"completed_at":{"description":"When the export reached a terminal state, or null if not yet.","example":"2026-06-01T00:04:12.784Z","format":"date-time","nullable":true,"type":"string"},"desk_id":{"description":"Selected desk. `null` means all desks, except for exports created before\ndesks were available. Those stay limited to the original account.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","nullable":true,"type":"string"},"download_url":{"description":"Authenticated ZIP download URL. Available when `status` is `succeeded`.\n","example":"https://api.stelaxis.com/v1/trade-reports/4217/download","nullable":true,"type":"string"},"error":{"description":"Populated when `status` is `failed`.","nullable":true,"properties":{"message":{"description":"Client-safe failure message.","type":"string"}},"required":["message"],"type":"object"},"order_status":{"description":"The order-status filter applied to this export, or null for all statuses.","example":"traded","nullable":true,"type":"string"},"report_id":{"description":"ID used to check and download the export. Keep it as a string.\n","example":"4217","type":"string"},"row_count":{"description":"Number of rows in the export, at most 10,000,000. Populated when `succeeded`.","example":4310293,"nullable":true,"type":"integer"},"status":{"description":"Lifecycle state. `pending` → `running` → `succeeded` | `failed`.\nTerminal states are `succeeded` and `failed`.\n","enum":["pending","running","succeeded","failed"],"type":"string"},"submitted_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the export was submitted."},"symbol":{"description":"The symbol filter applied to this export, or null for all symbols. Echoes the request so a report is self-describing.","example":"BTC-USD","nullable":true,"type":"string"},"time_range":{"description":"The requested export window `[start, end)` in UTC.","properties":{"end":{"$ref":"#/components/schemas/Timestamp"},"start":{"$ref":"#/components/schemas/Timestamp"}},"required":["start","end"],"type":"object"}},"required":["report_id","status","time_range","submitted_at"],"title":"TradeReport","type":"object"},"QuoteBase":{"properties":{"amount":{"$ref":"#/components/schemas/Amount"},"base_asset":{"$ref":"#/components/schemas/Asset"},"quote_asset":{"$ref":"#/components/schemas/Asset"},"quote_id":{"type":"string"},"requested_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the client submitted the quote request."},"side":{"allOf":[{"$ref":"#/components/schemas/QuoteSide"}],"description":"Present for one-way quotes and executed two-way quotes. Unresolved\ntwo-way quotes use `bid_price` and `offer_price` instead.\n"},"status":{"$ref":"#/components/schemas/QuoteStatus"},"symbol":{"$ref":"#/components/schemas/Symbol"},"symbol_type":{"$ref":"#/components/schemas/SymbolType"}},"required":["quote_id","status","symbol","base_asset","quote_asset","symbol_type","amount","requested_at"],"title":"QuoteBase","type":"object"},"ExecuteQuoteRequest":{"description":"Execute request body. No fields are required from API clients.","properties":{"side":{"allOf":[{"$ref":"#/components/schemas/QuoteSide"}],"description":"Side to execute. Required for a two-way quote. For a one-way quote, it\nmay be omitted or must match the quoted side.\n"}},"title":"ExecuteQuoteRequest","type":"object"},"ClearingSnapshot":{"description":"One asset's balance at the latest clearing cut-off.\n","properties":{"as_of":{"description":"Clearing cut-off in ISO-8601 UTC. All rows share this value.\n","example":"2026-08-17T12:00:00.000Z","format":"date-time","type":"string"},"asset":{"description":"The asset this row reports.","example":"USD","type":"string"},"cleared_balance":{"description":"Signed cash plus trading balance across all desks at `as_of`. It stays\nunchanged until the next clearing.\n","example":"1000","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["asset","cleared_balance","as_of"],"title":"ClearingSnapshot","type":"object"},"Balance":{"properties":{"asset":{"type":"string"},"balance":{"description":"Posted value after pending outflows. Pending inflows are not included.\nFor an RFQ outflow, check the quote at\n`GET /venues/{venue_id}/rfq/quotes/{quote_id}`.\n","example":"0.5","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"debits_pending":{"description":"Pending inflows. This value is not included in `balance`.\n","example":"0","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"human_readable_balance":{"description":"Display-ready balance with currency, such as `US$187.62` or `0.5 BTC`.\n","example":"US$187.62","type":"string"}},"required":["balance","asset","debits_pending","human_readable_balance"],"title":"Balance","type":"object"},"FundingEvent":{"description":"One recorded daily funding charge for one contract position, with the\nvaluation it was derived from. Events are immutable: they are never\nupdated, corrected, or superseded.\n","properties":{"amount":{"description":"The money charged, at `quote_asset`'s precision. **Positive is a charge\nagainst you**; negative is a funding credit. The matching ledger record\ncarries the **opposite** sign, being signed from your cash account's\nperspective.\n","example":"18.91","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"as_of":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"The cutoff the position was valued at, which closes `funding_date`:\n17:00 America/New_York on that date.\n"},"desk_id":{"description":"The desk whose position was charged. Reported as recorded, so a desk\nretired since still names itself here.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","type":"string"},"funding_date":{"description":"The charged funding date: the day ending at 17:00 America/New_York on\nthat date. It is not a UTC calendar day. Its cutoff, shown in `as_of`,\nis 21:00 UTC under US daylight saving and 22:00 UTC otherwise.\n","example":"2026-08-27","format":"date","type":"string"},"funding_event_id":{"description":"Stable event ID. It is also the `ref_id` of the matching\n`funding/charge` record on `GET /v1/ledger/transactions`.\n","example":"018f9e2a-3b4c-7d8e-9f10-5e6f70819203","format":"uuid","type":"string"},"mark_captured_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the oldest market observation that mark rests on was captured."},"mark_price":{"description":"The contract's mark at the cutoff, which valued the position. It is the\nsame for longs and shorts.\n","example":"42000.123456789","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"notional":{"description":"Marked notional the rate was applied to, in `quote_asset`.","example":"63000.185185184","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"quantity":{"description":"Signed number of contracts held at the cutoff.","example":"-1.5","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"quote_asset":{"description":"Currency of `notional` and `amount`.","example":"USD","type":"string"},"rate":{"description":"The rate applied, as an exact percentage for this one day: `0.03`\nmeans 0.03%. There is no annual quotation and no day-count conversion.\n","example":"0.03","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"recorded_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the event was written. Later than `as_of` on a backfilled date.\n"},"side":{"description":"Side of the position, which selects the long or short rate.","enum":["long","short"],"example":"long","type":"string"},"status":{"description":"`charged` when the event moved money, `zero` when it moved none —\nrecorded, settled, and carrying no ledger record.\n","enum":["charged","zero"],"example":"charged","type":"string"},"symbol":{"allOf":[{"$ref":"#/components/schemas/Symbol"}],"description":"The charged contract."},"venue_id":{"description":"The venue the position is held on.","example":"gcp-europe-west1","type":"string"}},"required":["funding_event_id","funding_date","desk_id","venue_id","symbol","side","as_of","quantity","mark_price","mark_captured_at","notional","rate","quote_asset","status","amount","recorded_at"],"title":"FundingEvent","type":"object"},"SymbolType":{"description":"Instrument type: `spot` or `cfd`. A CFD symbol ends in `.CFD`.","enum":["spot","cfd"],"example":"spot","title":"SymbolType","type":"string"},"TradeReportRequest":{"description":"Order export for an inclusive UTC date range of up to 366 days, covering\nstreaming orders and RFQ executes alike. Use `desk_id`, `symbol`, and\n`order_status` to filter it.\n","properties":{"client_job_id":{"description":"Optional unique retry ID, up to 255 characters. A duplicate returns\n`409` with the existing export.\n","example":"eod-2026-05-31","maxLength":255,"type":"string"},"desk_id":{"description":"Optional. Restrict the export to one desk; omit it to export every\ndesk's orders. Must name a desk of yours, else `422`.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","type":"string"},"end_date":{"description":"Last day to include (inclusive), UTC.","example":"2026-05-31","format":"date","type":"string"},"order_status":{"description":"Optional. Restrict the export to orders in one status. An RFQ execute\nreports `pending` while it is in flight, `traded` once it books, and\n`rejected` when it fails or is cancelled.\n","enum":["pending","traded","rejected"],"example":"traded","type":"string"},"start_date":{"description":"First day to include (inclusive), UTC.","example":"2026-05-01","format":"date","type":"string"},"symbol":{"description":"Optional. Restrict the export to one instrument (canonical `BASE-QUOTE`,\ne.g. `BTC-USD`). Must be a symbol Stelaxis offers, else `422`.\n","example":"BTC-USD","pattern":"^[A-Z]+-[A-Z]+(\\.CFD)?$","type":"string"}},"required":["start_date","end_date"],"title":"TradeReportRequest","type":"object"},"TransfersPage":{"description":"Transfers ordered by request time, newest first. Pass `next_cursor` as\n`cursor` for the next page, keeping the same filters. Stop when it is `null`.\n\nPages reflect current data, not a shared snapshot. State changes can add\nor remove matches under a `state` filter. Omit that filter when collecting\nhistory, and read pending transfers by ID to track their outcomes.\n","properties":{"next_cursor":{"description":"Pass this as `cursor` to fetch the next page. `null` means no more pages.\n","example":"MjAyNi0wNS0wMVQxMjozNDo1Ni43ODlaCTAxOGY5ZTJh","nullable":true,"type":"string"},"transfers":{"description":"The transfers in this page, newest first by request time.","items":{"$ref":"#/components/schemas/Transfer"},"type":"array"}},"required":["transfers","next_cursor"],"title":"TransfersPage","type":"object"},"Position":{"description":"One open contract position. Fields that require an unavailable price or\nleverage are `null`. The response lists the missing inputs.\n","properties":{"avg_entry_price":{"allOf":[{"$ref":"#/components/schemas/Decimal"}],"description":"Average entry price, in the quote asset."},"contract_size":{"allOf":[{"$ref":"#/components/schemas/Decimal"}],"description":"Units of the underlying per contract."},"initial_margin":{"description":"`notional_usd / leverage`. `null` when either input is unavailable.\n","example":"9750","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"leverage":{"description":"The leverage applied to this symbol. `null` in the one case the\nsetting is missing (listed in `missing_leverage`).\n","example":"10","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"mark_price":{"description":"Close price: bid for longs and ask for shorts. `null` when unavailable.\n","example":"65000","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"notional":{"description":"`quantity × contract_size × mark_price`, in the quote asset. `null` when unmarked.","example":"97500","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"notional_usd":{"description":"The notional converted to USD. `null` when the position is unmarked\nor its quote asset is unpriceable.\n","example":"97500","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"quantity":{"allOf":[{"$ref":"#/components/schemas/Decimal"}],"description":"Absolute position size, in contracts."},"quote_asset":{"description":"The asset the position's prices are quoted in.","example":"USD","type":"string"},"side":{"description":"Position direction.","enum":["long","short"],"type":"string"},"symbol":{"description":"The contract symbol.","example":"BTC-USD.CFD","type":"string"},"unrealized_pnl":{"description":"Unrealized PnL in the quote asset. Signed. `null` when unmarked.","example":"7500","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"unrealized_pnl_usd":{"description":"The unrealized PnL converted to USD. Signed. `null` when the\nposition is unmarked or its quote asset is unpriceable.\n","example":"7500","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"updated_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the position aggregate last changed."}},"required":["symbol","side","quantity","contract_size","avg_entry_price","mark_price","quote_asset","notional","notional_usd","unrealized_pnl","unrealized_pnl_usd","leverage","initial_margin","updated_at"],"title":"Position","type":"object"},"LedgerTransactionsPage":{"description":"Ledger records, newest first. A page can be short or empty while\n`next_cursor` is present. Pass it as `cursor` until it is `null`.\n","properties":{"next_cursor":{"description":"Opaque keyset cursor to resume from. Pass it back as the `cursor` query\nparameter to fetch the next page. `null` marks the end of the data.\n","example":"MjAyNi0wNS0wMVQxMjozNDo1Ni43ODlaCTAxOGY5ZTJh","nullable":true,"type":"string"},"transactions":{"description":"The records in this page, newest first.","items":{"$ref":"#/components/schemas/LedgerTransaction"},"type":"array"}},"required":["transactions","next_cursor"],"title":"LedgerTransactionsPage","type":"object"},"Positions":{"description":"Your open positions on one venue. If a value cannot be calculated,\naffected fields are `null` and the missing-input lists explain why.\n","properties":{"marks_as_of":{"description":"Time of the oldest price used. `null` when no market price was needed.\n","example":"2026-07-16T11:59:59.812Z","format":"date-time","nullable":true,"type":"string"},"missing_leverage":{"description":"Open contract symbols with no effective leverage setting. Empty\nwhen `valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"missing_pricing":{"description":"Assets that cannot be converted to the accounting currency. Empty\nwhen `valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"positions":{"description":"One entry per open position. Empty when there are none.","items":{"$ref":"#/components/schemas/Position"},"type":"array"},"unmarked_symbols":{"description":"Held contract symbols without a usable (fresh) mark. Empty when\n`valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"valuation":{"description":"`ok` when all required inputs are available. `indeterminate` when\ninputs listed in the missing-input fields are unavailable.\n","enum":["ok","indeterminate"],"type":"string"},"valuation_time":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the snapshot was computed."},"venue_id":{"description":"The venue this snapshot is scoped to.","example":"ld4","type":"string"}},"required":["venue_id","valuation","valuation_time","marks_as_of","missing_pricing","unmarked_symbols","missing_leverage","positions"],"title":"Positions","type":"object"},"PredictedFundingPage":{"description":"Estimated funding charges for the day in progress, one per open position,\nordered by desk, venue, and symbol, and the `total` over them.\n\nThe rows and the total come from one snapshot of one walk and are not\npaginated: every position in `scope` is here, and the total is the sum of\nexactly these rows. If a row cannot be estimated, `status` is\n`indeterminate` and `total` is `null` — the rows remain available, and\n`unavailable_reason` on one of them names what withheld the total.\n","properties":{"accounting_currency":{"description":"The currency `total` is denominated in.","example":"USD","type":"string"},"as_of":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"The cutoff that will close `funding_date`. Every estimate here assumes\nthe position is still held then.\n"},"funding_date":{"description":"The funding date in progress — the day ending at 17:00\nAmerica/New_York. It is not a UTC calendar day, and it rolls without\nwaiting for the previous date's run.\n","example":"2026-08-28","format":"date","type":"string"},"indeterminate_reason":{"description":"Why no total is stated. `null` when `status` is `ok`.\n`unavailable_prediction` means at least one row is `unavailable`, and\na sum would have omitted it silently.\n","enum":["unavailable_prediction"],"nullable":true,"type":"string"},"predicted_funding":{"description":"Every estimate in scope. These rows remain available when the total is\nindeterminate.\n","items":{"$ref":"#/components/schemas/PredictedFunding"},"type":"array"},"scope":{"description":"The filters that were applied, echoed back. A total is only ever a\ntotal of this scope, so reading one against rows fetched for another\nquestion is not possible.\n","properties":{"desk_id":{"description":"The desk the answer is narrowed to, or `null` for every desk.","format":"uuid","nullable":true,"type":"string"},"venue_id":{"description":"The venue the answer is narrowed to, or `null` for every venue.","nullable":true,"type":"string"}},"required":["desk_id","venue_id"],"type":"object"},"status":{"description":"`ok` when every row could be estimated and the total stands.\n`indeterminate` when one could not: the total is withheld rather than\nstated short of a position.\n","enum":["ok","indeterminate"],"type":"string"},"total":{"description":"The whole charge for `funding_date` over the positions in `scope`, in\n`accounting_currency`: positive is a charge, negative a net funding\ncredit. It is the sum of the rows' `amount`, each the money that\nposition's event would move. `null` when `status` is `indeterminate`.\n","example":"18.91","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["funding_date","as_of","scope","status","indeterminate_reason","total","accounting_currency","predicted_funding"],"title":"PredictedFundingPage","type":"object"},"QuoteRequested":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"properties":{"status":{"enum":["requested"],"type":"string"}},"type":"object"}],"title":"QuoteRequested"},"Amount":{"description":"Quantity of base asset. Must be strictly positive.","example":"0.5","pattern":"^\\d+(\\.\\d+)?$","title":"Amount","type":"string"},"QuoteExpired":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"status":{"enum":["expired"],"type":"string"}},"type":"object"}],"title":"QuoteExpired"},"Account":{"description":"Your balances, collateral, PnL, equity, and margin on one venue. If a\nvalue cannot be calculated, `valuation` is `indeterminate`, affected\nfields are `null`, and the missing-input lists explain why.\n","properties":{"accounting_currency":{"description":"The accounting currency every summary aggregate is denominated in.","example":"USD","type":"string"},"balances":{"description":"Trading balances on this venue, one row per asset. Zero balances are\nincluded. These rows remain available when valuation is indeterminate.\n","example":[{"asset":"BTC","balance":"0.5","human_readable_balance":"0.5 BTC"},{"asset":"USD","balance":"187.62","human_readable_balance":"US$187.62"}],"items":{"$ref":"#/components/schemas/Balance"},"type":"array"},"collateral_value":{"description":"Value of `balances` after haircuts, in the accounting currency.\n`null` when an asset cannot be converted.\n","example":"100000","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"equity":{"description":"`collateral_value + unrealized_pnl`. Signed. `null` when either input is unavailable.","example":"98749.5","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"free_margin":{"description":"`equity - used_margin`. May be negative. `null` when either input is unavailable.","example":"79000.6","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"margin_ratio":{"description":"`used_margin / equity`. `0` means no exposure, `1` means free margin\nis zero, and values above `1` mean free margin is negative. `null`\nwhen equity is not positive or an input is missing.\n","example":"0.2","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"marks_as_of":{"description":"Time of the oldest price used. `null` when no market price was needed.\n","example":"2026-07-16T11:59:59.812Z","format":"date-time","nullable":true,"type":"string"},"missing_leverage":{"description":"Open contract symbols with no effective leverage setting. Empty\nwhen `valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"missing_pricing":{"description":"Assets that cannot be converted to the accounting currency. Empty\nwhen `valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"unmarked_symbols":{"description":"Held contract symbols without a usable (fresh) mark. Empty when\n`valuation` is `ok`.\n","example":[],"items":{"type":"string"},"type":"array"},"unrealized_pnl":{"description":"Signed unrealized PnL in the accounting currency. `null` when a\nrequired price is unavailable.\n","example":"-1250.5","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"used_margin":{"description":"Sum of `notional / leverage` in the accounting currency. `null` when\na required price or leverage is unavailable.\n","example":"19749.9","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"valuation":{"description":"`ok` when all required inputs are available. `indeterminate` when\ninputs listed in the missing-input fields are unavailable.\n","enum":["ok","indeterminate"],"type":"string"},"valuation_time":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the snapshot was computed."},"venue_id":{"description":"The venue this snapshot is scoped to.","example":"ld4","type":"string"}},"required":["venue_id","accounting_currency","valuation","balances","collateral_value","unrealized_pnl","equity","used_margin","free_margin","margin_ratio","missing_pricing","unmarked_symbols","missing_leverage","valuation_time","marks_as_of"],"title":"Account","type":"object"},"SettlementCancelRequest":{"description":"Optional cancel details. `reason` is added to `cancelled by client`.\n","properties":{"reason":{"description":"Free text appended to the server-generated void reason.","example":"wire never sent","maxLength":500,"type":"string"}},"title":"SettlementCancelRequest","type":"object"},"QuoteFailed":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"reason":{"type":"string"},"status":{"enum":["failed"],"type":"string"}},"required":["reason"],"type":"object"}],"description":"Execution failed. Request a new quote before retrying.\n","title":"QuoteFailed"},"Transfer":{"description":"A transfer between your cash and a desk's trading account. The funds have\nmoved only when `state` is `processed`.\n","properties":{"amount":{"description":"The requested amount as a positive decimal string.","example":"1000","pattern":"^\\d+(\\.\\d+)?$","type":"string"},"asset":{"description":"The asset requested for transfer.","example":"USD","type":"string"},"created_at":{"description":"When the transfer was requested.","example":"2026-05-01T12:34:56.789Z","format":"date-time","type":"string"},"desk_id":{"description":"The desk's ID, or `null` if the account has no current desk owner.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","nullable":true,"type":"string"},"id":{"description":"The transfer's identifier.","example":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","format":"uuid","type":"string"},"operation":{"description":"`to_trading` moves cash into trading; `to_cash` moves trading funds\nback to cash.\n","enum":["to_trading","to_cash"],"example":"to_trading","type":"string"},"resolved_at":{"description":"When the transfer reached `processed`, `declined` or `failed`; `null`\nwhile it is pending or processing.\n","example":"2026-05-01T12:34:56.912Z","format":"date-time","nullable":true,"type":"string"},"state":{"description":"`pending`: awaiting confirmation. `processing`: in progress.\n`processed`: funds moved. `declined`: refused. `failed`: could not\ncomplete. The last three states are final.\n","enum":["pending","processing","processed","declined","failed"],"example":"processed","type":"string"},"state_reason":{"description":"Why the transfer was declined or failed; `null` otherwise.\n","nullable":true,"type":"string"},"venue_id":{"description":"The trading account's venue.","example":"ld4","nullable":true,"type":"string"}},"required":["id","operation","asset","amount","state","created_at"],"title":"Transfer","type":"object"},"DesksPage":{"description":"Your desks in stable ID order. Pass `next_cursor` as `cursor` until it is\n`null`.\n","properties":{"desks":{"description":"The desks in this page, in id order.","items":{"$ref":"#/components/schemas/Desk"},"type":"array"},"next_cursor":{"description":"Opaque keyset cursor to resume from. Pass it back as the `cursor` query\nparameter to fetch the next page. `null` marks the end of the data.\n","example":"MDE4ZjllMmEtM2I0Yy03ZDhlLTlmMTAtNGQ1ZTZmNzA4MTky","nullable":true,"type":"string"}},"required":["desks","next_cursor"],"title":"DesksPage","type":"object"},"TransferRequest":{"additionalProperties":false,"description":"Transfer funds between your organisation's cash and one desk's trading\naccount. Specify the desk, asset, amount and direction.\n","properties":{"amount":{"$ref":"#/components/schemas/TransferAmount"},"asset":{"description":"The asset to transfer. Unsupported assets return `422`.\n","example":"USD","type":"string"},"desk_id":{"description":"One of your desks. Use `GET /v1/desks` to find its ID.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","type":"string"},"operation":{"description":"`to_trading` moves cash into trading and creates the trading account\nif needed. `to_cash` moves funds from an existing trading account to cash.\n","enum":["to_trading","to_cash"],"example":"to_trading","type":"string"},"venue_id":{"description":"The trading account's venue. If omitted, Stelaxis uses the default\nvenue when creating the transfer. Keep it omitted on retries.\n","example":"ld4","type":"string"}},"required":["operation","desk_id","asset","amount"],"title":"TransferRequest","type":"object"},"SettlementDate":{"description":"UTC date (`YYYY-MM-DD`) of the clearing cut-off that closes the window.\nActivity at the cut-off belongs to the next window.\n","example":"2026-05-01","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"SettlementDate","type":"string"},"SettlementsPage":{"description":"Your settlements, newest first. Pass `next_cursor` as `cursor` until it is\n`null`. To collect a complete history, omit the mutable `state` filter.\n","properties":{"next_cursor":{"description":"Opaque keyset cursor to resume from. Pass it back as the `cursor`\nquery parameter to fetch the next page. `null` marks the end of the\ndata.\n","example":"MjAyNi0wNS0wMVQxMjozNDo1Ni43ODlaCTAxOGY5ZTJh","nullable":true,"type":"string"},"settlements":{"description":"The settlements in this page, newest first by creation.","items":{"$ref":"#/components/schemas/Settlement"},"type":"array"}},"required":["settlements","next_cursor"],"title":"SettlementsPage","type":"object"},"TransferAmount":{"description":"A positive decimal string of at most 64 characters. The amount\nmust fit the asset's precision and transfer limit. For example, `\"1.009\"`\nfor an asset with two decimal places returns `422`.\n","example":"1000.00","maxLength":64,"pattern":"^\\d+(\\.\\d+)?$","title":"TransferAmount","type":"string"},"Settlement":{"description":"One deposit or withdrawal. It starts as `pending` and later becomes\n`posted` or `voided`.\n","properties":{"amount":{"description":"The amount crossing, as booked. Always positive.","example":"1000","pattern":"^\\d+(\\.\\d+)?$","type":"string"},"asset":{"description":"The asset that crosses the boundary.","example":"USD","type":"string"},"created_at":{"description":"When the settlement was initiated. This is the pagination key.","example":"2026-05-01T12:34:56.789Z","format":"date-time","type":"string"},"direction":{"description":"`deposit` adds money to cash. `withdrawal` pays money out of cash.\n","enum":["deposit","withdrawal"],"example":"deposit","type":"string"},"id":{"description":"The settlement's identifier.","example":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","type":"string"},"resolved_at":{"description":"When the settlement posted or voided; `null` while it is pending.","format":"date-time","nullable":true,"type":"string"},"state":{"description":"`pending` while the movement is in flight, then `posted` when the\nmoney landed or `voided` when it did not. Both resolutions are\nterminal.\n","enum":["pending","posted","voided"],"example":"pending","type":"string"},"void_reason":{"description":"Why the settlement was voided; `null` unless `state` is `voided`.","nullable":true,"type":"string"}},"required":["id","direction","asset","amount","state","created_at"],"title":"Settlement","type":"object"},"Decimal":{"description":"Decimal string with optional sign and fractional part.\n","example":"12345.6789","pattern":"^-?\\d+(\\.\\d+)?$","title":"Decimal","type":"string"},"Price":{"description":"Total price in quote asset for the full amount.","example":"33945.06","pattern":"^-?\\d+(\\.\\d+)?$","title":"Price","type":"string"},"Asset":{"description":"Asset identifier. Uppercase letters only — e.g. `BTC`, `ETH`, `USD`. Used as the base or quote component of a trading symbol.","example":"BTC","pattern":"^[A-Z]+$","title":"Asset","type":"string"},"Desk":{"description":"One desk with its own positions, margin, and trading sessions.\n","properties":{"created_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"When the desk was created. ISO-8601 UTC."},"desk_id":{"description":"Stable desk ID. Use it in trading tokens and API filters.\n","example":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","format":"uuid","type":"string"},"name":{"description":"Display name. Names can change or repeat, so use `desk_id` as the key.\n","example":"Macro","type":"string"}},"required":["desk_id","name","created_at"],"title":"Desk","type":"object"},"Quote":{"description":"Tagged union of every possible lifecycle state of a quote.","discriminator":{"mapping":{"cancelled":"#/components/schemas/QuoteCancelled","executed":"#/components/schemas/QuoteExecuted","expired":"#/components/schemas/QuoteExpired","failed":"#/components/schemas/QuoteFailed","processing":"#/components/schemas/QuoteProcessing","quoted":"#/components/schemas/QuoteQuoted","rejected":"#/components/schemas/QuoteRejected","requested":"#/components/schemas/QuoteRequested"},"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/QuoteRequested"},{"$ref":"#/components/schemas/QuoteQuoted"},{"$ref":"#/components/schemas/QuoteRejected"},{"$ref":"#/components/schemas/QuoteProcessing"},{"$ref":"#/components/schemas/QuoteExecuted"},{"$ref":"#/components/schemas/QuoteFailed"},{"$ref":"#/components/schemas/QuoteExpired"},{"$ref":"#/components/schemas/QuoteCancelled"}],"title":"Quote"},"QuoteProcessing":{"allOf":[{"$ref":"#/components/schemas/QuoteBase"},{"$ref":"#/components/schemas/QuotedFields"},{"properties":{"status":{"enum":["processing"],"type":"string"}},"type":"object"}],"title":"QuoteProcessing"}},"securitySchemes":{"bearerHttpAuthentication":{"bearerFormat":"JWT","description":"Sign bearer JWTs with your API key. Operations marked\n`x-desk-required` need a `desk_id` claim. Other operations require a\ntoken without `desk_id`. List your desk IDs with `GET /v1/desks`.\n","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"support@stelaxis.com","name":"Stelaxis Support"},"description":"Authenticate with a bearer JWT signed by your API key. Create API keys\nin Console.\n\nTimestamps use ISO-8601 UTC with milliseconds and a `Z` suffix.\n\nThe default rate limit is 600 requests per 60 seconds, shared across\nyour API keys and desks. Responses include\n`X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`\nheaders. A `429` response also includes `Retry-After` in seconds.\n","title":"Stelaxis API","version":"1.1"},"openapi":"3.0.0","paths":{"/cash-accounts":{"get":{"callbacks":{},"description":"Your cash balances, one row per asset. This endpoint covers all desks and\nvenues, so use a token without `desk_id`.\n\n`balance` excludes pending outflows. `debits_pending` shows pending\ninflows separately. `withdrawable` is the amount you can currently\nwithdraw. The list is empty before your first settlement.\n","operationId":"getCashAccounts","parameters":[],"responses":{"200":{"content":{"application/json":{"examples":{"empty":{"summary":"Nothing settled yet","value":[]},"funded":{"summary":"Settled, holding cash in two assets","value":[{"asset":"USD","balance":"1000","debits_pending":"0","human_readable_balance":"US$1,000.00","withdrawable":"1000"},{"asset":"BTC","balance":"0.5","debits_pending":"0","human_readable_balance":"0.5 BTC","withdrawable":"0"}]}},"schema":{"items":{"$ref":"#/components/schemas/CashAccount"},"type":"array"}}},"description":"Your cash accounts, one row per asset."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get cash accounts","tags":["account"]}},"/clearing-snapshots/latest":{"get":{"callbacks":{},"description":"Your latest cleared balance for each asset. Each value includes cash and\ntrading balances across all desks and venues at the `as_of` cut-off.\n\nThese values do not change until the next clearing cut-off. Use\n`GET /cash-accounts` and `GET /venues/{venue_id}/account` for live balances.\nAn empty list means no clearing snapshot is available yet. This endpoint\nrequires an API-key JWT without `desk_id`.\n","operationId":"getLatestClearingSnapshots","parameters":[],"responses":{"200":{"content":{"application/json":{"examples":{"cleared":{"summary":"Cleared — every row shares one cut-off","value":[{"as_of":"2026-08-17T12:00:00.000Z","asset":"BTC","cleared_balance":"0"},{"as_of":"2026-08-17T12:00:00.000Z","asset":"USD","cleared_balance":"1000"}]},"never_cleared":{"summary":"No clearing run has captured you yet","value":[]}},"schema":{"items":{"$ref":"#/components/schemas/ClearingSnapshot"},"type":"array"}}},"description":"Your latest cleared balances, one row per asset."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"examples":{"ip_not_whitelisted":{"summary":"A caller IP outside your IP whitelist","value":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]}},"session_token":{"summary":"A session token cannot access this endpoint","value":{"errors":[{"detail":"session tokens are not permitted on this endpoint","title":"Forbidden"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Use an API-key JWT from an allowed IP address."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get the latest clearing snapshot","tags":["clearing"]}},"/desks":{"get":{"callbacks":{},"description":"Your desks, in stable ID order. Use these IDs in trading tokens and API\nfilters. This endpoint requires a token without `desk_id`.\n\nPass `next_cursor` as `cursor` until `next_cursor` is `null`. Create and\nrename desks in Console.\n","operationId":"listDesks","parameters":[{"description":"Opaque keyset cursor from a previous response's `next_cursor`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum desks per page. Default 500, maximum 1000.","in":"query","name":"limit","required":false,"schema":{"default":500,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"desks":[{"created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","name":"Macro"}],"next_cursor":null},"schema":{"$ref":"#/components/schemas/DesksPage"}}},"description":"A page of your desks."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List desks","tags":["desks"]}},"/funding-events":{"get":{"callbacks":{},"description":"Your recorded daily funding charges, newest funding date first, then by\nsymbol. Every contract position open at a day's cutoff produces one event\nfor that day.\n\n`amount` is the money that was charged, at the quote asset's precision. It\nis **positive when you are charged** and negative on a funding credit; the\nmatching `funding/charge` record on `GET /v1/ledger/transactions` carries\nthe opposite sign, being signed from your cash account's perspective.\n`status` is `zero` when the charge came to nothing, in which case no ledger\nrecord exists.\n\nPass `next_cursor` as `cursor` until it is `null`. Unlike the ledger\nstatement this feed is not scan-bounded: a page shorter than `limit` is the\nend of the data. Within one traversal no event that existed when it started\nis skipped or repeated. An event recorded during the traversal may appear\nlater in the same traversal or only in the next one.\n","operationId":"listFundingEvents","parameters":[{"description":"Restrict to one desk. All desks are covered when omitted.","in":"query","name":"desk_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Restrict to one venue. A name no venue carries returns `422`.","in":"query","name":"venue_id","required":false,"schema":{"example":"gcp-europe-west1","type":"string"}},{"description":"Restrict to one contract.","in":"query","name":"symbol","required":false,"schema":{"$ref":"#/components/schemas/Symbol"}},{"description":"Earliest funding date to include (inclusive).","in":"query","name":"start_date","required":false,"schema":{"example":"2026-08-01","format":"date","type":"string"}},{"description":"Latest funding date to include (inclusive).","in":"query","name":"end_date","required":false,"schema":{"example":"2026-08-31","format":"date","type":"string"}},{"description":"Opaque keyset cursor from a previous response's `next_cursor`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum events per page. Default 100, maximum 500.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"funding_events":[{"amount":"18.91","as_of":"2026-08-27T21:00:00.000Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","funding_date":"2026-08-27","funding_event_id":"018f9e2a-3b4c-7d8e-9f10-5e6f70819203","mark_captured_at":"2026-08-27T20:59:58.750Z","mark_price":"42000.123456789","notional":"63000.185185184","quantity":"1.5","quote_asset":"USD","rate":"0.03","recorded_at":"2026-08-27T21:13:11.204Z","side":"long","status":"charged","symbol":"BTC-USD.CFD","venue_id":"gcp-europe-west1"}],"next_cursor":null},"schema":{"$ref":"#/components/schemas/FundingEventsPage"}}},"description":"A page of funding events."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List funding events","tags":["funding"]}},"/funding-events/predicted":{"get":{"callbacks":{},"description":"Estimates for the funding date **in progress**: one per open contract\nposition, using its current quantity, mark, and applicable rate, plus\ntheir `total`.\n\nEach row assumes the position remains open at the coming cutoff; charges\nare not pro-rated. `amount` uses the quote asset's precision and is\n**positive for a charge** and negative for a credit. No event exists until\nthe funding run records it.\n\nA funding date is the day ending at **17:00 America/New_York** on that date:\n21:00 UTC under US daylight saving and 22:00 UTC otherwise. It is not a UTC\ncalendar day and rolls without waiting for the previous run.\n\nA stale mark, unsupported contract, or missing rate makes that row\n`unavailable` with derived fields `null`. Any unavailable row makes the\ntotal `indeterminate` and `null`, but all rows remain in the response.\n\nThe whole answer comes from one snapshot and is not paginated: rows and\ntotal describe the same book at the same instant. `scope` echoes the applied\nfilters.\n","operationId":"listPredictedFunding","parameters":[{"description":"Restrict to one desk. All desks are covered when omitted.","in":"query","name":"desk_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Restrict to one venue. A name no venue carries returns `422`.","in":"query","name":"venue_id","required":false,"schema":{"example":"gcp-europe-west1","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"accounting_currency":"USD","as_of":"2026-08-28T21:00:00.000Z","funding_date":"2026-08-28","indeterminate_reason":null,"predicted_funding":[{"amount":"18.91","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","mark_captured_at":"2026-08-28T09:14:02.310Z","mark_price":"42000.123456789","notional":"63000.185185184","quantity":"1.5","quote_asset":"USD","rate":"0.03","side":"long","status":"estimated","symbol":"BTC-USD.CFD","unavailable_reason":null,"venue_id":"gcp-europe-west1"}],"scope":{"desk_id":null,"venue_id":null},"status":"ok","total":"18.91"},"schema":{"$ref":"#/components/schemas/PredictedFundingPage"}}},"description":"The predicted funding charges in scope, and the total over them."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List predicted funding charges","tags":["funding"]}},"/funding-events/{funding_event_id}":{"get":{"callbacks":{},"description":"One of your funding events by ID — the same row shape the list returns.\nThe `ref_id` of a `funding/charge` ledger record is this ID.\n","operationId":"getFundingEvent","parameters":[{"description":"","in":"path","name":"funding_event_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"amount":"18.91","as_of":"2026-08-27T21:00:00.000Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","funding_date":"2026-08-27","funding_event_id":"018f9e2a-3b4c-7d8e-9f10-5e6f70819203","mark_captured_at":"2026-08-27T20:59:58.750Z","mark_price":"42000.123456789","notional":"63000.185185184","quantity":"1.5","quote_asset":"USD","rate":"0.03","recorded_at":"2026-08-27T21:13:11.204Z","side":"long","status":"charged","symbol":"BTC-USD.CFD","venue_id":"gcp-europe-west1"},"schema":{"$ref":"#/components/schemas/FundingEvent"}}},"description":"The funding event."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"funding event not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No funding event with that ID was found."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get one funding event","tags":["funding"]}},"/ledger/transactions":{"get":{"callbacks":{},"description":"Posted movements on your cash and trading accounts, newest first. Use\n`desk_id` to select one desk. `amount` is positive when the account balance\nincreases and negative when it decreases. Transfers return two records\nwith the same `transaction_id`.\n\nA page can contain fewer than `limit` records, including zero, while\n`next_cursor` is present. Pass it as `cursor` until it is `null`.\n\n`reason` values may be added. Treat unknown values as opaque.\n\n| `reason` | Meaning |\n|---|---|\n| `settlement/deposit` | Deposit received. |\n| `settlement/withdrawal` | Withdrawal sent. |\n| `transfer/to_trading` | Cash moved to trading. |\n| `transfer/to_cash` | Trading balance moved to cash. |\n| `credit/grant` | Credit added. |\n| `credit/return` | Credit returned. |\n| `rfq/execute` | RFQ trade. |\n| `edge/trade` | Streaming trade. |\n| `cfd/realize` | Realized contract PnL. |\n| `cfd/commission` | Commission on an opening contract trade. |\n| `funding/charge` | Daily contract funding: a charge, or a credit when negative. |\n","operationId":"listLedgerTransactions","parameters":[{"description":"Restrict to one desk. All desks are covered when omitted.","in":"query","name":"desk_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Inclusive lower bound of the post-time window (ISO-8601 UTC).","in":"query","name":"start","required":false,"schema":{"$ref":"#/components/schemas/Timestamp"}},{"description":"Exclusive upper bound of the post-time window (ISO-8601 UTC).","in":"query","name":"end","required":false,"schema":{"$ref":"#/components/schemas/Timestamp"}},{"description":"Restrict to a single asset.","in":"query","name":"asset","required":false,"schema":{"example":"USD","type":"string"}},{"description":"Restrict to `cash` or `trading`. Both are returned when omitted.","in":"query","name":"account_type","required":false,"schema":{"enum":["cash","trading"],"type":"string"}},{"description":"Comma-separated exact `reason` values to include.","explode":false,"in":"query","name":"reason","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Opaque keyset cursor from a previous response's `next_cursor`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum records per page. Default 500, maximum 1000.","in":"query","name":"limit","required":false,"schema":{"default":500,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"transactions":[{"account_id":"018f9e2a-3b4c-7d8e-9f10-2b3c4d5e6f70","account_type":"cash","amount":"1000.00","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":null,"entry_id":"018f9e2a-3b4c-7d8e-9f10-0a1b2c3d4e5f","reason":"settlement/deposit","ref_id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","ref_type":"settlement","reference":null,"transaction_id":"018f9e2a-3b4c-7d8e-9f10-1a2b3c4d5e6f","venue_id":null}]},"schema":{"$ref":"#/components/schemas/LedgerTransactionsPage"}}},"description":"A page of ledger statement records."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List ledger transactions","tags":["ledger"]}},"/settlements":{"get":{"callbacks":{},"description":"Your settlements, newest first. A settlement can change state between\npages. To collect a complete history, omit `state` and filter it locally.\n","operationId":"listSettlements","parameters":[{"description":"Restrict to one lifecycle state. See the note above before relying on it.","in":"query","name":"state","required":false,"schema":{"enum":["pending","posted","voided"],"type":"string"}},{"description":"Restrict to one direction.","in":"query","name":"direction","required":false,"schema":{"enum":["deposit","withdrawal"],"type":"string"}},{"description":"Restrict to a single asset.","in":"query","name":"asset","required":false,"schema":{"example":"USD","type":"string"}},{"description":"Opaque keyset cursor from a previous response's `next_cursor`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum records per page. Default 50, maximum 200.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"settlements":[{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":null,"state":"pending","void_reason":null},{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":"2026-05-02T09:15:00.000Z","state":"posted","void_reason":null}]},"schema":{"$ref":"#/components/schemas/SettlementsPage"}}},"description":"A page of settlements."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List settlements","tags":["settlements"]},"post":{"callbacks":{},"description":"Announce a deposit or request a withdrawal. The settlement starts as\n`pending` and later becomes `posted` or `voided`.\n\nA withdrawal reserves cash immediately. Requests above the available\namount return `422`. The amount must use the asset's supported precision.\nSupply `Idempotency-Key` to retry safely.\n","operationId":"createSettlement","parameters":[{"description":"Optional retry key. Send the same key and body to receive the original\nsettlement with `200`. Reusing a key with a different body returns `409`.\n\nWithout a key, each request creates a settlement. Maximum\n255 characters and 1024\nUTF-8 bytes.\n","example":"deposit-2026-05-01-001","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementRequest"}}},"description":"The settlement to initiate.","required":true},"responses":{"200":{"content":{"application/json":{"example":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":null,"state":"pending","void_reason":null},"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"An `Idempotency-Key` replay: this key and this body already created a\nsettlement, and that settlement is returned unchanged. Nothing was\nbooked.\n"},"201":{"content":{"application/json":{"example":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":null,"state":"pending","void_reason":null},"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"The settlement was initiated; it is `pending`."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"409":{"content":{"application/json":{"example":{"errors":[{"detail":"Idempotency-Key was used for a different settlement request","title":"Conflict"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The supplied `Idempotency-Key` was already used for a **different**\nsettlement request. Nothing was booked; use a fresh key, or repeat\nthe original body.\n"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Initiate a settlement","tags":["settlements"]}},"/settlements/{settlement_id}":{"get":{"callbacks":{},"description":"Get one of your settlements by ID.","operationId":"getSettlement","parameters":[{"description":"","in":"path","name":"settlement_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"pending":{"summary":"In flight","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":null,"state":"pending","void_reason":null}},"posted":{"summary":"The money moved","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":"2026-05-02T09:15:00.000Z","state":"posted","void_reason":null}},"voided":{"summary":"It never will","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":"2026-05-01T13:02:11.412Z","state":"voided","void_reason":"cancelled by client: wire never sent"}}},"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"The settlement."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"settlement not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No settlement with that ID was found."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get one settlement","tags":["settlements"]}},"/settlements/{settlement_id}/cancel":{"post":{"callbacks":{},"description":"Cancel one of your pending deposits. It becomes `voided`. Withdrawals and\nresolved deposits return `409`. Contact support to cancel a withdrawal.\n\nYou may add a `reason` to the generated void reason.\n","operationId":"cancelSettlement","parameters":[{"description":"","in":"path","name":"settlement_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementCancelRequest"}}},"description":"Optional cancel detail.","required":false},"responses":{"200":{"content":{"application/json":{"example":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","direction":"deposit","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","resolved_at":"2026-05-01T13:02:11.412Z","state":"voided","void_reason":"cancelled by client: wire never sent"},"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"The settlement is now `voided`."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"settlement not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No settlement with that ID was found."},"409":{"content":{"application/json":{"examples":{"not_pending":{"summary":"Already resolved","value":{"errors":[{"detail":"settlement is posted and cannot be cancelled","title":"Conflict"}]}},"withdrawal":{"summary":"Contact support to cancel a withdrawal","value":{"errors":[{"detail":"a withdrawal cannot be cancelled by the client; contact support","title":"Conflict"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The settlement cannot be cancelled by the client: it is a withdrawal\n(in any state), or it is a deposit that is no longer `pending`.\n"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Cancel a pending deposit","tags":["settlements"]}},"/trade-reports":{"get":{"callbacks":{},"description":"Your order exports, newest first. Use `desk_id` to select one desk.\n","operationId":"listTradeReports","parameters":[{"description":"Only jobs whose export is filtered to this desk.","in":"query","name":"desk_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":[{"client_job_id":"eod-2026-05-31","completed_at":"2026-06-01T00:04:12.784Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":"https://api.stelaxis.com/v1/trade-reports/4217/download","error":null,"order_status":null,"report_id":"4217","row_count":4310293,"status":"succeeded","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}},{"client_job_id":"eod-2026-05-31","completed_at":null,"desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":null,"error":null,"order_status":null,"report_id":"4217","row_count":null,"status":"pending","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}}],"schema":{"items":{"$ref":"#/components/schemas/TradeReport"},"type":"array"}}},"description":"List of export jobs."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List orders exports","tags":["trade-reports"]},"post":{"callbacks":{},"description":"Start an order export for an inclusive UTC date range. It covers streaming\norders and RFQ executes alike; the `order_type` column carries\n`previously_quoted` on an RFQ row. Use `desk_id`, `symbol`, or\n`order_status` to filter it. The response is a `pending` job. Poll\n`GET /trade-reports/{report_id}` for status.\n\nUse a unique `client_job_id` to retry safely. A duplicate returns `409`\nwith the existing job.\n","operationId":"requestTradeReport","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeReportRequest"}}},"description":"Export request","required":true},"responses":{"202":{"content":{"application/json":{"example":{"client_job_id":"eod-2026-05-31","completed_at":null,"desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":null,"error":null,"order_status":null,"report_id":"4217","row_count":null,"status":"pending","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}},"schema":{"$ref":"#/components/schemas/TradeReport"}}},"description":"Export accepted; job created in `pending` state."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"409":{"content":{"application/json":{"example":{"client_job_id":"eod-2026-05-31","completed_at":"2026-06-01T00:04:12.784Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":"https://api.stelaxis.com/v1/trade-reports/4217/download","error":null,"order_status":null,"report_id":"4217","row_count":4310293,"status":"succeeded","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}},"schema":{"$ref":"#/components/schemas/TradeReport"}}},"description":"A report with the supplied `client_job_id` already exists; its current state is returned."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Request an orders export","tags":["trade-reports"]}},"/trade-reports/{report_id}":{"get":{"callbacks":{},"description":"Current state of an export job. On `succeeded`, includes `download_url`.","operationId":"getTradeReport","parameters":[{"description":"","in":"path","name":"report_id","required":true,"schema":{"pattern":"^[1-9][0-9]{0,18}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"failed":{"summary":"Generation failed","value":{"client_job_id":"eod-2026-05-31","completed_at":"2026-06-01T00:04:12.784Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":null,"error":{"message":"Report generation failed."},"order_status":null,"report_id":"4217","row_count":null,"status":"failed","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}}},"pending":{"summary":"Still queued","value":{"client_job_id":"eod-2026-05-31","completed_at":null,"desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":null,"error":null,"order_status":null,"report_id":"4217","row_count":null,"status":"pending","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}}},"succeeded":{"summary":"Ready to download","value":{"client_job_id":"eod-2026-05-31","completed_at":"2026-06-01T00:04:12.784Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","download_url":"https://api.stelaxis.com/v1/trade-reports/4217/download","error":null,"order_status":null,"report_id":"4217","row_count":4310293,"status":"succeeded","submitted_at":"2026-06-01T00:00:03.128Z","symbol":"BTC-USD","time_range":{"end":"2026-06-01T00:00:00.000Z","start":"2026-05-01T00:00:00.000Z"}}}},"schema":{"$ref":"#/components/schemas/TradeReport"}}},"description":"The export job."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"trade report not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Export not found."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get orders export status","tags":["trade-reports"]}},"/trade-reports/{report_id}/download":{"get":{"callbacks":{},"description":"Streams the ZIP archive (`orders-<from>-<to>.csv` inside) for a `succeeded`\nexport. This is the target of the `download_url` returned by\n`GET /trade-reports/{report_id}`.\n","operationId":"downloadTradeReport","parameters":[{"description":"","in":"path","name":"report_id","required":true,"schema":{"pattern":"^[1-9][0-9]{0,18}$","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"The ZIP archive."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"trade report not found or not ready","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Export not found or not ready to download."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Download an orders export","tags":["trade-reports"]}},"/transfers":{"get":{"callbacks":{},"description":"List your transfers, newest first by request time. Use a tenant API token\nwithout a `desk_id` claim. The optional `desk_id` filter selects one desk.\n\nPass `next_cursor` as `cursor` to continue, keeping the same filters.\nPages reflect current data. A `state` filter can gain or lose matches\nbetween pages; omit it when collecting history. Read pending transfers\nby ID to track their outcomes.\n","operationId":"listTransfers","parameters":[{"description":"Restrict to one desk. All desks are covered when omitted.","in":"query","name":"desk_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Restrict to one direction.","in":"query","name":"operation","required":false,"schema":{"enum":["to_trading","to_cash"],"type":"string"}},{"description":"Filter by current state. Matches can change between pages.","in":"query","name":"state","required":false,"schema":{"enum":["pending","processing","processed","declined","failed"],"type":"string"}},{"description":"Restrict to a single asset.","in":"query","name":"asset","required":false,"schema":{"example":"USD","type":"string"}},{"description":"The previous response's `next_cursor`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Maximum records per page. Default 50, maximum 200.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"transfers":[{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":"2026-05-01T12:34:56.912Z","state":"processed","state_reason":null,"venue_id":"ld4"}]},"schema":{"$ref":"#/components/schemas/TransfersPage"}}},"description":"A page of transfers."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied. Use a tenant API token from an allowed IP address."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List transfers","tags":["transfers"]},"post":{"callbacks":{},"description":"Move funds between your cash and a desk's trading account. Use\n`to_trading` to fund trading, or `to_cash` to move funds back to cash.\n\n`201` means accepted. Funds have moved only when `state` is `processed`.\nIf the transfer is pending, read it by ID until it reaches a final state.\n\n`to_trading` reserves available cash immediately and creates the trading\naccount if needed. `to_cash` requires an existing account and enough balance.\nWith open contracts, the remaining collateral must satisfy the desk's margin\nbuffer. Stelaxis may refuse it immediately with `422`, or accept it as pending\nand later decline it.\n\nInvalid desks, venues, assets or amounts return `422`. Send\n`Idempotency-Key` to retry without creating another transfer.\n","operationId":"createTransfer","parameters":[{"description":"A client-chosen key of at most 255 characters.\nRepeating the key and request returns the existing transfer with `200`.\nReusing the key for a different request returns `409`.\n\nKeep the original `venue_id` field on retries: adding or removing it\nchanges the request. An omitted venue is resolved only on creation.\nWithout this header, each accepted request creates a new transfer.\n","example":"fund-macro-2026-05-01-001","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"}}},"description":"The transfer to initiate.","required":true},"responses":{"200":{"content":{"application/json":{"example":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":"2026-05-01T12:34:56.912Z","state":"processed","state_reason":null,"venue_id":"ld4"},"schema":{"$ref":"#/components/schemas/Transfer"}}},"description":"The existing transfer for this key and request, with its current state.\n"},"201":{"content":{"application/json":{"examples":{"booked":{"summary":"Completed","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":"2026-05-01T12:34:56.912Z","state":"processed","state_reason":null,"venue_id":"ld4"}},"parked":{"summary":"Awaiting confirmation","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":null,"state":"pending","state_reason":null,"venue_id":"ld4"}}},"schema":{"$ref":"#/components/schemas/Transfer"}}},"description":"Transfer accepted. Check `state` for the outcome."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied. Use a tenant API token from an allowed IP address."},"409":{"content":{"application/json":{"example":{"errors":[{"detail":"Idempotency-Key was used for a different transfer request","title":"Conflict"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"This key was used for a different request. Repeat the original request\nor use a new key for a new transfer.\n"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Initiate a transfer","tags":["transfers"]}},"/transfers/{transfer_id}":{"get":{"callbacks":{},"description":"Read a transfer's current state. Use this after a pending response to\nlearn whether Stelaxis completed or declined the transfer.\n","operationId":"getTransfer","parameters":[{"description":"","in":"path","name":"transfer_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"declined":{"summary":"Declined","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_cash","resolved_at":"2026-05-01T12:34:56.912Z","state":"declined","state_reason":"insufficient balance","venue_id":"ld4"}},"pending":{"summary":"Awaiting confirmation","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":null,"state":"pending","state_reason":null,"venue_id":"ld4"}},"processed":{"summary":"Completed","value":{"amount":"1000","asset":"USD","created_at":"2026-05-01T12:34:56.789Z","desk_id":"018f9e2a-3b4c-7d8e-9f10-4d5e6f708192","id":"018f9e2a-3b4c-7d8e-9f10-3c4d5e6f7081","operation":"to_trading","resolved_at":"2026-05-01T12:34:56.912Z","state":"processed","state_reason":null,"venue_id":"ld4"}}},"schema":{"$ref":"#/components/schemas/Transfer"}}},"description":"The transfer."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied. Use a tenant API token from an allowed IP address."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"transfer not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No transfer with that id belongs to the authenticated client."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get one transfer","tags":["transfers"]}},"/venues/{venue_id}/account":{"get":{"callbacks":{},"description":"Your balances, collateral, PnL, equity, and margin for one venue.\n`balance` excludes pending outflows. `debits_pending` shows pending\ninflows separately. `margin_ratio` is `used_margin / equity`.\n\nIf a value cannot be calculated, the response remains `200` and\n`valuation` is `indeterminate`. Affected fields are `null`, and the\ndiagnostic lists identify the missing inputs.\n","operationId":"getAccount","parameters":[{"description":"Venue to use. An account with no activity returns an empty snapshot.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"indeterminate":{"summary":"An unpriceable collateral asset taints collateral value and equity","value":{"accounting_currency":"USD","balances":[{"asset":"BTC","balance":"0.5","debits_pending":"0","human_readable_balance":"0.5 BTC"},{"asset":"USD","balance":"67500","debits_pending":"0","human_readable_balance":"US$67,500.00"}],"collateral_value":null,"equity":null,"free_margin":null,"margin_ratio":null,"marks_as_of":"2026-07-16T11:59:59.812Z","missing_leverage":[],"missing_pricing":["BTC"],"unmarked_symbols":[],"unrealized_pnl":"-1250.5","used_margin":"19749.9","valuation":"indeterminate","valuation_time":"2026-07-16T12:00:00.000Z","venue_id":"ld4"}},"insolvent":{"summary":"Equity is zero or negative, so margin_ratio is null","value":{"accounting_currency":"USD","balances":[{"asset":"BTC","balance":"0.5","debits_pending":"0","human_readable_balance":"0.5 BTC"},{"asset":"USD","balance":"67500","debits_pending":"0","human_readable_balance":"US$67,500.00"}],"collateral_value":"1000","equity":"-250.5","free_margin":"-2225.5","margin_ratio":null,"marks_as_of":"2026-07-16T11:59:59.812Z","missing_leverage":[],"missing_pricing":[],"unmarked_symbols":[],"unrealized_pnl":"-1250.5","used_margin":"1975","valuation":"ok","valuation_time":"2026-07-16T12:00:00.000Z","venue_id":"ld4"}},"ok":{"summary":"Fully valued account","value":{"accounting_currency":"USD","balances":[{"asset":"BTC","balance":"0.5","debits_pending":"0","human_readable_balance":"0.5 BTC"},{"asset":"USD","balance":"67500","debits_pending":"0","human_readable_balance":"US$67,500.00"}],"collateral_value":"100000","equity":"98749.5","free_margin":"79000.6","margin_ratio":"0.2","marks_as_of":"2026-07-16T11:59:59.812Z","missing_leverage":[],"missing_pricing":[],"unmarked_symbols":[],"unrealized_pnl":"-1250.5","used_margin":"19749.9","valuation":"ok","valuation_time":"2026-07-16T12:00:00.000Z","venue_id":"ld4"}}},"schema":{"$ref":"#/components/schemas/Account"}}},"description":"The account summary."},"400":{"content":{"application/json":{"examples":{"unknown_venue":{"summary":"No such venue","value":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Venue selection failed — the `venue_id` does not name a deployed venue."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get account","tags":["account"],"x-desk-required":true}},"/venues/{venue_id}/positions":{"get":{"callbacks":{},"description":"Your open contract positions on one venue. Each position includes its\nmark, notional, unrealized PnL, leverage, and initial margin.\n\nIf a value cannot be calculated, the response remains `200`. Affected\nfields are `null`, and the diagnostic lists identify the missing inputs.\n","operationId":"getPositions","parameters":[{"description":"Venue to use. An account with no activity returns an empty snapshot.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"indeterminate":{"summary":"A missing price leaves affected fields null","value":{"marks_as_of":null,"missing_leverage":[],"missing_pricing":[],"positions":[{"avg_entry_price":"60000","contract_size":"1","initial_margin":null,"leverage":"10","mark_price":null,"notional":null,"notional_usd":null,"quantity":"1.5","quote_asset":"USD","side":"long","symbol":"BTC-USD.CFD","unrealized_pnl":null,"unrealized_pnl_usd":null,"updated_at":"2026-07-16T11:58:03.101Z"}],"unmarked_symbols":["BTC-USD.CFD"],"valuation":"indeterminate","valuation_time":"2026-07-16T12:00:00.000Z","venue_id":"ld4"}},"ok":{"summary":"Fully valued positions","value":{"marks_as_of":"2026-07-16T11:59:59.812Z","missing_leverage":[],"missing_pricing":[],"positions":[{"avg_entry_price":"60000","contract_size":"1","initial_margin":"9750","leverage":"10","mark_price":"65000","notional":"97500","notional_usd":"97500","quantity":"1.5","quote_asset":"USD","side":"long","symbol":"BTC-USD.CFD","unrealized_pnl":"7500","unrealized_pnl_usd":"7500","updated_at":"2026-07-16T11:58:03.101Z"}],"unmarked_symbols":[],"valuation":"ok","valuation_time":"2026-07-16T12:00:00.000Z","venue_id":"ld4"}}},"schema":{"$ref":"#/components/schemas/Positions"}}},"description":"The open position views."},"400":{"content":{"application/json":{"examples":{"unknown_venue":{"summary":"No such venue","value":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Venue selection failed — the `venue_id` does not name a deployed venue."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"example":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get open positions","tags":["account"],"x-desk-required":true}},"/venues/{venue_id}/rfq/quotes":{"post":{"callbacks":{},"description":"Request a quote for an asset pair. Send `side` for a one-way quote. Omit it\nfor a two-way quote with `bid_price` and `offer_price`; choose the side when\nyou execute.\n\nThe response is `quoted` or `rejected`. You may supply a unique\n`client_quote_id`; duplicate IDs return `409`. If omitted, we create an ID.\n","operationId":"requestQuote","parameters":[{"description":"Venue to trade on. A session token must use its session's venue.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"amount":"0.5","client_quote_id":"order-2026-05-01-0042","settlement_hours":0,"side":"buy","symbol":"BTC-USD","ttl_seconds":30},"schema":{"$ref":"#/components/schemas/QuoteRequest"}}},"description":"Quote request","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"quoted":{"summary":"One-way quote returned with a price","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"quoted","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"rejected":{"summary":"Quote refused","value":{"amount":"10000","base_asset":"BTC","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440001","reason":"size exceeds available liquidity","requested_at":"2026-05-01T12:34:56.123Z","side":"buy","status":"rejected","symbol":"BTC-USD","symbol_type":"spot"}},"two_way_quoted":{"summary":"Two-way quote returned with both legs","value":{"amount":"0.5","base_asset":"BTC","bid_commission":"0","bid_price":"33940.00","commission_currency":"USD","expires_at":"2026-05-01T12:35:26.789Z","offer_commission":"0","offer_price":"33950.12","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440003","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"status":"quoted","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}}},"schema":{"discriminator":{"mapping":{"quoted":"#/components/schemas/QuoteQuoted","rejected":"#/components/schemas/QuoteRejected"},"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/QuoteQuoted"},{"$ref":"#/components/schemas/QuoteRejected"}]}}},"description":"Quote response — `quoted` or `rejected`."},"400":{"content":{"application/json":{"example":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown `venue_id`, or one that does not match the session."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"examples":{"ip_not_whitelisted":{"summary":"Caller IP is not in your IP whitelist","value":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]}},"no_whitelist_configured":{"summary":"No IP whitelist entries configured","value":{"errors":[{"detail":"No IP whitelist configured","title":"Forbidden"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"409":{"content":{"application/json":{"example":{"errors":[{"detail":"quote with client_quote_id 'order-2026-05-01-0042' already exists","source":{"pointer":"/client_quote_id"},"title":"Conflict"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A quote with the supplied `client_quote_id` already exists."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Request a quote","tags":["rfq"],"x-desk-required":true}},"/venues/{venue_id}/rfq/quotes/{quote_id}":{"get":{"callbacks":{},"description":"Check the status of a quote already requested.","operationId":"getQuoteStatus","parameters":[{"description":"Venue to trade on. A session token must use its session's venue.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}},{"description":"","in":"path","name":"quote_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"executed":{"summary":"Trade booked successfully","value":{"amount":"0.5","base_asset":"BTC","executed_at":"2026-05-01T12:35:01.456Z","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_date":"2026-05-02","settlement_hours":0,"side":"buy","status":"executed","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"expired":{"summary":"Quote was not executed before TTL elapsed","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"expired","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"failed":{"summary":"Execution failed","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440002","quoted_at":"2026-05-01T12:34:56.789Z","reason":"execution failed","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"failed","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"processing":{"summary":"Execution accepted, booking in progress","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"processing","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"quoted":{"summary":"Quote is live and awaiting execution","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"quoted","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"rejected":{"summary":"Quote was refused at request time","value":{"amount":"10000","base_asset":"BTC","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440001","reason":"size exceeds available liquidity","requested_at":"2026-05-01T12:34:56.123Z","side":"buy","status":"rejected","symbol":"BTC-USD","symbol_type":"spot"}}},"schema":{"$ref":"#/components/schemas/Quote"}}},"description":"Quote object in any lifecycle state."},"400":{"content":{"application/json":{"example":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown `venue_id`, or one that does not match the session."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"examples":{"ip_not_whitelisted":{"summary":"Caller IP is not in your IP whitelist","value":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]}},"no_whitelist_configured":{"summary":"No IP whitelist entries configured","value":{"errors":[{"detail":"No IP whitelist configured","title":"Forbidden"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"quote not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Quote not found."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get quote status","tags":["rfq"],"x-desk-required":true}},"/venues/{venue_id}/rfq/quotes/{quote_id}/execute":{"post":{"callbacks":{},"operationId":"executeQuote","parameters":[{"description":"Venue to trade on. A session token must use its session's venue.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}},{"description":"","in":"path","name":"quote_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteQuoteRequest"}}},"description":"Optional body. `side` is required for a two-way quote. For a one-way\nquote, omit it or send the quoted side.\n","required":false},"responses":{"200":{"content":{"application/json":{"examples":{"executed":{"summary":"Trade executed at the quoted price","value":{"amount":"0.5","base_asset":"BTC","executed_at":"2026-05-01T12:35:01.456Z","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440000","quoted_at":"2026-05-01T12:34:56.789Z","requested_at":"2026-05-01T12:34:56.123Z","settlement_date":"2026-05-02","settlement_hours":0,"side":"buy","status":"executed","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}},"failed":{"summary":"Execution failed; client should re-quote","value":{"amount":"0.5","base_asset":"BTC","expires_at":"2026-05-01T12:35:26.789Z","price":"33945.06","quote_asset":"USD","quote_id":"550e8400-e29b-41d4-a716-446655440002","quoted_at":"2026-05-01T12:34:56.789Z","reason":"execution failed","requested_at":"2026-05-01T12:34:56.123Z","settlement_hours":0,"side":"buy","status":"failed","symbol":"BTC-USD","symbol_type":"spot","ttl_seconds":30}}},"schema":{"discriminator":{"mapping":{"executed":"#/components/schemas/QuoteExecuted","failed":"#/components/schemas/QuoteFailed"},"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/QuoteExecuted"},{"$ref":"#/components/schemas/QuoteFailed"}]}}},"description":"Returns `executed` on success or `failed` when execution cannot be\ncompleted. Request a new quote before retrying a failed execution.\n"},"400":{"content":{"application/json":{"example":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown `venue_id`, or one that does not match the session."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"examples":{"ip_not_whitelisted":{"summary":"Caller IP is not in your IP whitelist","value":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]}},"no_whitelist_configured":{"summary":"No IP whitelist entries configured","value":{"errors":[{"detail":"No IP whitelist configured","title":"Forbidden"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"404":{"content":{"application/json":{"example":{"errors":[{"detail":"quote not found","title":"Not found"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Quote not found."},"409":{"content":{"application/json":{"examples":{"already_executed":{"summary":"Quote was already executed","value":{"errors":[{"detail":"quote already executed","title":"Conflict"}]}},"cancelled":{"summary":"Quote was cancelled","value":{"errors":[{"detail":"quote is in cancelled state and cannot be executed","title":"Conflict"}]}},"expired":{"summary":"Quote expired before execution","value":{"errors":[{"detail":"quote expired before execution","title":"Conflict"}]}},"processing":{"summary":"Execution already in progress","value":{"errors":[{"detail":"quote is already being processed","title":"Conflict"}]}},"rejected":{"summary":"Quote was rejected at request time","value":{"errors":[{"detail":"quote was rejected and cannot be executed","title":"Conflict"}]}},"streaming_acquired":{"summary":"Trading account is in use by a streaming session","value":{"errors":[{"detail":"client trading account is in use by a streaming session","title":"Conflict"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Returns `409` unless the quote is `quoted`. It also returns `409` when\nan active streaming session uses the account. Check the quote status\nor close the streaming session before retrying.\n"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Execute a quote","tags":["rfq"],"x-desk-required":true}},"/venues/{venue_id}/rfq/trading-pairs":{"get":{"callbacks":{},"description":"Trading pairs you can quote and execute on this venue. Spot only.","operationId":"getTradingPairs","parameters":[{"description":"Venue to trade on. A session token must use its session's venue.","example":"ld4","in":"path","name":"venue_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":[{"base_asset":"BTC","quote_asset":"USD","symbol":"BTC-USD"},{"base_asset":"ETH","quote_asset":"USD","symbol":"ETH-USD"}],"items":{"$ref":"#/components/schemas/TradingPair"},"type":"array"}}},"description":"List of trading pairs."},"400":{"content":{"application/json":{"example":{"errors":[{"detail":"unknown venue_id: nowhere","title":"Bad Request"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown `venue_id`, or one that does not match the session."},"401":{"content":{"application/json":{"example":{"errors":[{"detail":"JWT validation failed: token expired","title":"Unauthorized"}]},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed — missing, invalid, or expired bearer token."},"403":{"content":{"application/json":{"examples":{"ip_not_whitelisted":{"summary":"Caller IP is not in your IP whitelist","value":{"errors":[{"detail":"IP 198.51.100.42 is not whitelisted","title":"Forbidden"}]}},"no_whitelist_configured":{"summary":"No IP whitelist entries configured","value":{"errors":[{"detail":"No IP whitelist configured","title":"Forbidden"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller IP is not allowed to access the API."},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get trading pairs","tags":["rfq"],"x-desk-required":true}}},"security":[{"bearerHttpAuthentication":[]}],"servers":[{"url":"https://api.app.stelaxis.com/v1","variables":{}}],"tags":[]}