{
"swagger": "2.0",
"info": {
"title": "BitMEX API",
"description": "## REST API for the BitMEX Trading Platform\n\n_If you are building automated tools, please subscribe to the_\n_[BitMEX API RSS Feed](https://blog.bitmex.com/api_announcement/feed/) for changes. The feed will be updated_\n_regularly and is the most reliable way to get downtime and update announcements._\n\n[View Changelog](/app/apiChangelog)\n\n-\n\n#### Getting Started\n\nBase URI: [https://www.bitmex.com/api/v1](/api/v1)\n\n##### Fetching Data\n\nAll REST endpoints are documented below. You can try out any query right from this interface.\n\nMost table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first.\n\nAdditional documentation regarding filters, timestamps, and authentication\nis available in [the main API documentation](/app/restAPI).\n\n_All_ table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want\nto have the quickest possible data without being subject to ratelimits.\n\n##### Return Types\n\nBy default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data.\n\n##### Trade Data Queries\n\n_This is only a small subset of what is available, to get you started._\n\nFill in the parameters and click the `Try it out!` button to try any of these queries.\n\n- [Pricing Data](#!/Quote/Quote_get)\n\n- [Trade Data](#!/Trade/Trade_get)\n\n- [OrderBook Data](#!/OrderBook/OrderBook_getL2)\n\n- [Settlement Data](#!/Settlement/Settlement_get)\n\n- [Exchange Statistics](#!/Stats/Stats_history)\n\nEvery function of the BitMEX.com platform is exposed here and documented. Many more functions are available.\n\n##### Swagger Specification\n\n[⇩ Download Swagger JSON](swagger.json)\n\n-\n\n## All API Endpoints\n\nClick to expand a section.\n",
"termsOfService": "https://www.bitmex.com/app/terms",
"contact": {
"email": "support@bitmex.com"
},
"version": "1.2.0"
},
"basePath": "/api/v1",
"paths": {
"/announcement": {
"get": {
"tags": [
"Announcement"
],
"summary": "Get site announcements.",
"operationId": "Announcement.get",
"parameters": [
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.",
"required": false,
"type": "string",
"format": "JSON"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Announcement"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/announcement/urgent": {
"get": {
"tags": [
"Announcement"
],
"summary": "Get urgent (banner) announcements.",
"operationId": "Announcement.getUrgent",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Announcement"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/apiKey": {
"get": {
"tags": [
"APIKey"
],
"summary": "Get your API Keys.",
"operationId": "APIKey.get",
"parameters": [
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIKey"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/chat/pinned": {
"get": {
"tags": [
"Chat"
],
"summary": "Get pinned message for a channel.",
"operationId": "Chat.getPinnedMessage",
"parameters": [
{
"name": "channelID",
"in": "query",
"required": true,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/PinnedMessage"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/chat": {
"get": {
"tags": [
"Chat"
],
"summary": "Get chat messages.",
"operationId": "Chat.get",
"parameters": [
{
"name": "count",
"in": "query",
"description": "Number of results to fetch.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting ID for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": true,
"type": "boolean"
},
{
"name": "channelID",
"in": "query",
"description": "Channel id. GET /chat/channels for ids. Global English by default",
"required": false,
"default": 1,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Chat"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
},
"post": {
"tags": [
"Chat"
],
"summary": "Send a chat message.",
"operationId": "Chat.new",
"parameters": [
{
"name": "message",
"in": "formData",
"required": true,
"type": "string"
},
{
"name": "channelID",
"in": "formData",
"description": "Channel to post to. Default 1 (English).",
"required": false,
"default": 1,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Chat"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/chat/channels": {
"get": {
"tags": [
"Chat"
],
"summary": "Get available channels.",
"operationId": "Chat.getChannels",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ChatChannel"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/chat/connected": {
"get": {
"tags": [
"Chat"
],
"summary": "Get connected users.",
"description": "Returns an array with browser users in the first position and API users (bots) in the second position.",
"operationId": "Chat.getConnected",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/ConnectedUsers"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/execution": {
"get": {
"tags": [
"Execution"
],
"summary": "Get all raw executions for your account.",
"description": "This returns all raw transactions, which includes order opening and cancelation, and order status\nchanges. It can be quite noisy. More focused information is available at `/execution/tradeHistory`.\n\nYou may also use the `filter` param to target your query. Specify an array as a filter value, such as\n`{\"execType\": [\"Settlement\", \"Trade\"]}` to filter on multiple values.\n\nSee [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_8_8.html) for explanations of these fields.\n",
"operationId": "Execution.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Execution"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/execution/tradeHistory": {
"get": {
"tags": [
"Execution"
],
"summary": "Get all balance-affecting executions.",
"operationId": "Execution.getTradeHistory",
"parameters": [
{
"name": "targetAccountId",
"in": "query",
"description": "AccountId fetching the trade history, must be a paired account with main user.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "targetAccountIds",
"in": "query",
"description": "AccountIds fetching the trade history, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Execution"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/funding": {
"get": {
"tags": [
"Funding"
],
"summary": "Get funding history.",
"operationId": "Funding.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Funding"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument": {
"get": {
"tags": [
"Instrument"
],
"summary": "Get instruments.",
"description": "This returns all instruments and indices, including those that have settled or are unlisted.\nUse this endpoint if you want to query for individual instruments or use a complex filter.\nUse `/instrument/active` to return active instruments, or use a filter like `{\"state\": \"Open\"}`.\n\nThe instrument type is specified by the `typ` param.\n\n- Perpetual Contracts - `FFWCSX`\n- Perpetual Contracts (FX underliers) - `FFWCSF`\n- Spot - `IFXXXP`\n- Futures - `FFCCSX`\n- BitMEX Basket Index - `MRBXXX`\n- BitMEX Crypto Index - `MRCXXX`\n- BitMEX FX Index - `MRFXXX`\n- BitMEX Lending/Premium Index - `MRRXXX`\n- BitMEX Volatility Index - `MRIXXX`\n",
"operationId": "Instrument.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Instrument"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/active": {
"get": {
"tags": [
"Instrument"
],
"summary": "Get all active instruments and instruments that have expired in <24hrs.",
"operationId": "Instrument.getActive",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Instrument"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/indices": {
"get": {
"tags": [
"Instrument"
],
"summary": "Get all price indices.",
"operationId": "Instrument.getIndices",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Instrument"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/activeAndIndices": {
"get": {
"tags": [
"Instrument"
],
"summary": "Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active.",
"operationId": "Instrument.getActiveAndIndices",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Instrument"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/activeIntervals": {
"get": {
"tags": [
"Instrument"
],
"summary": "Return all active contract series and interval pairs.",
"description": "This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index.",
"operationId": "Instrument.getActiveIntervals",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/InstrumentInterval"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/compositeIndex": {
"get": {
"tags": [
"Instrument"
],
"summary": "Show constituent parts of an index.",
"description": "Composite indices are built from multiple external price sources.\n\nUse this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.BXBT` to\nget the ticks and weights of the constituent exchanges that build the \".BXBT\" index.\n\nA tick with reference `\"BMI\"` and weight `null` is the composite index tick.\n",
"operationId": "Instrument.getCompositeIndex",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "The composite index symbol.",
"required": false,
"default": ".BXBT",
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/IndexComposite"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/instrument/usdVolume": {
"get": {
"tags": [
"Instrument"
],
"summary": "Get a summary of exchange statistics in USD.",
"operationId": "Instrument.getUsdVolume",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Filter by symbol.",
"required": false,
"type": "string"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch.",
"required": false,
"type": "string",
"format": "JSON"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/StatsUSDBySymbol"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/insurance": {
"get": {
"tags": [
"Insurance"
],
"summary": "Get insurance fund history.",
"operationId": "Insurance.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Insurance"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/leaderboard": {
"get": {
"tags": [
"Leaderboard"
],
"summary": "Get current leaderboard.",
"operationId": "Leaderboard.get",
"parameters": [
{
"name": "method",
"in": "query",
"description": "Ranking type. Options: \"notional\", \"ROE\"",
"required": false,
"default": "notional",
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Leaderboard"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/leaderboard/name": {
"get": {
"tags": [
"Leaderboard"
],
"summary": "Get your alias on the leaderboard.",
"operationId": "Leaderboard.getName",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/liquidation": {
"get": {
"tags": [
"Liquidation"
],
"summary": "Get liquidation orders.",
"operationId": "Liquidation.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Liquidation"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/globalNotification": {
"get": {
"tags": [
"GlobalNotification"
],
"summary": "Get your current GlobalNotifications.",
"description": "This is an upcoming feature and currently does not return data.",
"operationId": "GlobalNotification.get",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/GlobalNotification"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/order": {
"get": {
"tags": [
"Order"
],
"summary": "Get your orders.",
"description": "To get open orders only, send {\"open\": true} in the filter param.\n\nSee the FIX Spec for explanations of these fields.",
"operationId": "Order.getOrders",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"post": {
"tags": [
"Order"
],
"summary": "Create a new order.",
"description": "## Placing Orders\n\nThis endpoint is used for placing orders. See individual fields below for more details on their use.\n\n#### Order Types\n\nAll orders require a `symbol`. All other fields are optional except when otherwise specified.\n\nThese are the valid `ordType`s:\n\n- **Limit**: The default order type. Specify an `orderQty` and `price`.\n- **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at\n which point it will cancel.\n- **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered\n into the book.\n - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher.\n - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your\n account so that it may trigger fully.\n - `Close` Stops don't require an `orderQty`. See Execution Instructions below.\n- **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`,\n and `price`.\n- **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders.\n- **LimitIfTouched**: As above; use for Take Profit Limit orders.\n- **Pegged**: Pegged orders allow users to submit a limit price relative to the current market price. Specify a\n `pegPriceType`, and `pegOffsetValue`.\n - Pegged orders **must** have an `execInst` of `Fixed`. This means the limit price is set at the time the order\n is accepted and does not change as the reference price changes.\n - `PrimaryPeg`: Price is set relative to near touch price.\n - `MarketPeg`: Price is set relative to far touch price.\n - A `pegPriceType` submitted with no `ordType` is treated as a `Pegged` order.\n\n#### Execution Instructions\n\nThe following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`).\n\n- **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead.\n This is intended to protect you from the far touch moving towards you while the order is in transit.\n It is not intended for speculating on the far touch moving away after submission - we consider such behaviour abusive and monitor for it.\n- **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price.\n Use only one. By default, `MarkPrice` is used. Also used for Pegged orders to define the value of `LastPeg`. IndexPrice is not applicable to spot trading symbols.\n- **ReduceOnly**: A `ReduceOnly` order can only reduce your position, not increase it. If you have a `ReduceOnly`\n limit order that rests in the order book while the position is reduced by other orders, then its order quantity will\n be amended down or canceled. If there are multiple `ReduceOnly` orders the least aggressive will be amended first. Not applicable to spot trading symbols.\n- **Close**: `Close` implies `ReduceOnly`. A `Close` order will cancel other active limit orders with the same side\n and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a\n `Close` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your\n position. If `orderQty` is not specified, a `Close` order has an `orderQty` equal to your current position's size. Not applicable to spot trading symbols.\n - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger\n above or below the `stopPx`.\n- **LastWithinMark**: Used by stop orders with `LastPrice` to allow stop triggers only when:\n - For Sell Stop Market / Stop Limit Order\n - Last Price <= Stop Price\n - Last Price >= Mark Price × (1 - 5%)\n - For Buy Stop Market / Stop Limit Order:\n - Last Price >= Stop Price\n - Last Price <= Mark Price × (1 + 5%)\n - Not applicable to spot trading symbols.\n- **Fixed**: Pegged orders **must** have an `execInst` of `Fixed`. This means the limit price is set at the time\n the order is accepted and does not change as the reference price changes.\n\n#### Pegged Orders\n\nPegged orders allow users to submit a limit price relative to the current market price.\nThe limit price is set once when the order is submitted and does not change with the reference price.\nThis order type is not intended for speculating on the far touch moving away after submission - we consider such behaviour abusive and monitor for it.\n\nPegged orders have an `ordType` of `Pegged`, and an `execInst` of `Fixed`.\n\nA `pegPriceType` and `pegOffsetValue` must also be submitted:\n\n- `PrimaryPeg` - price is set relative to the **near touch** price\n- `MarketPeg` - price is set relative to the **far touch** price\n\n#### Trailing Stop Pegged Orders\n\nUse `pegPriceType` of `TrailingStopPeg` to create Trailing Stops.\n\nThe price is set at submission and updates once per second if the underlying price (last/mark/index) has moved by\nmore than 0.1%. `stopPx` then moves as the market moves away from the peg, and freezes as the market moves toward it.\n\nUse `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the\n`execInst` (default `MarkPrice`). Use a negative offset for stop-sell and buy-if-touched orders.\n\nRequires `ordType`: `Stop`, `StopLimit`, `MarketIfTouched`, `LimitIfTouched`.\n\n#### Linked Orders\n\nLinked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing.\nPlease follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing.\n\nBitMEX offers four advanced Linked Order types:\n\n- **OCO**: _One Cancels the Other_. A very flexible version of the standard Stop / Take Profit technique.\n Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of\n `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates\n for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`.\n- **OTO**: _One Triggers the Other_. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and\n then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes.\n\n#### Trailing Stops\n\nYou may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market\nmoves away from the peg, and freeze as the market moves toward it.\n\nTo use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price\nspecified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders.\n\nRequires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`.\n\n#### Simple Quantities\n\n[Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/)\n\n#### Rate Limits\n\nYou can improve your reactivity to market movements while staying under your rate limit by using the\n[Amend](#!/Order/Order_amend) endpoint (PUT /order). This allows you to stay\nin the market and avoids the cancel/replace cycle.\n\n#### Tracking Your Orders\n\nIf you want to keep track of order IDs yourself, set a unique `clOrdID` per order.\nThis `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket),\nand can be used to get or cancel the order. Max length is 36 characters.\n\nYou can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new\nID as the `clOrdID` param, like so:\n\n```\n# Amends an order's leavesQty, and updates its clOrdID to \"def-456\"\nPUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000}\n```\n",
"operationId": "Order.new",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Instrument symbol. e.g. 'XBTUSD'.",
"required": true,
"type": "string"
},
{
"name": "side",
"in": "formData",
"description": "Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative.",
"required": false,
"type": "string"
},
{
"name": "simpleOrderQty",
"in": "formData",
"description": "Deprecated: simple orders are not supported after 2018/10/26",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "orderQty",
"in": "formData",
"description": "Order quantity in units of the instrument (i.e. contracts, for spot it is base currency in minor currency for spot (e.g. XBt quantity for XBT)).",
"required": false,
"format": "int32",
"type": "integer"
},
{
"name": "price",
"in": "formData",
"description": "Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "displayQty",
"in": "formData",
"description": "Optional quantity to display in the book. Use 0 for a fully hidden order.",
"required": false,
"format": "int32",
"type": "integer"
},
{
"name": "stopPx",
"in": "formData",
"description": "Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "clOrdID",
"in": "formData",
"description": "Optional Client Order ID. This clOrdID will come back on the order and any related executions.",
"required": false,
"type": "string"
},
{
"name": "clOrdLinkID",
"in": "formData",
"description": "Optional Client Order Link ID for contingent orders",
"required": false,
"type": "string"
},
{
"name": "pegOffsetValue",
"in": "formData",
"description": "Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "pegPriceType",
"in": "formData",
"description": "Optional peg price type. Valid options: MarketPeg, PrimaryPeg, TrailingStopPeg.",
"required": false,
"type": "string"
},
{
"name": "ordType",
"in": "formData",
"description": "Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified.",
"required": false,
"default": "Limit",
"type": "string"
},
{
"name": "timeInForce",
"in": "formData",
"description": "Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.",
"required": false,
"type": "string"
},
{
"name": "execInst",
"in": "formData",
"description": "Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed, LastWithinMark. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. 'LastWithinMark' instruction valid for 'Stop' and 'StopLimit' with instruction 'LastPrice'. IndexPrice, LastWithMark, Close and ReduceOnly are not applicable to spot trading symbols.",
"required": false,
"type": "string"
},
{
"name": "contingencyType",
"in": "formData",
"description": "Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther.",
"required": false,
"type": "string"
},
{
"name": "text",
"in": "formData",
"description": "Optional order annotation. e.g. 'Take profit'.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"put": {
"tags": [
"Order"
],
"summary": "Amend the quantity or price of an open order.",
"description": "Send an `orderID` or `origClOrdID` to identify the order you wish to amend.\n\nBoth order quantity and price can be amended. Only one `qty` field can be used to amend.\n\nUse the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful\nif you want to adjust your position's delta by a certain amount, regardless of how much of the order has\nalready filled.\n\n> A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill.\n",
"operationId": "Order.amend",
"parameters": [
{
"name": "orderID",
"in": "formData",
"description": "Order ID",
"required": false,
"type": "string"
},
{
"name": "origClOrdID",
"in": "formData",
"description": "Client Order ID. See POST /order.",
"required": false,
"type": "string"
},
{
"name": "clOrdID",
"in": "formData",
"description": "Optional new Client Order ID, requires `origClOrdID`.",
"required": false,
"type": "string"
},
{
"name": "simpleOrderQty",
"in": "formData",
"description": "Deprecated: simple orders are not supported after 2018/10/26",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "orderQty",
"in": "formData",
"description": "Optional order quantity in units of the instrument (i.e. contracts, for spot it is the base currency in minor currency (e.g. XBt quantity for XBT)).",
"required": false,
"format": "int32",
"type": "integer"
},
{
"name": "simpleLeavesQty",
"in": "formData",
"description": "Deprecated: simple orders are not supported after 2018/10/26",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "leavesQty",
"in": "formData",
"description": "Optional leaves quantity in units of the instrument (i.e. contracts, for spot it is the base currency in minor currency (e.g. XBt quantity for XBT)). Useful for amending partially filled orders.",
"required": false,
"format": "int32",
"type": "integer"
},
{
"name": "price",
"in": "formData",
"description": "Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "stopPx",
"in": "formData",
"description": "Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "pegOffsetValue",
"in": "formData",
"description": "Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "text",
"in": "formData",
"description": "Optional amend annotation. e.g. 'Adjust skew'.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"delete": {
"tags": [
"Order"
],
"summary": "Cancel order(s). Send multiple order IDs to cancel in bulk.",
"description": "Either an orderID or a clOrdID must be provided.",
"operationId": "Order.cancel",
"parameters": [
{
"name": "orderID",
"in": "formData",
"description": "Order ID(s).",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "clOrdID",
"in": "formData",
"description": "Client Order ID(s). See POST /order.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "text",
"in": "formData",
"description": "Optional cancellation annotation. e.g. 'Spread Exceeded'.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/order/closePosition": {
"post": {
"tags": [
"Order"
],
"summary": "Close a position. [Deprecated, use POST /order with execInst: 'Close']",
"description": "If no `price` is specified, a market order will be submitted to close the whole of your position. This will also close all other open orders in this symbol.",
"operationId": "Order.closePosition",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Symbol of position to close.",
"required": true,
"type": "string"
},
{
"name": "price",
"in": "formData",
"description": "Optional limit price.",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"description": "Resulting close order.",
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/order/all": {
"delete": {
"tags": [
"Order"
],
"summary": "Cancels all of your orders.",
"operationId": "Order.cancelAll",
"parameters": [
{
"name": "targetAccountIds",
"in": "formData",
"description": "AccountIds to cancel all orders, must be a paired account with main user. Also accepts wildcard, [*], this will cancel all orders for all accounts. the authenticated user has order write permissions for.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "symbol",
"in": "formData",
"description": "Optional symbol. If provided, only cancels orders for that symbol.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "formData",
"description": "Optional filter for cancellation. Use to only cancel some orders, e.g. `{\"side\": \"Buy\"}`.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "text",
"in": "formData",
"description": "Optional cancellation annotation. e.g. 'Spread Exceeded'",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/order/cancelAllAfter": {
"post": {
"tags": [
"Order"
],
"summary": "Automatically cancel all your orders after a specified timeout.",
"description": "Useful as a dead-man's switch to ensure your orders are canceled in case of an outage.\nIf called repeatedly, the existing offset will be canceled and a new one will be inserted in its place.\n\nExample usage: call this route at 15s intervals with an offset of 60000 (60s).\nIf this route is not called within 60 seconds, all your orders will be automatically canceled.\n\nThis is also available via [WebSocket](https://www.bitmex.com/app/wsAPI#Dead-Mans-Switch-Auto-Cancel).\n",
"operationId": "Order.cancelAllAfter",
"parameters": [
{
"name": "timeout",
"in": "formData",
"description": "Timeout in ms. Set to 0 to cancel this timer. ",
"required": true,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/orderBook/L2": {
"get": {
"tags": [
"OrderBook"
],
"summary": "Get current orderbook in vertical format.",
"operationId": "OrderBook.getL2",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.",
"required": true,
"type": "string"
},
{
"name": "depth",
"in": "query",
"description": "Orderbook depth per side. Send 0 for full depth.",
"required": false,
"minimum": 0,
"format": "int32",
"default": 25,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/OrderBookL2"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/position": {
"get": {
"tags": [
"Position"
],
"summary": "Get your positions.",
"description": "This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below.\n\nThe fields _account_, _symbol_, _currency_ are unique to each position and form its key.\n\nSpot trading symbols returns a subset of the position fields, mainly the open order aggregates.\n\n- **account**: Your unique account ID.\n- **symbol**: The contract for this position.\n- **currency**: The margin currency for this position.\n- **underlying**: Meta data of the _symbol_.\n- **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_\n- **commission**: The maximum of the maker, taker, and settlement fee.\n- **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage.\n- **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit.\n- **riskLimit**: This is a function of your _maintMarginReq_.\n- **leverage**: 1 / initMarginReq.\n- **crossMargin**: True/false depending on whether you set cross margin on this position.\n- **deleveragePercentile**: Indicates where your position is in the ADL queue.\n- **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position.\n- **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed.\n- **currentQty**: The current position amount in contracts.\n- **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_).\n- **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_).\n- **realisedCost**: The realised cost of this position calculated with regard to average cost accounting.\n- **unrealisedCost**: _currentCost_ - _realisedCost_.\n- **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_).\n- **markPrice**: The mark price of the symbol in _quoteCurrency_.\n- **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_).\n- **homeNotional**: Value of position in units of _underlying_.\n- **foreignNotional**: Value of position in units of _quoteCurrency_.\n- **realisedPnl**: The negative of _realisedCost_.\n- **unrealisedPnl**: _unrealisedGrossPnl_.\n- **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated.\n- **bankruptPrice**: Once markPrice reaches this price, this position will have no equity.\n",
"operationId": "Position.get",
"parameters": [
{
"name": "filter",
"in": "query",
"description": "Table filter. For example, send {\"symbol\": \"XBTUSD\"}.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Which columns to fetch. For example, send [\"columnName\"].",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of rows to fetch.",
"required": false,
"format": "int32",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Position"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/position/isolate": {
"post": {
"tags": [
"Position"
],
"summary": "Enable isolated margin or cross margin per-position.",
"description": "Users can switch isolate margin per-position. This function allows switching margin isolation (aka fixed margin) on and off.",
"operationId": "Position.isolateMargin",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Position symbol to isolate.",
"required": true,
"type": "string"
},
{
"name": "enabled",
"in": "formData",
"description": "True for isolated margin, false for cross margin.",
"required": false,
"default": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"description": "Affected position.",
"$ref": "#/definitions/Position"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/position/riskLimit": {
"post": {
"tags": [
"Position"
],
"summary": "Update your risk limit.",
"description": "Risk Limits limit the size of positions you can trade at various margin levels. Larger positions require more margin. Please see the Risk Limit documentation for more details.",
"operationId": "Position.updateRiskLimit",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Symbol of position to update risk limit on.",
"required": true,
"type": "string"
},
{
"name": "riskLimit",
"in": "formData",
"description": "New Risk Limit, in Satoshis.",
"required": true,
"format": "int64",
"type": "integer"
},
{
"name": "targetAccountId",
"in": "formData",
"description": "AccountId for the position that the risk limit would be updated on, must be a paired account with main user.",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"description": "Affected position.",
"$ref": "#/definitions/Position"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/position/transferMargin": {
"post": {
"tags": [
"Position"
],
"summary": "Transfer equity in or out of a position.",
"description": "When margin is isolated on a position, use this function to add or remove margin from the position. Note that you cannot remove margin below the initial margin threshold.",
"operationId": "Position.transferIsolatedMargin",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Symbol of position to isolate.",
"required": true,
"type": "string"
},
{
"name": "amount",
"in": "formData",
"description": "Amount to transfer, in Satoshis. May be negative.",
"required": true,
"format": "int64",
"type": "integer"
},
{
"name": "targetAccountId",
"in": "formData",
"description": "AccountId for the position that the margin would be transfered to, must be a paired account with main user.",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"description": "Affected position.",
"$ref": "#/definitions/Position"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/position/leverage": {
"post": {
"tags": [
"Position"
],
"summary": "Choose leverage for a position.",
"description": "Users can choose an isolated leverage. This will automatically enable isolated margin.",
"operationId": "Position.updateLeverage",
"parameters": [
{
"name": "symbol",
"in": "formData",
"description": "Symbol of position to adjust.",
"required": true,
"type": "string"
},
{
"name": "leverage",
"in": "formData",
"description": "Leverage value. Send a number between 0.01 and 100 to enable isolated margin with a fixed leverage. Send 0 to enable cross margin.",
"required": true,
"type": "number",
"format": "double"
},
{
"name": "targetAccountId",
"in": "formData",
"description": "AccountId for the position that the leverage would be changed on, must be a paired account with main user.",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"description": "Affected position.",
"$ref": "#/definitions/Position"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/quote": {
"get": {
"tags": [
"Quote"
],
"summary": "Get Quotes.",
"operationId": "Quote.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Quote"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/quote/bucketed": {
"get": {
"tags": [
"Quote"
],
"summary": "Get previous quotes in time buckets.",
"description": "Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.",
"operationId": "Quote.getBucketed",
"parameters": [
{
"name": "binSize",
"in": "query",
"description": "Time interval to bucket by. Available options: [1m,5m,1h,1d].",
"required": false,
"default": "1m",
"type": "string"
},
{
"name": "partial",
"in": "query",
"description": "If true, will send in-progress (incomplete) bins for the current time period.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Quote"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/schema": {
"get": {
"tags": [
"Schema"
],
"summary": "Get model schemata for data objects returned by this API.",
"operationId": "Schema.get",
"parameters": [
{
"name": "model",
"in": "query",
"description": "Optional model filter. If omitted, will return all models.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/schema/websocketHelp": {
"get": {
"tags": [
"Schema"
],
"summary": "Returns help text & subject list for websocket usage.",
"operationId": "Schema.websocketHelp",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/settlement": {
"get": {
"tags": [
"Settlement"
],
"summary": "Get settlement history.",
"operationId": "Settlement.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Settlement"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/stats": {
"get": {
"tags": [
"Stats"
],
"summary": "Get exchange-wide and per-series turnover and volume statistics.",
"operationId": "Stats.get",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Stats"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/stats/history": {
"get": {
"tags": [
"Stats"
],
"summary": "Get historical exchange-wide and per-series turnover and volume statistics.",
"operationId": "Stats.history",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/StatsHistory"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/stats/historyUSD": {
"get": {
"tags": [
"Stats"
],
"summary": "Get a summary of exchange statistics in USD.",
"operationId": "Stats.historyUSD",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/StatsUSD"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/trade": {
"get": {
"tags": [
"Trade"
],
"summary": "Get Trades.",
"description": "Please note that indices (symbols starting with `.`) post trades at intervals to the trade feed. These have a `size` of 0 and are used only to indicate a changing price.\n\nSee [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.html) for explanations of these fields.",
"operationId": "Trade.get",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Trade"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/trade/bucketed": {
"get": {
"tags": [
"Trade"
],
"summary": "Get previous trades in time buckets.",
"description": "Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.\n\nAlso note the `open` price is equal to the `close` price of the previous timeframe bucket.",
"operationId": "Trade.getBucketed",
"parameters": [
{
"name": "binSize",
"in": "query",
"description": "Time interval to bucket by. Available options: [1m,5m,1h,1d].",
"required": false,
"default": "1m",
"type": "string"
},
{
"name": "partial",
"in": "query",
"description": "If true, will send in-progress (incomplete) bins for the current time period.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "symbol",
"in": "query",
"description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.\n\nSymbols are case-insensitive.",
"required": false,
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "columns",
"in": "query",
"description": "Array of column names to fetch. If omitted, will return all columns.\n\nNote that this method will always return item keys, even when not specified, so you may receive more columns that you expect.",
"required": false,
"type": "string",
"format": "JSON"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Must be a positive integer.",
"required": false,
"format": "int32",
"default": 100,
"type": "integer"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results.",
"required": false,
"format": "int32",
"default": 0,
"type": "integer"
},
{
"name": "reverse",
"in": "query",
"description": "If true, will sort results newest first.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "startTime",
"in": "query",
"description": "Starting date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "Ending date filter for results.",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TradeBin"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/depositAddress": {
"get": {
"tags": [
"User"
],
"summary": "Get a deposit address.",
"operationId": "User.getDepositAddress",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint",
"required": true,
"type": "string"
},
{
"name": "network",
"in": "query",
"description": "The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "string"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/depositAddressInformation": {
"get": {
"tags": [
"User"
],
"summary": "Get a deposit address.",
"operationId": "User.getDepositAddressInformation",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint",
"required": true,
"type": "string"
},
{
"name": "network",
"in": "query",
"description": "The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/DepositAddress"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/wallet": {
"get": {
"tags": [
"User"
],
"summary": "Get your current wallet information.",
"operationId": "User.getWallet",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint. For all currencies specify \"all\"",
"required": false,
"default": "XBt",
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Wallet"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/walletHistory": {
"get": {
"tags": [
"User"
],
"summary": "Get a history of all of your wallet transactions (deposits, withdrawals, PNL).",
"operationId": "User.getWalletHistory",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint. For all currencies specify \"all\"",
"required": false,
"default": "XBt",
"type": "string"
},
{
"name": "count",
"in": "query",
"description": "Number of results to fetch. Fetch results from start to start + count. Max: 10,000 rows.",
"required": false,
"default": 10000,
"type": "number",
"format": "double"
},
{
"name": "start",
"in": "query",
"description": "Starting point for results, integer. Default 0.",
"required": false,
"default": 0,
"type": "number",
"format": "double"
},
{
"name": "targetAccountId",
"in": "query",
"description": "AccountId to view the history of, must be a paired account with the authorised user requesting the history.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "reverse",
"in": "query",
"description": "Start from the latest transaction record. Default true.",
"required": false,
"default": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/walletSummary": {
"get": {
"tags": [
"User"
],
"summary": "Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).",
"description": "Provides an aggregated view of transactions, by transaction type, over a specific time period.",
"operationId": "User.getWalletSummary",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint. For all currencies specify \"all\"",
"required": false,
"default": "XBt",
"type": "string"
},
{
"name": "startTime",
"in": "query",
"description": "Start time for the summary",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "endTime",
"in": "query",
"description": "End time for the summary",
"required": false,
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/WalletSummaryRecord"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/executionHistory": {
"get": {
"tags": [
"User"
],
"summary": "Get the execution history by day.",
"operationId": "User.getExecutionHistory",
"parameters": [
{
"name": "symbol",
"in": "query",
"required": true,
"default": "XBTUSD",
"type": "string"
},
{
"name": "timestamp",
"in": "query",
"required": true,
"default": "2017-02-13T12:00:00.000Z",
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Execution"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/staking": {
"get": {
"tags": [
"User"
],
"summary": "Get the current user staking amount.",
"operationId": "User.getStaking",
"parameters": [
{
"name": "currency",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/StakingRecord"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/unstakingRequests": {
"get": {
"tags": [
"User"
],
"summary": "Get the current user unstaking requests",
"operationId": "User.getUnstakingRequests",
"parameters": [
{
"name": "status",
"in": "query",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/StakingRecord"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"post": {
"tags": [
"User"
],
"summary": "Create unstaking request",
"operationId": "User.createUnstakingRequests",
"parameters": [
{
"name": "symbol",
"in": "formData",
"required": true,
"type": "string"
},
{
"name": "amount",
"in": "formData",
"required": true,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"delete": {
"tags": [
"User"
],
"summary": "Cancel unstaking request",
"operationId": "User.deleteUnstakingRequests",
"parameters": [
{
"name": "redemptionID",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/staking/instruments": {
"get": {
"tags": [
"User"
],
"summary": "List staking instruments",
"operationId": "User.getStakingInstruments",
"parameters": [
{
"name": "symbol",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "currency",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/staking/tiers": {
"get": {
"tags": [
"User"
],
"summary": "List staking tiers for a given currency",
"operationId": "User.getStakingTiers",
"parameters": [
{
"name": "currency",
"in": "query",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/walletTransfer": {
"post": {
"tags": [
"User"
],
"summary": "Execute a transfer to a paired account.",
"description": "This will send a confirmation email to the email address on record.",
"operationId": "User.walletTransfer",
"parameters": [
{
"name": "currency",
"in": "formData",
"description": "Currency you're transfering. Any currency. For all currencies, see asset config endpoint",
"required": true,
"type": "string"
},
{
"name": "amount",
"in": "formData",
"description": "Amount of transfer.",
"required": true,
"format": "int64",
"type": "integer"
},
{
"name": "fromAccountId",
"in": "formData",
"description": "AccountID to send the transfer from. Must be paired account with the authenticated user.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "targetAccountId",
"in": "formData",
"description": "AccountId to send the transfer to, must be a paired account with the user sending the transfer.",
"required": true,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Transaction"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/requestWithdrawal": {
"post": {
"tags": [
"User"
],
"summary": "Request a withdrawal to an external wallet.",
"description": "This will send a confirmation email to the email address on record.",
"operationId": "User.requestWithdrawal",
"parameters": [
{
"name": "otpToken",
"in": "formData",
"description": "2FA token. Required for all external withdrawals unless the address has skip2FA in addressbook.",
"required": false,
"type": "string"
},
{
"name": "currency",
"in": "formData",
"description": "Currency you're withdrawing. Any currency. For all currencies, see asset config endpoint",
"required": true,
"default": "XBt",
"type": "string"
},
{
"name": "network",
"in": "formData",
"description": "The `network` parameter is used to indicate which blockchain you would like to withdraw from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.",
"required": true,
"type": "string"
},
{
"name": "amount",
"in": "formData",
"description": "Amount of withdrawal currency.",
"required": true,
"format": "int64",
"type": "integer"
},
{
"name": "address",
"in": "formData",
"description": "Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified.",
"required": false,
"type": "string"
},
{
"name": "memo",
"in": "formData",
"description": "Destination Memo. If `address`, is specified, Destination Memo can also be specified",
"required": false,
"type": "string"
},
{
"name": "addressId",
"in": "formData",
"description": "ID of the Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "targetUserId",
"in": "formData",
"description": "ID of the Target User. One of `address`, `addressId`, `targetUserId` has to be specified.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "fee",
"in": "formData",
"description": "Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email.",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "text",
"in": "formData",
"description": "Optional annotation, e.g. 'Transfer to home wallet'.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Transaction"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/withdrawal": {
"delete": {
"tags": [
"User"
],
"summary": "Cancel pending withdrawal",
"operationId": "User.cancelPendingWithdrawal",
"parameters": [
{
"name": "transactID",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/cancelWithdrawal": {
"post": {
"tags": [
"User"
],
"summary": "Cancel a withdrawal.",
"operationId": "User.cancelWithdrawal",
"parameters": [
{
"name": "token",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Transaction"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/confirmWithdrawal": {
"post": {
"tags": [
"User"
],
"summary": "Confirm a withdrawal.",
"operationId": "User.confirmWithdrawal",
"parameters": [
{
"name": "token",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Transaction"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/confirmEmail": {
"post": {
"tags": [
"User"
],
"summary": "Confirm your email address with a token.",
"operationId": "User.confirm",
"parameters": [
{
"name": "token",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/AccessToken"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/affiliateStatus": {
"get": {
"tags": [
"User"
],
"summary": "Get your current affiliate/referral status.",
"operationId": "User.getAffiliateStatus",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint. For all currencies specify \"all\"",
"required": false,
"default": "XBt",
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Affiliate"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/checkReferralCode": {
"get": {
"tags": [
"User"
],
"summary": "Check if a referral code is valid.",
"description": "If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid.",
"operationId": "User.checkReferralCode",
"parameters": [
{
"name": "referralCode",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/quoteFillRatio": {
"get": {
"tags": [
"User"
],
"summary": "Get 7 days worth of Quote Fill Ratio statistics.",
"operationId": "User.getQuoteFillRatio",
"parameters": [
{
"name": "targetAccountId",
"in": "query",
"description": "AccountId to get quote fill ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/QuoteFillRatio"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/quoteValueRatio": {
"get": {
"tags": [
"User"
],
"summary": "Get Quote Value Ratio statistics over the last 3 days",
"operationId": "User.getQuoteValueRatio",
"parameters": [
{
"name": "targetAccountId",
"in": "query",
"description": "AccountId to get quote value ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/QuoteValueRatio"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/tradingVolume": {
"get": {
"tags": [
"User"
],
"summary": "Get your 30 days USD average trading volume",
"operationId": "User.getTradingVolume",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TradingVolume"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/addSubaccount": {
"post": {
"tags": [
"User"
],
"summary": "Creates a new sub-account.",
"operationId": "User.createSubAccount",
"parameters": [
{
"name": "accountName",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/updateSubaccount": {
"post": {
"tags": [
"User"
],
"summary": "Updates the sub-account name.",
"operationId": "User.updateSubAccount",
"parameters": [
{
"name": "targetAccountId",
"in": "formData",
"required": true,
"type": "number",
"format": "double"
},
{
"name": "accountName",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/getWalletTransferAccounts": {
"get": {
"tags": [
"User"
],
"summary": "Get the list of accounts you can transfer funds between.",
"operationId": "User.getWalletTransferAccounts",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/logout": {
"post": {
"tags": [
"User"
],
"summary": "Log out of BitMEX.",
"operationId": "User.logout",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "null"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/user/preferences": {
"post": {
"tags": [
"User"
],
"summary": "Save user preferences.",
"operationId": "User.savePreferences",
"parameters": [
{
"name": "prefs",
"in": "formData",
"required": true,
"type": "string",
"format": "JSON"
},
{
"name": "overwrite",
"in": "formData",
"description": "If true, will overwrite all existing preferences.",
"required": false,
"default": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/User"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user": {
"get": {
"tags": [
"User"
],
"summary": "Get your user model.",
"operationId": "User.get",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/User"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/commission": {
"get": {
"tags": [
"User"
],
"summary": "Get your account's commission status.",
"operationId": "User.getCommission",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/UserCommissionsBySymbol"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/margin": {
"get": {
"tags": [
"User"
],
"summary": "Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.",
"operationId": "User.getMargin",
"parameters": [
{
"name": "currency",
"in": "query",
"description": "Any currency. For all currencies, see asset config endpoint. For all currencies specify \"all\"",
"required": false,
"default": "XBt",
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Margin"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/csa": {
"get": {
"tags": [
"User"
],
"summary": "Get your account's CSA status.",
"operationId": "User.getCSA",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/CollateralSupportAgreement"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/user/communicationToken": {
"post": {
"tags": [
"User"
],
"summary": "Register your communication token for mobile clients",
"operationId": "User.communicationToken",
"parameters": [
{
"name": "token",
"in": "formData",
"required": true,
"type": "string"
},
{
"name": "platformAgent",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/CommunicationToken"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/userEvent": {
"get": {
"tags": [
"UserEvent"
],
"summary": "Get your user events",
"operationId": "UserEvent.get",
"parameters": [
{
"name": "count",
"in": "query",
"description": "Number of results to fetch.",
"required": false,
"default": 100,
"type": "number",
"format": "double"
},
{
"name": "startId",
"in": "query",
"description": "Cursor for pagination.",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserEvent"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/wallet/assets": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get Assets Config",
"operationId": "Wallet.getAssetsConfig",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AssetsConfig"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/wallet/networks": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get Networks Config",
"operationId": "Wallet.getNetworksConfig",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/NetworksConfig"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/address": {
"post": {
"tags": [
"Address"
],
"summary": "Creates a new saved address.",
"operationId": "Address.new",
"parameters": [
{
"name": "currency",
"in": "formData",
"description": "Currency of the address. Options: `XBt`, `USDt`",
"required": true,
"type": "string"
},
{
"name": "network",
"in": "formData",
"description": "Selected network.",
"required": true,
"type": "string"
},
{
"name": "address",
"in": "formData",
"description": "Destination Address.",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "formData",
"description": "Name of the entry, eg. 'Hardware wallet'.",
"required": true,
"type": "string"
},
{
"name": "note",
"in": "formData",
"description": "Optional annotation.",
"required": false,
"type": "string"
},
{
"name": "skipConfirm",
"in": "formData",
"description": "Skip e-mail confirmations for transfers to this address. Will require an email confirmation after creation.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "skip2FA",
"in": "formData",
"description": "Skip 2FA confirmations for transfers to this address. Will require an email confirmation after creation.",
"required": false,
"default": false,
"type": "boolean"
},
{
"name": "memo",
"in": "formData",
"description": "Destination Memo.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Address"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"get": {
"tags": [
"Address"
],
"summary": "Get your addresses.",
"operationId": "Address.get",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Address"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/userAffiliates": {
"get": {
"tags": [
"UserAffiliates"
],
"summary": "Get user's affiliates to a given depth",
"operationId": "UserAffiliates.get",
"parameters": [
{
"name": "depth",
"in": "query",
"description": "the depth of affiliates to return. Eg depth = 2 would return direct affiliates and their affiliates",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "targetAccountId",
"in": "query",
"description": "AccountId of Sub-Affiliate Account",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "selectUserId",
"in": "query",
"description": "User id of result array to keep",
"required": false,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/guild": {
"post": {
"tags": [
"Guild"
],
"summary": "Creates a new guild",
"operationId": "Guild.new",
"parameters": [
{
"name": "name",
"in": "formData",
"description": "Name of the guild, must be unique, must be at least 5 characters",
"required": true,
"type": "string"
},
{
"name": "emoji",
"in": "formData",
"description": "Emoji name.",
"required": true,
"type": "string"
},
{
"name": "potDistributionPercent",
"in": "formData",
"description": "How much of the pot should be distributed to the guild members, must be between 0 and 100",
"required": true,
"type": "number",
"format": "double"
},
{
"name": "potDistributionType",
"in": "formData",
"description": "How the pot should be distributed to the guild members, must be one of the following: ROLL_OVER, TOP_3, TOP_5, TOP_10, VOLUME_PERCENTAGE, TOP_3_BY_ADV, TOP_5_BY_ADV, TOP_10_BY_ADV, TOP_3_BY_ROI, TOP_5_BY_ROI, TOP_10_BY_ROI, RANDOM",
"required": true,
"type": "string"
},
{
"name": "description",
"in": "formData",
"description": "Guild description, can be used to explain the guild to other users.",
"required": false,
"type": "string"
},
{
"name": "twitter",
"in": "formData",
"description": "Guild twitter handle.",
"required": false,
"type": "string"
},
{
"name": "discord",
"in": "formData",
"description": "Guild discord link.",
"required": false,
"type": "string"
},
{
"name": "telegram",
"in": "formData",
"description": "Guild telegram link.",
"required": false,
"type": "string"
},
{
"name": "imgUrl",
"in": "formData",
"description": "URL for the profile image of the guild, is used by clients to add some color to the guild, if no image is provided, a default image is used",
"required": false,
"type": "string"
},
{
"name": "isPrivate",
"in": "formData",
"description": "Guild privacy status",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Guild"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"put": {
"tags": [
"Guild"
],
"summary": "Edit guild new guild",
"operationId": "Guild.edit",
"parameters": [
{
"name": "name",
"in": "formData",
"description": "Name of the guild, must be unique, must be at least 5 characters",
"required": true,
"type": "string"
},
{
"name": "emoji",
"in": "formData",
"description": "Emoji name.",
"required": true,
"type": "string"
},
{
"name": "potDistributionPercent",
"in": "formData",
"description": "How much of the pot should be distributed to the guild members, must be between 0 and 100",
"required": true,
"type": "number",
"format": "double"
},
{
"name": "potDistributionType",
"in": "formData",
"description": "How the pot should be distributed to the guild members, must be one of the following: ROLL_OVER, TOP_3, TOP_5, TOP_10, VOLUME_PERCENTAGE, TOP_3_BY_ADV, TOP_5_BY_ADV, TOP_10_BY_ADV, TOP_3_BY_ROI, TOP_5_BY_ROI, TOP_10_BY_ROI, RANDOM",
"required": true,
"type": "string"
},
{
"name": "potTraderId",
"in": "formData",
"description": "User ID of the guild member with order write permission for the pot",
"required": false,
"type": "number",
"format": "double"
},
{
"name": "description",
"in": "formData",
"description": "Guild description, can be used to explain the guild to other users.",
"required": false,
"type": "string"
},
{
"name": "twitter",
"in": "formData",
"description": "Guild twitter handle.",
"required": false,
"type": "string"
},
{
"name": "discord",
"in": "formData",
"description": "Guild discord link.",
"required": false,
"type": "string"
},
{
"name": "telegram",
"in": "formData",
"description": "Guild telegram link.",
"required": false,
"type": "string"
},
{
"name": "imgUrl",
"in": "formData",
"description": "URL for the profile image of the guild, is used by clients to add some color to the guild, if no image is provided, a default image is used",
"required": false,
"type": "string"
},
{
"name": "isPrivate",
"in": "formData",
"description": "Guild privacy status",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Guild"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
},
"get": {
"tags": [
"Guild"
],
"summary": "Get all guilds",
"operationId": "Guild.get",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
},
"/guild/shareTrades": {
"post": {
"tags": [
"Guild"
],
"summary": "Toggle share trades for your account, which controls whether your guild members can see your orders and positions in their UI",
"operationId": "Guild.shareTrades",
"parameters": [
{
"name": "shareTrades",
"in": "formData",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/guild/leave": {
"post": {
"tags": [
"Guild"
],
"summary": "Leave guild or cancel guild join request",
"operationId": "Guild.leave",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/guild/kick": {
"post": {
"tags": [
"Guild"
],
"summary": "Kick member from guild",
"operationId": "Guild.kick",
"parameters": [
{
"name": "memberUserId",
"in": "formData",
"required": true,
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/guild/join": {
"post": {
"tags": [
"Guild"
],
"summary": "Request to Join a private guild or join a public guild",
"operationId": "Guild.join",
"parameters": [
{
"name": "code",
"in": "formData",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/guild/archive": {
"post": {
"tags": [
"Guild"
],
"summary": "Archive a guild",
"operationId": "Guild.archive",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "object"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/porl/nonce": {
"get": {
"tags": [
"Porl"
],
"summary": "Get your Proof of Reserves nonce and data.",
"description": "## Proof of Reserves Nonce\n\nThis endpoint will return the nonce and associated data needed to validate BitMEX reserves data.\n\n\n",
"operationId": "Porl.getNonce",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"$ref": "#/definitions/Porl"
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false
}
},
"/porl/snapshots": {
"get": {
"tags": [
"Porl"
],
"summary": "Get Proof of Reserves historical snapshots",
"operationId": "Porl.getSnapshots",
"parameters": [],
"responses": {
"200": {
"description": "Request was successful",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
}
},
"400": {
"description": "Parameter Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Access Denied",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"deprecated": false,
"security": []
}
}
},
"tags": [
{
"name": "Announcement",
"description": "Public Announcements"
},
{
"name": "APIKey",
"description": "Persistent API Keys for Developers"
},
{
"name": "Chat",
"description": "Trollbox Data"
},
{
"name": "Execution",
"description": "Raw Order and Balance Data"
},
{
"name": "Funding",
"description": "Swap Funding History"
},
{
"name": "Instrument",
"description": "Tradeable Contracts, Indices, and History"
},
{
"name": "Insurance",
"description": "Insurance Fund Data"
},
{
"name": "Leaderboard",
"description": "Information on Top Users"
},
{
"name": "Liquidation",
"description": "Active Liquidations"
},
{
"name": "GlobalNotification",
"description": "Account Notifications"
},
{
"name": "Order",
"description": "Placement, Cancellation, Amending, and History"
},
{
"name": "OrderBook",
"description": "Level 2 Book Data"
},
{
"name": "Position",
"description": "Summary of Open and Closed Positions"
},
{
"name": "Quote",
"description": "Best Bid/Offer Snapshots & Historical Bins"
},
{
"name": "Schema",
"description": "Dynamic Schemata for Developers"
},
{
"name": "Settlement",
"description": "Historical Settlement Data"
},
{
"name": "Stats",
"description": "Exchange Statistics"
},
{
"name": "Trade",
"description": "Individual & Bucketed Trades"
},
{
"name": "User",
"description": "Account Operations"
},
{
"name": "UserEvent",
"description": "User Events for Auditing"
},
{
"name": "Wallet",
"description": "Assets and Networks Data"
},
{
"name": "Address"
},
{
"name": "UserAffiliates"
},
{
"name": "Guild"
},
{
"name": "Porl",
"description": "Proof of Reserves/Liabilities"
}
],
"consumes": [
"application/json",
"application/x-www-form-urlencoded"
],
"host": "www.bitmex.com",
"produces": [
"application/json",
"application/xml",
"text/xml",
"application/javascript",
"text/javascript"
],
"definitions": {
"Announcement": {
"description": "Public Announcements",
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"link": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"date": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id"
],
"type": "object"
},
"Error": {
"properties": {
"error": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"required": [
"error"
],
"type": "object"
},
"APIKey": {
"description": "Persistent API Keys for Developers",
"properties": {
"id": {
"maxLength": 24,
"type": "string"
},
"secret": {
"maxLength": 48,
"type": "string"
},
"name": {
"maxLength": 64,
"type": "string"
},
"nonce": {
"format": "int64",
"default": 0,
"type": "integer"
},
"cidr": {
"maxLength": 18,
"type": "string"
},
"cidrs": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
},
"targetAccountId": {
"format": "int32",
"type": "integer"
},
"permissions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/x-any"
}
},
"enabled": {
"default": false,
"type": "boolean"
},
"userId": {
"format": "int32",
"type": "integer"
},
"created": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"secret",
"name",
"nonce",
"userId"
],
"type": "object"
},
"PinnedMessage": {
"description": "Pinned Messages",
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"channelID": {
"format": "int32",
"type": "integer"
},
"messageId": {
"format": "int32",
"type": "integer"
},
"created": {
"type": "string",
"format": "date-time"
},
"ended": {
"type": "string",
"format": "date-time"
},
"createdUserId": {
"type": "number",
"format": "double"
},
"endedUserId": {
"type": "number",
"format": "double"
}
},
"required": [
"id",
"channelID",
"messageId"
],
"type": "object"
},
"Chat": {
"description": "Trollbox Data",
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"date": {
"type": "string",
"format": "date-time"
},
"user": {
"type": "string"
},
"userColor": {
"type": "string"
},
"message": {
"type": "string"
},
"html": {
"type": "string"
},
"channelID": {
"type": "number",
"format": "double"
}
},
"required": [
"date",
"user",
"message",
"html"
],
"type": "object"
},
"ChatChannel": {
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"name": {
"type": "string"
},
"isPrivate": {
"type": "boolean"
}
},
"required": [
"name",
"isPrivate"
],
"type": "object"
},
"ConnectedUsers": {
"properties": {
"users": {
"format": "int32",
"type": "integer"
},
"bots": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"Execution": {
"description": "Raw Order and Balance Data",
"properties": {
"execID": {
"format": "guid",
"type": "string"
},
"orderID": {
"format": "guid",
"type": "string"
},
"clOrdID": {
"type": "string"
},
"clOrdLinkID": {
"type": "string"
},
"account": {
"format": "int64",
"type": "integer"
},
"symbol": {
"type": "string"
},
"side": {
"type": "string"
},
"lastQty": {
"format": "int64",
"type": "integer"
},
"lastPx": {
"format": "double",
"type": "number"
},
"lastLiquidityInd": {
"type": "string"
},
"orderQty": {
"format": "int64",
"type": "integer"
},
"price": {
"format": "double",
"type": "number"
},
"displayQty": {
"format": "int64",
"type": "integer"
},
"stopPx": {
"format": "double",
"type": "number"
},
"pegOffsetValue": {
"format": "double",
"type": "number"
},
"pegPriceType": {
"type": "string"
},
"currency": {
"type": "string"
},
"settlCurrency": {
"type": "string"
},
"execType": {
"type": "string"
},
"ordType": {
"type": "string"
},
"timeInForce": {
"type": "string"
},
"execInst": {
"type": "string"
},
"contingencyType": {
"type": "string"
},
"ordStatus": {
"type": "string"
},
"triggered": {
"type": "string"
},
"workingIndicator": {
"type": "boolean"
},
"ordRejReason": {
"type": "string"
},
"leavesQty": {
"format": "int64",
"type": "integer"
},
"cumQty": {
"format": "int64",
"type": "integer"
},
"avgPx": {
"format": "double",
"type": "number"
},
"commission": {
"format": "double",
"type": "number"
},
"feeType": {
"type": "string"
},
"tradePublishIndicator": {
"type": "string"
},
"text": {
"type": "string"
},
"trdMatchID": {
"format": "guid",
"type": "string"
},
"execCost": {
"format": "int64",
"type": "integer"
},
"execComm": {
"format": "int64",
"type": "integer"
},
"homeNotional": {
"format": "double",
"type": "number"
},
"foreignNotional": {
"format": "double",
"type": "number"
},
"transactTime": {
"format": "date-time",
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"symbol",
"timestamp"
],
"type": "object"
},
"x-any": {
"properties": {},
"type": "object"
},
"Funding": {
"description": "Swap Funding History",
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"symbol": {
"type": "string"
},
"fundingInterval": {
"format": "date-time",
"type": "string"
},
"fundingRate": {
"format": "double",
"type": "number"
},
"fundingRateDaily": {
"format": "double",
"type": "number"
}
},
"required": [
"timestamp",
"symbol"
],
"type": "object"
},
"Instrument": {
"description": "Tradeable Contracts, Indices, and History",
"properties": {
"symbol": {
"type": "string"
},
"rootSymbol": {
"type": "string"
},
"state": {
"type": "string"
},
"typ": {
"type": "string"
},
"listing": {
"format": "date-time",
"type": "string"
},
"front": {
"format": "date-time",
"type": "string"
},
"expiry": {
"format": "date-time",
"type": "string"
},
"settle": {
"format": "date-time",
"type": "string"
},
"listedSettle": {
"format": "date-time",
"type": "string"
},
"positionCurrency": {
"type": "string"
},
"underlying": {
"type": "string"
},
"quoteCurrency": {
"type": "string"
},
"underlyingSymbol": {
"type": "string"
},
"reference": {
"type": "string"
},
"referenceSymbol": {
"type": "string"
},
"calcInterval": {
"format": "date-time",
"type": "string"
},
"publishInterval": {
"format": "date-time",
"type": "string"
},
"publishTime": {
"format": "date-time",
"type": "string"
},
"maxOrderQty": {
"format": "int64",
"type": "integer"
},
"maxPrice": {
"format": "double",
"type": "number"
},
"lotSize": {
"format": "int64",
"type": "integer"
},
"tickSize": {
"format": "double",
"type": "number"
},
"multiplier": {
"format": "int64",
"type": "integer"
},
"settlCurrency": {
"type": "string"
},
"underlyingToPositionMultiplier": {
"format": "int64",
"type": "integer"
},
"underlyingToSettleMultiplier": {
"format": "int64",
"type": "integer"
},
"quoteToSettleMultiplier": {
"format": "int64",
"type": "integer"
},
"isQuanto": {
"type": "boolean"
},
"isInverse": {
"type": "boolean"
},
"initMargin": {
"format": "double",
"type": "number"
},
"maintMargin": {
"format": "double",
"type": "number"
},
"riskLimit": {
"format": "int64",
"type": "integer"
},
"riskStep": {
"format": "int64",
"type": "integer"
},
"limit": {
"format": "double",
"type": "number"
},
"taxed": {
"type": "boolean"
},
"deleverage": {
"type": "boolean"
},
"makerFee": {
"format": "double",
"type": "number"
},
"takerFee": {
"format": "double",
"type": "number"
},
"settlementFee": {
"format": "double",
"type": "number"
},
"fundingBaseSymbol": {
"type": "string"
},
"fundingQuoteSymbol": {
"type": "string"
},
"fundingPremiumSymbol": {
"type": "string"
},
"fundingTimestamp": {
"format": "date-time",
"type": "string"
},
"fundingInterval": {
"format": "date-time",
"type": "string"
},
"fundingRate": {
"format": "double",
"type": "number"
},
"indicativeFundingRate": {
"format": "double",
"type": "number"
},
"rebalanceTimestamp": {
"format": "date-time",
"type": "string"
},
"rebalanceInterval": {
"format": "date-time",
"type": "string"
},
"prevClosePrice": {
"format": "double",
"type": "number"
},
"limitDownPrice": {
"format": "double",
"type": "number"
},
"limitUpPrice": {
"format": "double",
"type": "number"
},
"totalVolume": {
"format": "int64",
"type": "integer"
},
"volume": {
"format": "int64",
"type": "integer"
},
"volume24h": {
"format": "int64",
"type": "integer"
},
"prevTotalTurnover": {
"format": "int64",
"type": "integer"
},
"totalTurnover": {
"format": "int64",
"type": "integer"
},
"turnover": {
"format": "int64",
"type": "integer"
},
"turnover24h": {
"format": "int64",
"type": "integer"
},
"homeNotional24h": {
"format": "double",
"type": "number"
},
"foreignNotional24h": {
"format": "double",
"type": "number"
},
"prevPrice24h": {
"format": "double",
"type": "number"
},
"vwap": {
"format": "double",
"type": "number"
},
"highPrice": {
"format": "double",
"type": "number"
},
"lowPrice": {
"format": "double",
"type": "number"
},
"lastPrice": {
"format": "double",
"type": "number"
},
"lastPriceProtected": {
"format": "double",
"type": "number"
},
"lastTickDirection": {
"type": "string"
},
"lastChangePcnt": {
"format": "double",
"type": "number"
},
"bidPrice": {
"format": "double",
"type": "number"
},
"midPrice": {
"format": "double",
"type": "number"
},
"askPrice": {
"format": "double",
"type": "number"
},
"impactBidPrice": {
"format": "double",
"type": "number"
},
"impactMidPrice": {
"format": "double",
"type": "number"
},
"impactAskPrice": {
"format": "double",
"type": "number"
},
"hasLiquidity": {
"type": "boolean"
},
"openInterest": {
"format": "int64",
"type": "integer"
},
"openValue": {
"format": "int64",
"type": "integer"
},
"fairMethod": {
"type": "string"
},
"fairBasisRate": {
"format": "double",
"type": "number"
},
"fairBasis": {
"format": "double",
"type": "number"
},
"fairPrice": {
"format": "double",
"type": "number"
},
"markMethod": {
"type": "string"
},
"markPrice": {
"format": "double",
"type": "number"
},
"indicativeSettlePrice": {
"format": "double",
"type": "number"
},
"settledPriceAdjustmentRate": {
"format": "double",
"type": "number"
},
"settledPrice": {
"format": "double",
"type": "number"
},
"instantPnl": {
"type": "boolean"
},
"minTick": {
"format": "double",
"type": "number"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"InstrumentInterval": {
"properties": {
"intervals": {
"type": "array",
"items": {
"type": "string"
}
},
"symbols": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"intervals",
"symbols"
],
"type": "object"
},
"IndexComposite": {
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"symbol": {
"type": "string"
},
"indexSymbol": {
"type": "string"
},
"indexMultiplier": {
"type": "number",
"format": "double"
},
"reference": {
"type": "string"
},
"lastPrice": {
"type": "number",
"format": "double"
},
"sourcePrice": {
"type": "number",
"format": "double"
},
"conversionIndex": {
"type": "string"
},
"conversionIndexPrice": {
"type": "number",
"format": "double"
},
"weight": {
"type": "number",
"format": "double"
},
"logged": {
"type": "string",
"format": "date-time"
}
},
"required": [
"timestamp"
],
"type": "object"
},
"StatsUSDBySymbol": {
"properties": {
"symbol": {
"type": "string"
},
"currency": {
"type": "string"
},
"turnover24h": {
"format": "int64",
"type": "integer"
},
"turnover30d": {
"format": "int64",
"type": "integer"
},
"turnover365d": {
"format": "int64",
"type": "integer"
},
"turnover": {
"format": "int64",
"type": "integer"
}
},
"required": [
"symbol"
],
"type": "object"
},
"Insurance": {
"description": "Insurance Fund Data",
"properties": {
"currency": {
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"walletBalance": {
"format": "int64",
"type": "integer"
}
},
"required": [
"currency",
"timestamp"
],
"type": "object"
},
"Leaderboard": {
"description": "Information on Top Users",
"properties": {
"name": {
"type": "string"
},
"isRealName": {
"type": "boolean"
},
"profit": {
"type": "number",
"format": "double"
}
},
"required": [
"name"
],
"type": "object"
},
"Liquidation": {
"description": "Active Liquidations",
"properties": {
"orderID": {
"format": "guid",
"type": "string"
},
"symbol": {
"type": "string"
},
"side": {
"type": "string"
},
"price": {
"format": "double",
"type": "number"
},
"leavesQty": {
"format": "int64",
"type": "integer"
}
},
"required": [
"orderID"
],
"type": "object"
},
"GlobalNotification": {
"description": "Account Notifications",
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"date": {
"type": "string",
"format": "date-time"
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"ttl": {
"format": "int32",
"type": "integer"
},
"type": {
"enum": [
"success",
"error",
"info"
],
"type": "string"
},
"closable": {
"default": true,
"type": "boolean"
},
"persist": {
"default": true,
"type": "boolean"
},
"waitForVisibility": {
"default": true,
"type": "boolean"
},
"sound": {
"type": "string"
}
},
"required": [
"date",
"title",
"body",
"ttl"
],
"type": "object"
},
"Order": {
"description": "Placement, Cancellation, Amending, and History",
"properties": {
"orderID": {
"format": "guid",
"type": "string"
},
"clOrdID": {
"type": "string"
},
"clOrdLinkID": {
"type": "string"
},
"account": {
"format": "int64",
"type": "integer"
},
"symbol": {
"type": "string"
},
"side": {
"type": "string"
},
"orderQty": {
"format": "int64",
"type": "integer"
},
"price": {
"format": "double",
"type": "number"
},
"displayQty": {
"format": "int64",
"type": "integer"
},
"stopPx": {
"format": "double",
"type": "number"
},
"pegOffsetValue": {
"format": "double",
"type": "number"
},
"pegPriceType": {
"type": "string"
},
"currency": {
"type": "string"
},
"settlCurrency": {
"type": "string"
},
"ordType": {
"type": "string"
},
"timeInForce": {
"type": "string"
},
"execInst": {
"type": "string"
},
"contingencyType": {
"type": "string"
},
"ordStatus": {
"type": "string"
},
"triggered": {
"type": "string"
},
"workingIndicator": {
"type": "boolean"
},
"ordRejReason": {
"type": "string"
},
"leavesQty": {
"format": "int64",
"type": "integer"
},
"cumQty": {
"format": "int64",
"type": "integer"
},
"avgPx": {
"format": "double",
"type": "number"
},
"text": {
"type": "string"
},
"transactTime": {
"format": "date-time",
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"orderID"
],
"type": "object"
},
"OrderBookL2": {
"properties": {
"symbol": {
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"side": {
"type": "string"
},
"size": {
"format": "int64",
"type": "integer"
},
"price": {
"format": "double",
"type": "number"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"symbol",
"id",
"side"
],
"type": "object"
},
"Position": {
"description": "Summary of Open and Closed Positions",
"properties": {
"account": {
"format": "int64",
"default": 0,
"type": "integer"
},
"symbol": {
"type": "string"
},
"currency": {
"type": "string"
},
"underlying": {
"type": "string"
},
"quoteCurrency": {
"type": "string"
},
"commission": {
"format": "double",
"default": 0,
"type": "number"
},
"initMarginReq": {
"format": "double",
"default": 0,
"type": "number"
},
"maintMarginReq": {
"format": "double",
"default": 0,
"type": "number"
},
"riskLimit": {
"format": "int64",
"default": 0,
"type": "integer"
},
"leverage": {
"format": "double",
"default": 0,
"type": "number"
},
"crossMargin": {
"type": "boolean"
},
"deleveragePercentile": {
"format": "double",
"default": 0,
"type": "number"
},
"rebalancedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"prevRealisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"prevUnrealisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openingQty": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderBuyQty": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderBuyCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderBuyPremium": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderSellQty": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderSellCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"openOrderSellPremium": {
"format": "int64",
"default": 0,
"type": "integer"
},
"currentQty": {
"format": "int64",
"default": 0,
"type": "integer"
},
"currentCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"currentComm": {
"format": "int64",
"default": 0,
"type": "integer"
},
"realisedCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"unrealisedCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossOpenPremium": {
"format": "int64",
"default": 0,
"type": "integer"
},
"isOpen": {
"type": "boolean"
},
"markPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"markValue": {
"format": "int64",
"default": 0,
"type": "integer"
},
"riskValue": {
"format": "int64",
"default": 0,
"type": "integer"
},
"homeNotional": {
"format": "double",
"default": 0,
"type": "number"
},
"foreignNotional": {
"format": "double",
"default": 0,
"type": "number"
},
"posState": {
"type": "string"
},
"posCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"posCross": {
"format": "int64",
"default": 0,
"type": "integer"
},
"posComm": {
"format": "int64",
"default": 0,
"type": "integer"
},
"posLoss": {
"format": "int64",
"default": 0,
"type": "integer"
},
"posMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"posMaint": {
"format": "int64",
"default": 0,
"type": "integer"
},
"initMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"maintMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"realisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"unrealisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"unrealisedPnlPcnt": {
"format": "double",
"default": 0,
"type": "number"
},
"unrealisedRoePcnt": {
"format": "double",
"default": 0,
"type": "number"
},
"avgCostPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"avgEntryPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"breakEvenPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"marginCallPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"liquidationPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"bankruptPrice": {
"format": "double",
"default": 0,
"type": "number"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"account",
"symbol"
],
"type": "object"
},
"Quote": {
"description": "Best Bid/Offer Snapshots & Historical Bins",
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"symbol": {
"type": "string"
},
"bidSize": {
"format": "int64",
"type": "integer"
},
"bidPrice": {
"format": "double",
"type": "number"
},
"askPrice": {
"format": "double",
"type": "number"
},
"askSize": {
"format": "int64",
"type": "integer"
}
},
"required": [
"timestamp",
"symbol"
],
"type": "object"
},
"Settlement": {
"description": "Historical Settlement Data",
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"symbol": {
"type": "string"
},
"settlementType": {
"type": "string"
},
"settledPrice": {
"format": "double",
"type": "number"
},
"optionStrikePrice": {
"format": "double",
"type": "number"
},
"optionUnderlyingPrice": {
"format": "double",
"type": "number"
},
"bankrupt": {
"format": "int64",
"type": "integer"
},
"taxBase": {
"format": "int64",
"type": "integer"
},
"taxRate": {
"format": "double",
"type": "number"
}
},
"required": [
"timestamp",
"symbol"
],
"type": "object"
},
"Stats": {
"description": "Exchange Statistics",
"properties": {
"rootSymbol": {
"type": "string"
},
"currency": {
"type": "string"
},
"volume24h": {
"format": "int64",
"type": "integer"
},
"turnover24h": {
"format": "int64",
"type": "integer"
},
"openInterest": {
"format": "int64",
"type": "integer"
},
"openValue": {
"format": "int64",
"type": "integer"
}
},
"required": [
"rootSymbol"
],
"type": "object"
},
"StatsHistory": {
"properties": {
"date": {
"type": "string",
"format": "date-time"
},
"rootSymbol": {
"type": "string"
},
"currency": {
"type": "string"
},
"volume": {
"format": "int64",
"type": "integer"
},
"turnover": {
"format": "int64",
"type": "integer"
}
},
"required": [
"date",
"rootSymbol"
],
"type": "object"
},
"StatsUSD": {
"properties": {
"rootSymbol": {
"type": "string"
},
"currency": {
"type": "string"
},
"turnover24h": {
"format": "int64",
"type": "integer"
},
"turnover30d": {
"format": "int64",
"type": "integer"
},
"turnover365d": {
"format": "int64",
"type": "integer"
},
"turnover": {
"format": "int64",
"type": "integer"
}
},
"required": [
"rootSymbol"
],
"type": "object"
},
"Trade": {
"description": "Individual & Bucketed Trades",
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"symbol": {
"type": "string"
},
"side": {
"type": "string"
},
"size": {
"format": "int64",
"type": "integer"
},
"price": {
"format": "double",
"type": "number"
},
"tickDirection": {
"type": "string"
},
"trdMatchID": {
"format": "guid",
"type": "string"
},
"grossValue": {
"format": "int64",
"type": "integer"
},
"homeNotional": {
"format": "double",
"type": "number"
},
"foreignNotional": {
"format": "double",
"type": "number"
},
"trdType": {
"type": "string"
}
},
"required": [
"timestamp",
"symbol"
],
"type": "object"
},
"TradeBin": {
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"symbol": {
"type": "string"
},
"open": {
"format": "double",
"type": "number"
},
"high": {
"format": "double",
"type": "number"
},
"low": {
"format": "double",
"type": "number"
},
"close": {
"format": "double",
"type": "number"
},
"trades": {
"format": "int64",
"type": "integer"
},
"volume": {
"format": "int64",
"type": "integer"
},
"vwap": {
"format": "double",
"type": "number"
},
"lastSize": {
"format": "int64",
"type": "integer"
},
"turnover": {
"format": "int64",
"type": "integer"
},
"homeNotional": {
"format": "double",
"type": "number"
},
"foreignNotional": {
"format": "double",
"type": "number"
}
},
"required": [
"timestamp",
"symbol"
],
"type": "object"
},
"DepositAddress": {
"description": "Deposit Address",
"properties": {
"address": {
"type": "string"
},
"memo": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"Wallet": {
"description": "Assets and Networks Data",
"properties": {
"account": {
"format": "int64",
"type": "integer"
},
"currency": {
"type": "string"
},
"deposited": {
"format": "int64",
"type": "integer"
},
"withdrawn": {
"format": "int64",
"type": "integer"
},
"transferIn": {
"format": "int64",
"type": "integer"
},
"transferOut": {
"format": "int64",
"type": "integer"
},
"amount": {
"format": "int64",
"type": "integer"
},
"pendingCredit": {
"format": "int64",
"type": "integer"
},
"pendingDebit": {
"format": "int64",
"type": "integer"
},
"confirmedDebit": {
"format": "int64",
"type": "integer"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"account",
"currency"
],
"type": "object"
},
"Transaction": {
"properties": {
"transactID": {
"format": "guid",
"type": "string"
},
"account": {
"format": "int64",
"type": "integer"
},
"currency": {
"type": "string"
},
"network": {
"type": "string"
},
"transactType": {
"type": "string"
},
"amount": {
"format": "int64",
"type": "integer"
},
"fee": {
"format": "int64",
"type": "integer"
},
"transactStatus": {
"type": "string"
},
"address": {
"type": "string"
},
"tx": {
"type": "string"
},
"text": {
"type": "string"
},
"transactTime": {
"format": "date-time",
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"walletBalance": {
"format": "int64",
"type": "integer"
}
},
"required": [
"transactID"
],
"type": "object"
},
"WalletSummaryRecord": {
"properties": {
"account": {
"type": "number",
"format": "double"
},
"currency": {
"default": "XBt",
"type": "string"
},
"transactType": {
"type": "string"
},
"symbol": {
"default": "XBTUSD",
"type": "string"
},
"amount": {
"default": 0,
"type": "number",
"format": "double"
},
"pendingDebit": {
"default": 0,
"type": "number",
"format": "double"
},
"realisedPnl": {
"default": 0,
"type": "number",
"format": "double"
},
"walletBalance": {
"default": 0,
"type": "number",
"format": "double"
},
"unrealisedPnl": {
"default": 0,
"type": "number",
"format": "double"
},
"marginBalance": {
"default": 0,
"type": "number",
"format": "double"
}
},
"required": [
"account"
],
"type": "object"
},
"StakingRecord": {
"description": "Get the current user staking amount in vertical format.",
"properties": {
"account": {
"type": "number",
"format": "double"
},
"amount": {
"type": "number",
"format": "double"
},
"currency": {
"default": "XBt",
"type": "string"
}
},
"required": [
"account"
],
"type": "object"
},
"AccessToken": {
"properties": {
"updated": {
"type": "string",
"format": "date-time"
},
"authorizedAccounts": {
"default": {
"margin": {
"read": []
},
"order": {
"read": [],
"write": []
},
"execution": {
"read": []
},
"position": {
"read": []
},
"internalTransfer": {
"write": []
},
"transferTakeover": {
"write": []
},
"owner": []
},
"type": "object"
},
"id": {
"type": "string"
},
"ttl": {
"default": 1209600,
"description": "time to live in seconds (2 weeks by default)",
"type": "number",
"format": "double"
},
"created": {
"type": "string",
"format": "date-time"
},
"userId": {
"type": "number",
"format": "double"
}
},
"required": [
"updated",
"id"
],
"type": "object"
},
"Affiliate": {
"properties": {
"account": {
"format": "int64",
"type": "integer"
},
"currency": {
"type": "string"
},
"prevPayout": {
"format": "int64",
"type": "integer"
},
"prevTurnover": {
"format": "int64",
"type": "integer"
},
"prevComm": {
"format": "int64",
"type": "integer"
},
"prevTimestamp": {
"format": "date-time",
"type": "string"
},
"execTurnover": {
"format": "int64",
"type": "integer"
},
"execComm": {
"format": "int64",
"type": "integer"
},
"totalReferrals": {
"format": "int64",
"type": "integer"
},
"totalTurnover": {
"format": "int64",
"type": "integer"
},
"totalComm": {
"format": "int64",
"type": "integer"
},
"payoutPcnt": {
"format": "double",
"type": "number"
},
"pendingPayout": {
"format": "int64",
"type": "integer"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"referrerAccount": {
"type": "number",
"format": "double"
},
"referralDiscount": {
"type": "number",
"format": "double"
},
"affiliatePayout": {
"type": "number",
"format": "double"
}
},
"required": [
"account",
"currency"
],
"type": "object"
},
"QuoteFillRatio": {
"description": "Daily Quote Fill Ratio Statistic",
"properties": {
"date": {
"type": "string",
"format": "date-time"
},
"account": {
"type": "number",
"format": "double"
},
"quoteCount": {
"type": "number",
"format": "double"
},
"dealtCount": {
"type": "number",
"format": "double"
},
"quotesMavg7": {
"type": "number",
"format": "double"
},
"dealtMavg7": {
"type": "number",
"format": "double"
},
"quoteFillRatioMavg7": {
"type": "number",
"format": "double"
}
},
"required": [
"date"
],
"type": "object"
},
"QuoteValueRatio": {
"description": "Hourly Quote Value Ratio Statistic",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"account": {
"type": "number",
"format": "double"
},
"symbol": {
"type": "string"
},
"quoteCount": {
"type": "number",
"format": "double"
},
"volumeXBT": {
"type": "number",
"format": "double"
},
"QVR": {
"type": "number",
"format": "double"
},
"id": {
"type": "number",
"format": "double"
}
},
"type": "object"
},
"TradingVolume": {
"description": "30 days USD average trading volume",
"properties": {
"advUsd": {
"type": "number",
"format": "double"
},
"advUsdSpot": {
"type": "number",
"format": "double"
},
"advUsdContract": {
"type": "number",
"format": "double"
}
},
"required": [
"advUsd"
],
"type": "object"
},
"User": {
"description": "Account Operations",
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"username": {
"type": "string"
},
"accountName": {
"type": "string"
},
"isUser": {
"default": true,
"type": "boolean"
},
"email": {
"type": "string"
},
"dateOfBirth": {
"type": "string"
},
"phone": {
"type": "string"
},
"created": {
"type": "string",
"format": "date-time"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"preferences": {
"default": {},
"$ref": "#/definitions/UserPreferences"
},
"TFAEnabled": {
"type": "string"
},
"affiliateID": {
"maxLength": 6,
"type": "string"
},
"country": {
"maxLength": 3,
"type": "string"
},
"geoipCountry": {
"maxLength": 2,
"type": "string"
},
"geoipRegion": {
"maxLength": 2,
"type": "string"
},
"firstTradeTimestamp": {
"type": "string",
"format": "date-time"
},
"firstDepositTimestamp": {
"type": "string",
"format": "date-time"
},
"typ": {
"type": "string"
}
},
"required": [
"username",
"isUser"
],
"type": "object"
},
"UserCommissionsBySymbol": {
"properties": {},
"type": "object"
},
"Margin": {
"properties": {
"account": {
"format": "int64",
"default": 0,
"type": "integer"
},
"currency": {
"type": "string"
},
"riskLimit": {
"format": "int64",
"default": 0,
"type": "integer"
},
"state": {
"type": "string"
},
"amount": {
"format": "int64",
"default": 0,
"type": "integer"
},
"prevRealisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossComm": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossOpenCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossOpenPremium": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossExecCost": {
"format": "int64",
"default": 0,
"type": "integer"
},
"grossMarkValue": {
"format": "int64",
"default": 0,
"type": "integer"
},
"riskValue": {
"format": "int64",
"default": 0,
"type": "integer"
},
"initMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"maintMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"targetExcessMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"realisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"unrealisedPnl": {
"format": "int64",
"default": 0,
"type": "integer"
},
"walletBalance": {
"format": "int64",
"default": 0,
"type": "integer"
},
"marginBalance": {
"format": "int64",
"default": 0,
"type": "integer"
},
"marginLeverage": {
"format": "double",
"default": 0,
"type": "number"
},
"marginUsedPcnt": {
"format": "double",
"default": 0,
"type": "number"
},
"excessMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"availableMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"withdrawableMargin": {
"format": "int64",
"default": 0,
"type": "integer"
},
"makerFeeDiscount": {
"format": "double",
"default": 0,
"type": "number"
},
"takerFeeDiscount": {
"format": "double",
"default": 0,
"type": "number"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"account",
"currency"
],
"type": "object"
},
"CollateralSupportAgreement": {
"properties": {
"csaID": {
"type": "string"
},
"account": {
"format": "int64",
"type": "integer"
},
"currency": {
"type": "string"
},
"amount": {
"format": "int64",
"type": "integer"
},
"minAmount": {
"format": "int64",
"type": "integer"
},
"threshold": {
"format": "int64",
"type": "integer"
},
"mmRatioMarginCall": {
"format": "int64",
"type": "integer"
},
"mmRatioLiquidation": {
"format": "int64",
"type": "integer"
},
"startTime": {
"type": "string"
},
"maturityTime": {
"type": "string"
},
"maturityInstruction": {
"type": "string"
},
"csaStatus": {
"type": "string"
},
"requester": {
"type": "string"
},
"clientDetails": {
"type": "string"
},
"text": {
"type": "string"
},
"timestamp": {
"type": "string"
}
},
"required": [
"csaID"
],
"type": "object"
},
"CommunicationToken": {
"description": "User communication SNS token",
"properties": {
"id": {
"type": "string"
},
"userId": {
"format": "int32",
"type": "integer"
},
"deviceToken": {
"type": "string"
},
"channel": {
"type": "string"
}
},
"required": [
"id",
"userId",
"deviceToken",
"channel"
],
"type": "object"
},
"UserEvent": {
"description": "User Events for Auditing",
"properties": {
"id": {
"type": "number",
"format": "double"
},
"type": {
"enum": [
"apiKeyCreated",
"deleverageExecution",
"depositConfirmed",
"depositPending",
"banZeroVolumeApiUser",
"liquidationOrderPlaced",
"login",
"existingAccountRegistrationAttempt",
"passwordChanged",
"positionStateLiquidated",
"positionStateWarning",
"resetPasswordConfirmed",
"resetPasswordRequest",
"transferCanceled",
"transferCompleted",
"transferReceived",
"transferRequested",
"twoFactorDisabled",
"twoFactorEnabled",
"withdrawalCanceled",
"withdrawalCompleted",
"withdrawalConfirmed",
"withdrawalRequested",
"addressSkipConfirmRequested",
"addressSkipConfirmVerified",
"verify",
"restrictedAccount",
"unrestrictedAccount",
"disabledAccount",
"enabledAccount",
"role:roleMappingDestroy",
"role:chatBanned",
"role:withdrawalBanned",
"role:orderBanned",
"role:apiBanned",
"role:restrictedJurisdictionPrivilege"
],
"type": "string"
},
"status": {
"enum": [
"success",
"failure"
],
"type": "string"
},
"userId": {
"type": "number",
"format": "double"
},
"createdById": {
"type": "number",
"format": "double"
},
"ip": {
"type": "string"
},
"geoipCountry": {
"maxLength": 2,
"type": "string"
},
"geoipRegion": {
"maxLength": 3,
"type": "string"
},
"geoipSubRegion": {
"maxLength": 3,
"type": "string"
},
"eventMeta": {
"type": "object"
},
"created": {
"type": "string",
"format": "date-time"
}
},
"required": [
"type",
"status",
"userId",
"createdById",
"created"
],
"type": "object"
},
"AssetsConfig": {
"properties": {
"asset": {
"default": "XBT",
"type": "string"
},
"currency": {
"default": "XBt",
"type": "string"
},
"majorCurrency": {
"default": "XBT",
"type": "string"
},
"name": {
"default": "Bitcoin",
"type": "string"
},
"currencyType": {
"default": "Crypto",
"type": "string"
},
"scale": {
"default": 8,
"type": "number",
"format": "double"
},
"enabled": {
"default": true,
"type": "boolean"
},
"isMarginCurrency": {
"default": true,
"type": "boolean"
},
"memoRequired": {
"default": false,
"type": "boolean"
},
"networks": {
"type": "array",
"items": {
"$ref": "#/definitions/AssetsConfigNetworkItem"
}
}
},
"required": [
"asset"
],
"type": "object"
},
"NetworksConfig": {
"properties": {
"network": {
"default": "eth",
"type": "string"
},
"name": {
"default": "Ethereum",
"type": "string"
},
"currency": {
"default": "Gwei",
"type": "string"
},
"networkSymbol": {
"default": "ETH",
"type": "string"
},
"transactionExplorer": {
"default": "https://etherscan.io/tx/",
"type": "string"
},
"tokenExplorer": {
"default": "https://etherscan.io/token/",
"type": "string"
},
"depositConfirmations": {
"format": "int32",
"type": "integer"
},
"enabled": {
"default": true,
"type": "boolean"
}
},
"required": [
"network"
],
"type": "object"
},
"Address": {
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"currency": {
"type": "string"
},
"created": {
"type": "string",
"format": "date-time"
},
"userId": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"skipConfirm": {
"type": "boolean"
},
"skipConfirmVerified": {
"type": "boolean"
},
"skip2FA": {
"type": "boolean"
},
"skip2FAVerified": {
"type": "boolean"
},
"network": {
"type": "string"
},
"memo": {
"type": "string"
}
},
"required": [
"address",
"name",
"network"
],
"type": "object"
},
"Guild": {
"properties": {
"id": {
"format": "int32",
"type": "integer"
},
"created": {
"type": "string",
"format": "date-time"
},
"updated": {
"type": "string",
"format": "date-time"
},
"archived": {
"type": "boolean"
},
"name": {
"type": "string"
},
"imgUrl": {
"type": "string"
},
"mobileHeroImgUrl": {
"type": "string"
},
"emoji": {
"type": "string"
},
"logoUrl": {
"type": "string"
},
"description": {
"type": "string"
},
"chatChannelId": {
"type": "number",
"format": "double"
},
"isPrivate": {
"type": "boolean"
},
"affiliateId": {
"type": "string"
},
"potDistributionPreferences": {
"type": "object"
},
"socials": {
"type": "object"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"created",
"updated",
"name",
"chatChannelId",
"isPrivate"
],
"type": "object"
},
"Porl": {
"description": "Proof of Reserves/Liabilities",
"properties": {
"account": {
"format": "int32",
"type": "integer"
},
"nonce": {
"type": "string"
},
"accountNonce": {
"type": "string"
},
"total": {
"type": "number",
"format": "double"
},
"balance": {
"type": "number",
"format": "double"
},
"filename": {
"type": "string"
},
"height": {
"type": "number",
"format": "double"
},
"created": {
"type": "string",
"format": "date-time"
}
},
"required": [
"account",
"accountNonce",
"total",
"balance",
"height",
"created"
],
"type": "object"
},
"UserPreferences": {
"properties": {
"alertOnLiquidations": {
"type": "boolean"
},
"animationsEnabled": {
"type": "boolean"
},
"announcementsLastSeen": {
"type": "string",
"format": "date-time"
},
"chatChannelID": {
"type": "number",
"format": "double"
},
"colorTheme": {
"type": "string"
},
"currency": {
"type": "string"
},
"debug": {
"type": "boolean"
},
"disableEmails": {
"type": "array",
"items": {
"type": "string"
}
},
"disablePush": {
"type": "array",
"items": {
"type": "string"
}
},
"displayCorpEnrollUpsell": {
"type": "boolean"
},
"equivalentCurrency": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
},
"favourites": {
"type": "array",
"items": {
"type": "string"
}
},
"favouritesAssets": {
"type": "array",
"items": {
"type": "string"
}
},
"favouritesOrdered": {
"type": "array",
"items": {
"type": "string"
}
},
"favouriteBots": {
"type": "array",
"items": {
"type": "string"
}
},
"hasSetTradingCurrencies": {
"type": "boolean"
},
"hideConfirmDialogs": {
"type": "array",
"items": {
"type": "string"
}
},
"hideConnectionModal": {
"type": "boolean"
},
"hideFromLeaderboard": {
"default": false,
"type": "boolean"
},
"hideNameFromLeaderboard": {
"default": true,
"type": "boolean"
},
"hidePnlInGuilds": {
"default": false,
"type": "boolean"
},
"hideRoiInGuilds": {
"default": false,
"type": "boolean"
},
"hideNotifications": {
"type": "array",
"items": {
"type": "string"
}
},
"hidePhoneConfirm": {
"default": false,
"type": "boolean"
},
"isSensitiveInfoVisible": {
"type": "boolean"
},
"isWalletZeroBalanceHidden": {
"type": "boolean"
},
"locale": {
"default": "en-US",
"type": "string"
},
"localeSetTime": {
"type": "number",
"format": "double"
},
"marginPnlRow": {
"type": "string"
},
"marginPnlRowKind": {
"type": "string"
},
"mobileLocale": {
"type": "string"
},
"msgsSeen": {
"type": "array",
"items": {
"type": "string"
}
},
"notifications": {
"type": "object"
},
"optionsBeta": {
"type": "boolean"
},
"orderBookBinning": {
"type": "object"
},
"orderBookType": {
"type": "string"
},
"orderClearImmediate": {
"default": false,
"type": "boolean"
},
"orderControlsPlusMinus": {
"type": "boolean"
},
"platformLayout": {
"type": "string"
},
"selectedFiatCurrency": {
"type": "string"
},
"showChartBottomToolbar": {
"type": "boolean"
},
"showLocaleNumbers": {
"default": true,
"type": "boolean"
},
"sounds": {
"type": "array",
"items": {
"type": "string"
}
},
"spacingPreference": {
"type": "string"
},
"strictIPCheck": {
"default": false,
"type": "boolean"
},
"strictTimeout": {
"default": true,
"type": "boolean"
},
"tickerGroup": {
"type": "string"
},
"tickerPinned": {
"type": "boolean"
},
"tradeLayout": {
"type": "string"
},
"userColor": {
"type": "string"
}
},
"type": "object"
},
"AssetsConfigNetworkItem": {
"properties": {
"asset": {
"default": "BTC",
"type": "string"
},
"tokenAddress": {
"default": "",
"type": "string"
},
"depositEnabled": {
"default": true,
"type": "boolean"
},
"withdrawalEnabled": {
"default": true,
"type": "boolean"
},
"withdrawalFee": {
"type": "number",
"format": "double"
},
"minFee": {
"type": "number",
"format": "double"
},
"maxFee": {
"type": "number",
"format": "double"
}
},
"required": [
"asset"
],
"type": "object"
}
},
"securityDefinitions": {
"apiKey": {
"type": "apiKey",
"in": "header",
"name": "api-key"
},
"apiSignature": {
"type": "apiKey",
"in": "header",
"name": "api-signature"
},
"apiExpires": {
"type": "apiKey",
"in": "header",
"name": "api-expires"
}
},
"security": [
{
"apiKey": [],
"apiSignature": [],
"apiExpires": []
}
]
}