Files
ritmex-bot/docs/backpack/openapi.json
T

12458 lines
387 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Backpack Exchange API",
"description": "\n# Introduction\n\nWelcome to the Backpack Exchange API. This API is for programmatic trade execution. All of the endpoints require requests to be signed with an ED25519 keypair for authentication.\n\nThe API is hosted at `https://api.backpack.exchange/` and the WS API is hosted at `wss://ws.backpack.exchange/`.\n\n# Authentication\n\n\n## Signing requests\n\nSigned requests are required for any API calls that mutate state. Additionally, some read only requests can be performed by signing or via session authentication.\n\nSigned requests require the following additional headers:\n\n- `X-Timestamp` - Unix time in milliseconds that the request was sent.\n- `X-Window` - Time window in milliseconds that the request is valid for, default is `5000` and maximum is `60000`.\n- `X-API-Key` - Base64 encoded verifying key of the ED25519 keypair.\n- `X-Signature` - Base64 encoded signature generated according to the instructions below.\n\nTo generate a signature perform the following:\n\n1) The key/values of the request body or query parameters should be ordered alphabetically and then turned into query string format.\n\n2) Append the header values for the timestamp and receive window to the above generated string in the format `&timestamp=<timestamp>&window=<window>`. If no `X-Window` header is passed the default value of `5000` still needs to be added to the signing string.\n\nEach request also has an instruction type, valid instructions are:\n\n```\naccountQuery\nbalanceQuery\nborrowLendExecute\nborrowHistoryQueryAll\ncollateralQuery\ndepositAddressQuery\ndepositQueryAll\nfillHistoryQueryAll\nfundingHistoryQueryAll\ninterestHistoryQueryAll\norderCancel\norderCancelAll\norderExecute\norderHistoryQueryAll\norderQuery\norderQueryAll\npnlHistoryQueryAll\npositionQuery\nquoteSubmit\nstrategyCancel\nstrategyCancelAll\nstrategyCreate\nstrategyHistoryQueryAll\nstrategyQuery\nstrategyQueryAll\nwithdraw\nwithdrawalQueryAll\n```\n\nThe correct instruction type should be prefixed to the signing string. The instruction types for each request are documented alongside the request.\n\nFor example, an API request to cancel an order with the following body:\n\n```json\n{\n \"orderId\": 28\n \"symbol\": \"BTC_USDT\",\n}\n```\n\nWould require the following to be signed:\n\n```text\ninstruction=orderCancel&orderId=28&symbol=BTC_USDT&timestamp=1614550000000&window=5000\n```\n\nRegarding batch order execution (`POST /orders`), for each order in the batch, the order parameters should be ordered alphabetically and then turned into query string format. The orderExecute instruction should then be prefixed to that string.\nThe query strings for the orders should be concatenated with `&` and the timestamp and window appended at the end.\n\nFor example, an API request for an order execution batch with the following body:\n\n```json\n[\n {\n \"symbol\": \"SOL_USDC_PERP\",\n \"side\": \"Bid\",\n \"orderType\": \"Limit\",\n \"price\": \"141\",\n \"quantity\": \"12\"\n },\n {\n \"symbol\": \"SOL_USDC_PERP\",\n \"side\": \"Bid\",\n \"orderType\": \"Limit\",\n \"price\": \"140\",\n \"quantity\": \"11\"\n }\n]\n```\n\nWould require the following to be signed:\n\n```text\ninstruction=orderExecute&orderType=Limit&price=141&quantity=12&side=Bid&symbol=SOL_USDC_PERP&instruction=orderExecute&orderType=Limit&price=140&quantity=11&side=Bid&symbol=SOL_USDC_PERP&timestamp=1750793021519&window=5000\n```\n\nIf the API endpoint requires query parameters instead of a request body, the same procedure should be used on the query parameters. If the API endpoint does not have a request body or query parameters, only the timestamp and receive window need to be signed.\n\nThis message should be signed using the private key of the ED25519 keypair that corresponds to the public key in the `X-API-Key` header. The signature should then be base64 encoded and submitted in the `X-Signature` header.\n\n\n<br /><br />\n\n---\n\n# Changelog\n\n## 2025-09-02\n\n- The `/depth` endpoint now returns a limit of 5,000 price levels on each side of the book.\n\n## 2025-09-01\n\n- The `cumulativeInterest` response field is being removed from the `/position`endpoint.\n- Estimated liquidation price or `l` is being removed from the position update stream. It will remain as a placeholder\n and be set to 0. It will be removed in the future, so client's should not rely on its presence.\n- Liquidation price can be queried for a single position using the Positions API `/position` for example\n `/position?symbol=BTC_USDC_PERP`.\n\n## 2025-08-07\n\n- `/history/pnl` has been removed.\n\n## 2025-06-08\n\n- The order id format is changing, it is no longer a byte shifted timestamp. It is no longer possible to derive the\n order timestamp from the order id. This change will take place at Monday June 9th, 01:00 UTC.\n\n## 2025-04-22\n\n- The `/fills` endpoint now returns all fills for the account, including fills from system orders as well as client\n orders. System orders include liquidations, ADLs and collateral conversions. Previously, by default, it only returned\n fills from client orders. This behavior can be achieved by setting the `fillType` parameter to `User`.\n\n## 2025-04-08\n\n- Added funding rate lower and upper bounds to `/markets` and `/market` endpoints.\n\n## 2025-03-26\n\n- Add open interest stream `openInterest.<symbol>`.\n- Added the option to query `/history/borrowLend/positions` with a signed request using the instruction\n `borrowPositionHistoryQueryAll`.\n\n## 2025-03-19\n\n- The leverage filter has been removed from `/markets` and `/market` endpoints.\n- Added `/openInterest` now takes `symbol` as an optional parameter. When not set, all markets are returned.\n- `/openInterests` has been deprecated.\n- Add stop loss and take profit fields to `/orders/execute`.\n- Add `I` field to the order update stream (related order id).\n- Add `a` and `b` fields to the order update stream (take profit trigger price and stop loss trigger price).\n\n## 2025-02-28\n\n- Added `clientId` to fill history.\n\n## 2025-02-11\n\n- An `O` field has been added to the order update stream. It denotes the origin of the update. The possible values are:\n - `USER`: The origin of the update was due to order entry by the user.\n - `LIQUIDATION_AUTOCLOSE`: The origin of the update was due to a liquidation by the liquidation engine.\n - `ADL_AUTOCLOSE`: The origin of the update was due to an ADL (auto-deleveraging) event.\n - `COLLATERAL_CONVERSION`: The origin of the update was due to a collateral conversion to settle debt on the\n account.\n - `SETTLEMENT_AUTOCLOSE`: The origin of the update was due to the settlement of a position on a dated market.\n - `BACKSTOP_LIQUIDITY_PROVIDER`: The origin of the update was due to a backstop liquidity provider facilitating a\n liquidation.\n\n## 2025-02-07\n\n- Added `r` to denote a reduce only order on the order updates stream.\n- Added `reduceOnly` to the get orders endpoint.\n\n## 2025-02-03\n\n- Added `openInterestLimit` to the markets endpoint. Applicable to futures markets only.\n- Added `orderModified` event to the order update stream. A resting reduce only order's quantity can be decreased in\n order to prevent position side reversal.\n\n## 2025-01-09\n\n- Added `marketType` to the markets endpoint.\n- Added an optional `marketType` filter to the fills and the orders endpoints.\n\n## 2024-12-03\n\n- Add order expiry reason to order update stream.\n- Add `cumulativeInterest` to borrow lend position.\n\n## 2024-12-02\n\n- Add borrow lend history per position endpoint.\n\n## 2024-11-10\n\n- Add `timestamp` field denoting the system time in unix-epoch microseconds to the depth endpoint.\n\n## 2024-10-15\n\n- Convert all error responses to JSON and add a error code.\n\n## 2024-05-14\n\n- Add `executedQuantity` and `executedQuoteQuantity` to order history endpoint.\n\n## 2024-05-03\n\n- Add single market order update stream `account.orderUpdate.<symbol>`.\n\n## 2024-05-02\n\n- Add optional `from` and `to` timestamp to get withdrawals endpoint.\n\n## 2024-05-01\n\n- Add optional `from` and `to` timestamp to get deposits endpoint.\n\n## 2024-03-14\n\n- Add optional `orderId` filter to order history endpoint.\n- Add optional `from` and `to` timestamp to order fills endpoint.\n\n## 2024-02-28\n\n- Return the withdrawal in request withdrawal response.\n\n## 2024-02-24\n\n- An additional field `t` was added to the private order update stream. It is the `trade_id` of the fill that generated\n the order update.\n- Added a maximum value for the `X-Window` header of `60000`.\n\n## 2024-01-16\n\n### Breaking\n\n- A new websocket API is available at `wss://ws.backpack.exchange`. Please see the documentation. The previous API\n remains on the same endpoint and will be deprecated after a migration period. The new API changes the following:\n - Subscription endpoint is now `wss://ws.backpack.exchange` instead of `wss://ws.backpack.exchange/stream`.\n - Can subscribe and unsubscribe to/from multiple streams by passing more than one in the `params` field.\n - Signature should now be sent in a separate `signature` field.\n - Signature instruction changed from `accountQuery` to `subscribe`.\n - Event and engine timestamps are now in `microseconds` instead of `milliseconds`.\n - Add engine timestamp to `bookTicker`, `depth`, and `order` streams.\n - Add quote asset volume to ticker stream.\n - Add sequential trade id to trade stream.\n - Rename the event type in the depth stream from `depthEvent` to `depth`.\n - Change the format of streams from `<symbol>@<type>` to `<type>.<symbol>` or `kline.<interval>.<symbol>` for\n K-lines.\n - Flatten the K-Line in the K-line stream so its not nested.\n\n## 2024-01-11\n\n### Breaking\n\n- Replaced `identifier` field on deposits with `transaction_hash` and `provider_id`.\n This aims to provide clearer representation of the field, particularly for fiat deposits.\n- Removed duplicate `pending` values from the `WithdrawalStatus` and `DepositStatus` spec enum.\n\n\n<br /><br />\n\n---\n ",
"version": "1.0",
"x-logo": {
"url": "https://raw.githubusercontent.com/backpack-exchange/bpx-openapi/refs/heads/master/assets/backpack.png"
}
},
"servers": [
{
"url": "https://api.backpack.exchange"
}
],
"tags": [
{
"name": "Account",
"description": "Account settings and limits."
},
{
"name": "Assets",
"description": "Assets and collateral data."
},
{
"name": "Borrow Lend",
"description": "Borrowing and lending."
},
{
"name": "Borrow Lend Markets",
"description": "Borrowing and lending."
},
{
"name": "Capital",
"description": "Capital management."
},
{
"name": "Funding",
"description": "Futures funding."
},
{
"name": "Futures",
"description": "Futures data."
},
{
"name": "History",
"description": "Historical account data."
},
{
"name": "Markets",
"description": "Public market data."
},
{
"name": "Order",
"description": "Order management."
},
{
"name": "Position",
"description": "Account position summary."
},
{
"name": "Request For Quote",
"description": "Request For Quote."
},
{
"name": "Strategy",
"description": "Strategies."
},
{
"name": "Streams",
"description": "# Usage\n\n## Subscribing\n\nTo use the websocket API, connect to\n`wss://ws.backpack.exchange`.\n\nTo subscribe to a stream with the name `stream` send a text frame\nover the websocket connection with the following JSON payload:\n\n```\n{\n \"method\": \"SUBSCRIBE\",\n \"params\": [\"stream\"]\n}\n```\n\nSimilarly, to unsubscribe from a stream with the name `stream`:\n\n```\n{\n \"method\": \"UNSUBSCRIBE\",\n \"params\": [\"stream\"]\n}\n```\n\nYou can subscribe or unsubscribe from multiple streams if you include\nmore than one in the params field.\n\nAll data from streams is wrapped in a JSON object of the following form:\n\n```\n{\n \"stream\": \"<stream>\",\n \"data\": \"<payload>\"\n}\n```\n\nThe following command can be used to test subscribing to a stream:\n```\n(sleep 1; \\\necho '{\"method\":\"SUBSCRIBE\",\"params\":[\"depth.SOL_USDC\"]}';\\\ncat) |\\\nwscat -c wss://ws.backpack.exchange\n```\nThe payloads for each stream time are outlined below.\n\n## Timing\n\nTimestamps are in microseconds (except for the K-line start and end\ntimes). The event timestamp is the time the event was emitted from\nthe websocket server, and the engine timestamp is the time the event\nwas generated by the matching engine.\n\nIf a message aggregates more than one event (for example, a depth\nmessage), the engine timestamp will be the timestamp of the last\nmatching engine event.\n\n## Keeping the connection alive\n\nTo keep the connection alive, a `Ping` frame will be sent from the\nserver every 60s, and a `Pong` is expected to be received from the\nclient. If a `Pong` is not received within 120s, a `Close` frame will be\nsent and the connection will be closed.\n\nIf the server is shutting down, a `Close` frame will be sent and then a\ngrace period of 30s will be given before the connection is closed. The\nclient should reconnect after receiving the `Close` frame. The client\nwill be reconnected to a server that is not shutting down.\n\n# Private\n\nSubscribing to a private stream requires a valid signature generated\nfrom an ED25519 keypair. For stream subscriptions, the signature\nshould be of the form:\n\n```text\ninstruction=subscribe&timestamp=1614550000000&window=5000\n```\n\nWhere the timestamp and window are in milliseconds.\n\nPrivate streams are prefixed with `account.` and require signature data\nto be submitted in the subscribe parameters. The verifying key and\nsignature should be base64 encoded.\n\n```\n{\n \"method\": \"SUBSCRIBE\",\n \"params\": [\"stream\"],\n \"signature\": [\"<verifying key>\", \"<signature>\", \"<timestamp>\", \"<window>\"]\n}\n````\n\n## Order update\n\nOn any mutation to an order the order will be pushed to the order update\nstream. The event type of the order update will be one of the\nfollowing:\n\n- `orderAccepted`\n- `orderCancelled`\n- `orderExpired`\n- `orderFill`\n- `orderModified`\n- `triggerPlaced`\n- `triggerFailed`\n\nAn `orderModified` update will be received when a resting reduce only\norder's quantity is decreased in order to prevent position side\nreversal.\n\n### Stream Name Format\n- For all markets: `account.orderUpdate`\n- For single market: `account.orderUpdate.<symbol>`\n\n```\n{\n \"e\": \"orderAccepted\", // Event type\n \"E\": 1694687692980000, // Event time in microseconds\n \"s\": \"SOL_USD\", // Symbol\n \"c\": 123, // Client order ID\n \"S\": \"Bid\", // Side\n \"o\": \"LIMIT\", // Order type\n \"f\": \"GTC\", // Time in force\n \"q\": \"32123\", // Quantity\n \"Q\": \"32123\", // Quantity in quote\n \"p\": \"20\", // Price\n \"P\": \"21\", // Trigger price\n \"B\": \"LastPrice\", // Trigger by\n \"a\": \"30\", // Take profit trigger price\n \"b\": \"10\", // Stop loss trigger price\n \"d\": \"MarkPrice\", // Take profit trigger by\n \"g\": \"IndexPrice\", // Stop loss trigger by\n \"Y\": \"10\", // Trigger quantity\n \"X\": \"Filled\", // Order state\n \"R\": \"PRICE_BAND\", // Order expiry reason\n \"i\": \"1111343026172067\" // Order ID\n \"t\": 567, // Trade ID\n \"l\": \"1.23\", // Fill quantity\n \"z\": \"321\", // Executed quantity\n \"Z\": \"123\", // Executed quantity in quote\n \"L\": \"20\", // Fill price\n \"m\": true, // Whether the order was maker\n \"n\": \"23\", // Fee\n \"N\": \"USD\", // Fee symbol\n \"V\": \"RejectTaker\", // Self trade prevention\n \"T\": 1694687692989999, // Engine timestamp in microseconds\n \"O\": \"USER\" // Origin of the update\n \"I\": \"1111343026156135\" // Related order ID\n \"H\": 6023471188 // Strategy ID\n \"y\": true // Post only\n}\n```\n\nThere are several possible values for the `O` field (origin of the\nupdate):\n- `USER`: The origin of the update was due to order entry by the user.\n- `LIQUIDATION_AUTOCLOSE`: The origin of the update was due to a\nliquidation by the liquidation engine.\n- `ADL_AUTOCLOSE`: The origin of the update was due to an ADL\n(auto-deleveraging) event.\n- `COLLATERAL_CONVERSION`: The origin of the update was due to a\ncollateral conversion to settle debt on the account.\n- `SETTLEMENT_AUTOCLOSE`: The origin of the update was due to the\nsettlement of a position on a dated market.\n- `BACKSTOP_LIQUIDITY_PROVIDER`: The origin of the update was due to a\nbackstop liquidity provider facilitating a liquidation.\n\nSome fields are conditional on the order settings or event type:\n\n- `c` - Only present if the order has a client order ID.\n- `q` - Only present if the order has a quantity set.\n- `Q` - Only present if the order is reverse market order.\n- `p` - Only present if the order is a limit order.\n- `P` - Only present if the order is a trigger order.\n- `B` - Only present if the order is a trigger order.\n- `a` - Only present if the order has a take profit trigger price set.\n- `b` - Only present if the order has a stop loss trigger price set.\n- `d` - Only present if the order has a take profit trigger price set.\n- `g` - Only present if the order has a stop loss trigger price set.\n- `Y` - Only present if the order is a trigger order.\n- `R` - Only present if the event is a `orderExpired` event.\n- `t` - Only present if the event is a `orderFill` event.\n- `l` - Only present if the event is a `orderFill` event.\n- `L` - Only present if the event is a `orderFill` event.\n- `m` - Only present if the event is a `orderFill` event.\n- `n` - Only present if the event is a `orderFill` event.\n- `N` - Only present if the event is a `orderFill` event.\n\n## Position update\n\nOn any mutation to a position the position will be pushed to the\nposition update stream. The event type of the position update will\nbe one of the following:\n\n- `positionAdjusted`\n- `positionOpened`\n- `positionClosed`\n\nOn subscription, a message will be sent to the client with the current\nopen positions, if any. The `e` field will not be present in the\nmessage.\n\n### Stream Name Format\n- For all markets: `account.positionUpdate`\n- For single market: `account.positionUpdate.<symbol>`\n\n```\n{\n \"e\": \"positionOpened\", // Event type\n \"E\": 1694687692980000, // Event time in microseconds\n \"s\": \"SOL_USDC_PERP\", // Symbol\n \"b\": 123, // Break event price\n \"B\": 122, // Entry price\n \"f\": 0.5, // Initial margin fraction\n \"M\": 122, // Mark price\n \"m\": 0.01, // Maintenance margin fraction\n \"q\": 5, // Net quantity\n \"Q\": 6, // Net exposure quantity\n \"n\": 732 , // Net exposure notional\n \"i\": \"1111343026172067\" // Position ID\n \"p\": \"-1\", // PnL realized\n \"P\": \"0\", // PnL unrealized\n \"T\": 1694687692989999 // Engine timestamp in microseconds\n}\n```\n\nThe net quantity field will be positive if the position is long and\nnegative if the position is short.\n\nThe net exposure quantity field includes exposure from the open\nposition, as well as any open orders.\n\n## RFQ Update\n\nThis WebSocket stream provides real-time updates on RFQs (Request for\nQuotes) that are relevant to makers. Events are pushed to this\nstream whenever there is a significant state change in an RFQ or its\nassociated quotes, allowing makers to monitor and respond to RFQs as\nthey progress through various states.\n\n### Event Types\n\nFor RFQs that submitted by other requesters.\n- `rfqActive`: Indicates that an RFQ is active and open for quotes.\n\nFor RFQs that submitted by your account.\n- `rfqAccepted`: Indicates that an RFQ has been accepted and is no\n- `rfqRefreshed`: Indicates that an RFQ has been refreshed, is active\nand open for quotes.\n- `rfqCancelled`: Indicates that an RFQ has been cancelled or expired.\n- `rfqCandidate`: RFQ has received a new best quote.\n- `rfqFilled`: Indicates that an RFQ has been fully filled with a quote.\n\nFor Quotes submitted by your account.\n- `quoteAccepted`: Indicates that a quote submitted by the maker has\nbeen accepted.\n- `quoteCancelled`: Indicates that a quote has been cancelled due to\nquote submission, RFQ being filled, refreshed, cancelled, or expired.\n\n### Quote Submission and RFQ Timing\n\nMakers should submit quotes before the **submission time** (`w` field)\nis reached, as indicated in each `rfqActive` event. An RFQ remains\nactive until the **expiration time** (`W` field). If no quote is\naccepted or the RFQ is not cancelled, makers may continue to submit\nquotes until expiration.\n\nRFQs can periodically request new quotes by issuing additional\n`rfqActive` events. Each new `rfqActive` event will have the same\nRFQ ID (`R` field) but updated values for **submission time** and\n**expiration time**, allowing makers to participate in extended or\nrenewed quoting periods for ongoing RFQs.\n\n### Stream Name Format\n- For all markets: `account.rfqUpdate`\n- For single market: `account.rfqUpdate.<symbol>`\n\n### Example Messages\n\n**RFQ Accepted** (sent to requester)\n```\n{\n \"e\": \"rfqAccepted\", // Event type\n \"E\": 1730225420369829, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"C\": \"123\", // Client RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"S\": \"Bid\", // RFQ side\n \"q\": \"10\", // Quantity (if quantity in base asset)\n \"w\": 1730225480368, // Submission time in milliseconds\n \"W\": 1730225540368, // Expiry time in milliseconds\n \"X\": \"New\", // RFQ status\n \"T\": 1730225420368765 // Engine timestamp in microseconds\n}\n```\n\n**RFQ Active** (broadcast to all rfq listeners)\n```\n{\n \"e\": \"rfqActive\", // Event type\n \"E\": 1730225420369829, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"q\": \"10\", // Quantity (optional) (if quantity in base asset)\n \"w\": 1730225480368, // Submission time in milliseconds\n \"W\": 1730225540368, // Expiry time in milliseconds\n \"X\": \"New\", // RFQ status\n \"T\": 1730225420368765 // Engine timestamp in microseconds\n}\n```\n\n**RFQ Refreshed** (sent to requester)\n```\n{\n \"e\": \"rfqRefreshed\", // Event type\n \"E\": 1730225450369829, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"C\": \"123\", // Client RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"S\": \"Bid\", // RFQ side\n \"q\": \"10\", // Quantity (optional) (if quantity in base asset)\n \"w\": 1730225480368, // Submission time in milliseconds\n \"W\": 1730225540368, // Expiry time in milliseconds\n \"X\": \"New\", // RFQ status\n \"T\": 1730225450368765 // Engine timestamp in microseconds\n}\n```\n\n**RFQ Cancelled** (sent to taker only)\n```\n{\n \"e\": \"rfqCancelled\", // Event type\n \"E\": 1730225460369829, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"C\": \"123\", // Client RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"S\": \"Bid\", // RFQ side\n \"Q\": \"150\", // Quote quantity (optional) (if quantity in quote asset)\n \"w\": 1730225480368, // Submission time in milliseconds\n \"W\": 1730225540368, // Expiry time in milliseconds\n \"X\": \"Cancelled\", // RFQ status\n \"T\": 1730225460368765 // Engine timestamp in microseconds\n}\n```\n\n**Quote Accepted** (sent to quoter)\n```\n{\n \"e\": \"quoteAccepted\", // Event type\n \"E\": 1730225434631394, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"u\": 113392054083780608, // Quote ID\n \"C\": \"123\", // Client Quote ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"X\": \"New\", // Quote status\n \"T\": 1730225434629778 // Engine timestamp in microseconds\n}\n```\n\n**Quote Cancelled** (sent to quoter)\n```\n{\n \"e\": \"quoteCancelled\", // Event type\n \"E\": 1730225583761963, // Event time in microseconds\n \"R\": 113392061354344448, // RFQ ID\n \"u\": 113392062870847488, // Quote ID\n \"C\": \"123\", // Client Quote ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"X\": \"Cancelled\", // Quote status\n \"T\": 1730225583753811 // Engine timestamp in microseconds\n}\n```\n\n**RFQ Candidate** (sent to requester with quote details)\n```\n{\n \"e\": \"rfqCandidate\", // Event type\n \"E\": 1730225490648996, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"u\": 113392054083780608, // Quote ID\n \"C\": \"123\", // Client RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"S\": \"Bid\", // RFQ side\n \"q\": \"10\", // RFQ quantity (in base asset)\n \"Q\": \"150\", // RFQ quote quantity (in quote asset)\n \"p\": \"15.50\", // Taker price (quote price + fee)\n \"X\": \"New\", // RFQ status\n \"T\": 1730225490647080 // Engine timestamp in microseconds\n}\n```\n\n**RFQ Filled** (sent to both requester and quoter)\n```\n// To requester\n{\n \"e\": \"rfqFilled\", // Event type\n \"E\": 1730225497648996, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"u\": 113392054083780608, // Quote ID\n \"C\": \"123\", // Client RFQ ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"S\": \"Bid\", // RFQ side\n \"Q\": \"150\", // RFQ quote quantity (optional) (if quantity in quote asset)\n \"p\": \"15.50\", // Taker price (quote price + fee)\n \"X\": \"Filled\", // RFQ status\n \"T\": 1730225497647080 // Engine timestamp in microseconds\n}\n\n// To quoter\n{\n \"e\": \"rfqFilled\", // Event type\n \"E\": 1730225497648996, // Event time in microseconds\n \"R\": 113392053149171712, // RFQ ID\n \"u\": 113392054083780608, // Quote ID\n \"C\": \"123\", // Client Quote ID\n \"s\": \"SOL_USDC_RFQ\", // Symbol\n \"p\": \"15.00\", // Price\n \"X\": \"Filled\", // Quote status\n \"T\": 1730225497647080 // Engine timestamp in microseconds\n}\n```\n\n### Field Descriptions\n\n- `e` - Event type (e.g., `rfqActive`, `rfqAccepted`, `rfqRefreshed`,\n`rfqCancelled`, `quoteAccepted`, `quoteCancelled`, `rfqCandidate`,\n`rfqFilled`).\n- `E` - Event time in microseconds.\n- `R` - RFQ ID, identifying the request for quote.\n- `u` - Quote ID, identifying the specific quote.\n- `C` - Client ID (either Client RFQ ID or Client Quote ID depending on\ncontext).\n- `s` - Symbol the RFQ is for.\n- `S` - Side of the RFQ, either \"Bid\" or \"Ask\".\n- `q` - Quantity for the RFQ (in base asset, if quantity in base asset).\n- `Q` - Quote quantity for the RFQ (in quote asset, if quantity in quote\nasset).\n- `p` - Price associated with the quote/fill event.\n- `w` - Submission time for the RFQ in milliseconds.\n- `W` - Expiry time for the RFQ in milliseconds.\n- `X` - Order status (e.g., `New`, `Cancelled`, `Filled`).\n- `T` - Engine timestamp in microseconds.\n\nSome fields are conditional and may be present only in specific events.\n\n# Public\n\n## Book ticker\n\nStream name format: `bookTicker.<symbol>`\n```\n{\n \"e\": \"bookTicker\", // Event type\n \"E\": 1694687965941000, // Event time in microseconds\n \"s\": \"SOL_USDC\", // Symbol\n \"a\": \"18.70\", // Inside ask price\n \"A\": \"1.000\", // Inside ask quantity\n \"b\": \"18.67\", // Inside bid price\n \"B\": \"2.000\", // Inside bid quantity\n \"u\": \"111063070525358080\", // Update ID of event\n \"T\": 1694687965940999 // Engine timestamp in microseconds\n}\n```\n\n## Depth\n\nContains incremental depth updates. Each depth update has the absolute\nvalue of the depths at the given levels, and only changes when the\ndepth has changed.\n\nTo obtain an initial snapshot of the depth, the client should query the\n[REST API](https://docs.backpack.exchange/#tag/Markets/operation/get_depth).\n\nThe depth stream will push updates as quickly as possible, but under\nload it may aggregate more than one update into a single event. In\nthis case the `U` and `u` fields will not be the same. The `U` field\nis the first update ID in the event, and the `u` field is the final\nupdate ID in the event.\n\nThere are alternative depth streams that aggregates updates into a\nsingle message over a 200ms, 600ms or 1000ms period instead of pushing\nupdates in realtime. This is useful for reducing network traffic.\n\nUpdates are sequential, so `U` will always be `u + 1` from the previous\nmessage. If this is not the case, the client should assume that the\ndepth has been invalidated and requery the REST API.\n\nStream name format: `depth.<symbol>` (realtime)\nStream name format: `depth.200ms.<symbol>` (aggregated)\nStream name format: `depth.600ms.<symbol>` (aggregated)\nStream name format: `depth.1000ms.<symbol>` (aggregated)\n```\n{\n \"e\": \"depth\", // Event type\n \"E\": 1694687965941000, // Event time in microseconds\n \"s\": \"SOL_USDC\", // Symbol\n \"a\": [ // Asks\n [\n \"18.70\",\n \"0.000\"\n ]\n ],\n \"b\": [ // Bids\n [\n \"18.67\",\n \"0.832\"\n ],\n [\n \"18.68\",\n \"0.000\"\n ]\n ],\n \"U\": 94978271, // First update ID in event\n \"u\": 94978271, // Last update ID in event\n \"T\": 1694687965940999 // Engine timestamp in microseconds\n}\n```\n\n## K-Line\n\nStream name format: `kline.<interval>.<symbol>`\n\n```\n{\n \"e\": \"kline\", // Event type\n \"E\": 1694687692980000, // Event time in microseconds\n \"s\": \"SOL_USD\", // Symbol\n \"t\": \"2024-09-11T12:00:00\", // K-Line start time (ISO 8601 format)\n \"T\": \"2024-09-11T12:01:00\", // K-Line close time (ISO 8601 format)\n \"o\": \"18.75\", // Open price\n \"c\": \"19.25\", // Close price\n \"h\": \"19.80\", // High price\n \"l\": \"18.50\", // Low price\n \"v\": \"32123\", // Base asset volume\n \"n\": 93828, // Number of trades\n \"X\": false // Is this k-line closed?\n}\n```\n\n## Liquidation\n\nContains updates for liquidation events for all liquidation types.\n\nStream name format: `liquidation`\n\n```\n{\n \"e\": \"liquidation\", // Event type\n \"E\": 1694688638091000, // Event time in microseconds\n \"q\": \"10\", // Quantity\n \"p\": \"18.70\", // Price\n \"S\": \"Bid\", // Side\n \"s\": \"SOL_USDC\", // Symbol\n \"T\": 567, // Engine timestamp in microseconds\n}\n```\n\n## Mark price\n\nStream name format: `markPrice.<symbol>`\n\n```\n{\n \"e\": \"markPrice\", // Event type\n \"E\": 1694687965941000, // Event time in microseconds\n \"s\": \"SOL_USDC\", // Symbol\n \"p\": \"18.70\", // Mark price\n \"f\": \"1.70\", // Estimated funding rate\n \"i\": \"19.70\", // Index price\n \"n\": 1694687965941, // Next funding timestamp in milliseconds\n \"T\": 1694687965940999 // Engine timestamp in microseconds\n}\n```\n\n## Ticker\n\nThe ticker stream pushes 24hr rolling statistics for a single symbol\nevery second.\n\nStream name format: `ticker.<symbol>`\n\n```\n{\n \"e\": \"ticker\", // Event type\n \"E\": 1694687692980000, // Event time in microseconds\n \"s\": \"SOL_USD\", // Symbol\n \"o\": \"18.75\", // First price\n \"c\": \"19.24\", // Last price\n \"h\": \"19.80\", // High price\n \"l\": \"18.50\", // Low price\n \"v\": \"32123\", // Base asset volume\n \"V\": \"928190\", // Quote asset volume\n \"n\": 93828 // Number of trades\n}\n```\n## Open interest\n\nOpen interest updates are pushed to the openInterest stream every 60\nseconds.\n\nStream name format: `openInterest.<symbol>`\n```\n{\n \"e\": \"openInterest\", // Event type\n \"E\": 1694687965941000, // Event time in microseconds\n \"s\": \"SOL_USDC_PERP\", // Symbol\n \"o\": \"100\", // Open interest in contracts\n}\n```\n\n## Trade\n\nContains public trade data for a single symbol. The trade ID is a\nsequential number specific to the symbol. This stream includes updates\nfor trades executed as a result of liquidations.\n\nStream name format: `trade.<symbol>`\n```\n{\n \"e\": \"trade\", // Event type\n \"E\": 1694688638091000, // Event time in microseconds\n \"s\": \"SOL_USDC\", // Symbol\n \"p\": \"18.68\", // Price\n \"q\": \"0.122\", // Quantity\n \"b\": \"111063114377265150\", // Buyer order ID\n \"a\": \"111063114585735170\", // Seller order ID\n \"t\": 12345, // Trade ID\n \"T\": 1694688638089000, // Engine timestamp in microseconds\n \"m\": true // Is the buyer the maker?\n}\n```"
},
{
"name": "System",
"description": "Exchange system status."
},
{
"name": "Trades",
"description": "Public trade data."
}
],
"paths": {
"/api/v1/account": {
"get": {
"tags": [
"Account"
],
"summary": "Get account.",
"description": "**Instruction:** `accountQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/AccountSummary"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_account"
},
"patch": {
"tags": [
"Account"
],
"summary": "Update account.",
"description": "Update account settings.\n\n**Instruction:** `accountUpdate`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/UpdateAccountSettingsRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "update_account_settings"
}
},
"/api/v1/account/convertDust": {
"post": {
"tags": [
"Account"
],
"summary": "Convert a dust balance on an account.",
"description": "Converts a dust balance to USDC. The balance (including lend) must be\nless than the minimum quantity tradable on the spot order book.\n\n**Instruction:** `convertDust`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/AccountConvertDustPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "convert_dust"
}
},
"/api/v1/account/limits/borrow": {
"get": {
"tags": [
"Account"
],
"summary": "Get max borrow quantity.",
"description": "Retrieves the maxmimum quantity an account can borrow\nfor a given asset based on the accounts existing exposure\nand margin requirements\n\n**Instruction:** `maxBorrowQuantity`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "The asset to borrow.",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/MaxBorrowQuantity"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "Service unavailable.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_max_borrow_quantity"
}
},
"/api/v1/account/limits/order": {
"get": {
"tags": [
"Account"
],
"summary": "Get max order quantity.",
"description": "Retrieves the maxmimum quantity an account can trade\nfor a given symbol based on the account's balances, existing exposure\nand margin requirements.\n\n**Instruction:** `maxOrderQuantity`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "The market symbol to trade.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "side",
"schema": {
"$ref": "#/components/schemas/Side"
},
"in": "query",
"description": "The side of the order.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "price",
"schema": {
"type": "string",
"format": "decimal"
},
"in": "query",
"description": "The limit price of the order. Not included for market orders.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "reduceOnly",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the order is reduce only.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "autoBorrow",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the order uses auto borrow.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "autoBorrowRepay",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the order uses auto borrow repay.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "autoLendRedeem",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the order uses auto lend redeem.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/MaxOrderQuantity"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_max_order_quantity"
}
},
"/api/v1/account/limits/withdrawal": {
"get": {
"tags": [
"Account"
],
"summary": "Get max withdrawal quantity.",
"description": "Retrieves the maxmimum quantity an account can withdraw\nfor a given asset based on the accounts existing exposure\nand margin requirements\nThe response will include the maximum quantity that can be withdrawn\nand whether the withdrawal is with auto borrow or auto lend redeem\nenabled.\n\n**Instruction:** `maxWithdrawalQuantity`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "The asset to withdraw.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "autoBorrow",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the withdrawal is with auto borrow.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "autoLendRedeem",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "Whether the withdrawal is with auto lend redeem.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/MaxWithdrawalQuantity"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_max_withdrawal_quantity"
}
},
"/api/v1/assets": {
"get": {
"tags": [
"Assets"
],
"summary": "Get assets.",
"description": "Get all supported assets.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketAsset"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_assets"
}
},
"/api/v1/collateral": {
"get": {
"tags": [
"Assets"
],
"summary": "Get collateral.",
"description": "Get collateral parameters for assets.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CollateralSummary"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_collateral_parameters"
}
},
"/api/v1/borrowLend/positions": {
"get": {
"tags": [
"Borrow Lend"
],
"summary": "Get borrow lend positions.",
"description": "Retrieves all the open borrow lending positions for the account.\n\n**Instruction:** `borrowLendPositionQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BorrowLendPositionWithMargin"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_positions"
}
},
"/api/v1/borrowLend": {
"post": {
"tags": [
"Borrow Lend"
],
"summary": "Execute borrow lend.",
"description": "**Instruction:** `borrowLendExecute`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/BorrowLendExecutePayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "execute_borrow_lend"
}
},
"/api/v1/borrowLend/position/liquidationPrice": {
"get": {
"tags": [
"Borrow Lend"
],
"summary": "Get an estimated liquidation price for potential borrow lend position.",
"description": "Retrieves the estimated liquidation price for a potential borrow lend\nposition.",
"parameters": [
{
"name": "subaccountId",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"description": "Optional subaccount.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "borrow",
"schema": {
"type": "string"
},
"in": "query",
"description": "Standard base64 encoded json of [`BorrowLendExecutePayload`]",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/PositionEstimatedLiquidationPrice"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_estimated_liquidation_price"
}
},
"/api/v1/borrowLend/markets": {
"get": {
"tags": [
"Borrow Lend Markets"
],
"summary": "Get borrow lend markets.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BorrowLendMarket"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_markets"
}
},
"/api/v1/borrowLend/markets/history": {
"get": {
"tags": [
"Borrow Lend Markets"
],
"summary": "Get borrow lend market history.",
"parameters": [
{
"name": "interval",
"schema": {
"$ref": "#/components/schemas/BorrowLendMarketHistoryInterval"
},
"in": "query",
"description": "Filter for an interval.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol to query. If not set, all markets are returned.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BorrowLendHistory"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_markets_history"
}
},
"/api/v1/capital": {
"get": {
"tags": [
"Capital"
],
"summary": "Get balances.",
"description": "Retrieves account balances and the state of the balances (locked or\navailable).\n\nLocked assets are those that are currently in an open order.\n\n**Instruction:** `balanceQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Balance"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_balances"
}
},
"/api/v1/capital/collateral": {
"get": {
"tags": [
"Capital"
],
"summary": "Get collateral.",
"description": "Retrieves collateral information for an account.\n\n**Instruction:** `collateralQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "subaccountId",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/MarginAccountSummary"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_collateral"
}
},
"/wapi/v1/capital/deposits": {
"get": {
"tags": [
"Capital"
],
"summary": "Get deposits.",
"description": "Retrieves deposit history.\n\n**Instruction:** `depositQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "from",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to minimum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "to",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to maximum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Deposit"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_deposits"
}
},
"/wapi/v1/capital/deposit/address": {
"get": {
"tags": [
"Capital"
],
"summary": "Get deposit address.",
"description": "Retrieves the user specific deposit address if the user were to deposit\non the specified blockchain.\n\n**Instruction:** `depositAddressQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "blockchain",
"schema": {
"$ref": "#/components/schemas/Blockchain"
},
"in": "query",
"description": "Blockchain symbol to get a deposit address for.",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/DepositAddress"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_deposit_address"
}
},
"/api/v1/markets": {
"get": {
"tags": [
"Markets"
],
"summary": "Get markets.",
"description": "Retrieves all the markets that are supported by the exchange.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Market"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_markets"
}
},
"/api/v1/market": {
"get": {
"tags": [
"Markets"
],
"summary": "Get market.",
"description": "Retrieves a market supported by the exchange.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Market"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_market"
}
},
"/api/v1/ticker": {
"get": {
"tags": [
"Markets"
],
"summary": "Get ticker.",
"description": "Retrieves summarised statistics for the last 24 hours for the given\nmarket symbol.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "interval",
"schema": {
"$ref": "#/components/schemas/TickerInterval"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Ticker"
}
}
}
},
"204": {
"description": "Not found."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_ticker"
}
},
"/api/v1/tickers": {
"get": {
"tags": [
"Markets"
],
"summary": "Get tickers.",
"description": "Retrieves summarised statistics for the last 24 hours for all market\nsymbols.",
"parameters": [
{
"name": "interval",
"schema": {
"$ref": "#/components/schemas/TickerInterval"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Ticker"
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_tickers"
}
},
"/api/v1/depth": {
"get": {
"tags": [
"Markets"
],
"summary": "Get depth.",
"description": "Retrieves the order book depth for a given market symbol.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Depth"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_depth"
}
},
"/api/v1/klines": {
"get": {
"tags": [
"Markets"
],
"summary": "Get K-lines.",
"description": "Get K-Lines for the given market symbol, optionally providing a\n`startTime` and `endTime`. If no `endTime` is provided, the current time\nwill be used.\n\nThe `priceType` parameter can be used to specify the price type of the\nkline. If not provided, the default is `LastPrice`.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol for the kline query, e.g. SOL_USDC.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "interval",
"schema": {
"$ref": "#/components/schemas/KlineInterval"
},
"in": "query",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "startTime",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "UTC timestamp in seconds.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "endTime",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "UTC timestamp in seconds. Set to the current time if not provided.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "priceType",
"schema": {
"$ref": "#/components/schemas/KlinePriceType"
},
"in": "query",
"description": "The price type of the K-line.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Kline"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_klines"
}
},
"/api/v1/markPrices": {
"get": {
"tags": [
"Markets"
],
"summary": "Get all mark prices.",
"description": "Retrieves mark price, index price and the funding rate for the current\ninterval for all symbols, or the symbol specified.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarkPrice"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_mark_prices"
}
},
"/api/v1/openInterest": {
"get": {
"tags": [
"Markets"
],
"summary": "Get open interest.",
"description": "Retrieves the current open interest for the given market.\nIf no market is provided, then all markets are returned.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OpenInterest"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_open_interest"
}
},
"/api/v1/fundingRates": {
"get": {
"tags": [
"Markets"
],
"summary": "Get funding interval rates.",
"description": "Funding interval rate history for futures.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol to query",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `10000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FundingIntervalRate"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_funding_interval_rates"
}
},
"/api/v1/order": {
"get": {
"tags": [
"Order"
],
"summary": "Get open order.",
"description": "Retrieves an open order from the order book. This only returns the order\nif it is resting on the order book (i.e. has not been completely filled,\nexpired, or cancelled).\n\nOne of `orderId` or `clientId` must be specified. If both are specified\nthen the request will be rejected.\n\n**Instruction:** `orderQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "clientId",
"schema": {
"type": "integer",
"format": "uint32"
},
"in": "query",
"description": "Client ID of the order.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "orderId",
"schema": {
"type": "string"
},
"in": "query",
"description": "ID of the order.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol for the order.",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderType"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"404": {
"description": "Order not found.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_order"
},
"post": {
"tags": [
"Order"
],
"summary": "Execute order.",
"description": "Submits an order to the matching engine for execution.\n\n**Instruction:** `orderExecute`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-BROKER-ID",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "header",
"description": "Broker ID of the order",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-Broker-Id",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "header",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderExecutePayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Order executed.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderType"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "execute_order"
},
"delete": {
"tags": [
"Order"
],
"summary": "Cancel open order.",
"description": "Cancels an open order from the order book.\n\nOne of `orderId` or `clientId` must be specified. If both are specified\nthen the request will be rejected.\n\n**Instruction:** `orderCancel`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderCancelPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Order cancelled.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderType"
}
}
}
},
"202": {
"description": "Request accepted but not yet executed."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "cancel_order"
}
},
"/api/v1/orders": {
"post": {
"tags": [
"Order"
],
"summary": "Execute orders.",
"description": "Submits a set of orders to the matching engine for execution in a batch.\n\n**Batch commands instruction:** `orderExecute`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-Broker-Id",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "header",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderExecutePayload"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Batch orders executed.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BatchCommandOrderResult"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "execute_order_batch"
},
"get": {
"tags": [
"Order"
],
"summary": "Get open orders.",
"description": "Retrieves all open orders. If a symbol is provided, only open orders for\nthat market will be returned, otherwise all open orders are\nreturned.\n\n**Instruction:** `orderQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "marketType",
"schema": {
"$ref": "#/components/schemas/MarketType"
},
"in": "query",
"description": "The market for the orders (SPOT or PERP).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "The symbol of the market for the orders.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderType"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_open_orders"
},
"delete": {
"tags": [
"Order"
],
"summary": "Cancel open orders.",
"description": "Cancels all open orders on the specified market.\n\n**Instruction:** `orderCancelAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/OrderCancelAllPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderType"
}
}
}
}
},
"202": {
"description": "Request accepted but not yet executed."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "cancel_open_orders"
}
},
"/api/v1/position": {
"get": {
"tags": [
"Futures"
],
"summary": "Get open positions.",
"description": "Retrieves account position summary.\n\n**Instruction:** `positionQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter for a single position by symbol.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FuturePositionWithMargin"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"404": {
"description": "Position not found.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_positions"
}
},
"/api/v1/rfq": {
"post": {
"tags": [
"Request For Quote"
],
"summary": "Submit RFQ.",
"description": "Submit a Request for Quote (RFQ). The RFQ will be available for\na specified time window for makers to respond to.\n\n**Instruction:** `rfqSubmit`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuotePayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Accepted.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuote"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "submit_rfq"
}
},
"/api/v1/rfq/accept": {
"post": {
"tags": [
"Request For Quote"
],
"summary": "Accept quote.",
"description": "Accept a specific quote from a maker in response to an RFQ.\n\n**Instruction:** `quoteAccept`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/QuoteAcceptPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Accepted.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuote"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "accept_quote"
}
},
"/api/v1/rfq/refresh": {
"post": {
"tags": [
"Request For Quote"
],
"summary": "Refresh RFQ.",
"description": "Refresh a RFQ, extending the time window it is available for.\n\n**Instruction:** `rfqRefresh`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuoteRefreshPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Accepted.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuote"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "refresh_rfq"
}
},
"/api/v1/rfq/cancel": {
"post": {
"tags": [
"Request For Quote"
],
"summary": "Cancel RFQ.",
"description": "**Instruction:** `rfqCancel`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuoteCancelPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Accepted.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RequestForQuote"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "cancel_rfq"
}
},
"/api/v1/rfq/quote": {
"post": {
"tags": [
"Request For Quote"
],
"summary": "Submit quote.",
"description": "Submit a quote in response to an RFQ. If valid, the quote may be\naccepted within the specified time window.\n\n**Instruction:** `quoteSubmit`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/QuotePayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Accepted.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Quote"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "submit_quote"
}
},
"/api/v1/strategy": {
"get": {
"tags": [
"Strategy"
],
"summary": "Get open strategy.",
"description": "Retrieves an open strategy from the engine. This only returns the\nstrategy if it is active (i.e. has not been completely filled,\ncancelled by the user, or cancelled by the system).\n\nOne of `strategyId` or `clientStrategyId` must be specified.\n\n**Instruction:** `strategyQuery`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "clientStrategyId",
"schema": {
"type": "integer",
"format": "uint32"
},
"in": "query",
"description": "Client ID of the strategy.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "strategyId",
"schema": {
"type": "string"
},
"in": "query",
"description": "ID of the strategy.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol for the strategy.",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyType"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"404": {
"description": "Strategy not found.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_strategy"
},
"post": {
"tags": [
"Strategy"
],
"summary": "Create strategy.",
"description": "Submits a strategy to the engine for processing.\n\n**Instruction:** `strategyCreate`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-Broker-Id",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "header",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyCreatePayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Strategy created.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyType"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "strategy_create"
},
"delete": {
"tags": [
"Strategy"
],
"summary": "Cancel open strategy.",
"description": "Cancels an open strategy currently being run.\n\nOne of `strategyId` or `clientStrategyId` must be specified.\n\n**Instruction:** `strategyCancel`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyCancelPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Strategy cancelled.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyType"
}
}
}
},
"202": {
"description": "Request accepted but not yet executed."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "cancel_strategy"
}
},
"/api/v1/strategies": {
"get": {
"tags": [
"Strategy"
],
"summary": "Get open strategies.",
"description": "Retrieves all open strategies. If a symbol is provided, only open\nstrategies for that market will be returned, otherwise all open\nstrategies are returned.\n\n**Instruction:** `strategyQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "marketType",
"schema": {
"$ref": "#/components/schemas/MarketType"
},
"in": "query",
"description": "The market for the strategies (SPOT or PERP).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "strategyType",
"schema": {
"$ref": "#/components/schemas/StrategyTypeEnum"
},
"in": "query",
"description": "The strategy type.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "The symbol of the market for the strategies.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StrategyType"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_open_strategies"
},
"delete": {
"tags": [
"Strategy"
],
"summary": "Cancel open strategies.",
"description": "Cancels all open strategies on the specified market.\n\n**Instruction:** `strategyCancelAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StrategyCancelAllPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StrategyType"
}
}
}
}
},
"202": {
"description": "Request accepted but not yet executed."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "cancel_open_strategies"
}
},
"/api/v1/status": {
"get": {
"tags": [
"System"
],
"summary": "Status.",
"description": "Get the system status, and the status message, if any.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/StatusAndMessage"
}
}
}
}
},
"operationId": "get_status"
}
},
"/api/v1/ping": {
"get": {
"tags": [
"System"
],
"summary": "Ping.",
"description": "Responds with `pong`.",
"responses": {
"200": {
"description": "",
"content": {
"text/plain; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"operationId": "ping"
}
},
"/api/v1/time": {
"get": {
"tags": [
"System"
],
"summary": "Get system time.",
"description": "Retrieves the current system time.",
"responses": {
"200": {
"description": "",
"content": {
"text/plain; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"operationId": "get_time"
}
},
"/api/v1/trades": {
"get": {
"tags": [
"Trades"
],
"summary": "Get recent trades.",
"description": "Retrieve the most recent trades for a symbol. This is public data and\nis not specific to any account.\n\nThe maximum available recent trades is `1000`. If you need more than\n`1000` trades use the historical trades endpoint.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol to query fills for.",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"description": "Limit the number of fills returned. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trade"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_recent_trades"
}
},
"/api/v1/trades/history": {
"get": {
"tags": [
"Trades"
],
"summary": "Get historical trades.",
"description": "Retrieves all historical trades for the given symbol. This is public\ntrade data and is not specific to any account.",
"parameters": [
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Limit the number of trades returned. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trade"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_historical_trades"
}
},
"/api/v1/wallets": {
"get": {
"tags": [
"System"
],
"summary": "Get wallets.",
"description": "Returns all configured blockchain wallets and their addresses.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WalletResponse"
}
}
}
}
}
},
"operationId": "get_wallets"
}
},
"/wapi/v1/capital/withdrawals": {
"get": {
"tags": [
"Capital"
],
"summary": "Get withdrawals.",
"description": "Retrieves withdrawal history.\n\n**Instruction:** `withdrawalQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "from",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to minimum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "to",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to maximum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Withdrawal"
}
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_withdrawals"
},
"post": {
"tags": [
"Capital"
],
"summary": "Request withdrawal.",
"description": "Requests a withdrawal from the exchange.\n\nThe `twoFactorToken` field is required if the withdrawal address is not\nan address that is configured in the address book to not require\n2FA. These addresses can be configured [here](https://backpack.exchange/settings/withdrawal-addresses?twoFactorWithdrawalAddress=true).\n\n**Instruction:** `withdraw`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/AccountWithdrawalPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Withdrawal"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"429": {
"description": "Too many requests.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"503": {
"description": "System under maintenance.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "request_withdrawal"
}
},
"/wapi/v1/capital/withdrawals/delay": {
"get": {
"summary": "Get withdrawal delay.",
"description": "A configurable hourly delay can be applied to withdrawals to non\nwhitelisted addresses.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/WithdrawalDelay"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"404": {
"description": ""
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_withdrawal_delay"
},
"post": {
"summary": "Create withdrawal delay.",
"description": "A configurable hourly delay can be applied to withdrawals to non\nwhitelisted addresses.",
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/CreateWithdrawalDelayRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success."
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"409": {
"description": "Withdrawal delay already exists.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "create_withdrawal_delay"
},
"patch": {
"summary": "Update the withdrawal delay.",
"description": "A configurable hourly delay can be applied to withdrawals to non\nwhitelisted addresses.\n\nUpdates are only applied after the current delay ends.",
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/UpdateWithdrawalDelayRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/WithdrawalDelay"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"404": {
"description": ""
},
"500": {
"description": "Internal Server Error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "update_withdrawal_delay"
}
},
"/wapi/v1/history/borrowLend": {
"get": {
"tags": [
"History"
],
"summary": "Get borrow history.",
"description": "History of borrow and lend operations for the account.\n\n**Instruction:** `borrowHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "type",
"schema": {
"$ref": "#/components/schemas/BorrowLendEventType"
},
"in": "query",
"description": "Filter to history for either borrows or lends.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sources",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to return history for a particular source. Can be a single\nsource, or multiple sources separated by commas.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "positionId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to return history for a borrow lend position.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BorrowLendMovement"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_history"
}
},
"/wapi/v1/history/interest": {
"get": {
"tags": [
"History"
],
"summary": "Get interest history.",
"description": "History of the interest payments for borrows and lends for the account.\n\n**Instruction:** `interestHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "asset",
"schema": {
"type": "string"
},
"in": "query",
"description": "Asset to query. If not set, all assets are returned.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol to query. If not set, all markets are returned. If a\nfutures symbol is supplied, then interest payments on unrealized pnl\nwill be returned. Spot market symbols refer to interest payments on\nregular borrow lend positions.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "positionId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to return history for a borrow lend position.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "source",
"schema": {
"$ref": "#/components/schemas/InterestPaymentSource"
},
"in": "query",
"description": "Filter to return interest payments of a particular source. Borrow\ninterest payments through two mechanisms: borrow lend\npositions; interest paid on unrealized pnl.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InterestPayment"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_interest_history"
}
},
"/wapi/v1/history/borrowLend/positions": {
"get": {
"tags": [
"History"
],
"summary": "Get borrow position history.",
"description": "History of borrow and lend positions for the account.\n\n**Instruction:** `borrowPositionHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "side",
"schema": {
"$ref": "#/components/schemas/BorrowLendSide"
},
"in": "query",
"description": "Return only borrows or only lends.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "state",
"schema": {
"$ref": "#/components/schemas/BorrowLendPositionState"
},
"in": "query",
"description": "Return only open positions or closed positions.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BorrowLendPositionRow"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_borrow_lend_position_history"
}
},
"/wapi/v1/history/dust": {
"get": {
"tags": [
"History"
],
"summary": "Get dust conversion history.",
"description": "Retrieves the dust conversion history for the user.\n\n**Instruction:** `dustHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to a given dust conversion id.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DustConversion"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_dust_history"
}
},
"/wapi/v1/history/fills": {
"get": {
"tags": [
"History"
],
"summary": "Get fill history.",
"description": "Retrieves historical fills, with optional filtering for a specific order\nor symbol.\n\n**Instruction:** `fillHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "orderId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given order.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "strategyId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given strategy.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "from",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to minimum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "to",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "query",
"description": "Filter to maximum time (milliseconds).",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "fillType",
"schema": {
"$ref": "#/components/schemas/FillType"
},
"in": "query",
"description": "Filter to return fills for different fill types",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "marketType",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketType"
}
},
"in": "query",
"description": "Market type.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderFill"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_fills"
}
},
"/wapi/v1/history/funding": {
"get": {
"tags": [
"History"
],
"summary": "Get funding payments.",
"description": "Users funding payment history for futures.\n\n**Instruction:** `fundingHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "subaccountId",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"description": "Filter for a subaccount.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Market symbol to query. If not set, all markets are returned.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FundingPayment"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_funding_payments"
}
},
"/wapi/v1/history/orders": {
"get": {
"tags": [
"History"
],
"summary": "Get order history.",
"description": "Retrieves the order history for the user. This includes orders that have\nbeen filled and are no longer on the book. It may include orders\nthat are on the book, but the `/orders` endpoint contains more up to\ndate data.\n\n**Instruction:** `orderHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "orderId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given order.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "strategyId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given strategy.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "marketType",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketType"
}
},
"in": "query",
"description": "Market type.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_order_history"
}
},
"/wapi/v1/history/rfq": {
"get": {
"tags": [
"History"
],
"summary": "Get rfq history.",
"description": "Retrieves the rfq history for the user. This includes RFQs that have\nbeen filled or expired.\n\n**Instruction:** `rfqHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "rfqId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given rfq.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "status",
"schema": {
"$ref": "#/components/schemas/OrderStatus"
},
"in": "query",
"description": "Filter to the given status.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "side",
"schema": {
"$ref": "#/components/schemas/Side"
},
"in": "query",
"description": "Filter to the given side.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RequestForQuoteHistorical"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_rfq_history"
}
},
"/wapi/v1/history/quote": {
"get": {
"tags": [
"History"
],
"summary": "Get quote history.",
"description": "Retrieves the quote history for the user. This includes quotes that have\nbeen filled or expired.\n\n**Instruction:** `quoteHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "quoteId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given quote.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "status",
"schema": {
"$ref": "#/components/schemas/OrderStatus"
},
"in": "query",
"description": "Filter to the given status.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QuoteHistorical"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_quote_history"
}
},
"/wapi/v1/history/settlement": {
"get": {
"tags": [
"History"
],
"summary": "Get settlement history.",
"description": "History of settlement operations for the account.\n\n**Instruction:** `settlementHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset for pagination. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "source",
"schema": {
"$ref": "#/components/schemas/SettlementSourceFilter"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Settlement"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_settlement_history"
}
},
"/wapi/v1/history/strategies": {
"get": {
"tags": [
"History"
],
"summary": "Get strategy history.",
"description": "Retrieves the strategy history for the user. This returns strategies\nthat are no longer active as they have either been\ncompleted, cancelled by the user or cancelled by the system.\n\n**Instruction:** `strategyHistoryQueryAll`",
"parameters": [
{
"name": "X-API-KEY",
"schema": {
"type": "string"
},
"in": "header",
"description": "API key",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-SIGNATURE",
"schema": {
"type": "string"
},
"in": "header",
"description": "Signature of the request",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-TIMESTAMP",
"schema": {
"type": "integer",
"format": "int64"
},
"in": "header",
"description": "Timestamp of the request in milliseconds",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "X-WINDOW",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "header",
"description": "Time the request is valid for in milliseconds (default `5000`, maximum `60000`)",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "strategyId",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given strategy.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "symbol",
"schema": {
"type": "string"
},
"in": "query",
"description": "Filter to the given symbol.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Maximum number to return. Default `100`, maximum `1000`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"description": "Offset. Default `0`.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "marketType",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketType"
}
},
"in": "query",
"description": "Market type.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "sortDirection",
"schema": {
"$ref": "#/components/schemas/SortDirection"
},
"in": "query",
"description": "Sort direction.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Strategy"
}
}
}
},
"headers": {
"ACCESS-CONTROL-EXPOSE-HEADERS": {
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
"X-PAGE-COUNT": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-CURRENT-PAGE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-PAGE-SIZE": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
},
"X-TOTAL": {
"required": true,
"deprecated": false,
"schema": {
"type": "integer",
"format": "uint64"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ApiErrorResponse"
}
}
}
}
},
"operationId": "get_strategies_history"
}
}
},
"components": {
"schemas": {
"AccountConvertDustPayload": {
"type": "object",
"title": "AccountConvertDustPayload",
"properties": {
"symbol": {
"description": "The asset symbol to convert dust for.\nIf omitted, all dust balances will be converted.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "The asset symbol to convert dust for.\nIf omitted, all dust balances will be converted."
}
]
}
}
},
"AccountSummary": {
"type": "object",
"title": "AccountSummary",
"required": [
"autoBorrowSettlements",
"autoLend",
"autoRealizePnl",
"autoRepayBorrows",
"borrowLimit",
"futuresMakerFee",
"futuresTakerFee",
"leverageLimit",
"limitOrders",
"liquidating",
"positionLimit",
"spotMakerFee",
"spotTakerFee",
"triggerOrders"
],
"properties": {
"autoBorrowSettlements": {
"type": "boolean",
"description": "If true, then tries to borrow during collateral reconciliation."
},
"autoLend": {
"type": "boolean",
"description": "If true, then tries to automatically lend with available balance."
},
"autoRealizePnl": {
"type": "boolean",
"description": "Determines if the account should have continuous PnL realization."
},
"autoRepayBorrows": {
"type": "boolean",
"description": "If true, then tries to automatically repay borrows with available\nbalance."
},
"borrowLimit": {
"type": "string",
"format": "decimal",
"description": "Borrow limit."
},
"futuresMakerFee": {
"type": "string",
"format": "decimal",
"description": "Futures maker fee in basis points. Negative if a rebate exists."
},
"futuresTakerFee": {
"type": "string",
"format": "decimal",
"description": "Futures taker fee in basis points."
},
"leverageLimit": {
"type": "string",
"format": "decimal",
"description": "Leverage limit of the account."
},
"limitOrders": {
"type": "integer",
"format": "uint64",
"description": "Number of open limit orders."
},
"liquidating": {
"type": "boolean",
"description": "Whether the account is liquidating."
},
"positionLimit": {
"type": "string",
"format": "decimal",
"description": "Position limit."
},
"spotMakerFee": {
"type": "string",
"format": "decimal",
"description": "Spot maker fee in basis points. Negative if a rebate exists."
},
"spotTakerFee": {
"type": "string",
"format": "decimal",
"description": "Spot taker fee in basis points."
},
"triggerOrders": {
"type": "integer",
"format": "uint64",
"description": "Number of open trigger orders."
}
}
},
"AccountWithdrawalPayload": {
"type": "object",
"title": "AccountWithdrawalPayload",
"required": [
"address",
"blockchain",
"quantity",
"symbol"
],
"properties": {
"address": {
"type": "string",
"description": "Address to withdraw to."
},
"blockchain": {
"description": "Blockchain to withdraw on.",
"allOf": [
{
"$ref": "#/components/schemas/Blockchain"
},
{
"description": "Blockchain to withdraw on."
}
]
},
"clientId": {
"type": "string",
"description": "Custom client id.",
"maxLength": 255
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to withdraw."
},
"symbol": {
"description": "Symbol of the asset to withdraw.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Symbol of the asset to withdraw."
}
]
},
"twoFactorToken": {
"type": "string",
"description": "Issued two factor token."
},
"autoBorrow": {
"type": "boolean",
"description": "Auto borrow to withdraw if required."
},
"autoLendRedeem": {
"type": "boolean",
"description": "Auto redeem a lend if required."
}
}
},
"ApiErrorCode": {
"type": "string",
"enum": [
"ACCOUNT_LIQUIDATING",
"BORROW_LIMIT",
"BORROW_REQUIRES_LEND_REDEEM",
"FORBIDDEN",
"INSUFFICIENT_FUNDS",
"INSUFFICIENT_MARGIN",
"INSUFFICIENT_SUPPLY",
"INVALID_ASSET",
"INVALID_CLIENT_REQUEST",
"INVALID_MARKET",
"INVALID_ORDER",
"INVALID_PRICE",
"INVALID_POSITION_ID",
"INVALID_QUANTITY",
"INVALID_RANGE",
"INVALID_SIGNATURE",
"INVALID_SOURCE",
"INVALID_SYMBOL",
"INVALID_TWO_FACTOR_CODE",
"LEND_LIMIT",
"LEND_REQUIRES_BORROW_REPAY",
"MAINTENANCE",
"MAX_LEVERAGE_REACHED",
"NOT_IMPLEMENTED",
"ORDER_LIMIT",
"POSITION_LIMIT",
"PRECONDITION_FAILED",
"RESOURCE_NOT_FOUND",
"SERVER_ERROR",
"TIMEOUT",
"TOO_MANY_REQUESTS",
"TRADING_PAUSED",
"UNAUTHORIZED"
]
},
"ApiErrorResponse": {
"type": "object",
"title": "ApiErrorResponse",
"required": [
"code",
"message"
],
"properties": {
"code": {
"$ref": "#/components/schemas/ApiErrorCode"
},
"message": {
"type": "string"
}
}
},
"Asset": {
"type": "string",
"enum": [
"BTC",
"ETH",
"SOL",
"USDC",
"USDT",
"PYTH",
"JTO",
"BONK",
"HNT",
"MOBILE",
"WIF",
"JUP",
"RENDER",
"WEN",
"W",
"TNSR",
"PRCL",
"SHARK",
"KMNO",
"MEW",
"BOME",
"RAY",
"HONEY",
"SHFL",
"BODEN",
"IO",
"DRIFT",
"PEPE",
"SHIB",
"LINK",
"UNI",
"ONDO",
"FTM",
"MATIC",
"STRK",
"BLUR",
"WLD",
"GALA",
"NYAN",
"HLG",
"MON",
"ZKJ",
"MANEKI",
"HABIBI",
"UNA",
"ZRO",
"ZEX",
"AAVE",
"LDO",
"MOTHER",
"CLOUD",
"MAX",
"POL",
"TRUMPWIN",
"HARRISWIN",
"MOODENG",
"DBR",
"GOAT",
"ACT",
"DOGE",
"BCH",
"LTC",
"APE",
"ENA",
"ME",
"EIGEN",
"CHILLGUY",
"PENGU",
"EUR",
"SONIC",
"J",
"TRUMP",
"MELANIA",
"ANIME",
"XRP",
"SUI",
"VINE",
"ADA",
"MOVE",
"BERA",
"IP",
"HYPE",
"BNB",
"KAITO",
"kPEPE",
"kBONK",
"kSHIB",
"AVAX",
"S",
"POINTS",
"ROAM",
"AI16Z",
"LAYER",
"FARTCOIN",
"NEAR",
"PNUT",
"ARB",
"DOT",
"APT",
"OP",
"PYUSD",
"HUMA",
"WAL",
"DEEP",
"CETUS",
"SEND",
"BLUE",
"NS",
"HAEDAL",
"JPY",
"TAO",
"VIRTUAL",
"TIA",
"TRX",
"FRAG",
"PUMP",
"WCT",
"ES",
"SEI",
"CRV",
"TON",
"HBAR",
"XLM",
"ZORA",
"WLFI",
"BPEUR",
"SWTCH",
"LINEA",
"XPL",
"BARD",
"FLOCK",
"AVNT",
"PENDLE",
"AERO",
"ASTER",
"GLXY",
"0G",
"2Z",
"FORD",
"ZEUS",
"APEX",
"EDEN",
"FF",
"ORDER",
"MNT",
"ZEC",
"PAXG",
"MORPHO",
"ATH",
"KGEN",
"XAUT",
"FOGO",
"SPX",
"ETHFI",
"APR",
"PIPE",
"MET"
]
},
"Balance": {
"type": "object",
"title": "Balance",
"required": [
"available",
"locked",
"staked"
],
"properties": {
"available": {
"type": "string",
"format": "decimal",
"description": "Funds available for use."
},
"locked": {
"type": "string",
"format": "decimal",
"description": "Funds that are locked because they are in an order that has not been\nexecuted."
},
"staked": {
"type": "string",
"format": "decimal",
"description": "Funds that are staked."
}
}
},
"BatchCommandOrderResult": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/BatchCommandOrderResult_OrderType"
},
{
"$ref": "#/components/schemas/BatchCommandOrderResult_ApiErrorResponse"
}
],
"discriminator": {
"propertyName": "operation",
"mapping": {
"Ok": "#/components/schemas/BatchCommandOrderResult_OrderType",
"Err": "#/components/schemas/BatchCommandOrderResult_ApiErrorResponse"
}
}
},
"BatchCommandOrderResult_ApiErrorResponse": {
"allOf": [
{
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "string",
"enum": [
"Err"
],
"example": "Err"
}
}
},
{
"$ref": "#/components/schemas/ApiErrorResponse"
}
]
},
"BatchCommandOrderResult_OrderType": {
"allOf": [
{
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "string",
"enum": [
"Ok"
],
"example": "Ok"
}
}
},
{
"$ref": "#/components/schemas/OrderType"
}
]
},
"Blockchain": {
"type": "string",
"enum": [
"0G",
"Aptos",
"Arbitrum",
"Avalanche",
"Base",
"Berachain",
"Bitcoin",
"BitcoinCash",
"Bsc",
"Cardano",
"Dogecoin",
"Eclipse",
"EqualsMoney",
"Ethereum",
"HyperEVM",
"Hyperliquid",
"Linea",
"Litecoin",
"Optimism",
"Plasma",
"Polygon",
"Sei",
"Sui",
"Solana",
"Story",
"Tron",
"XRP",
"Zcash"
]
},
"BorrowLendBookState": {
"type": "string",
"description": "Borrow lend book state",
"enum": [
"Open",
"Closed",
"RepayOnly"
]
},
"BorrowLendEventType": {
"type": "string",
"enum": [
"Borrow",
"BorrowRepay",
"Lend",
"LendRedeem"
]
},
"BorrowLendExecutePayload": {
"type": "object",
"title": "BorrowLendExecutePayload",
"required": [
"quantity",
"side",
"symbol"
],
"properties": {
"quantity": {
"type": "string",
"format": "decimal",
"description": "The quantity of the asset to repay."
},
"side": {
"description": "Side of the borrow lend.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendSide"
},
{
"description": "Side of the borrow lend."
}
]
},
"symbol": {
"description": "The asset to repay.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "The asset to repay."
}
]
}
}
},
"BorrowLendHistory": {
"type": "object",
"title": "BorrowLendHistory",
"required": [
"borrowInterestRate",
"borrowedQuantity",
"lendInterestRate",
"lentQuantity",
"timestamp",
"utilization"
],
"properties": {
"borrowInterestRate": {
"type": "string",
"format": "decimal",
"description": "The rate borrowers pay."
},
"borrowedQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount of assets borrowed from the pool."
},
"lendInterestRate": {
"type": "string",
"format": "decimal",
"description": "The APY rate lenders receive."
},
"lentQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount of assets lent to the pool."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the summary."
},
"utilization": {
"type": "string",
"format": "decimal",
"description": "Utilisation."
}
}
},
"BorrowLendMarket": {
"type": "object",
"title": "BorrowLendMarket",
"description": "Borrow Lending market summary.",
"required": [
"state",
"assetMarkPrice",
"borrowInterestRate",
"borrowedQuantity",
"fee",
"lendInterestRate",
"lentQuantity",
"maxUtilization",
"openBorrowLendLimit",
"optimalUtilization",
"symbol",
"timestamp",
"throttleUtilizationThreshold",
"throttleUtilizationBound",
"throttleUpdateFraction",
"utilization",
"stepSize"
],
"properties": {
"state": {
"description": "State of the borrow lend market.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendBookState"
},
{
"description": "State of the borrow lend market."
}
]
},
"assetMarkPrice": {
"type": "string",
"format": "decimal",
"description": "Mark price of spot instrument."
},
"borrowInterestRate": {
"type": "string",
"format": "decimal",
"description": "The rate borrowers pay."
},
"borrowedQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount of assets borrowed from the pool."
},
"fee": {
"type": "string",
"format": "decimal",
"description": "The fee that the exchange takes on borrow lend yield."
},
"lendInterestRate": {
"type": "string",
"format": "decimal",
"description": "The APY rate lenders receive."
},
"lentQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount of assets lent to the pool."
},
"maxUtilization": {
"type": "string",
"format": "decimal",
"description": "The max amount of utilization that can be used by borrowing or redeeming\nlend, irrespsective of the throttle."
},
"openBorrowLendLimit": {
"type": "string",
"format": "decimal",
"description": "Can't increase borrows or lends pass this threshold. It's possible\nthis is less than the outstanding amount. If that's the case, then\nit simply prevents new borrow or lends from being created."
},
"optimalUtilization": {
"type": "string",
"format": "decimal",
"description": "The optimal utilization rate for the interest rate model."
},
"symbol": {
"description": "Uniquely identifies the token.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Uniquely identifies the token."
}
]
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the summary."
},
"throttleUtilizationThreshold": {
"type": "string",
"format": "decimal",
"description": "The threshold that triggers borrow throttling."
},
"throttleUtilizationBound": {
"type": "string",
"format": "decimal",
"description": "The max utilization threshold for any given timestep. Any borrow\nor lend redemption should fail if it puts utilization above this\n(with the exception of liquidations)."
},
"throttleUpdateFraction": {
"type": "string",
"format": "decimal",
"description": "Hyper-param determining the max utilization can increase during any\ntimestep."
},
"utilization": {
"type": "string",
"format": "decimal",
"description": "Utilisation."
},
"stepSize": {
"type": "string",
"format": "decimal",
"description": "Step Size."
}
}
},
"BorrowLendMarketHistoryInterval": {
"type": "string",
"enum": [
"1d",
"1w",
"1month",
"1year"
]
},
"BorrowLendMovement": {
"type": "object",
"title": "BorrowLendMovement",
"required": [
"eventType",
"positionId",
"quantity",
"source",
"symbol",
"timestamp"
],
"properties": {
"eventType": {
"description": "Type of event.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendEventType"
},
{
"description": "Type of event."
}
]
},
"positionId": {
"type": "string",
"description": "ID of the borrow lend position the event is associated with."
},
"positionQuantity": {
"type": "string",
"format": "decimal",
"description": "Running total quantity of borrow lend position."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the borrow lend event."
},
"source": {
"description": "Source of the borrow lend event.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendSource"
},
{
"description": "Source of the borrow lend event."
}
]
},
"symbol": {
"type": "string",
"description": "Symbol of the asset the borrow lend is for."
},
"timestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The timestamp of the borrow lend event (UTC)."
},
"spotMarginOrderId": {
"type": "string",
"description": "The order id associated with the borrow lend event created through spot\nmargin."
}
}
},
"BorrowLendPositionRow": {
"type": "object",
"title": "BorrowLendPositionRow",
"required": [
"positionId",
"quantity",
"symbol",
"source",
"cumulativeInterest",
"avgInterestRate",
"side",
"createdAt"
],
"properties": {
"positionId": {
"type": "string",
"description": "ID of the borrow lend position the event is associated with."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the borrow lend event."
},
"symbol": {
"type": "string",
"description": "Symbol of the asset the borrow lend is for."
},
"source": {
"description": "Initial source of position.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendSource"
},
{
"description": "Initial source of position."
}
]
},
"cumulativeInterest": {
"type": "string",
"format": "decimal",
"description": "Cumulative interest payments quantity."
},
"avgInterestRate": {
"type": "string",
"format": "decimal",
"description": "Average interest rate over the time this position was open."
},
"side": {
"description": "Borrow or lend.",
"allOf": [
{
"$ref": "#/components/schemas/BorrowLendSide"
},
{
"description": "Borrow or lend."
}
]
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "The timestamp the borrow lend event was created at (UTC)."
}
}
},
"BorrowLendPositionState": {
"type": "string",
"enum": [
"Open",
"Closed"
]
},
"BorrowLendPositionWithMargin": {
"type": "object",
"title": "BorrowLendPositionWithMargin",
"required": [
"cumulativeInterest",
"id",
"imf",
"imfFunction",
"netQuantity",
"markPrice",
"mmf",
"mmfFunction",
"netExposureQuantity",
"netExposureNotional",
"symbol"
],
"properties": {
"cumulativeInterest": {
"type": "string",
"format": "decimal",
"description": "Cumulative interest payments quantity."
},
"id": {
"type": "string",
"description": "Uniquely identifies the position."
},
"imf": {
"type": "string",
"format": "decimal",
"description": "Initial margin fraction for this position."
},
"imfFunction": {
"description": "IMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "IMF function."
}
]
},
"netQuantity": {
"type": "string",
"format": "decimal",
"description": "Net quantity of the position, positive if long, negative if short."
},
"markPrice": {
"type": "string",
"format": "decimal",
"description": "Mark price of the underlying asset."
},
"mmf": {
"type": "string",
"format": "decimal",
"description": "Maintenance margin fraction for this position."
},
"mmfFunction": {
"description": "MMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "MMF function."
}
]
},
"netExposureQuantity": {
"type": "string",
"format": "decimal",
"description": "Net exposure of the position, positive if long, negative if short. Lends\nhave no exposure."
},
"netExposureNotional": {
"type": "string",
"format": "decimal",
"description": "Notional value of the position."
},
"symbol": {
"description": "Symbol of the underlying asset.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Symbol of the underlying asset."
}
]
}
}
},
"BorrowLendSide": {
"type": "string",
"enum": [
"Borrow",
"Lend"
]
},
"BorrowLendSource": {
"type": "string",
"enum": [
"AdlProvider",
"AutoBorrowRepay",
"AutoLend",
"BackstopProvider",
"DustConversion",
"Interest",
"Liquidation",
"LiquidationAdl",
"LiquidationBackstop",
"Manual",
"Reconciliation",
"SpotMargin",
"Withdrawal"
]
},
"CancelOrderTypeEnum": {
"type": "string",
"enum": [
"RestingLimitOrder",
"ConditionalOrder"
]
},
"Collateral": {
"type": "object",
"title": "Collateral",
"required": [
"symbol",
"assetMarkPrice",
"totalQuantity",
"balanceNotional",
"collateralWeight",
"collateralValue",
"openOrderQuantity",
"lendQuantity",
"availableQuantity"
],
"properties": {
"symbol": {
"type": "string",
"description": "Spot asset of the collateral."
},
"assetMarkPrice": {
"type": "string",
"format": "decimal",
"description": "Mark price of spot instrument"
},
"totalQuantity": {
"type": "string",
"format": "decimal",
"description": "Pre haircut quantity of the asset."
},
"balanceNotional": {
"type": "string",
"format": "decimal",
"description": "Balance of spot instrument in USDC.\nThis is calculated as `index_price * balance`."
},
"collateralWeight": {
"type": "string",
"format": "decimal",
"description": "Collateral weight of spot instrument, applied as a haircut."
},
"collateralValue": {
"type": "string",
"format": "decimal",
"description": "Collateral Value (or adjusted equity).\nThis is calculated as `index_price * balance * collateral_weight`."
},
"openOrderQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount added to collateral from open orders."
},
"lendQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount added to collateral from lending."
},
"availableQuantity": {
"type": "string",
"format": "decimal",
"description": "The amount of freely available assets."
}
}
},
"CollateralFunction": {
"type": "object",
"title": "CollateralFunction",
"required": [
"weight",
"kind"
],
"properties": {
"weight": {
"type": "string",
"format": "decimal"
},
"kind": {
"$ref": "#/components/schemas/CollateralFunctionKind"
}
}
},
"CollateralFunctionKind": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/CollateralFunctionKind_IdentityFunction"
},
{
"$ref": "#/components/schemas/CollateralFunctionKind_InverseSqrtFunction"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"identity": "#/components/schemas/CollateralFunctionKind_IdentityFunction",
"inverseSqrt": "#/components/schemas/CollateralFunctionKind_InverseSqrtFunction"
}
}
},
"CollateralFunctionKind_IdentityFunction": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"identity"
],
"example": "identity"
}
}
},
{
"$ref": "#/components/schemas/IdentityFunction"
}
]
},
"CollateralFunctionKind_InverseSqrtFunction": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"inverseSqrt"
],
"example": "inverseSqrt"
}
}
},
{
"$ref": "#/components/schemas/InverseSqrtFunction"
}
]
},
"CollateralSummary": {
"type": "object",
"title": "CollateralSummary",
"required": [
"symbol",
"imfFunction",
"mmfFunction",
"haircutFunction"
],
"properties": {
"symbol": {
"type": "string",
"description": "Symbol of the collateral."
},
"imfFunction": {
"description": "IMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "IMF function."
}
]
},
"mmfFunction": {
"description": "MMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "MMF function."
}
]
},
"haircutFunction": {
"description": "Calculates the haircut for collateral value.",
"allOf": [
{
"$ref": "#/components/schemas/CollateralFunction"
},
{
"description": "Calculates the haircut for collateral value."
}
]
}
}
},
"CreateWithdrawalDelayRequest": {
"type": "object",
"title": "CreateWithdrawalDelayRequest",
"required": [
"withdrawalDelayHours",
"twoFactorToken"
],
"properties": {
"withdrawalDelayHours": {
"type": "integer",
"format": "uint32",
"description": "The delay applied to withdrawals being processed, in hours."
},
"twoFactorToken": {
"type": "string",
"description": "Issued two factor token."
}
}
},
"Deposit": {
"type": "object",
"title": "Deposit",
"required": [
"id",
"source",
"status",
"symbol",
"quantity",
"createdAt"
],
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Unique id of the deposit."
},
"toAddress": {
"type": "string",
"description": "Deposit address."
},
"fromAddress": {
"type": "string",
"description": "Source address."
},
"source": {
"description": "Source of the deposit, blockchain or a payment processor.",
"allOf": [
{
"$ref": "#/components/schemas/DepositSource"
},
{
"description": "Source of the deposit, blockchain or a payment processor."
}
]
},
"status": {
"description": "Status of the deposit.",
"allOf": [
{
"$ref": "#/components/schemas/DepositStatus"
},
{
"description": "Status of the deposit."
}
]
},
"transactionHash": {
"type": "string",
"description": "Transaction hash of the blockchain transfer."
},
"symbol": {
"description": "Symbol of the asset to be deposited.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Symbol of the asset to be deposited."
}
]
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to be deposited."
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "When the deposit was created."
},
"fiatAmount": {
"type": "number",
"format": "double",
"description": "Amount in fiat currency."
},
"fiatCurrency": {
"description": "Currency of the fiat amount.",
"allOf": [
{
"$ref": "#/components/schemas/FiatAsset"
},
{
"description": "Currency of the fiat amount."
}
]
},
"institutionBic": {
"type": "string",
"description": "Institution BIC."
},
"platformMemo": {
"type": "string",
"description": "An optional memo that may be provided by the platform."
}
}
},
"DepositAddress": {
"type": "object",
"title": "DepositAddress",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"description": "Address."
}
}
},
"DepositSource": {
"type": "string",
"enum": [
"administrator",
"0G",
"aptos",
"arbitrum",
"avalanche",
"base",
"berachain",
"bitcoin",
"bitcoinCash",
"bsc",
"cardano",
"dogecoin",
"eclipse",
"ethereum",
"hyperEVM",
"hyperliquid",
"linea",
"litecoin",
"polygon",
"optimism",
"plasma",
"sei",
"sui",
"solana",
"story",
"tron",
"xRP",
"zcash",
"equalsMoney",
"banxa",
"internal"
]
},
"DepositStatus": {
"type": "string",
"enum": [
"cancelled",
"confirmed",
"declined",
"expired",
"initiated",
"ownershipVerificationRequired",
"pending",
"refunded",
"senderVerificationCompleted",
"senderVerificationRequired"
]
},
"Depth": {
"type": "object",
"title": "Depth",
"required": [
"asks",
"bids",
"lastUpdateId",
"timestamp"
],
"properties": {
"asks": {
"type": "array",
"description": "Asks on the order book.",
"items": {
"type": "array",
"items": {
"type": "string",
"format": "decimal"
},
"maxLength": 2,
"minLength": 2
}
},
"bids": {
"type": "array",
"description": "Bids on the order book.",
"items": {
"type": "array",
"items": {
"type": "string",
"format": "decimal"
},
"maxLength": 2,
"minLength": 2
}
},
"lastUpdateId": {
"type": "string",
"description": "Update ID that caused the last change to the order book depth."
},
"timestamp": {
"type": "integer",
"format": "int64",
"description": "Matching engine timestamp in microseconds."
}
},
"example": {
"asks": [
[
"21.9",
"500.123"
],
[
"22.1",
"2321.11"
]
],
"bids": [
[
"20.12",
"255.123"
],
[
"20.5",
"499.555"
]
],
"lastUpdateId": "1684026955123",
"timestamp": 1684026955123
}
},
"DustConversion": {
"type": "object",
"title": "DustConversion",
"required": [
"id",
"quantity",
"symbol",
"usdcReceived",
"timestamp"
],
"properties": {
"id": {
"type": "integer",
"format": "uint64",
"description": "The ID of the dust conversion."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Dust quantity."
},
"symbol": {
"type": "string",
"description": "Symbol."
},
"usdcReceived": {
"type": "string",
"format": "decimal",
"description": "USDC received."
},
"timestamp": {
"type": "string",
"format": "naive-date-time",
"description": "Timestamp."
}
}
},
"EqualsMoneyWithdrawalState": {
"type": "string",
"enum": [
"initialized",
"pending",
"fulfilling",
"processing",
"complete",
"declined",
"cancelled",
"review",
"awaitingDocuments",
"awaitingComplianceQuestions",
"refundedInternal",
"refundedExternal"
]
},
"FiatAsset": {
"type": "string",
"enum": [
"AED",
"AUD",
"BGN",
"BHD",
"CAD",
"CHF",
"CNH",
"CNY",
"CZK",
"DKK",
"EUR",
"GBP",
"HKD",
"HUF",
"ILS",
"JOD",
"JPY",
"KES",
"KWD",
"MUR",
"MXN",
"NOK",
"NZD",
"OMR",
"PLN",
"QAR",
"RON",
"SAR",
"SEK",
"SGD",
"THB",
"TND",
"TRY",
"USD",
"ZAR",
"ZMW"
]
},
"FillType": {
"type": "string",
"enum": [
"User",
"BookLiquidation",
"Adl",
"Backstop",
"Liquidation",
"AllLiquidation",
"CollateralConversion",
"CollateralConversionAndSpotLiquidation"
]
},
"FundingIntervalRate": {
"type": "object",
"title": "FundingIntervalRate",
"required": [
"symbol",
"intervalEndTimestamp",
"fundingRate"
],
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the market associated to the funding interval."
},
"intervalEndTimestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The end of the funding interval."
},
"fundingRate": {
"type": "string",
"format": "decimal",
"description": "The funding rate for the interval."
}
}
},
"FundingPayment": {
"type": "object",
"title": "FundingPayment",
"required": [
"userId",
"symbol",
"quantity",
"intervalEndTimestamp",
"fundingRate"
],
"properties": {
"userId": {
"type": "integer",
"format": "int32",
"description": "User id of the account the payment is associated with."
},
"subaccountId": {
"type": "integer",
"format": "uint16",
"description": "Id of the subaccount the payment is associated with, if any."
},
"symbol": {
"type": "string",
"description": "The symbol of the market the payment is associated with."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the payment. Positive if received, negative if paid."
},
"intervalEndTimestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The end of the funding interval for the payment."
},
"fundingRate": {
"type": "string",
"format": "decimal",
"description": "The funding rate for the payment."
}
}
},
"FuturePositionWithMargin": {
"type": "object",
"title": "FuturePositionWithMargin",
"required": [
"breakEvenPrice",
"entryPrice",
"estLiquidationPrice",
"imf",
"imfFunction",
"markPrice",
"mmf",
"mmfFunction",
"netCost",
"netQuantity",
"netExposureQuantity",
"netExposureNotional",
"pnlRealized",
"pnlUnrealized",
"cumulativeFundingPayment",
"symbol",
"userId",
"positionId",
"cumulativeInterest"
],
"properties": {
"breakEvenPrice": {
"type": "string",
"format": "decimal",
"description": "Break-even price for this position."
},
"entryPrice": {
"type": "string",
"format": "decimal",
"description": "Entry price for this position."
},
"estLiquidationPrice": {
"type": "string",
"format": "decimal",
"description": "Estimated liquidation price for this position."
},
"imf": {
"type": "string",
"format": "decimal",
"description": "Initial margin fraction for this position."
},
"imfFunction": {
"description": "IMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "IMF function."
}
]
},
"markPrice": {
"type": "string",
"format": "decimal",
"description": "Mark price for this position's market."
},
"mmf": {
"type": "string",
"format": "decimal",
"description": "Maintenance margin fraction for this position."
},
"mmfFunction": {
"description": "MMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "MMF function."
}
]
},
"netCost": {
"type": "string",
"format": "decimal",
"description": "Positive if long. Negative if short.\n\nThe net cost to enter into the position,i.e., price*quantity for\nall positions adjusting this position."
},
"netQuantity": {
"type": "string",
"format": "decimal",
"description": "Positive if long. Negative if short."
},
"netExposureQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of this futures position including worst case open positions."
},
"netExposureNotional": {
"type": "string",
"format": "decimal",
"description": "Notional value of the futures position including worst case open\npositions."
},
"pnlRealized": {
"type": "string",
"format": "decimal",
"description": "Aggregates the amount of pnl realized on this position since opening."
},
"pnlUnrealized": {
"type": "string",
"format": "decimal",
"description": "Unrealized profit and loss for this position."
},
"cumulativeFundingPayment": {
"type": "string",
"format": "decimal",
"description": "Cumulative funding payment for this position."
},
"subaccountId": {
"type": "integer",
"format": "uint16",
"description": "ID of the user subaccount that the position is for."
},
"symbol": {
"type": "string",
"description": "Future to which this position belongs."
},
"userId": {
"type": "integer",
"format": "int32",
"description": "Id of the user."
},
"positionId": {
"type": "string",
"description": "Id of the position."
},
"cumulativeInterest": {
"type": "string",
"format": "decimal",
"description": "Cumulative interest paid for this position's unrealized pnl."
}
}
},
"IdentityFunction": {
"type": "object",
"title": "IdentityFunction"
},
"InterestPayment": {
"type": "object",
"title": "InterestPayment",
"required": [
"paymentType",
"interestRate",
"interval",
"marketSymbol",
"positionId",
"quantity",
"symbol",
"timestamp"
],
"properties": {
"paymentType": {
"description": "Type of payment.",
"allOf": [
{
"$ref": "#/components/schemas/PaymentType"
},
{
"description": "Type of payment."
}
]
},
"interestRate": {
"type": "string",
"format": "decimal",
"description": "The rate of interest."
},
"interval": {
"type": "integer",
"format": "uint64",
"description": "The interval duration of the payment."
},
"marketSymbol": {
"type": "string",
"description": "The market symbol for which the interest payment can be attributed. For\ninterest payments corresponding to borrow lend positions, this is\nthe spot market symbol. For interest payments corresponding to\nunrealized pnl on futures markets, this will be the futures market\nsymbol."
},
"positionId": {
"type": "string",
"description": "ID of the borrow lend position the interest payment is for."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Amount of the payment."
},
"symbol": {
"description": "The symbol of the market asset the payment is associated with.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "The symbol of the market asset the payment is associated with."
}
]
},
"timestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The timestamp for the borrow lending interest payment (UTC)."
}
}
},
"InterestPaymentSource": {
"type": "string",
"enum": [
"UnrealizedPnl",
"BorrowLend"
]
},
"InverseSqrtFunction": {
"type": "object",
"title": "InverseSqrtFunction",
"required": [
"base",
"positiveCurvePenalty"
],
"properties": {
"base": {
"type": "string",
"format": "decimal"
},
"positiveCurvePenalty": {
"type": "string",
"format": "decimal"
}
}
},
"Kline": {
"type": "object",
"title": "Kline",
"required": [
"start",
"end",
"volume",
"quoteVolume",
"trades"
],
"properties": {
"start": {
"type": "string",
"description": "Start time."
},
"end": {
"type": "string",
"description": "End time."
},
"open": {
"type": "string",
"description": "Open price."
},
"high": {
"type": "string",
"description": "High price."
},
"low": {
"type": "string",
"description": "Low price."
},
"close": {
"type": "string",
"description": "Close price."
},
"volume": {
"type": "string",
"description": "Volume in base asset."
},
"quoteVolume": {
"type": "string",
"description": "Volume in quote asset."
},
"trades": {
"type": "string",
"description": "Number of trades during the K-line."
}
}
},
"KlineInterval": {
"type": "string",
"enum": [
"1m",
"3m",
"5m",
"15m",
"30m",
"1h",
"2h",
"4h",
"6h",
"8h",
"12h",
"1d",
"3d",
"1w",
"1month"
]
},
"KlinePriceType": {
"type": "string",
"enum": [
"Last",
"Index",
"Mark"
]
},
"LimitOrder": {
"type": "object",
"title": "LimitOrder",
"required": [
"id",
"createdAt",
"executedQuantity",
"executedQuoteQuantity",
"postOnly",
"price",
"quantity",
"selfTradePrevention",
"status",
"side",
"symbol",
"timeInForce"
],
"properties": {
"id": {
"type": "string",
"description": "ID of the order."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom order ID."
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Time the order was created."
},
"executedQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity that has been filled."
},
"executedQuoteQuantity": {
"type": "string",
"format": "decimal",
"description": "The quantity of the quote asset that has been filled."
},
"postOnly": {
"type": "boolean",
"description": "Whether the order is post only or not"
},
"price": {
"type": "string",
"format": "decimal",
"description": "The limit price. The order book will only match this order with\nother orders at this price or better."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill."
},
"reduceOnly": {
"type": "boolean",
"description": "True if reducing a futures position."
},
"selfTradePrevention": {
"description": "Action to take in the event the user crosses themselves in the\norder book. Default is `RejectTaker`.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Action to take in the event the user crosses themselves in the\norder book. Default is `RejectTaker`."
}
]
},
"status": {
"description": "Status of the order.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status of the order."
}
]
},
"stopLossTriggerPrice": {
"type": "string",
"description": "Stop loss price (price the stop loss order will be triggered at)."
},
"stopLossLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Stop loss limit price. If set the stop loss will be a limit order,\notherwise it will be a market order."
},
"stopLossTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the stop loss order."
},
"side": {
"description": "The order side. It will be matched against the resting orders on the\nother side of the order book.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "The order side. It will be matched against the resting orders on the\nother side of the order book."
}
]
},
"symbol": {
"type": "string",
"description": "Market symbol."
},
"takeProfitTriggerPrice": {
"type": "string",
"description": "Take profit price (price the take profit order will be triggered at)."
},
"takeProfitLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Take profit limit price. If set the take profit will be a limit order,\notherwise it will be a market order."
},
"takeProfitTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the take profit order."
},
"timeInForce": {
"description": "How long the order is good for.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "How long the order is good for."
}
]
},
"triggerBy": {
"type": "string",
"description": "Reference price that should trigger the order."
},
"triggerPrice": {
"type": "string",
"description": "Price the order should trigger at, if any."
},
"triggerQuantity": {
"type": "string",
"description": "Quantity for trigger orders."
},
"triggeredAt": {
"type": "integer",
"format": "int64"
},
"relatedOrderId": {
"type": "string",
"description": "The ID of the related order. This may refer to a parent order or,\nfor a trigger order, the order this trigger is for."
},
"strategyId": {
"type": "string",
"description": "Strategy ID of the order, if any."
}
}
},
"MarginAccountSummary": {
"type": "object",
"title": "MarginAccountSummary",
"required": [
"assetsValue",
"borrowLiability",
"collateral",
"imf",
"unsettledEquity",
"liabilitiesValue",
"mmf",
"netEquity",
"netEquityAvailable",
"netEquityLocked",
"netExposureFutures",
"pnlUnrealized"
],
"properties": {
"assetsValue": {
"type": "string",
"format": "decimal",
"description": "Notional value of assets"
},
"borrowLiability": {
"type": "string",
"format": "decimal",
"description": "Total borrow notional."
},
"collateral": {
"type": "array",
"description": "Collateral held for a given spot asset.",
"items": {
"$ref": "#/components/schemas/Collateral"
}
},
"imf": {
"type": "string",
"format": "decimal",
"description": "Initial margin fraction."
},
"unsettledEquity": {
"type": "string",
"format": "decimal",
"description": "Unsettled claim on the liquidity fund."
},
"liabilitiesValue": {
"type": "string",
"format": "decimal",
"description": "Notional value of liabilities"
},
"marginFraction": {
"type": "string",
"format": "decimal",
"description": "Margin fraction."
},
"mmf": {
"type": "string",
"format": "decimal",
"description": "Maintenance margin fraction."
},
"netEquity": {
"type": "string",
"format": "decimal",
"description": "Net equity."
},
"netEquityAvailable": {
"type": "string",
"format": "decimal",
"description": "Net equity available."
},
"netEquityLocked": {
"type": "string",
"format": "decimal",
"description": "Net equity Locked."
},
"netExposureFutures": {
"type": "string",
"format": "decimal",
"description": "Total exposure of positions as well potential open positions."
},
"pnlUnrealized": {
"type": "string",
"format": "decimal",
"description": "Unrealised PnL."
}
}
},
"MarkPrice": {
"type": "object",
"title": "MarkPrice",
"required": [
"fundingRate",
"indexPrice",
"markPrice",
"nextFundingTimestamp",
"symbol"
],
"properties": {
"fundingRate": {
"type": "string",
"format": "decimal",
"description": "The funding rate for the current interval."
},
"indexPrice": {
"type": "string",
"format": "decimal",
"description": "The index price for the market."
},
"markPrice": {
"type": "string",
"format": "decimal",
"description": "The mark price for the market."
},
"nextFundingTimestamp": {
"type": "integer",
"format": "int64",
"description": "The end time of the current interval and start time of next interval.\nFunding payments will be distributed at this time."
},
"symbol": {
"type": "string",
"description": "The symbol of the market."
}
}
},
"Market": {
"type": "object",
"title": "Market",
"required": [
"symbol",
"baseSymbol",
"quoteSymbol",
"marketType",
"filters",
"orderBookState",
"createdAt",
"visible"
],
"properties": {
"symbol": {
"type": "string",
"description": "Symbol of the market, e.g. `ETH_USDC`"
},
"baseSymbol": {
"description": "The base asset of the market.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "The base asset of the market."
}
]
},
"quoteSymbol": {
"description": "The quote asset of the market.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "The quote asset of the market."
}
]
},
"marketType": {
"description": "The type of the market.",
"allOf": [
{
"$ref": "#/components/schemas/MarketType"
},
{
"description": "The type of the market."
}
]
},
"filters": {
"description": "Price, lot and leverage rules.",
"allOf": [
{
"$ref": "#/components/schemas/OrderBookFilters"
},
{
"description": "Price, lot and leverage rules."
}
]
},
"imfFunction": {
"description": "IMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "IMF function."
}
]
},
"mmfFunction": {
"description": "MMF function.",
"allOf": [
{
"$ref": "#/components/schemas/PositionImfFunction"
},
{
"description": "MMF function."
}
]
},
"fundingInterval": {
"type": "integer",
"format": "uint64",
"description": "Funding interval for perpetuals in milliseconds."
},
"fundingRateUpperBound": {
"type": "string",
"format": "decimal",
"description": "Funding rate upper bound for perpetual markets. In basis points. E.g. 10\n= 10bps"
},
"fundingRateLowerBound": {
"type": "string",
"format": "decimal",
"description": "Funding rate lower bound for perpetual markets. In basis points. E.g.\n-10 = -10bps"
},
"openInterestLimit": {
"type": "string",
"format": "decimal",
"description": "Maximum open interest limit for the market if the market is a future."
},
"orderBookState": {
"description": "The order book state.",
"allOf": [
{
"$ref": "#/components/schemas/OrderBookState"
},
{
"description": "The order book state."
}
]
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "Market created at time."
},
"visible": {
"type": "boolean",
"description": "Market currently visible."
}
}
},
"MarketAsset": {
"type": "object",
"title": "MarketAsset",
"required": [
"symbol",
"displayName",
"tokens"
],
"properties": {
"symbol": {
"description": "Symbol of the asset, e.g. ETH.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Symbol of the asset, e.g. ETH."
}
]
},
"displayName": {
"type": "string",
"description": "Display name of the asset."
},
"coingeckoId": {
"type": "string",
"description": "Coingecko ID of the asset."
},
"tokens": {
"type": "array",
"description": "Token on each blockchain the asset is available on.",
"items": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"MarketOrder": {
"type": "object",
"title": "MarketOrder",
"required": [
"id",
"createdAt",
"executedQuantity",
"executedQuoteQuantity",
"timeInForce",
"selfTradePrevention",
"side",
"status",
"symbol"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID of this order."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom order ID."
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Time the order was created."
},
"executedQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity that has been filled."
},
"executedQuoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the quote asset that has been filled."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the quote asset to fill."
},
"reduceOnly": {
"type": "boolean",
"description": "True if reducing a futures position."
},
"timeInForce": {
"description": "How long the order is good for.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "How long the order is good for."
}
]
},
"selfTradePrevention": {
"description": "Action to take in the event the user crosses themselves in the\norder book. Default is `RejectTaker`.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Action to take in the event the user crosses themselves in the\norder book. Default is `RejectTaker`."
}
]
},
"side": {
"description": "The order side. It will be matched against the resting orders on the\nother side of the order book.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "The order side. It will be matched against the resting orders on the\nother side of the order book."
}
]
},
"status": {
"description": "Status of the order.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status of the order."
}
]
},
"stopLossTriggerPrice": {
"type": "string",
"description": "Stop loss price (price the stop loss order will be triggered at)."
},
"stopLossLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Stop loss limit price. If set the stop loss will be a limit order,\notherwise it will be a market order."
},
"stopLossTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the stop loss order."
},
"symbol": {
"type": "string",
"description": "Market symbol."
},
"takeProfitTriggerPrice": {
"type": "string",
"description": "Take profit price (price the take profit order will be triggered at)."
},
"takeProfitLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Take profit limit price. If set the take profit will be a limit order,\notherwise it will be a market order."
},
"takeProfitTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the take profit order."
},
"triggerBy": {
"type": "string",
"description": "Reference price that should trigger the order."
},
"triggerPrice": {
"type": "string",
"description": "Price the order should trigger at, if any."
},
"triggerQuantity": {
"type": "string",
"description": "Quantity for trigger orders."
},
"triggeredAt": {
"type": "integer",
"format": "int64"
},
"relatedOrderId": {
"type": "string",
"description": "The ID of the related order. This may refer to a parent order or,\nfor a trigger order, the order this trigger is for."
},
"strategyId": {
"type": "string",
"description": "Strategy ID of the order, if any."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type"
}
]
}
}
},
"MarketType": {
"type": "string",
"enum": [
"SPOT",
"PERP",
"IPERP",
"DATED",
"PREDICTION",
"RFQ"
]
},
"MaxBorrowQuantity": {
"type": "object",
"title": "MaxBorrowQuantity",
"required": [
"maxBorrowQuantity",
"symbol"
],
"properties": {
"maxBorrowQuantity": {
"type": "string",
"format": "decimal"
},
"symbol": {
"type": "string"
}
}
},
"MaxOrderQuantity": {
"type": "object",
"title": "MaxOrderQuantity",
"required": [
"maxOrderQuantity",
"side",
"symbol"
],
"properties": {
"autoBorrow": {
"type": "boolean"
},
"autoBorrowRepay": {
"type": "boolean"
},
"autoLendRedeem": {
"type": "boolean"
},
"maxOrderQuantity": {
"type": "string",
"format": "decimal"
},
"price": {
"type": "string",
"format": "decimal"
},
"side": {
"type": "string"
},
"symbol": {
"type": "string"
},
"reduceOnly": {
"type": "boolean"
}
}
},
"MaxWithdrawalQuantity": {
"type": "object",
"title": "MaxWithdrawalQuantity",
"required": [
"maxWithdrawalQuantity",
"symbol"
],
"properties": {
"autoBorrow": {
"type": "boolean"
},
"autoLendRedeem": {
"type": "boolean"
},
"maxWithdrawalQuantity": {
"type": "string",
"format": "decimal"
},
"symbol": {
"type": "string"
}
}
},
"OpenInterest": {
"type": "object",
"title": "OpenInterest",
"required": [
"symbol",
"timestamp"
],
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the market."
},
"openInterest": {
"type": "string",
"format": "decimal",
"description": "The open interest."
},
"timestamp": {
"type": "integer",
"format": "int64",
"description": "Timestamp."
}
}
},
"Order": {
"type": "object",
"title": "Order",
"required": [
"id",
"createdAt",
"orderType",
"selfTradePrevention",
"status",
"side",
"symbol",
"timeInForce"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the order."
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "Time the order was created."
},
"executedQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the order that has been filled."
},
"executedQuoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the order that has been filled in the quote asset."
},
"expiryReason": {
"description": "Order expiry reason.",
"allOf": [
{
"$ref": "#/components/schemas/OrderExpiryReason"
},
{
"description": "Order expiry reason."
}
]
},
"orderType": {
"description": "Type of order.",
"allOf": [
{
"$ref": "#/components/schemas/OrderTypeEnum"
},
{
"description": "Type of order."
}
]
},
"postOnly": {
"type": "boolean",
"description": "Whether the order is post only or not."
},
"price": {
"type": "string",
"format": "decimal",
"description": "Price that the order was submitted at (if `orderType` is `Limit`)"
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the order."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the order in quote the quote asset."
},
"selfTradePrevention": {
"description": "Self trade prevention setting of the order. Default is `RejectTaker`.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Self trade prevention setting of the order. Default is `RejectTaker`."
}
]
},
"status": {
"description": "Status of the order.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status of the order."
}
]
},
"side": {
"description": "Side of the order.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Side of the order."
}
]
},
"stopLossTriggerPrice": {
"type": "string",
"description": "Stop loss price (price the stop loss order will be triggered at)."
},
"stopLossLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Stop loss limit price. If set the stop loss will be a limit order,\notherwise it will be a market order."
},
"stopLossTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the stop loss order."
},
"symbol": {
"type": "string",
"description": "Market symbol of the order."
},
"takeProfitTriggerPrice": {
"type": "string",
"description": "Take profit price (price the take profit order will be triggered at)."
},
"takeProfitLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Take profit limit price. If set the take profit will be a limit order,\notherwise it will be a market order."
},
"takeProfitTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the take profit order."
},
"timeInForce": {
"description": "Time in force of the order.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "Time in force of the order."
}
]
},
"triggerBy": {
"type": "string",
"description": "Reference price that should trigger the order."
},
"triggerPrice": {
"type": "string",
"description": "Price the order was set to trigger at."
},
"triggerQuantity": {
"type": "string",
"description": "Trigger quantity."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom order ID."
},
"systemOrderType": {
"description": "The type of system order, if applicable.",
"allOf": [
{
"$ref": "#/components/schemas/SystemOrderType"
},
{
"description": "The type of system order, if applicable."
}
]
},
"strategyId": {
"type": "string",
"description": "Strategy ID of the order, if any."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type"
}
]
}
}
},
"OrderBookFilters": {
"type": "object",
"title": "OrderBookFilters",
"required": [
"price",
"quantity"
],
"properties": {
"price": {
"description": "Defines the price rules for the order book.",
"allOf": [
{
"$ref": "#/components/schemas/PriceFilter"
},
{
"description": "Defines the price rules for the order book."
}
]
},
"quantity": {
"description": "Defines the quantity rules for the order book.",
"allOf": [
{
"$ref": "#/components/schemas/QuantityFilter"
},
{
"description": "Defines the quantity rules for the order book."
}
]
}
}
},
"OrderBookState": {
"type": "string",
"enum": [
"Open",
"Closed",
"CancelOnly",
"LimitOnly",
"PostOnly"
]
},
"OrderCancelAllPayload": {
"type": "object",
"title": "OrderCancelAllPayload",
"required": [
"symbol"
],
"properties": {
"symbol": {
"type": "string",
"description": "Market to cancel orders for."
},
"orderType": {
"description": "Type of orders to cancel.",
"allOf": [
{
"$ref": "#/components/schemas/CancelOrderTypeEnum"
},
{
"description": "Type of orders to cancel."
}
]
}
}
},
"OrderCancelPayload": {
"type": "object",
"title": "OrderCancelPayload",
"required": [
"symbol"
],
"properties": {
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Client ID of the order."
},
"orderId": {
"type": "string",
"description": "ID of the order."
},
"symbol": {
"type": "string",
"description": "Market the order exists on."
}
}
},
"OrderExecutePayload": {
"type": "object",
"title": "OrderExecutePayload",
"required": [
"orderType",
"side",
"symbol"
],
"properties": {
"autoLend": {
"type": "boolean",
"description": "If true then the order can lend. Spot margin only."
},
"autoLendRedeem": {
"type": "boolean",
"description": "If true then the order can redeem a lend if required. Spot margin only."
},
"autoBorrow": {
"type": "boolean",
"description": "If true then the order can borrow. Spot margin only."
},
"autoBorrowRepay": {
"type": "boolean",
"description": "If true then the order can repay a borrow. Spot margin only."
},
"brokerId": {
"type": "integer",
"format": "uint16",
"description": "Broker ID of the order."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom order id."
},
"orderType": {
"description": "Order type, market or limit.",
"allOf": [
{
"$ref": "#/components/schemas/OrderTypeEnum"
},
{
"description": "Order type, market or limit."
}
]
},
"postOnly": {
"type": "boolean",
"description": "Only post liquidity, do not take liquidity."
},
"price": {
"type": "string",
"format": "decimal",
"description": "The order price if this is a limit order."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "The order quantity. Market orders must specify either a `quantity` or\n`quoteQuantity`. All other order types must specify a `quantity`."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "The maximum amount of the quote asset to spend (Ask) or receive (Bid)\nfor market orders. This is used for reverse market orders. The\norder book will execute a `quantity` as close as possible to the\nnotional value of `quoteQuantity`."
},
"reduceOnly": {
"type": "boolean",
"description": "If true then the order can only reduce the positon. Futures only."
},
"selfTradePrevention": {
"description": "Action to take if the user crosses themselves in the order book.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Action to take if the user crosses themselves in the order book."
}
]
},
"side": {
"description": "Order will be matched against the resting orders on the other side of\nthe order book.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Order will be matched against the resting orders on the other side of\nthe order book."
}
]
},
"stopLossLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Stop loss limit price. If set the stop loss will be a limit order."
},
"stopLossTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the stop loss order."
},
"stopLossTriggerPrice": {
"type": "string",
"description": "Stop loss price (price the stop loss order will be triggered at)."
},
"symbol": {
"type": "string",
"description": "The market for the order."
},
"takeProfitLimitPrice": {
"type": "string",
"format": "decimal",
"description": "Take profit limit price. If set the take profit will be a limit order,"
},
"takeProfitTriggerBy": {
"type": "string",
"description": "Reference price that should trigger the take profit order."
},
"takeProfitTriggerPrice": {
"type": "string",
"description": "Take profit price (price the take profit order will be triggered at)."
},
"timeInForce": {
"description": "How long the order is good for.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "How long the order is good for."
}
]
},
"triggerBy": {
"type": "string",
"description": "Trigger by."
},
"triggerPrice": {
"type": "string",
"description": "Trigger price if this is a conditional order."
},
"triggerQuantity": {
"type": "string",
"description": "Trigger quantity type if this is a trigger order."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type.",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type."
}
]
}
}
},
"OrderExpiryReason": {
"type": "string",
"enum": [
"AccountTradingSuspended",
"BorrowRequiresLendRedeem",
"FillOrKill",
"InsufficientBorrowableQuantity",
"InsufficientFunds",
"InsufficientLiquidity",
"InvalidPrice",
"InvalidQuantity",
"ImmediateOrCancel",
"InsufficientMargin",
"Liquidation",
"NegativeEquity",
"PostOnlyMode",
"PostOnlyTaker",
"PriceOutOfBounds",
"ReduceOnlyNotReduced",
"SelfTradePrevention",
"StopWithoutPosition",
"PriceImpact",
"Unknown",
"UserPermissions",
"MaxStopOrdersPerPosition",
"PositionLimit",
"SlippageToleranceExceeded"
]
},
"OrderFill": {
"type": "object",
"title": "OrderFill",
"required": [
"fee",
"feeSymbol",
"isMaker",
"orderId",
"price",
"quantity",
"side",
"symbol",
"timestamp"
],
"properties": {
"clientId": {
"type": "string",
"description": "Client id of the order."
},
"fee": {
"type": "string",
"format": "decimal",
"description": "The fee charged on the fill."
},
"feeSymbol": {
"type": "string",
"description": "The asset that is charged as a fee."
},
"isMaker": {
"type": "boolean",
"description": "Whether the fill was made by the maker."
},
"orderId": {
"type": "string",
"description": "The order ID of the fill."
},
"price": {
"type": "string",
"format": "decimal",
"description": "The price of the fill."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "The quantity of the fill."
},
"side": {
"description": "The side of the fill.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "The side of the fill."
}
]
},
"symbol": {
"type": "string",
"description": "The market symbol of the fill."
},
"systemOrderType": {
"description": "The type of system order that triggered the fill.",
"allOf": [
{
"$ref": "#/components/schemas/SystemOrderType"
},
{
"description": "The type of system order that triggered the fill."
}
]
},
"timestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The timestamp of the fill (UTC)."
},
"tradeId": {
"type": "integer",
"format": "int64",
"description": "The trade ID of the fill."
}
}
},
"OrderStatus": {
"type": "string",
"enum": [
"Cancelled",
"Expired",
"Filled",
"New",
"PartiallyFilled",
"TriggerPending",
"TriggerFailed"
]
},
"OrderType": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/OrderType_MarketOrder"
},
{
"$ref": "#/components/schemas/OrderType_LimitOrder"
}
],
"discriminator": {
"propertyName": "orderType",
"mapping": {
"Market": "#/components/schemas/OrderType_MarketOrder",
"Limit": "#/components/schemas/OrderType_LimitOrder"
}
}
},
"OrderTypeEnum": {
"type": "string",
"enum": [
"Market",
"Limit"
]
},
"OrderType_LimitOrder": {
"allOf": [
{
"type": "object",
"required": [
"orderType"
],
"properties": {
"orderType": {
"type": "string",
"enum": [
"Limit"
],
"example": "Limit"
}
}
},
{
"$ref": "#/components/schemas/LimitOrder"
}
]
},
"OrderType_MarketOrder": {
"allOf": [
{
"type": "object",
"required": [
"orderType"
],
"properties": {
"orderType": {
"type": "string",
"enum": [
"Market"
],
"example": "Market"
}
}
},
{
"$ref": "#/components/schemas/MarketOrder"
}
]
},
"PaymentType": {
"type": "string",
"enum": [
"EntryFee",
"Borrow",
"Lend",
"UnrealizedPositivePnl",
"UnrealizedNegativePnl"
]
},
"PositionEstimatedLiquidationPrice": {
"type": "object",
"title": "PositionEstimatedLiquidationPrice",
"required": [
"liquidationPrice",
"markPrice"
],
"properties": {
"liquidationPrice": {
"type": "string",
"format": "decimal"
},
"markPrice": {
"type": "string",
"format": "decimal"
}
}
},
"PositionImfFunction": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/PositionImfFunction_SqrtFunction"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"sqrt": "#/components/schemas/PositionImfFunction_SqrtFunction"
}
}
},
"PositionImfFunction_SqrtFunction": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"sqrt"
],
"example": "sqrt"
}
}
},
{
"$ref": "#/components/schemas/SqrtFunction"
}
]
},
"PriceBandMarkPrice": {
"type": "object",
"title": "PriceBandMarkPrice",
"required": [
"maxMultiplier",
"minMultiplier"
],
"properties": {
"maxMultiplier": {
"type": "string",
"format": "decimal",
"description": "Maximum allowed multiplier move from mean price."
},
"minMultiplier": {
"type": "string",
"format": "decimal",
"description": "Minimum allowed multiplier move from mean price."
}
}
},
"PriceBandMeanPremium": {
"type": "object",
"title": "PriceBandMeanPremium",
"required": [
"tolerancePct"
],
"properties": {
"tolerancePct": {
"type": "string",
"format": "decimal",
"description": "Maximum allowed deviation from the mean premium. E.g. if\n`tolerance_pct` is 0.05 (5%), and the mean premium is 5%, then\norders will be prevented from being placed if the premium exceeds 10%."
}
}
},
"PriceFilter": {
"type": "object",
"title": "PriceFilter",
"required": [
"minPrice",
"tickSize"
],
"properties": {
"minPrice": {
"type": "string",
"format": "decimal",
"description": "Minimum price the order book will allow."
},
"maxPrice": {
"type": "string",
"format": "decimal",
"description": "Maximum price the order book will allow."
},
"tickSize": {
"type": "string",
"format": "decimal",
"description": "Price increment."
},
"maxMultiplier": {
"type": "string",
"format": "decimal",
"description": "Maximum allowed multiplier from last active price."
},
"minMultiplier": {
"type": "string",
"format": "decimal",
"description": "Minimum allowed multiplier from last active price."
},
"maxImpactMultiplier": {
"type": "string",
"format": "decimal",
"description": "Maximum allowed impact multiplier from best offer. This\ndetermines how far above the best ask a market buy can penetrate."
},
"minImpactMultiplier": {
"type": "string",
"format": "decimal",
"description": "Minimum allowed impact multiplier from best bid. This\ndetermines how far below the best bid a market sell can penetrate."
},
"meanMarkPriceBand": {
"description": "Futures price band. Used to determine how far the price is allowed to\ndeviate from the mean mark price.",
"allOf": [
{
"$ref": "#/components/schemas/PriceBandMarkPrice"
},
{
"description": "Futures price band. Used to determine how far the price is allowed to\ndeviate from the mean mark price."
}
]
},
"meanPremiumBand": {
"description": "Futures price band. Used to determine how far the premium is allowed to\ndeviate from the mean premium.",
"allOf": [
{
"$ref": "#/components/schemas/PriceBandMeanPremium"
},
{
"description": "Futures price band. Used to determine how far the premium is allowed to\ndeviate from the mean premium."
}
]
},
"borrowEntryFeeMaxMultiplier": {
"type": "string",
"format": "decimal",
"description": "Maximum allowed multiplier move from last active price without incurring\nan entry fee for spot margin."
},
"borrowEntryFeeMinMultiplier": {
"type": "string",
"format": "decimal",
"description": "Minimum allowed multiplier move from last active price without incurring\nan entry fee for spot margin."
}
}
},
"QuantityFilter": {
"type": "object",
"title": "QuantityFilter",
"required": [
"minQuantity",
"stepSize"
],
"properties": {
"minQuantity": {
"type": "string",
"format": "decimal",
"description": "Minimum quantity the order book will allow.\n\nFor futures, this will be the threshold at which a position gets closed\nand so it should be as close as possible, preferably equal, to the\n`step_size`."
},
"maxQuantity": {
"type": "string",
"format": "decimal",
"description": "Maximum quantity the order book will allow."
},
"stepSize": {
"type": "string",
"format": "decimal",
"description": "Quantity increment."
}
}
},
"Quote": {
"type": "object",
"title": "Quote",
"required": [
"rfqId",
"quoteId",
"bidPrice",
"askPrice",
"status",
"createdAt"
],
"properties": {
"rfqId": {
"type": "string",
"description": "Unique RFQ order ID, assigned by the matching engine."
},
"quoteId": {
"type": "string",
"description": "Unique RFQ quote ID, assigned by the matching engine."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ quote ID, assigned by the maker (optionally)."
},
"bidPrice": {
"type": "string",
"format": "decimal",
"description": "Quote bid price."
},
"askPrice": {
"type": "string",
"format": "decimal",
"description": "Quote ask price."
},
"status": {
"description": "Status.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status."
}
]
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Time the quote was created."
}
}
},
"QuoteAcceptPayload": {
"type": "object",
"title": "QuoteAcceptPayload",
"required": [
"quoteId"
],
"properties": {
"rfqId": {
"type": "string",
"description": "RFQ ID."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ ID."
},
"quoteId": {
"type": "string",
"description": "RFQ quote ID."
}
}
},
"QuoteHistorical": {
"type": "object",
"title": "QuoteHistorical",
"required": [
"userId",
"rfqId",
"quoteId",
"bidPrice",
"askPrice",
"status",
"createdAt"
],
"properties": {
"userId": {
"type": "integer",
"format": "int32",
"description": "User ID."
},
"subaccountId": {
"type": "integer",
"format": "int32",
"description": "Subaccount ID."
},
"rfqId": {
"type": "string",
"description": "Unique RFQ order ID, assigned by the matching engine."
},
"quoteId": {
"type": "string",
"description": "Unique RFQ quote ID, assigned by the matching engine."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ quote ID, assigned by the maker (optionally)."
},
"bidPrice": {
"type": "string",
"format": "decimal",
"description": "Quote bid price."
},
"askPrice": {
"type": "string",
"format": "decimal",
"description": "Quote ask price."
},
"status": {
"description": "Status.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status."
}
]
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "Time the quote was created."
}
}
},
"QuotePayload": {
"type": "object",
"title": "QuotePayload",
"required": [
"rfqId",
"bidPrice",
"askPrice"
],
"properties": {
"rfqId": {
"type": "string",
"description": "RFQ ID."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ quote ID."
},
"bidPrice": {
"type": "string",
"format": "decimal",
"description": "Bid price."
},
"askPrice": {
"type": "string",
"format": "decimal",
"description": "Ask price."
}
}
},
"RequestForQuote": {
"type": "object",
"title": "RequestForQuote",
"required": [
"rfqId",
"symbol",
"side",
"submissionTime",
"expiryTime",
"status",
"executionMode",
"createdAt"
],
"properties": {
"rfqId": {
"type": "string",
"description": "Unique RFQ order ID, assigned by the matching engine."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ order ID, assigned by the user (optionally)."
},
"symbol": {
"type": "string",
"description": "Market symbol."
},
"side": {
"description": "Side.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Side."
}
]
},
"price": {
"type": "string",
"format": "decimal",
"description": "RFQ price.\nPrice of the RFQ. Only when execution mode is `Immediate`."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill (in base asset)."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill (in quote asset)."
},
"submissionTime": {
"type": "integer",
"format": "int64",
"description": "Time (milliseconds since epoch) by which quotes must be submitted for\nthe RFQ."
},
"systemOrderType": {
"description": "The type of system order, only when RFQ was initiated by the system.",
"allOf": [
{
"$ref": "#/components/schemas/SystemOrderType"
},
{
"description": "The type of system order, only when RFQ was initiated by the system."
}
]
},
"expiryTime": {
"type": "integer",
"format": "int64",
"description": "Time (milliseconds since epoch) by which the RFQ expires if no match."
},
"status": {
"description": "Status.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status."
}
]
},
"executionMode": {
"description": "RFQ execution mode.",
"allOf": [
{
"$ref": "#/components/schemas/RfqExecutionMode"
},
{
"description": "RFQ execution mode."
}
]
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Time the RFQ was created."
}
}
},
"RequestForQuoteCancelPayload": {
"type": "object",
"title": "RequestForQuoteCancelPayload",
"properties": {
"rfqId": {
"type": "string",
"description": "RFQ ID."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ ID."
}
}
},
"RequestForQuoteHistorical": {
"type": "object",
"title": "RequestForQuoteHistorical",
"required": [
"userId",
"rfqId",
"symbol",
"side",
"submissionTime",
"expiryTime",
"status",
"executionMode",
"createdAt"
],
"properties": {
"userId": {
"type": "integer",
"format": "int32",
"description": "User ID."
},
"subaccountId": {
"type": "integer",
"format": "int32",
"description": "Subaccount ID."
},
"rfqId": {
"type": "string",
"description": "Unique RFQ order ID, assigned by the matching engine."
},
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ order ID, assigned by the user (optionally)."
},
"symbol": {
"type": "string",
"description": "Market symbol."
},
"side": {
"description": "Side.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Side."
}
]
},
"price": {
"type": "string",
"format": "decimal",
"description": "RFQ price.\nPrice of the RFQ. Only when execution mode is `Immediate`."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill (in base asset)."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill (in quote asset)."
},
"submissionTime": {
"type": "string",
"format": "naive-date-time",
"description": "Time by which quotes must be submitted for\nthe RFQ."
},
"expiryTime": {
"type": "string",
"format": "naive-date-time",
"description": "Time by which the RFQ expires if no match."
},
"status": {
"description": "Status.",
"allOf": [
{
"$ref": "#/components/schemas/OrderStatus"
},
{
"description": "Status."
}
]
},
"executionMode": {
"description": "RFQ execution mode.",
"allOf": [
{
"$ref": "#/components/schemas/RfqExecutionMode"
},
{
"description": "RFQ execution mode."
}
]
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "Time the RFQ was created."
}
}
},
"RequestForQuotePayload": {
"type": "object",
"title": "RequestForQuotePayload",
"required": [
"symbol",
"side"
],
"properties": {
"clientId": {
"type": "integer",
"format": "uint32",
"description": "Custom RFQ ID."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "RFQ quantity (in base asset)."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "RFQ quote quantity (in quote asset)."
},
"price": {
"type": "string",
"format": "decimal",
"description": "RFQ price. Only when execution mode is `Immediate`."
},
"symbol": {
"type": "string",
"description": "RFQ symbol."
},
"side": {
"description": "Side of the order.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Side of the order."
}
]
},
"executionMode": {
"description": "Execution mode. Defaults to `AwaitAccept` when not provided.",
"allOf": [
{
"$ref": "#/components/schemas/RfqExecutionMode"
},
{
"description": "Execution mode. Defaults to `AwaitAccept` when not provided."
}
]
}
}
},
"RequestForQuoteRefreshPayload": {
"type": "object",
"title": "RequestForQuoteRefreshPayload",
"required": [
"rfqId"
],
"properties": {
"rfqId": {
"type": "string",
"description": "RFQ ID. An RFQ can only be refreshed using the RFQ ID."
}
}
},
"RfqExecutionMode": {
"type": "string",
"enum": [
"AwaitAccept",
"Immediate"
]
},
"ScheduledStrategy": {
"type": "object",
"title": "ScheduledStrategy",
"required": [
"id",
"createdAt",
"executedQuantity",
"executedQuoteQuantity",
"quantity",
"selfTradePrevention",
"status",
"side",
"symbol",
"timeInForce",
"duration",
"interval"
],
"properties": {
"id": {
"type": "string",
"description": "ID of the strategy."
},
"clientStrategyId": {
"type": "integer",
"format": "uint32",
"description": "Custom client strategy ID."
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Time the strategey was created."
},
"executedQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity that has been filled."
},
"executedQuoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quote quantity that has been filled."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity to fill."
},
"reduceOnly": {
"type": "boolean",
"description": "True if reducing a futures position."
},
"selfTradePrevention": {
"description": "Action to take in the event the user crosses themselves in the\norder book.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Action to take in the event the user crosses themselves in the\norder book."
}
]
},
"status": {
"description": "Status of the strategy.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyStatus"
},
{
"description": "Status of the strategy."
}
]
},
"side": {
"description": "The strategy side. The strategy's orders will be matched against the\nresting orders on the other side of the order book.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "The strategy side. The strategy's orders will be matched against the\nresting orders on the other side of the order book."
}
]
},
"symbol": {
"type": "string",
"description": "Market symbol."
},
"timeInForce": {
"description": "How long the strategy's orders is good for.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "How long the strategy's orders is good for."
}
]
},
"duration": {
"type": "integer",
"format": "uint64",
"description": "Duration of the strategy in milliseconds."
},
"interval": {
"type": "integer",
"format": "uint64",
"description": "Interval of the strategy in milliseconds."
},
"randomizedIntervalQuantity": {
"type": "boolean",
"description": "Determines whether the strategy will execute a randomized interval\nquantity."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type"
}
]
}
}
},
"SelfTradePrevention": {
"type": "string",
"enum": [
"RejectTaker",
"RejectMaker",
"RejectBoth"
]
},
"Settlement": {
"type": "object",
"title": "Settlement",
"required": [
"quantity",
"source",
"timestamp",
"userId"
],
"properties": {
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the settlement."
},
"source": {
"description": "Source of the settlement.",
"allOf": [
{
"$ref": "#/components/schemas/SettlementSource"
},
{
"description": "Source of the settlement."
}
]
},
"subaccountId": {
"type": "integer",
"format": "int32",
"description": "ID of the subaccount the event is associated with, if any."
},
"timestamp": {
"type": "string",
"format": "naive-date-time",
"description": "The timestamp of the settlement (UTC)."
},
"userId": {
"type": "integer",
"format": "int32",
"description": "User ID of the account the movement is associated with."
}
}
},
"SettlementSource": {
"type": "string",
"enum": [
"TradingFees",
"TradingFeesSystem",
"FundingPayment",
"CulledBorrowInterest",
"CulledRealizePnlAuto",
"CulledRealizePnlBookUtilisation",
"CulledRealizePnlAccountThreshold",
"CulledRealizePnlSystemThreshold",
"RealizePnl",
"BackstopProviderLiquidation",
"BackstopAdlLiquidation",
"BackstopLiquidityFundProceeds"
]
},
"SettlementSourceFilter": {
"type": "string",
"enum": [
"BackstopLiquidation",
"CulledBorrowInterest",
"CulledRealizePnl",
"CulledRealizePnlBookUtilization",
"FundingPayment",
"RealizePnl",
"TradingFees",
"TradingFeesSystem"
]
},
"Side": {
"type": "string",
"enum": [
"Bid",
"Ask"
]
},
"SlippageToleranceType": {
"type": "string",
"enum": [
"TickSize",
"Percent"
]
},
"SortDirection": {
"type": "string",
"enum": [
"Asc",
"Desc"
]
},
"SqrtFunction": {
"type": "object",
"title": "SqrtFunction",
"required": [
"base",
"factor"
],
"properties": {
"base": {
"type": "string",
"format": "decimal"
},
"factor": {
"type": "string",
"format": "decimal"
}
}
},
"Status": {
"type": "string",
"enum": [
"Ok",
"Maintenance"
]
},
"StatusAndMessage": {
"type": "object",
"title": "StatusAndMessage",
"required": [
"status"
],
"properties": {
"status": {
"description": "Status of the system.",
"allOf": [
{
"$ref": "#/components/schemas/Status"
},
{
"description": "Status of the system."
}
]
},
"message": {
"type": "string",
"description": "Status message, if any."
}
}
},
"Strategy": {
"type": "object",
"title": "Strategy",
"required": [
"id",
"createdAt",
"strategyType",
"selfTradePrevention",
"status",
"side",
"symbol",
"timeInForce",
"duration",
"interval",
"randomizedIntervalQuantity"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the strategy."
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "Time the strategy was created."
},
"executedQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the strategy that has been filled."
},
"executedQuoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quote quantity of the strategy that has been filled."
},
"cancelReason": {
"description": "Strategy cancel reason.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyCrankCancelReason"
},
{
"description": "Strategy cancel reason."
}
]
},
"strategyType": {
"description": "Type of strategy.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyTypeEnum"
},
{
"description": "Type of strategy."
}
]
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the strategy."
},
"selfTradePrevention": {
"description": "Self trade prevention setting of the strategy's orders.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Self trade prevention setting of the strategy's orders."
}
]
},
"status": {
"description": "Status of the strategy.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyStatus"
},
{
"description": "Status of the strategy."
}
]
},
"side": {
"description": "Side of the strategy.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "Side of the strategy."
}
]
},
"symbol": {
"type": "string",
"description": "Market symbol of the strategy."
},
"timeInForce": {
"description": "Time in force of the strategy.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "Time in force of the strategy."
}
]
},
"clientStrategyId": {
"type": "integer",
"format": "uint32",
"description": "Custom order strategy ID."
},
"duration": {
"type": "integer",
"format": "uint64",
"description": "Duration of the strategy in milliseconds."
},
"interval": {
"type": "integer",
"format": "uint64",
"description": "Interval of the strategy in milliseconds."
},
"randomizedIntervalQuantity": {
"type": "boolean",
"description": "Determines whether the strategy will execute a randomized interval\nquantity."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type"
}
]
}
}
},
"StrategyCancelAllPayload": {
"type": "object",
"title": "StrategyCancelAllPayload",
"required": [
"symbol"
],
"properties": {
"symbol": {
"type": "string",
"description": "Market to cancel strategies for."
},
"strategyType": {
"description": "Type of strategies to cancel.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyTypeEnum"
},
{
"description": "Type of strategies to cancel."
}
]
}
}
},
"StrategyCancelPayload": {
"type": "object",
"title": "StrategyCancelPayload",
"required": [
"symbol"
],
"properties": {
"clientStrategyId": {
"type": "integer",
"format": "uint32",
"description": "Client ID of the strategy."
},
"strategyId": {
"type": "string",
"description": "ID of the strategy."
},
"symbol": {
"type": "string",
"description": "Market the strategy exists on."
}
}
},
"StrategyCrankCancelReason": {
"type": "string",
"enum": [
"Expired",
"FillOrKill",
"InsufficientBorrowableQuantity",
"InsufficientFunds",
"InsufficientLiquidity",
"InvalidPrice",
"InvalidQuantity",
"InsufficientMargin",
"Liquidation",
"PriceOutOfBounds",
"ReduceOnlyNotReduced",
"SelfTradePrevention",
"Unknown",
"UserPermissions"
]
},
"StrategyCreatePayload": {
"type": "object",
"title": "StrategyCreatePayload",
"required": [
"strategyType",
"side",
"symbol"
],
"properties": {
"autoLend": {
"type": "boolean",
"description": "If true then the strategy's orders can lend. Spot margin only."
},
"autoLendRedeem": {
"type": "boolean",
"description": "If true then the strategy's orders can redeem a lend if required. Spot\nmargin only."
},
"autoBorrow": {
"type": "boolean",
"description": "If true then the strategy's orders can borrow. Spot margin only."
},
"autoBorrowRepay": {
"type": "boolean",
"description": "If true then the strategy's orders can repay a borrow. Spot margin only."
},
"brokerId": {
"type": "integer",
"format": "uint16",
"description": "Broker ID of the orders."
},
"clientStrategyId": {
"type": "integer",
"format": "uint32",
"description": "Custom client strategy id."
},
"strategyType": {
"description": "Strategy type.",
"allOf": [
{
"$ref": "#/components/schemas/StrategyTypeEnum"
},
{
"description": "Strategy type."
}
]
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "The strategy quantity."
},
"price": {
"type": "string",
"format": "decimal",
"description": "The strategy limit price."
},
"postOnly": {
"type": "boolean",
"description": "Only post liquidity, do not take liquidity."
},
"reduceOnly": {
"type": "boolean",
"description": "If true then the strategy's orders can only reduce the position.\nFutures only."
},
"selfTradePrevention": {
"description": "Action to take if the user crosses themselves in the order book.",
"allOf": [
{
"$ref": "#/components/schemas/SelfTradePrevention"
},
{
"description": "Action to take if the user crosses themselves in the order book."
}
]
},
"side": {
"description": "The side of the strategy.",
"allOf": [
{
"$ref": "#/components/schemas/Side"
},
{
"description": "The side of the strategy."
}
]
},
"symbol": {
"type": "string",
"description": "The market for the strategy."
},
"timeInForce": {
"description": "How long the strategy's orders are good for.",
"allOf": [
{
"$ref": "#/components/schemas/TimeInForce"
},
{
"description": "How long the strategy's orders are good for."
}
]
},
"duration": {
"type": "integer",
"format": "uint64",
"description": "Duration of the strategy."
},
"interval": {
"type": "integer",
"format": "uint64",
"description": "Interval of the strategy."
},
"randomizedIntervalQuantity": {
"type": "boolean",
"description": "Randomized interval quantity for the strategy."
},
"slippageTolerance": {
"type": "string",
"format": "decimal",
"description": "Slippage tolerance allowed for the order."
},
"slippageToleranceType": {
"description": "Slippage tolerance type.",
"allOf": [
{
"$ref": "#/components/schemas/SlippageToleranceType"
},
{
"description": "Slippage tolerance type."
}
]
}
}
},
"StrategyStatus": {
"type": "string",
"enum": [
"Running",
"Completed",
"Cancelled",
"Terminated"
]
},
"StrategyType": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/StrategyType_ScheduledStrategy"
}
],
"discriminator": {
"propertyName": "strategyType",
"mapping": {
"Scheduled": "#/components/schemas/StrategyType_ScheduledStrategy"
}
}
},
"StrategyTypeEnum": {
"type": "string",
"enum": [
"Scheduled"
]
},
"StrategyType_ScheduledStrategy": {
"allOf": [
{
"type": "object",
"required": [
"strategyType"
],
"properties": {
"strategyType": {
"type": "string",
"enum": [
"Scheduled"
],
"example": "Scheduled"
}
}
},
{
"$ref": "#/components/schemas/ScheduledStrategy"
}
]
},
"SystemOrderType": {
"type": "string",
"enum": [
"CollateralConversion",
"FutureExpiry",
"LiquidatePositionOnAdl",
"LiquidatePositionOnBook",
"LiquidatePositionOnBackstop",
"OrderBookClosed"
]
},
"Ticker": {
"type": "object",
"title": "Ticker",
"required": [
"symbol",
"firstPrice",
"lastPrice",
"priceChange",
"priceChangePercent",
"high",
"low",
"volume",
"quoteVolume",
"trades"
],
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the market."
},
"firstPrice": {
"type": "string",
"format": "decimal",
"description": "First price for the interval."
},
"lastPrice": {
"type": "string",
"format": "decimal",
"description": "Last price for the interval."
},
"priceChange": {
"type": "string",
"format": "decimal",
"description": "Price change for the interval."
},
"priceChangePercent": {
"type": "string",
"format": "decimal",
"description": "Percentage price change for the interval."
},
"high": {
"type": "string",
"format": "decimal",
"description": "Highest price for the interval."
},
"low": {
"type": "string",
"format": "decimal",
"description": "Lowest price for the interval."
},
"volume": {
"type": "string",
"format": "decimal",
"description": "Base volume for the interval."
},
"quoteVolume": {
"type": "string",
"format": "decimal",
"description": "Quote volume for the interval."
},
"trades": {
"type": "string",
"description": "Trades for the interval."
}
}
},
"TickerInterval": {
"type": "string",
"enum": [
"1d",
"1w"
]
},
"TimeInForce": {
"type": "string",
"enum": [
"GTC",
"IOC",
"FOK"
]
},
"Token": {
"type": "object",
"title": "Token",
"required": [
"displayName",
"blockchain",
"depositEnabled",
"minimumDeposit",
"withdrawEnabled",
"minimumWithdrawal",
"withdrawalFee"
],
"properties": {
"displayName": {
"type": "string"
},
"blockchain": {
"$ref": "#/components/schemas/Blockchain"
},
"contractAddress": {
"type": "string"
},
"depositEnabled": {
"type": "boolean"
},
"minimumDeposit": {
"type": "string",
"format": "decimal"
},
"withdrawEnabled": {
"type": "boolean"
},
"minimumWithdrawal": {
"type": "string",
"format": "decimal"
},
"maximumWithdrawal": {
"type": "string",
"format": "decimal"
},
"withdrawalFee": {
"type": "string",
"format": "decimal"
}
}
},
"Trade": {
"type": "object",
"title": "Trade",
"required": [
"price",
"quantity",
"quoteQuantity",
"timestamp",
"isBuyerMaker"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "Id of the trade."
},
"price": {
"type": "string",
"format": "decimal",
"description": "Price of the trade."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the trade in the base asset."
},
"quoteQuantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the trade in the quote asset."
},
"timestamp": {
"type": "integer",
"format": "int64",
"description": "Timestamp of the trade (server time)."
},
"isBuyerMaker": {
"type": "boolean",
"description": "Whether the buyer was the maker order."
}
}
},
"UpdateAccountSettingsRequest": {
"type": "object",
"title": "UpdateAccountSettingsRequest",
"properties": {
"autoBorrowSettlements": {
"type": "boolean",
"description": "If true, then tries to borrow during collateral reconciliation.\nCollateral reconciliation is a process in which the system reconciles\nthe negative account debt or positive account equity."
},
"autoLend": {
"type": "boolean",
"description": "Determines if the account should automatically lend."
},
"autoRepayBorrows": {
"type": "boolean",
"description": "Determines if the account should automatically repay borrows with\navailable balance."
},
"leverageLimit": {
"type": "string",
"format": "decimal",
"description": "Determines the maximum leverage allowed for the main account or\nsubaccount."
}
}
},
"UpdateWithdrawalDelayRequest": {
"type": "object",
"title": "UpdateWithdrawalDelayRequest",
"required": [
"withdrawalDelayHours",
"twoFactorToken"
],
"properties": {
"withdrawalDelayHours": {
"type": "integer",
"format": "uint32",
"description": "The delay applied to withdrawals being processed, in hours."
},
"twoFactorToken": {
"type": "string",
"description": "Issued two factor token."
}
}
},
"WalletResponse": {
"type": "object",
"title": "WalletResponse",
"required": [
"blockchain",
"address"
],
"properties": {
"blockchain": {
"type": "string",
"description": "The blockchain network."
},
"address": {
"type": "string",
"description": "The wallet address."
}
}
},
"Withdrawal": {
"type": "object",
"title": "Withdrawal",
"required": [
"id",
"blockchain",
"quantity",
"fee",
"symbol",
"status",
"toAddress",
"createdAt",
"isInternal"
],
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Unique id of the withdrawal."
},
"blockchain": {
"description": "Blockchain the withdrawal was requested for.",
"allOf": [
{
"$ref": "#/components/schemas/Blockchain"
},
{
"description": "Blockchain the withdrawal was requested for."
}
]
},
"clientId": {
"type": "string",
"description": "Custom client id."
},
"identifier": {
"type": "string",
"description": "Transaction hash of the withdrawal, if it has been sent."
},
"quantity": {
"type": "string",
"format": "decimal",
"description": "Quantity of the asset to withdraw."
},
"fee": {
"type": "string",
"format": "decimal",
"description": "Fee charged."
},
"fiatFee": {
"type": "string",
"format": "decimal",
"description": "Fiat fee charged."
},
"fiatState": {
"description": "Fiat state for Equals Money.",
"allOf": [
{
"$ref": "#/components/schemas/EqualsMoneyWithdrawalState"
},
{
"description": "Fiat state for Equals Money."
}
]
},
"fiatSymbol": {
"description": "Fiat symbol.",
"allOf": [
{
"$ref": "#/components/schemas/FiatAsset"
},
{
"description": "Fiat symbol."
}
]
},
"providerId": {
"type": "string",
"description": "Provider ID for payment provider."
},
"symbol": {
"description": "Symbol of the asset to withdraw.",
"allOf": [
{
"$ref": "#/components/schemas/Asset"
},
{
"description": "Symbol of the asset to withdraw."
}
]
},
"status": {
"description": "Status of the withdrawal.",
"allOf": [
{
"$ref": "#/components/schemas/WithdrawalStatus"
},
{
"description": "Status of the withdrawal."
}
]
},
"subaccountId": {
"type": "integer",
"format": "uint16",
"description": "ID of the subaccount requesting this withdrawal."
},
"toAddress": {
"type": "string",
"description": "Address to withdraw to."
},
"transactionHash": {
"type": "string",
"description": "Transaction hash of withdrawal."
},
"createdAt": {
"type": "string",
"format": "naive-date-time",
"description": "When the withdrawal was created."
},
"isInternal": {
"type": "boolean",
"description": "Whether the withdrawal is an internal transfer."
},
"bankName": {
"type": "string",
"description": "Bank name."
},
"bankIdentifier": {
"type": "string",
"description": "Bank identifier."
},
"accountIdentifier": {
"type": "string",
"description": "Account identifier."
},
"triggerAt": {
"type": "string",
"format": "naive-date-time",
"description": "When the withdrawal is to be triggered."
}
}
},
"WithdrawalDelay": {
"type": "object",
"title": "WithdrawalDelay",
"properties": {
"currentWithdrawalDelayHours": {
"type": "integer",
"format": "int32",
"description": "The delay applied to withdrawals being processed."
},
"pendingWithdrawalDelayHours": {
"type": "integer",
"format": "int32",
"description": "The delay that will be applied to withdrawals once the update to the\nsetting is enabled."
},
"pendingWithdrawalDelayHoursEnabledAt": {
"type": "string",
"format": "naive-date-time",
"description": "The time when the update to the withdrawal delay setting will be\napplied."
}
}
},
"WithdrawalStatus": {
"type": "string",
"enum": [
"confirmed",
"ownershipVerificationRequired",
"pending",
"recipientInformationProvided",
"recipientInformationRequired"
]
}
}
},
"x-tagGroups": [
{
"name": "Public Endpoints",
"tags": [
"Assets",
"Borrow Lend Markets",
"Markets",
"System",
"Trades"
]
},
{
"name": "Authenticated Endpoints",
"tags": [
"Account",
"Borrow Lend",
"Capital",
"Futures",
"History",
"Order",
"Request For Quote"
]
},
{
"name": "Websocket",
"tags": [
"Streams"
]
}
]
}