{
  "openapi": "3.0.1",
  "info": {
    "title": "Everstrike REST API",
    "description": "\nPublic API documentation for the Everstrike REST API.\n\nFor information on how to use the Everstrike Websockets API, head over to https://everstrikeio.github.io/everstrike-websockets-api/.\n\n#### General information\n\n* Results are returned in time-descending order (newest results first)\n* Timestamps are in UNIX time (milliseconds)\n* The base URL for the Everstrike Testnet is: https://api.testnet.everstrike.io.\n* The base URL for the Everstrike Mainnet is: https://api.everstrike.io.\n\n#### Rate limits\n\n* The current rate limit is 20 requests per second.\n* Requests that exceeed this limit will be throttled.\n* A 429 response code is sent back if the user has broken the limits.\n* The x-ratelimit-remaining header contains the number of requests remaining before the limit is reached.\n* The x-ratelimit-remaining header is reset every second.\n* A single POST requests to an /auth endpoint (e.g. /auth/order) counts two times towards the limit (equivalent to two GET requests).\n* Need higher limits? We are happy to help. Just [contact us](https://references.everstrike.io/account/contact-us).\n",
    "termsOfService": "https://references.everstrike.io/legal/terms-of-service",
    "contact": {
      "email": "support@everstrike.io"
    },
    "version": "1.0.0"
  },
  "externalDocs": {
    "description": "Websocket API",
    "url": "https://everstrikeio.github.io/everstrike-websockets-api/"
  },
  "servers": [
    {
      "url": "https://api.testnet.everstrike.io/"
    }
  ],
  "tags": [
    {
      "name": "Public",
      "description": "Public API endpoint"
    },
    {
      "name": "Private",
      "description": "Private API endpoint for fetching account data, requires an API key.",
      "externalDocs": {
        "description": "Get an API key",
        "url": "https://app.testnet.everstrike.io/app/apikey"
      }
    },
    {
      "name": "Auth",
      "description": "Private API endpoint for submitting orders, cancels and withdrawals, requires both an API key and a secret key.\n",
      "externalDocs": {
        "description": "Get an API key and a secret key",
        "url": "https://app.testnet.everstrike.io/app/apikey"
      }
    }
  ],
  "paths": {
    "/time": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Time",
        "description": "Retrieve the time of the server. Useful for testing API connectivity.",
        "operationId": "time",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "number",
                      "description": "UNIX timestamp (milliseconds)",
                      "example": 1550924138856
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.time();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/assets": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Assets",
        "description": "Retrieve a list of assets supported by Everstrike.",
        "operationId": "assets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "ETH": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Symbol of asset",
                              "example": "ETH"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of asset",
                              "example": "Ether"
                            },
                            "description": {
                              "type": "string",
                              "description": "Description of asset",
                              "example": "Ether"
                            },
                            "precision": {
                              "type": "integer",
                              "description": "Precision of asset",
                              "example": 18
                            },
                            "display_precision": {
                              "type": "integer",
                              "description": "Display precision of asset. Used for number display on the Everstrike frontend.",
                              "example": 2
                            },
                            "confirmations": {
                              "type": "integer",
                              "description": "Amount of blockchain confirmations required for deposits made with this asset.",
                              "example": 12
                            },
                            "platform": {
                              "type": "string",
                              "description": "Platform that the asset belongs to",
                              "example": "ETHEREUM"
                            },
                            "is_token": {
                              "type": "boolean",
                              "description": "Is the asset a token?",
                              "example": false
                            },
                            "withdrawable": {
                              "type": "boolean",
                              "description": "Is the asset withdrawable?",
                              "example": true
                            },
                            "min_withdrawal": {
                              "type": "number",
                              "description": "Minimum withdrawal",
                              "example": 0.001
                            },
                            "is_special_commission_asset": {
                              "type": "boolean",
                              "description": "Does holding the asset provide discounts on commissions?",
                              "example": false
                            },
                            "stablecoin": {
                              "type": "boolean",
                              "description": "Is the asset a stablecoin?",
                              "example": false
                            },
                            "fees": {
                              "type": "object",
                              "properties": {
                                "withdrawal": {
                                  "type": "number",
                                  "description": "Withdrawal fee",
                                  "example": 0.0001
                                },
                                "deposit": {
                                  "type": "number",
                                  "description": "Deposit fee",
                                  "example": 0
                                }
                              },
                              "description": "Deposit/withdrawal fees"
                            },
                            "filters": {
                              "type": "object",
                              "properties": {
                                "qty": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "LOT_SIZE"
                                    },
                                    "min_qty": {
                                      "type": "number",
                                      "description": "Minimum deposit",
                                      "example": 0.0001
                                    },
                                    "max_qty": {
                                      "type": "number",
                                      "description": "Maximum deposit",
                                      "example": 1
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Tick size",
                                      "example": 0.0001
                                    }
                                  },
                                  "description": "Quantity filter"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "PRICE_FILTER"
                                    },
                                    "min_price": {
                                      "type": "number",
                                      "description": "Minimum price",
                                      "example": 0.01
                                    },
                                    "max_price": {
                                      "type": "number",
                                      "description": "Maximum price",
                                      "example": 10000000
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Tick size",
                                      "example": 0.01
                                    }
                                  },
                                  "description": "Price filter"
                                }
                              },
                              "description": "Tick size and minimum quantity"
                            },
                            "usd_price": {
                              "type": "number",
                              "description": "USD price of asset. Used for display purposes on the Everstrike frontend. Should not be relied on."
                            }
                          },
                          "description": "Information about asset"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "ETH": {
                          "key": "ETH",
                          "name": "Ethereum",
                          "platform": "ETHEREUM",
                          "precision": 10,
                          "display_precision": 4,
                          "confirmations": 12,
                          "usd_price": 1440.2,
                          "withdrawable": true,
                          "is_token": false,
                          "stablecoin": false,
                          "fees": {
                            "withdrawal": 0.001,
                            "deposit": 0
                          },
                          "filters": {
                            "qty": {
                              "filter_type": "LOT_SIZE",
                              "min_qty": 0.001,
                              "max_qty": 1000,
                              "tick_size": 0.001
                            },
                            "price": {
                              "filter_type": "PRICE_FILTER",
                              "min_qty": 0.01,
                              "max_qty": 1000000000,
                              "tick_size": 0.01
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.assets();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/pairs": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Markets",
        "description": "Retrieve a list of markets supported by Everstrike.",
        "operationId": "pairs",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "USD_BTCCALL_PERP": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Programmatic identifier for the market",
                              "example": "USD_BTCCALL_PERP"
                            },
                            "base": {
                              "type": "string",
                              "description": "Base asset for the market",
                              "example": "BTC"
                            },
                            "base_precision": {
                              "type": "number",
                              "description": "Precision of base asset"
                            },
                            "base_display_precision": {
                              "type": "number",
                              "description": "Display precision of base asset. Used for display purposes on the Everstrike frontend.",
                              "example": 12
                            },
                            "quote": {
                              "type": "string",
                              "description": "Quote asset for the market",
                              "example": "USD"
                            },
                            "quote_precision": {
                              "type": "number",
                              "description": "Precision of quote asset",
                              "example": 4
                            },
                            "quote_display_precision": {
                              "type": "number",
                              "description": "Display precision of quote asset. Used for display purposes on the Everstrike frontend.",
                              "example": 2
                            },
                            "tv_price_precision": {
                              "type": "number",
                              "description": "Precision used for displaying prices on Tradingview"
                            },
                            "tv_volume_precicion": {
                              "type": "number",
                              "description": "Precision used for displaying volume on Tradingview",
                              "example": 1
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Symbol for the market",
                              "example": "BTCCALL90/USD"
                            },
                            "description": {
                              "type": "string",
                              "description": "Short description of the market",
                              "example": "BTC Perpetual Call Option (+10%)"
                            },
                            "introduction": {
                              "type": "string",
                              "description": "Description of the market",
                              "example": "BTC call option. The strike of the option is pinned to the 100-hour EMA of BTC (+10%). The option never expires."
                            },
                            "website": {
                              "type": "string",
                              "description": "Public website of the main asset of the market",
                              "example": "https://bitcoin.org"
                            },
                            "explorer": {
                              "type": "string",
                              "description": "Public block explorer of the main asset of the market",
                              "example": "https://www.blockchain.com/explore"
                            },
                            "subreddit": {
                              "type": "string",
                              "description": "Subreddit of the main asset of the market",
                              "example": "bitcoin"
                            },
                            "issue_price": {
                              "type": "number",
                              "description": "Issue price of the main asset of the market",
                              "example": 0.0025
                            },
                            "issue_time": {
                              "type": "number",
                              "description": "Issue time of the main asset of the market",
                              "example": 1225494000
                            },
                            "total_supply": {
                              "type": "number",
                              "description": "Total supply of the main asset of the market",
                              "example": 21000000
                            },
                            "category": {
                              "type": "string",
                              "description": "Category of the market",
                              "example": "call"
                            },
                            "url": {
                              "type": "string",
                              "description": "Public wiki URL of the main asset of the market",
                              "example": "call"
                            },
                            "commission_maker": {
                              "type": "number",
                              "description": "Maker fee",
                              "example": 0
                            },
                            "commission_taker": {
                              "type": "number",
                              "description": "Taker fee",
                              "example": 0.0003
                            },
                            "commission_liquidation": {
                              "type": "number",
                              "description": "Liquidation fee",
                              "example": 0.0003
                            },
                            "contract": {
                              "type": "string",
                              "description": "Contract type",
                              "example": "PERP"
                            },
                            "min_initial_margin": {
                              "type": "number",
                              "description": "Minimum Initial Margin",
                              "example": 1
                            },
                            "min_maintenace_margin": {
                              "type": "number",
                              "description": "Minimum Maintenance Margin",
                              "example": 0.5
                            },
                            "initial_risk_limit": {
                              "type": "number",
                              "description": "Initial Risk Limit. Minimum Initial Margin = Minimum Initial Margin + Position Size (USD) * Initial Risk Limit",
                              "example": 0.000001
                            },
                            "maintenance_risk_limit": {
                              "type": "number",
                              "description": "Maintenance Risk Limit. Minimum Maintenance Margin = Minimum Maintenance Margin + Position Size (USD) * Maintenance Risk Limit",
                              "example": 5e-7
                            },
                            "deleverage_threshold": {
                              "type": "number",
                              "description": "Maintenance Margin Threshold for Deleverage Events (ADL)",
                              "example": 0
                            },
                            "swap_threshold": {
                              "type": "number",
                              "description": "Maintenance Margin Threshold for Liquidation Failures (Liquidity Provider Takeover)",
                              "example": 0.5
                            },
                            "min_liquidate": {
                              "type": "number",
                              "description": "Minimum USD position size for Incremental Liquidation",
                              "example": 500
                            },
                            "liquidate_threshold": {
                              "type": "number",
                              "description": "Liquidation Threshold. Liquidation Qty = Position Size * Liquidation Threshold",
                              "example": 0.1
                            },
                            "funding_threshold": {
                              "type": "number",
                              "description": "Funding Threshold. No funding takes place if Abs(Funding Rate) < Funding Threshold",
                              "example": 0.0005
                            },
                            "funding_interval": {
                              "type": "number",
                              "description": "Funding Interval in milliseconds",
                              "example": 3600000
                            },
                            "funding_time_window": {
                              "type": "number",
                              "description": "Funding Period in milliseconds",
                              "example": 36000000
                            },
                            "funding_min": {
                              "type": "number",
                              "description": "Minimum Funding Rate",
                              "example": -1
                            },
                            "funding_max": {
                              "type": "number",
                              "description": "Maximum Funding Rate",
                              "example": 1
                            },
                            "fair_qty": {
                              "type": "number",
                              "description": "Minimum quantity required for establishing a Fair Price from order book data",
                              "example": 0.001
                            },
                            "fair_multiplier": {
                              "type": "number",
                              "example": 0.01
                            },
                            "insurance_percentage": {
                              "type": "number",
                              "example": 1
                            },
                            "index_price_update_interval": {
                              "type": "number",
                              "description": "Milliseconds between each Index Price update",
                              "example": 4000
                            },
                            "index_price_exclude_threshold": {
                              "type": "number",
                              "example": 4
                            },
                            "mark_price_max_deviation": {
                              "type": "number",
                              "example": 0.5
                            },
                            "mark_price_ema_range": {
                              "type": "number",
                              "example": 5
                            },
                            "trading_ema_range": {
                              "type": "number",
                              "example": 30
                            },
                            "trading_max_index_deviation": {
                              "type": "number",
                              "example": 0.5
                            },
                            "trading_max_mark_deviation": {
                              "type": "number",
                              "example": 0.5
                            },
                            "composite": {
                              "type": "boolean",
                              "description": "Is the market a composite market?",
                              "example": false
                            },
                            "use_ema": {
                              "type": "boolean",
                              "description": "Is the market tied to an exponential moving average?",
                              "example": true
                            },
                            "call": {
                              "type": "boolean",
                              "description": "Is the market a call option?",
                              "example": true
                            },
                            "index_price_ema_range": {
                              "type": "number",
                              "description": "If the market is tied to an exponetial moving average, this number indicates the length of the average.",
                              "example": 100
                            },
                            "price_multiplier": {
                              "type": "number",
                              "description": "Price Multiplier. Strike Price = Price Multiplier * 100HEMA(Underlier).",
                              "example": 1.1
                            },
                            "underlier": {
                              "type": "string",
                              "description": "If the market is an option, this property indicates the underlying asset of the option.",
                              "example": "BTC"
                            },
                            "status": {
                              "type": "string",
                              "description": "Status of the market",
                              "example": "TRADING"
                            },
                            "active": {
                              "type": "boolean",
                              "description": "Is the market currently active?",
                              "example": true
                            },
                            "filters": {
                              "type": "object",
                              "properties": {
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "PRICE_FILTER"
                                    },
                                    "min_price": {
                                      "type": "number",
                                      "description": "Minimum price",
                                      "example": 0.001
                                    },
                                    "max_price": {
                                      "type": "number",
                                      "description": "Maximum price",
                                      "example": 100000
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Price tick size",
                                      "example": 0.001
                                    }
                                  },
                                  "description": "Price filter"
                                },
                                "qty": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "LOT_SIZE"
                                    },
                                    "min_qty": {
                                      "type": "number",
                                      "description": "Minimum quantity",
                                      "example": 0.001
                                    },
                                    "max_qty": {
                                      "type": "number",
                                      "description": "Maximum quantity",
                                      "example": 50000
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Quantity tick size",
                                      "example": 0.001
                                    }
                                  },
                                  "description": "Quantity filter"
                                },
                                "icebergs": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "ICEBERG"
                                    },
                                    "min_qty": {
                                      "type": "number",
                                      "description": "Minimum quantity",
                                      "example": 1
                                    },
                                    "max_qty": {
                                      "type": "number",
                                      "description": "Maximum quantity",
                                      "example": 10
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Iceberg tick size",
                                      "example": 1
                                    }
                                  },
                                  "description": "Iceberg filter"
                                },
                                "interest": {
                                  "type": "object",
                                  "properties": {
                                    "filter_type": {
                                      "type": "string",
                                      "description": "Type of filter",
                                      "example": "INTEREST"
                                    },
                                    "min_qty": {
                                      "type": "number",
                                      "description": "Minimum position size",
                                      "example": 0
                                    },
                                    "max_qty": {
                                      "type": "number",
                                      "description": "Maximum position size",
                                      "example": 0.1
                                    },
                                    "tick_size": {
                                      "type": "number",
                                      "description": "Position size tick size",
                                      "example": 0.00001
                                    }
                                  },
                                  "description": "Position size filter"
                                }
                              },
                              "description": "Tick size, minimum quantity, iceberg quantity and maximum position size"
                            }
                          },
                          "description": "Information about the market"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "USD_BTCCALL_PERP": [
                          {
                            "key": "USD_BTCCALL_PERP",
                            "base": "USD",
                            "base_precision": 18,
                            "base_display_precision": 2,
                            "quote": "BTC",
                            "quote_precision": 12,
                            "quote_display_precision": 1,
                            "qty_display_precision": 4,
                            "precision_asset": "BTC",
                            "tv_price_precision": 1,
                            "tv_volume_precision": 4,
                            "symbol": "BTCCALL90/USD",
                            "description": "BTC Perpetual Call Option (+10%)",
                            "introduction": "BTC call option. The strike of the option is pinned to the 100-hour EMA of BTC (+10%). The option never expires.",
                            "website": "https://bitcoin.org",
                            "explorer": "https://www.blockchain.com/explore",
                            "subreddit": "bitcoin",
                            "issue_price": 0.0025,
                            "issue_time": 1225494000,
                            "total_supply": 21000000,
                            "category": "call",
                            "url": "https://en.wikipedia.org/wiki/Bitcoin",
                            "commission_maker": 0,
                            "commission_taker": 0.0003,
                            "commission_liquidation": 0.0003,
                            "contract": "PERP",
                            "min_initial_margin": 1,
                            "min_maintenance_margin": 0.5,
                            "initial_risk_limit": 0.000001,
                            "maintenance_risk_limit": 5e-7,
                            "deleverage_threshold": 0,
                            "swap_threshold": 0.5,
                            "min_liquidate": 500,
                            "liquidate_threshold": 0.1,
                            "funding_threshold": 0.0005,
                            "funding_interval": 3600000,
                            "funding_time_window": 36000000,
                            "funding_min": -1,
                            "funding_max": 1,
                            "fair_qty": 0.001,
                            "fair_multiplier": 0.01,
                            "insurance_percentage": 1,
                            "index_price_update_interval": 4000,
                            "index_price_exclude_threshold": 4,
                            "index_price_hit_api": true,
                            "mark_price_max_deviation": 0.5,
                            "mark_price_ema_range": 5,
                            "trading_ema_range": 30,
                            "trading_max_index_deviation": 0.5,
                            "trading_max_mark_deviation": 0.5,
                            "composite": false,
                            "use_ema": true,
                            "call": true,
                            "index_price_ema_range": 100,
                            "price_multiplier": 1.1,
                            "underlier": "BTC",
                            "order_types": [
                              "MARKET",
                              "LIMIT"
                            ],
                            "filters": {
                              "price": {
                                "filter_type": "PRICE_FILTER",
                                "min_price": 0.001,
                                "max_price": 100000,
                                "tick_size": 0.00001
                              },
                              "qty": {
                                "filter_type": "LOT_SIZE",
                                "min_qty": 0.001,
                                "max_qty": 50000,
                                "tick_size": 0.00001
                              },
                              "icebergs": {
                                "filter_type": "ICEBERG",
                                "min_qty": 1,
                                "max_qty": 10,
                                "tick_size": 1
                              },
                              "interest": {
                                "filter_type": "INTEREST",
                                "min_qty": 0,
                                "max_qty": 0.1,
                                "tick_size": 0.00001
                              }
                            },
                            "status": "TRADING",
                            "active": true,
                            "usd_price": 3843.01040541
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.pairs();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/depth": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Depth",
        "description": "Retrieve L2 order book data for a specific market.",
        "operationId": "depth",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Market to get depth for (e.g. \"USD_BTCCALL_PERP\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of bids and asks to return (default is 40).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "bids": {
                          "type": "array",
                          "description": "Bid array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "price": {
                                "type": "number",
                                "description": "Price",
                                "example": 0.01123
                              },
                              "qty": {
                                "type": "number",
                                "description": "Quantity",
                                "example": 0.01123
                              }
                            }
                          }
                        },
                        "asks": {
                          "type": "array",
                          "description": "Ask array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "price": {
                                "type": "number",
                                "description": "Price",
                                "example": 0.01123
                              },
                              "qty": {
                                "type": "number",
                                "description": "Quantity",
                                "example": 0.01123
                              }
                            }
                          }
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "bids": [
                          {
                            "price": 0.01123,
                            "qty": 0.00998
                          },
                          {
                            "price": 0.00892,
                            "qty": 0.0989
                          },
                          {
                            "price": 0.00976,
                            "qty": 0.01693
                          },
                          {
                            "price": 0.00828,
                            "qty": 0.03855
                          }
                        ],
                        "asks": [
                          {
                            "price": 0.08546,
                            "qty": 0.00284
                          },
                          {
                            "price": 0.08654,
                            "qty": 0.09746
                          },
                          {
                            "price": 0.09883,
                            "qty": 0.01746
                          },
                          {
                            "price": 0.08674,
                            "qty": 0.021
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.depth({\n    pair: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/ticker": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Ticker",
        "description": "Retrieve the latest ticker.",
        "operationId": "ticker",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Market to get the ticker for (e.g. \"USD_BTCCALL_PERP\"). If not specified, the ticker will include all available markets.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "USD_BTCCALL_PERP": {
                          "type": "object",
                          "properties": {
                            "price_change": {
                              "type": "number",
                              "description": "24H Price Change",
                              "example": 0.013
                            },
                            "price_change_percent": {
                              "type": "number",
                              "description": "24H Price Change Percent",
                              "example": 24.73
                            },
                            "last_price": {
                              "type": "number",
                              "description": "Last Traded Price",
                              "example": 0.06909
                            },
                            "prev_last_price": {
                              "type": "number",
                              "description": "Previous Last Traded Price",
                              "example": 0.06909
                            },
                            "last_qty": {
                              "type": "number",
                              "description": "Last Traded Qty",
                              "example": 20
                            },
                            "open_price": {
                              "type": "number",
                              "description": "24H Open",
                              "example": 0.05539
                            },
                            "open_price_mark": {
                              "type": "number",
                              "description": "24H Open (Mark Price)",
                              "example": 0.05539
                            },
                            "close_price": {
                              "type": "number",
                              "description": "24H Close",
                              "example": 0.06909
                            },
                            "high_price": {
                              "type": "number",
                              "description": "24H High",
                              "example": 0.09993
                            },
                            "high_price_mark": {
                              "type": "number",
                              "description": "24H High (Mark Price)",
                              "example": 0.09993
                            },
                            "low_price": {
                              "type": "number",
                              "description": "24H Low",
                              "example": 0.00133
                            },
                            "low_price_mark": {
                              "type": "number",
                              "description": "24H Low (Mark Price)",
                              "example": 0.00133
                            },
                            "min_price": {
                              "type": "number",
                              "description": "Minimum Allowed Trade Price",
                              "example": 0.0012
                            },
                            "max_price": {
                              "type": "number",
                              "description": "Maximum Allowed Trade Price",
                              "example": 0.09
                            },
                            "mark_price": {
                              "type": "number",
                              "description": "Mark Price",
                              "example": 0.09993
                            },
                            "index_price": {
                              "type": "number",
                              "description": "Index Price",
                              "example": 0.09993
                            },
                            "fair_price": {
                              "type": "number",
                              "description": "Fair Price",
                              "example": 0.09993
                            },
                            "volatility": {
                              "type": "number",
                              "description": "14D Annualized Volatility",
                              "example": 0.5312
                            },
                            "black_scholes": {
                              "type": "number",
                              "description": "Theoretical Price",
                              "example": 0.5312
                            },
                            "underlying_price": {
                              "type": "number",
                              "description": "Spot Price of Underlier",
                              "example": 0.535
                            },
                            "strike": {
                              "type": "number",
                              "description": "Current Strike Price",
                              "example": 1521.64
                            },
                            "otm_amount": {
                              "type": "number",
                              "description": "OTM Amount"
                            },
                            "itm_amount": {
                              "type": "number",
                              "description": "ITM Amount"
                            },
                            "base_volume": {
                              "type": "number",
                              "description": "Base volume",
                              "example": 42
                            },
                            "quote_volume": {
                              "type": "number",
                              "description": "Quote volume",
                              "example": 1000
                            },
                            "open_interest": {
                              "type": "number",
                              "description": "Open Interest",
                              "example": 11.17
                            },
                            "open_time": {
                              "type": "number",
                              "description": "Time of 24H Open, in milliseconds",
                              "example": 1551029761140
                            },
                            "close_time": {
                              "type": "number",
                              "description": "Time of 24H Close, in milliseconds",
                              "example": 1551032161140
                            },
                            "trades": {
                              "type": "number",
                              "description": "Number of trades since 24H Open",
                              "example": 1105
                            },
                            "orders": {
                              "type": "number",
                              "description": "Number of orders since 24H Open",
                              "example": 20314
                            },
                            "bid_price": {
                              "type": "number",
                              "description": "Best bid",
                              "example": 1105
                            },
                            "ask_price": {
                              "type": "number",
                              "description": "Best ask",
                              "example": 1105
                            },
                            "bid_qty": {
                              "type": "number",
                              "description": "Quantity of best bid",
                              "example": 1105
                            },
                            "ask_qty": {
                              "type": "number",
                              "description": "Quantity of best ask",
                              "example": 1105
                            }
                          },
                          "description": "Market"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "USD_BTCCALL_PERP": {
                          "price_change": 0.013,
                          "price_change_percent": 24.73,
                          "last_price": 0.06909,
                          "prev_last_price": 0.05932,
                          "last_qty": 0.01711,
                          "open_price": 0.05539,
                          "open_price_mark": 0.04341,
                          "close_price": 0.06909,
                          "high_price": 0.09993,
                          "high_price_mark": 0.08393,
                          "low_price": 0.00133,
                          "low_price_mark": 0.00125,
                          "min_price": 0.0012,
                          "max_price": 0.9123,
                          "mark_price": 0.09993,
                          "fair_price": 0.01343,
                          "underlying_price": 1371.32,
                          "otm_amount": 150.32,
                          "itm_amount": 0,
                          "black_scholes": 0.1034,
                          "strike": 1521.64,
                          "volatility": 0.5231,
                          "index_price": 0.09993,
                          "funding_rate": -0.0029,
                          "funding_avg": 0.004,
                          "base_volume": 42.31186,
                          "quote_volume": 1.9973966801,
                          "open_interest": 11.1173966801,
                          "open_time": 1551029761140,
                          "close_time": 1551032161140,
                          "trades": 1105,
                          "orders": 20133,
                          "bid_price": 0.01123,
                          "ask_price": 0.08546,
                          "bid_qty": 0.00998,
                          "ask_qty": 0.00284
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.ticker({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/ohlcv": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "OHLCV",
        "description": "Retrieve candlestick data for a specific market.",
        "operationId": "ohlcv",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Market to get candles for (e.g. USD_BTCCALL_PERP)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get candles for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get candles for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of candles to get (default is 250)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "open": 0.03446,
                          "high": 180,
                          "low": 0.00414,
                          "close": 0.027,
                          "base_volume": 5.608289999999999,
                          "quote_volume": 73.68101364710009,
                          "open_time": 1550969804300,
                          "close_time": 1550970104300,
                          "trades": 130,
                          "last_price": 0.027,
                          "last_qty": 0.01149
                        },
                        {
                          "open": 0.09911,
                          "high": 0.09911,
                          "low": 0.00463,
                          "close": 0.09854,
                          "base_volume": 34.6935,
                          "quote_volume": 2.8099507822,
                          "open_time": 1550970104300,
                          "close_time": 1550970404300,
                          "trades": 55,
                          "last_price": 0.09854,
                          "last_qty": 10
                        },
                        {
                          "open": 0.06534,
                          "high": 0.09773,
                          "low": 0.00637,
                          "close": 0.05404,
                          "base_volume": 2.68577,
                          "quote_volume": 0.1291248635,
                          "open_time": 1550970484750,
                          "close_time": 1550970784750,
                          "trades": 26,
                          "last_price": 0.05404,
                          "last_qty": 0.01246
                        },
                        {
                          "open": 0.09146,
                          "high": 0.09886,
                          "low": 0.00203,
                          "close": 0.00203,
                          "base_volume": 3.37571,
                          "quote_volume": 0.2363197901,
                          "open_time": 1550970784750,
                          "close_time": 1550971084750,
                          "trades": 44,
                          "last_price": 0.00203,
                          "last_qty": 0.39232
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "open": {
                            "type": "number",
                            "description": "Open",
                            "example": 11.34
                          },
                          "high": {
                            "type": "number",
                            "description": "High",
                            "example": 24.8
                          },
                          "low": {
                            "type": "number",
                            "description": "Low",
                            "example": 9.32
                          },
                          "close": {
                            "type": "number",
                            "description": "Close",
                            "example": 15.34
                          },
                          "base_volume": {
                            "type": "number",
                            "description": "Base Volume",
                            "example": 5.63
                          },
                          "quote_volume": {
                            "type": "number",
                            "description": "Quote Volume",
                            "example": 134.4
                          },
                          "open_time": {
                            "type": "number",
                            "description": "Time of Open, in milliseconds",
                            "example": 1550970104300
                          },
                          "close_time": {
                            "type": "number",
                            "description": "Time of Close, in milliseconds",
                            "example": 1550970104300
                          },
                          "trades": {
                            "type": "number",
                            "description": "Trades since Open",
                            "example": 55
                          },
                          "last_price": {
                            "type": "number",
                            "description": "Last Traded Price",
                            "example": 55
                          },
                          "last_qty": {
                            "type": "number",
                            "description": "Last Traded Qty",
                            "example": 102.3
                          }
                        },
                        "description": "Candle"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.ohlcv({\n    pair: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/trades": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Trades",
        "description": "Retrieve the latest trades for a specific market.",
        "operationId": "trades",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Market to get trades for (e.g. USD_BTCCALL_PERP)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get trades for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get trades for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of trades to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "is_buyer_maker": true,
                          "is_best_match": true,
                          "qty": 0.00698,
                          "price": 0.06924,
                          "id": "c6d30ec0385f11e9a7706b30b08d8b29",
                          "time": 1551031962028
                        },
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "is_buyer_maker": true,
                          "is_best_match": true,
                          "qty": 0.01711,
                          "price": 0.06909,
                          "id": "c6cec900385f11e9833bb5e42787dd91",
                          "time": 1551031961996
                        },
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "is_buyer_maker": false,
                          "is_best_match": true,
                          "qty": 0.02666,
                          "price": 0.07499,
                          "id": "c480ba50385f11e9a818bb1e0fcecae1",
                          "time": 1551031958133
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "pair": {
                            "type": "string",
                            "description": "Market",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "is_buyer_maker": {
                            "type": "boolean",
                            "description": "Is the buyer maker?",
                            "example": true
                          },
                          "is_best_match": {
                            "type": "boolean",
                            "example": true
                          },
                          "qty": {
                            "type": "number",
                            "description": "Trade quantity",
                            "example": 0.00698
                          },
                          "price": {
                            "type": "number",
                            "description": "Trade price",
                            "example": 0.06924
                          },
                          "id": {
                            "type": "string",
                            "description": "Trade ID",
                            "example": "c6d30ec0385f11e9a7706b30b08d8b29"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time that the trade took place, in milliseconds",
                            "example": 1551031962028
                          }
                        },
                        "description": "Trade"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.public.trades({\n    pair: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/deposits": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Deposits",
        "description": "Retrieve your deposits. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "deposits",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "address": 8.267255226581598e+47,
                          "customer_id": "5f9ca5f0380e11e9bf5191a076098e19",
                          "asset": "ETH",
                          "time": 1551120600023,
                          "qty": 0.1,
                          "net": 0.1,
                          "transaction": {
                            "hash": 3.422571472397266e+76,
                            "from": 9.04896849601773e+47
                          },
                          "status": "COMPLETED",
                          "id": "ETH0x4bab116ba887eeb9192a1b282766e58dfba65abf1d79548aad0636b89a21a7c3",
                          "qty_usd": 14.218710925,
                          "net_usd": 14.0765238158
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "description": "Address of deposit",
                            "example": 8.267255226581598e+47
                          },
                          "customer_id": {
                            "type": "string",
                            "description": "Your unique Account ID",
                            "example": "5f9ca5f0380e11e9bf5191a076098e19"
                          },
                          "asset": {
                            "type": "string",
                            "description": "Asset of deposit",
                            "example": "ETH"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of deposit",
                            "example": 1551120600023
                          },
                          "qty": {
                            "type": "number",
                            "description": "Quantity of deposit",
                            "example": 0.1
                          },
                          "net": {
                            "type": "number",
                            "description": "Net Quantity of deposit. Net Quantity = Quantity - Fee.",
                            "example": 0.1
                          },
                          "status": {
                            "type": "string",
                            "description": "Status of deposit. Can be PENDING or COMPLETED.",
                            "example": "COMPLETED"
                          },
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of deposit.",
                            "example": "ETH0x4bab116ba887eeb9192a1b282766e58dfba65abf1d79548aad0636b89a21a7c3"
                          },
                          "qty_usd": {
                            "type": "number",
                            "description": "USD quantity of deposit, at time of deposit.",
                            "example": 14.3
                          },
                          "transaction": {
                            "type": "object",
                            "properties": {
                              "hash": {
                                "type": "string",
                                "description": "Transaction hash",
                                "example": 3.422571472397266e+76
                              },
                              "from": {
                                "type": "string",
                                "description": "Sender of transaction",
                                "example": 9.04896849601773e+47
                              }
                            },
                            "description": "Blockchain transaction associated with the deposit"
                          }
                        },
                        "description": "Deposit"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.deposits();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/withdrawals": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Withdrawals",
        "description": "Retrieve your withdrawals. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "withdrawals",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "qty": 0.01,
                          "net": 0.009,
                          "qty_usd": 1.3930651399,
                          "manually_approved": false,
                          "address": 9.04896849601773e+47,
                          "asset": "ETH",
                          "time": 1551127794034,
                          "status": "ACTIVE",
                          "customer_id": "5f9ca5f0380e11e9bf5191a076098e19"
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "description": "Address of withdrawal",
                            "example": 8.267255226581598e+47
                          },
                          "customer_id": {
                            "type": "string",
                            "description": "Your unique Account ID",
                            "example": "5f9ca5f0380e11e9bf5191a076098e19"
                          },
                          "asset": {
                            "type": "string",
                            "description": "Asset of withdrawal",
                            "example": "ETH"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of withdrawal",
                            "example": 1551120600023
                          },
                          "qty": {
                            "type": "number",
                            "description": "Quantity of withdrawal",
                            "example": 0.1
                          },
                          "net": {
                            "type": "number",
                            "description": "Net Quantity of withdrawal. Net Quantity = Quantity - Fee.",
                            "example": 0.1
                          },
                          "status": {
                            "type": "string",
                            "description": "Status of withdrawal. Can be PENDING or COMPLETED.",
                            "example": "COMPLETED"
                          },
                          "manually_approved": {
                            "type": "boolean",
                            "example": true
                          },
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of withdrawal.",
                            "example": "ETH0x4bab116ba887eeb9192a1b282766e58dfba65abf1d79548aad0636b89a21a7c3"
                          },
                          "qty_usd": {
                            "type": "number",
                            "description": "USD quantity of withdrawal, at time of withdrawal.",
                            "example": 14.3
                          },
                          "transaction": {
                            "type": "object",
                            "properties": {
                              "hash": {
                                "type": "string",
                                "description": "Transaction hash",
                                "example": 3.422571472397266e+76
                              },
                              "from": {
                                "type": "string",
                                "description": "Sender of transaction",
                                "example": 9.04896849601773e+47
                              }
                            },
                            "description": "Blockchain transaction associated with the withdrawal"
                          }
                        },
                        "description": "Withdrawal"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.withdrawals();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Orders",
        "description": "Retrieve your orders. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0.02225,
                          "qty_filled": 0,
                          "side": "SELL",
                          "status": "ACTIVE",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.orders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/active_orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Active Orders",
        "description": "Retrieve your active orders. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "active_orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0.02225,
                          "qty_filled": 0,
                          "side": "SELL",
                          "status": "ACTIVE",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.activeOrders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/cancelled_orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Cancelled Orders",
        "description": "Retrieve your cancelled orders. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "cancelled_orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0.02225,
                          "qty_filled": 0,
                          "side": "SELL",
                          "status": "CANCELLED",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.cancelledOrders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/filled_orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Filled Orders",
        "description": "Retrieve your filled orders. Requires a valid API key sent with the *x-api-key* header. Returns orders that have been filled at least once (but not necessarily filled entirely)",
        "operationId": "filled_orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0.01225,
                          "qty_filled": 0.01,
                          "side": "SELL",
                          "status": "ACTIVE",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.filledOrders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/completed_orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Completely Filled Orders",
        "description": "Retrieve orders that have been filled entirely. Orders that have only been partially filled will not be returned by this endpoint. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "completed_orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0,
                          "qty_filled": 0.02225,
                          "side": "SELL",
                          "status": "COMPLETED",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.completedOrders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/partially_filled_orders": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Partially Filled Orders",
        "description": "Retrieve orders that have only been partially filled (filled at least once, but not filled entirely). Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "partially_filled_orders",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get orders for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "id": "781a8e80393f11e98e2643f8c5a993ce",
                          "fills": [],
                          "pair": "USD_BTCCALL_PERP",
                          "price": 200,
                          "price_orig": 200,
                          "qty_orig": 0.02225,
                          "qty_orig_usd": 3.09956993634425,
                          "qty_remaining": 0.01225,
                          "qty_filled": 0.01,
                          "side": "SELL",
                          "status": "ACTIVE",
                          "time": 1551128037224,
                          "time_in_force": "GTC",
                          "type": "LIMIT",
                          "oco": null,
                          "icebergs": null,
                          "trigger_price": null,
                          "trigger_event": null,
                          "close_on_trigger": false,
                          "reduce_only": false,
                          "post_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.partiallyFilledOrders({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/fills": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Fills",
        "description": "Retrieve your fills. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "fills",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get trades for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get trades for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of fills to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "is_buyer_maker": true,
                          "pair": "USD_BTCCALL_PERP",
                          "side": "SELL",
                          "type": "MARKET",
                          "qty": 940,
                          "qty_usd": 940,
                          "price": 7541.5,
                          "cost": 7089010,
                          "time": 1578322600590,
                          "gross_commission": 0.564,
                          "net_commission": 0.564,
                          "gross_commission_asset": "USD",
                          "liquidation": false,
                          "net_commission_asset": "USD",
                          "net_commission_usd": 0.564,
                          "conversion_rate": null,
                          "discount": 0
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "pair": {
                            "type": "string",
                            "description": "Market",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "is_buyer_maker": {
                            "type": "boolean",
                            "description": "Is the buyer maker?",
                            "example": true
                          },
                          "qty": {
                            "type": "number",
                            "description": "Trade quantity",
                            "example": 0.00698
                          },
                          "qty_usd": {
                            "type": "number",
                            "description": "USD Trade quantity",
                            "example": 10.3
                          },
                          "price": {
                            "type": "number",
                            "description": "Trade price",
                            "example": 0.06924
                          },
                          "gross_commission": {
                            "type": "number",
                            "example": 0.564
                          },
                          "net_commission": {
                            "type": "number",
                            "example": 0.564
                          },
                          "gross_commission_asset": {
                            "type": "string",
                            "example": "USD"
                          },
                          "net_commission_asset": {
                            "type": "string",
                            "example": "USD"
                          },
                          "liquidation": {
                            "type": "boolean",
                            "description": "Is the trade a result of a liquidation?",
                            "example": false
                          },
                          "id": {
                            "type": "string",
                            "description": "Trade ID",
                            "example": "c6d30ec0385f11e9a7706b30b08d8b29"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time that the trade took place, in milliseconds",
                            "example": 1551031962028
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.fills({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/triggers": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Triggers",
        "description": "Retrieve your trigger orders (stop losses and take profits). Requires a valid API key sent with the *x-api-key* header. When a stop or take profit is triggered and accepted by the engine, it is converted into an open order and can be retrieved through the /orders endpoint. If it is not accepted by the engine for whatever reason, it will still be available through this endpoint and will have a diagnostic message attached to it.",
        "operationId": "triggers",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. \"USD_BTCCALL_PERP\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get stops for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get stops for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of orders to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": [
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "status": "ACTIVE",
                          "qty_remaining": 0.01668,
                          "price": 0.06909,
                          "trigger_price": 0.17329,
                          "trigger_event": "MARK_PRICE",
                          "id": "38089ed0394011e9aab3bdc6c89d8f44",
                          "time": 1551128359228
                        },
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "status": "CANCELLED",
                          "qty_remaining": 0.01668,
                          "price": 0.06909,
                          "trigger_price": 0.17329,
                          "trigger_event": "LAST_PRICE",
                          "id": "38089ed0394011e9aab3bdc6c89d8f44",
                          "time": "1551128359228,",
                          "msg": "Order was rejected due to insufficient balance"
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "UNTRIGGERED, ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          },
                          "msg": {
                            "type": "string",
                            "description": "If the order has been triggered, but could not be accepted by the matching engine, the reason will show here.",
                            "example": "false"
                          }
                        },
                        "description": "Order"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.triggers({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/position": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Position",
        "description": "Retrieve your position. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "position",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Market for position (e.g. USD_BTCCALL_PERP)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "size": {
                          "type": "number",
                          "description": "Size of position",
                          "example": 1
                        },
                        "free": {
                          "type": "number",
                          "description": "Margin assigned to the position",
                          "example": 0.1
                        },
                        "locked": {
                          "type": "number",
                          "description": "Margin locked within the position",
                          "example": 0
                        },
                        "realized": {
                          "type": "number",
                          "description": "Realised P&L (USD)",
                          "example": 1
                        },
                        "funding": {
                          "type": "number",
                          "description": "Funding P&L (USD)",
                          "example": 1
                        },
                        "fees": {
                          "type": "number",
                          "description": "Fee P&L (USD)",
                          "example": 1
                        },
                        "stats": {
                          "type": "object",
                          "properties": {
                            "size": {
                              "type": "number",
                              "description": "Size of position",
                              "example": 1
                            },
                            "notional": {
                              "type": "number",
                              "description": "Notional size of position",
                              "example": 1
                            },
                            "margin": {
                              "type": "number",
                              "description": "Margin assigned to the position",
                              "example": 0
                            },
                            "pnl": {
                              "type": "number",
                              "description": "Total P&L (USD)",
                              "example": 1
                            },
                            "upnl": {
                              "type": "number",
                              "description": "Unrealised P&L (USD)",
                              "example": 1
                            },
                            "rpnl": {
                              "type": "number",
                              "description": "Realised P&L (USD)",
                              "example": 1
                            },
                            "equity": {
                              "type": "number",
                              "description": "Unrealised P&L + Margin",
                              "example": 1
                            },
                            "roe": {
                              "type": "number",
                              "description": "P&L / Initial Margin",
                              "example": 0
                            },
                            "mark": {
                              "type": "number",
                              "description": "Mark Price",
                              "example": 2.1
                            },
                            "avg_entry": {
                              "type": "number",
                              "description": "VWAP Entry Price",
                              "example": 3.4
                            },
                            "leverage": {
                              "type": "number",
                              "description": "Effective Leverage",
                              "example": 2.82
                            },
                            "lp": {
                              "type": "number",
                              "description": "Liquidation Price",
                              "example": 3.7
                            },
                            "bankrupt": {
                              "type": "number",
                              "description": "Bankruptcy Price",
                              "example": 3.7
                            },
                            "direction": {
                              "type": "string",
                              "description": "BUY or SELL",
                              "example": "BUY"
                            }
                          },
                          "description": "Detailed Position Information"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "size": 1,
                        "free": 1,
                        "locked": 0,
                        "realized": 0,
                        "funding": 0,
                        "fees": 0,
                        "stats": {
                          "size": 1,
                          "notional": 0.14,
                          "margin": 1,
                          "pnl": 0,
                          "upnl": 0,
                          "rpnl": 0,
                          "equity": 1,
                          "roe": 0,
                          "mark": 2.1,
                          "avg_entry": 3.4,
                          "leverage": 2.82,
                          "lp": 3.7,
                          "bankrupt": 3.78,
                          "direction": "BUY"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.position({\n    pair: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/active_positions": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Active Positions",
        "description": "Retrieve your active positions. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "active_positions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "USD_BTCCALL_PERP": {
                          "type": "object",
                          "properties": {
                            "size": {
                              "type": "number",
                              "description": "Size of position",
                              "example": 1
                            },
                            "free": {
                              "type": "number",
                              "description": "Margin assigned to the position",
                              "example": 0.1
                            },
                            "locked": {
                              "type": "number",
                              "description": "Margin locked within the position",
                              "example": 0
                            },
                            "realized": {
                              "type": "number",
                              "description": "Realised P&L (USD)",
                              "example": 1
                            },
                            "funding": {
                              "type": "number",
                              "description": "Funding P&L (USD)",
                              "example": 1
                            },
                            "fees": {
                              "type": "number",
                              "description": "Fee P&L (USD)",
                              "example": 1
                            },
                            "stats": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "notional": {
                                  "type": "number",
                                  "description": "Notional size of position",
                                  "example": 1
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "Total P&L (USD)",
                                  "example": 1
                                },
                                "upnl": {
                                  "type": "number",
                                  "description": "Unrealised P&L (USD)",
                                  "example": 1
                                },
                                "rpnl": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "equity": {
                                  "type": "number",
                                  "description": "Unrealised P&L + Margin",
                                  "example": 1
                                },
                                "roe": {
                                  "type": "number",
                                  "description": "P&L / Initial Margin",
                                  "example": 0
                                },
                                "mark": {
                                  "type": "number",
                                  "description": "Mark Price",
                                  "example": 2.1
                                },
                                "avg_entry": {
                                  "type": "number",
                                  "description": "VWAP Entry Price",
                                  "example": 3.4
                                },
                                "leverage": {
                                  "type": "number",
                                  "description": "Effective Leverage",
                                  "example": 2.82
                                },
                                "lp": {
                                  "type": "number",
                                  "description": "Liquidation Price",
                                  "example": 3.7
                                },
                                "bankrupt": {
                                  "type": "number",
                                  "description": "Bankruptcy Price",
                                  "example": 3.7
                                },
                                "direction": {
                                  "type": "string",
                                  "description": "BUY or SELL",
                                  "example": "BUY"
                                }
                              },
                              "description": "Detailed Position Information"
                            }
                          },
                          "description": "Market of position"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "USD_BTCCALL_PERP": {
                          "size": 1,
                          "free": 1,
                          "locked": 0,
                          "realized": 0,
                          "funding": 0,
                          "fees": 0,
                          "fills": [],
                          "stats": {
                            "size": 1,
                            "notional": 0.14,
                            "margin": 1,
                            "pnl": 0,
                            "upnl": 0,
                            "rpnl": 0,
                            "equity": 1,
                            "roe": 0,
                            "mark": 2.1,
                            "avg_entry": 3.4,
                            "leverage": 2.82,
                            "lp": 3.7,
                            "bankrupt": 3.78,
                            "direction": "BUY"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.activePositions();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/completed_positions": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Closed Positions",
        "description": "Retrieve your closed positions. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "completed_positions",
        "parameters": [
          {
            "name": "pair",
            "in": "query",
            "description": "Filter by market (e.g. USD_BTCCALL_PERP)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start of time period to get positions for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End of time period to get positions for (in milliseconds UNIX time)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Amount of positions to get (default is 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "description": "Request result",
                      "example": {
                        "USD_BTCCALL_PERP": {
                          "size": 1,
                          "free": 1,
                          "locked": 0,
                          "realized": 0,
                          "fees": 0,
                          "funding": 0,
                          "fills": [],
                          "stats": {
                            "size": 1,
                            "notional": 0.14,
                            "margin": 1,
                            "pnl": 0,
                            "upnl": 0,
                            "rpnl": 0,
                            "equity": 1,
                            "roe": 0,
                            "mark": 2.1,
                            "avg_entry": 3.4,
                            "leverage": 2.82,
                            "lp": 3.7,
                            "bankrupt": 3.78,
                            "direction": "BUY"
                          }
                        }
                      },
                      "items": {
                        "type": "object",
                        "properties": {
                          "pair": {
                            "type": "string",
                            "description": "Market of position",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "size": {
                            "type": "number",
                            "description": "Size of position",
                            "example": 1
                          },
                          "free": {
                            "type": "number",
                            "description": "Margin assigned to the position",
                            "example": 0.1
                          },
                          "locked": {
                            "type": "number",
                            "description": "Margin locked within the position",
                            "example": 0
                          },
                          "realized": {
                            "type": "number",
                            "description": "Realised P&L (USD)",
                            "example": 1
                          },
                          "funding": {
                            "type": "number",
                            "description": "Funding P&L (USD)",
                            "example": 1
                          },
                          "fees": {
                            "type": "number",
                            "description": "Fee P&L (USD)",
                            "example": 1
                          },
                          "stats": {
                            "type": "object",
                            "properties": {
                              "size": {
                                "type": "number",
                                "description": "Size of position",
                                "example": 1
                              },
                              "notional": {
                                "type": "number",
                                "description": "Notional size of position",
                                "example": 1
                              },
                              "margin": {
                                "type": "number",
                                "description": "Margin assigned to the position",
                                "example": 0
                              },
                              "pnl": {
                                "type": "number",
                                "description": "Total P&L (USD)",
                                "example": 1
                              },
                              "upnl": {
                                "type": "number",
                                "description": "Unrealised P&L (USD)",
                                "example": 1
                              },
                              "rpnl": {
                                "type": "number",
                                "description": "Realised P&L (USD)",
                                "example": 1
                              },
                              "equity": {
                                "type": "number",
                                "description": "Unrealised P&L + Margin",
                                "example": 1
                              },
                              "roe": {
                                "type": "number",
                                "description": "P&L / Initial Margin",
                                "example": 0
                              },
                              "mark": {
                                "type": "number",
                                "description": "Mark Price",
                                "example": 2.1
                              },
                              "avg_entry": {
                                "type": "number",
                                "description": "VWAP Entry Price",
                                "example": 3.4
                              },
                              "leverage": {
                                "type": "number",
                                "description": "Effective Leverage",
                                "example": 2.82
                              },
                              "lp": {
                                "type": "number",
                                "description": "Liquidation Price",
                                "example": 3.7
                              },
                              "bankrupt": {
                                "type": "number",
                                "description": "Bankruptcy Price",
                                "example": 3.7
                              },
                              "direction": {
                                "type": "string",
                                "description": "BUY or SELL",
                                "example": "BUY"
                              }
                            },
                            "description": "Detailed Position Information"
                          }
                        },
                        "description": "Position"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.completedPositions({});\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/order": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Order",
        "description": "Retrieve an order. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "order",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "ID of order",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of order",
                          "example": "781a8e80393f11e98e2643f8c5a993ce"
                        },
                        "pair": {
                          "type": "string",
                          "description": "Market of order",
                          "example": "USD_BTCCALL_PERP"
                        },
                        "price": {
                          "type": "number",
                          "description": "Current price of order",
                          "example": 200
                        },
                        "price_orig": {
                          "type": "number",
                          "description": "Original price of order",
                          "example": 200
                        },
                        "qty_orig": {
                          "type": "number",
                          "description": "Original quantity of order",
                          "example": 0.02
                        },
                        "qty_orig_usd": {
                          "type": "number",
                          "description": "Original USD quantity of order",
                          "example": 20
                        },
                        "qty_remaining": {
                          "type": "number",
                          "description": "Quantity not yet filled",
                          "example": 0.02
                        },
                        "qty_filled": {
                          "type": "number",
                          "description": "Quantity that has been filled",
                          "example": 0
                        },
                        "side": {
                          "type": "string",
                          "description": "BUY or SELL",
                          "example": "BUY"
                        },
                        "status": {
                          "type": "string",
                          "description": "ACTIVE, CANCELLED or COMPLETED",
                          "example": "ACTIVE"
                        },
                        "time": {
                          "type": "number",
                          "description": "Time of last update, in milliseconds",
                          "example": 1551128037224
                        },
                        "time_in_force": {
                          "type": "string",
                          "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                          "example": "GTC"
                        },
                        "type": {
                          "type": "string",
                          "description": "Type of order. Can be LIMIT or MARKET.",
                          "example": "LIMIT"
                        },
                        "oco": {
                          "type": "string",
                          "description": "OCO ID of order",
                          "example": "my-oco-id"
                        },
                        "icebergs": {
                          "type": "number",
                          "description": "Icebergs on order",
                          "example": 5
                        },
                        "trigger_price": {
                          "type": "number",
                          "description": "Trigger price of order",
                          "example": 210
                        },
                        "trigger_event": {
                          "type": "string",
                          "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                          "example": "MARK_PRICE"
                        },
                        "close_on_trigger": {
                          "type": "boolean",
                          "example": false
                        },
                        "reduce_only": {
                          "type": "boolean",
                          "description": "If true, the order can only decrease the size of your position.",
                          "example": false
                        },
                        "post_only": {
                          "type": "boolean",
                          "description": "If true, the order can only trade as maker.",
                          "example": false
                        },
                        "hidden": {
                          "type": "boolean",
                          "description": "If true, the order does not show in the order book.",
                          "example": false
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "id": "781a8e80393f11e98e2643f8c5a993ce",
                        "fills": [],
                        "pair": "USD_BTCCALL_PERP",
                        "price": 200,
                        "price_orig": 200,
                        "qty_orig": 0.02225,
                        "qty_orig_usd": 3.09956993634425,
                        "qty_remaining": 0.02225,
                        "side": "SELL",
                        "status": "ACTIVE",
                        "time": 1551128037224,
                        "time_in_force": "GTC",
                        "type": "LIMIT",
                        "oco": null,
                        "icebergs": null,
                        "trigger_price": null,
                        "trigger_event": null,
                        "close_on_trigger": false,
                        "reduce_only": false,
                        "post_only": false,
                        "hidden": false
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.order({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/personal": {
      "get": {
        "tags": [
          "Private"
        ],
        "summary": "Account",
        "description": "Retrieve balances and other account information. Requires a valid API key sent with the *x-api-key* header.",
        "operationId": "personal",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "description": "Account email",
                          "example": "johndoe@gmail.com"
                        },
                        "verification_level": {
                          "type": "string",
                          "description": "Account verification level",
                          "example": "UNVERIFIED"
                        },
                        "withdrawal_allowance": {
                          "type": "number",
                          "description": "Account 24H withdraw limit",
                          "example": 10000000
                        },
                        "deposit_addresses": {
                          "type": "array",
                          "description": "Active deposit addresses",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string",
                                "description": "Deposit address",
                                "example": 8.267255226581598e+47
                              },
                              "assets": {
                                "type": "array",
                                "description": "Assets supported for the address",
                                "items": {
                                  "type": "string",
                                  "description": "Asset",
                                  "example": "ETH"
                                }
                              }
                            },
                            "description": "Deposit address information"
                          }
                        },
                        "actions": {
                          "type": "object",
                          "properties": {
                            "latest_deposit": {
                              "type": "number",
                              "description": "Timestamp for most recent deposit",
                              "example": 1551120600024
                            },
                            "latest_withdrawal": {
                              "type": "number",
                              "description": "Timestamp for most recent withdrawal",
                              "example": 1551120600024
                            },
                            "latest_trade": {
                              "type": "number",
                              "description": "Timestamp for most recent trade",
                              "example": 1551120600024
                            },
                            "latest_cancellation": {
                              "type": "number",
                              "description": "Timestamp for most recent order cancellation",
                              "example": 1551120600024
                            },
                            "creation_time": {
                              "type": "number",
                              "description": "Timestamp for account creation",
                              "example": 1551120600024
                            }
                          },
                          "description": "Timestamps for recent account actions"
                        },
                        "permissions": {
                          "type": "object",
                          "properties": {
                            "trading_enabled": {
                              "type": "boolean",
                              "example": true
                            },
                            "deposit_enabled": {
                              "type": "boolean",
                              "example": true
                            },
                            "withdraw_enabled": {
                              "type": "boolean",
                              "example": true
                            },
                            "login_enabled": {
                              "type": "boolean",
                              "example": true
                            },
                            "api_enabled": {
                              "type": "boolean",
                              "example": true
                            }
                          },
                          "description": "Account permissions"
                        },
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "deposit_addresses": [
                          {
                            "address": 8.267255226581598e+47,
                            "assets": [
                              "ETH",
                              "DAI",
                              "MKR",
                              "ONT",
                              "MAN",
                              "USDT"
                            ]
                          },
                          {
                            "address": "n4JEw3aZXVFuiT48eDcG9MnGALjLRiAKe8",
                            "assets": [
                              "BTC"
                            ]
                          }
                        ],
                        "actions": {
                          "latest_deposit": 1551120600024,
                          "latest_withdrawal": 1551127794037,
                          "latest_order": 1551128358789,
                          "latest_trade": 1551128359583,
                          "latest_cancellation": 1550996999633,
                          "creation_time": 1550996999633
                        },
                        "balances": {
                          "ETH": {
                            "free": 0.05007,
                            "locked": 0.02225,
                            "withdrawn": 0,
                            "pnl": 0,
                            "margin": 0.01,
                            "fees": 0
                          },
                          "BTC": {
                            "free": 0,
                            "locked": 0,
                            "withdrawn": 0,
                            "pnl": 0,
                            "margin": 0,
                            "fees": 0
                          }
                        },
                        "permissions": {
                          "trading_enabled": true,
                          "deposit_enabled": true,
                          "withdraw_enabled": true,
                          "login_enabled": true,
                          "api_enabled": true
                        },
                        "email": "johndoe@gmail.com",
                        "verification_level": "UNVERIFIED",
                        "trading_allowance": 249996.9004300637,
                        "withdrawal_allowance": 249998.6069348601
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.personal();\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/leverage": {
      "post": {
        "tags": [
          "Private"
        ],
        "summary": "Leverage",
        "description": "Adjust the leverage of your position. Only relevant for Isolated Margin users.",
        "operationId": "leverage",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "leverage",
                  "pair"
                ],
                "type": "object",
                "properties": {
                  "pair": {
                    "type": "string",
                    "description": "Market of position (e.g. \"USD_BTCCALL_PERP\")"
                  },
                  "leverage": {
                    "type": "number",
                    "description": "Desired leverage for the position"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        },
                        "positions": {
                          "type": "object",
                          "properties": {
                            "USD_BTCCALL_PERP": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "free": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0.1
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "Margin locked within the position",
                                  "example": 0
                                },
                                "realized": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "funding": {
                                  "type": "number",
                                  "description": "Funding P&L (USD)",
                                  "example": 1
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fee P&L (USD)",
                                  "example": 1
                                },
                                "stats": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "number",
                                      "description": "Size of position",
                                      "example": 1
                                    },
                                    "notional": {
                                      "type": "number",
                                      "description": "Notional size of position",
                                      "example": 1
                                    },
                                    "margin": {
                                      "type": "number",
                                      "description": "Margin assigned to the position",
                                      "example": 0
                                    },
                                    "pnl": {
                                      "type": "number",
                                      "description": "Total P&L (USD)",
                                      "example": 1
                                    },
                                    "upnl": {
                                      "type": "number",
                                      "description": "Unrealised P&L (USD)",
                                      "example": 1
                                    },
                                    "rpnl": {
                                      "type": "number",
                                      "description": "Realised P&L (USD)",
                                      "example": 1
                                    },
                                    "equity": {
                                      "type": "number",
                                      "description": "Unrealised P&L + Margin",
                                      "example": 1
                                    },
                                    "roe": {
                                      "type": "number",
                                      "description": "P&L / Initial Margin",
                                      "example": 0
                                    },
                                    "mark": {
                                      "type": "number",
                                      "description": "Mark Price",
                                      "example": 2.1
                                    },
                                    "avg_entry": {
                                      "type": "number",
                                      "description": "VWAP Entry Price",
                                      "example": 3.4
                                    },
                                    "leverage": {
                                      "type": "number",
                                      "description": "Effective Leverage",
                                      "example": 2.82
                                    },
                                    "lp": {
                                      "type": "number",
                                      "description": "Liquidation Price",
                                      "example": 3.7
                                    },
                                    "bankrupt": {
                                      "type": "number",
                                      "description": "Bankruptcy Price",
                                      "example": 3.7
                                    },
                                    "direction": {
                                      "type": "string",
                                      "description": "BUY or SELL",
                                      "example": "BUY"
                                    }
                                  },
                                  "description": "Detailed Position Information"
                                }
                              },
                              "description": "Market of position"
                            }
                          },
                          "description": "Account positions"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "positions": {
                          "USD_BTCCALL_PERP": {
                            "size": 1,
                            "free": 1,
                            "locked": 0,
                            "realized": 0,
                            "stats": {
                              "size": 1,
                              "notional": 0.14,
                              "margin": 1,
                              "pnl": 0,
                              "equity": 1,
                              "roe": 0,
                              "mark": 2.1,
                              "avg_entry": 3.4,
                              "leverage": 2.82,
                              "lp": 3.7,
                              "bankrupt": 3.78,
                              "direction": "BUY"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.leverage({\n    pair: \"<value>\",\n    leverage: 4625.12,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/fund": {
      "post": {
        "tags": [
          "Private"
        ],
        "summary": "Increase Position Margin",
        "description": "Assign additional margin to a position, decreasing the leverage. Only relevant for Isolated Margin users.",
        "operationId": "fund",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "pair",
                  "qty"
                ],
                "type": "object",
                "properties": {
                  "pair": {
                    "type": "string",
                    "description": "Market of position (e.g. \"USD_BTCCALL_PERP\")"
                  },
                  "qty": {
                    "type": "number",
                    "description": "Amount of additional margin to assign (denominated in USD)"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        },
                        "positions": {
                          "type": "object",
                          "properties": {
                            "USD_BTCCALL_PERP": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "free": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0.1
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "Margin locked within the position",
                                  "example": 0
                                },
                                "realized": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "funding": {
                                  "type": "number",
                                  "description": "Funding P&L (USD)",
                                  "example": 1
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fee P&L (USD)",
                                  "example": 1
                                },
                                "stats": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "number",
                                      "description": "Size of position",
                                      "example": 1
                                    },
                                    "notional": {
                                      "type": "number",
                                      "description": "Notional size of position",
                                      "example": 1
                                    },
                                    "margin": {
                                      "type": "number",
                                      "description": "Margin assigned to the position",
                                      "example": 0
                                    },
                                    "pnl": {
                                      "type": "number",
                                      "description": "Total P&L (USD)",
                                      "example": 1
                                    },
                                    "upnl": {
                                      "type": "number",
                                      "description": "Unrealised P&L (USD)",
                                      "example": 1
                                    },
                                    "rpnl": {
                                      "type": "number",
                                      "description": "Realised P&L (USD)",
                                      "example": 1
                                    },
                                    "equity": {
                                      "type": "number",
                                      "description": "Unrealised P&L + Margin",
                                      "example": 1
                                    },
                                    "roe": {
                                      "type": "number",
                                      "description": "P&L / Initial Margin",
                                      "example": 0
                                    },
                                    "mark": {
                                      "type": "number",
                                      "description": "Mark Price",
                                      "example": 2.1
                                    },
                                    "avg_entry": {
                                      "type": "number",
                                      "description": "VWAP Entry Price",
                                      "example": 3.4
                                    },
                                    "leverage": {
                                      "type": "number",
                                      "description": "Effective Leverage",
                                      "example": 2.82
                                    },
                                    "lp": {
                                      "type": "number",
                                      "description": "Liquidation Price",
                                      "example": 3.7
                                    },
                                    "bankrupt": {
                                      "type": "number",
                                      "description": "Bankruptcy Price",
                                      "example": 3.7
                                    },
                                    "direction": {
                                      "type": "string",
                                      "description": "BUY or SELL",
                                      "example": "BUY"
                                    }
                                  },
                                  "description": "Detailed Position Information"
                                }
                              },
                              "description": "Market of position"
                            }
                          },
                          "description": "Account positions"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "positions": {
                          "USD_BTCCALL_PERP": {
                            "size": 1,
                            "free": 1,
                            "locked": 0,
                            "realized": 0,
                            "stats": {
                              "size": 1,
                              "notional": 0.14,
                              "margin": 1,
                              "pnl": 0,
                              "equity": 1,
                              "roe": 0,
                              "mark": 2.1,
                              "avg_entry": 3.4,
                              "leverage": 2.82,
                              "lp": 3.7,
                              "bankrupt": 3.78,
                              "direction": "BUY"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.fund({\n    pair: \"<value>\",\n    qty: 9353.72,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/draw": {
      "post": {
        "tags": [
          "Private"
        ],
        "summary": "Decrease Position Margin",
        "description": "Withdraw margin from a position, increasing the leverage. Only relevant for Isolated Margin users.",
        "operationId": "draw",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "pair",
                  "qty"
                ],
                "type": "object",
                "properties": {
                  "pair": {
                    "type": "string",
                    "description": "Market of position (e.g. \"USD_BTCCALL_PERP\")"
                  },
                  "qty": {
                    "type": "number",
                    "description": "Amount of margin to withdraw (denominated in USD)"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        },
                        "positions": {
                          "type": "object",
                          "properties": {
                            "USD_BTCCALL_PERP": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "free": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0.1
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "Margin locked within the position",
                                  "example": 0
                                },
                                "realized": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "funding": {
                                  "type": "number",
                                  "description": "Funding P&L (USD)",
                                  "example": 1
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fee P&L (USD)",
                                  "example": 1
                                },
                                "stats": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "number",
                                      "description": "Size of position",
                                      "example": 1
                                    },
                                    "notional": {
                                      "type": "number",
                                      "description": "Notional size of position",
                                      "example": 1
                                    },
                                    "margin": {
                                      "type": "number",
                                      "description": "Margin assigned to the position",
                                      "example": 0
                                    },
                                    "pnl": {
                                      "type": "number",
                                      "description": "Total P&L (USD)",
                                      "example": 1
                                    },
                                    "upnl": {
                                      "type": "number",
                                      "description": "Unrealised P&L (USD)",
                                      "example": 1
                                    },
                                    "rpnl": {
                                      "type": "number",
                                      "description": "Realised P&L (USD)",
                                      "example": 1
                                    },
                                    "equity": {
                                      "type": "number",
                                      "description": "Unrealised P&L + Margin",
                                      "example": 1
                                    },
                                    "roe": {
                                      "type": "number",
                                      "description": "P&L / Initial Margin",
                                      "example": 0
                                    },
                                    "mark": {
                                      "type": "number",
                                      "description": "Mark Price",
                                      "example": 2.1
                                    },
                                    "avg_entry": {
                                      "type": "number",
                                      "description": "VWAP Entry Price",
                                      "example": 3.4
                                    },
                                    "leverage": {
                                      "type": "number",
                                      "description": "Effective Leverage",
                                      "example": 2.82
                                    },
                                    "lp": {
                                      "type": "number",
                                      "description": "Liquidation Price",
                                      "example": 3.7
                                    },
                                    "bankrupt": {
                                      "type": "number",
                                      "description": "Bankruptcy Price",
                                      "example": 3.7
                                    },
                                    "direction": {
                                      "type": "string",
                                      "description": "BUY or SELL",
                                      "example": "BUY"
                                    }
                                  },
                                  "description": "Detailed Position Information"
                                }
                              },
                              "description": "Market of position"
                            }
                          },
                          "description": "Account positions"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "positions": {
                          "USD_BTCCALL_PERP": {
                            "size": 1,
                            "free": 1,
                            "locked": 0,
                            "realized": 0,
                            "stats": {
                              "size": 1,
                              "notional": 0.14,
                              "margin": 1,
                              "pnl": 0,
                              "equity": 1,
                              "roe": 0,
                              "mark": 2.1,
                              "avg_entry": 3.4,
                              "leverage": 2.82,
                              "lp": 3.7,
                              "bankrupt": 3.78,
                              "direction": "BUY"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript({\n  apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.private.draw({\n    pair: \"<value>\",\n    qty: 9820.82,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/order": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Order",
        "description": "Submit a new order. Requires a signed payload in HMAC-SHA256 form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nJavascript example:\n\n  ```js\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {pair: 'USD_BTCCALL_PERP', side: 'BUY', price: 1, qty: 0.001, timestamp: Date.now()};\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/order', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n\nPython example (Python3):\n\n  ```python\n  import requests\n  import urllib\n  import hmac\n  import hashlib\n  import base64\n  from time import time\n\n  api_key = '<YOUR_API_KEY>'\n  secret_key = '<YOUR_SECRET_KEY>'\n  url='https://api.testnet.everstrike.io/auth/order'\n  payload = {'pair': 'USD_BTCCALL_PERP', 'side': 'BUY', 'price': 1, 'qty': 0.001, 'timestamp': time()*1000.0}\n  urlencoded_payload = urllib.parse.urlencode(payload)\n  hmac_signature = hmac.new(bytes(secret_key , 'utf-8'), msg = bytes(urlencoded_payload , 'utf-8'), digestmod = hashlib.sha256).digest()\n  hmac_signature_base64 = base64.b64encode(hmac_signature)\n  headers = {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': api_key, 'x-signature': hmac_signature_base64}\n\n  response = requests.post(url, data=payload, headers=headers)\n\n  print(response.text)\n  print(response.status_code, response.reason)\n\n  ```\n",
        "operationId": "limit",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "pair",
                  "qty",
                  "side",
                  "timestamp"
                ],
                "type": "object",
                "properties": {
                  "pair": {
                    "type": "string",
                    "description": "Market for order (e.g. \"USD_BTCCALL_PERP\")"
                  },
                  "qty": {
                    "type": "number",
                    "description": "Quantity of order (e.g. 1000)"
                  },
                  "side": {
                    "type": "string",
                    "description": "Whether to buy or sell. Accepted values are [\"BUY\",\"SELL\"]"
                  },
                  "price": {
                    "type": "number",
                    "description": "Price of order (e.g. 7500). To make the order a market order, exclude this field."
                  },
                  "timestamp": {
                    "type": "integer",
                    "description": "UNIX timestamp in milliseconds. As trading is all about timing, orders that reach the API 15 seconds or more after this timestamp will be rejected.",
                    "format": "int32"
                  },
                  "leverage": {
                    "type": "number",
                    "description": "The leverage to use for your order. If not supplied, this will be set to the minimum leverage available on the market. Only relevant for Isolated Margin users."
                  },
                  "trigger_price": {
                    "type": "number",
                    "description": "An optional trigger price for your order. Your order will be triggered and sent to the matching engine once the Mark Price, Last Price or Index Price (depending on what you choose for the 'trigger_event' parameter) reaches this price. This parameter can be used to enable both stop and take profit orders. A \"SELL\" order with a trigger price below the current market price (when you are long) is a stop order. A \"SELL\" order with a trigger price above the current market price (when you are long) is a take profit order. The opposite is true when you are short."
                  },
                  "time_in_force": {
                    "type": "string",
                    "description": "Time in force. Can be either \"GTC\" (Good Till Cancelled), \"FOK\" (Fill or Kill) or \"IOC\" (Immediate or Cancel). Default is \"GTC\"."
                  },
                  "recv_window": {
                    "type": "integer",
                    "description": "A custom time window. Order is accepted if timestamp + recv_window <= now.",
                    "format": "int32"
                  },
                  "is_test": {
                    "type": "boolean",
                    "description": "Whether the order is a test order or not. Test orders are free and are not sent to the matching engine. By submitting test orders you can ensure that your payload is valid and well-formed."
                  },
                  "reduce_only": {
                    "type": "boolean",
                    "description": "Set this to true to make the order a reduce-only order. Reduce-only orders cannot increase the size of your position. They do not subtract from your balance."
                  },
                  "post_only": {
                    "type": "boolean",
                    "description": "Set this to true to make the order a post-only order. Post-only orders can only match passively and will never pay taker fees."
                  },
                  "hidden": {
                    "type": "boolean",
                    "description": "Set this to true to make the order a hidden order. Hidden orders are not shown in the order book."
                  },
                  "icebergs": {
                    "type": "integer",
                    "description": "Number of icebergs for the order. Visible Order Quantity = Order Quantity / Icebergs. Use this to only partially hide your order.",
                    "format": "int32"
                  },
                  "oco": {
                    "type": "string",
                    "description": "One Cancels the Others. Set this to a specific string to make it cancel all other orders with the same string when filled. The string must be of size at most 5 characters."
                  },
                  "trigger_event": {
                    "type": "string",
                    "description": "The price event that triggers the order. For derivatives, it can be either MARK_PRICE, INDEX_PRICE or LAST_PRICE. The default is MARK_PRICE. For spot markets, it can only be LAST_PRICE."
                  },
                  "close_on_trigger": {
                    "type": "boolean",
                    "description": "Whether to submit the order as a Close on Trigger order. Close on Trigger orders cancel open reduce-only orders on the position upon being triggered in an attempt to free up margin, making them less likely to encounter insufficient balance issues. Only relevant if you have an existing position for the given market."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Unique identifier of order",
                              "example": "781a8e80393f11e98e2643f8c5a993ce"
                            },
                            "pair": {
                              "type": "string",
                              "description": "Market of order",
                              "example": "USD_BTCCALL_PERP"
                            },
                            "price": {
                              "type": "number",
                              "description": "Current price of order",
                              "example": 200
                            },
                            "price_orig": {
                              "type": "number",
                              "description": "Original price of order",
                              "example": 200
                            },
                            "qty_orig": {
                              "type": "number",
                              "description": "Original quantity of order",
                              "example": 0.02
                            },
                            "qty_orig_usd": {
                              "type": "number",
                              "description": "Original USD quantity of order",
                              "example": 20
                            },
                            "qty_remaining": {
                              "type": "number",
                              "description": "Quantity not yet filled",
                              "example": 0.02
                            },
                            "qty_filled": {
                              "type": "number",
                              "description": "Quantity that has been filled",
                              "example": 0
                            },
                            "side": {
                              "type": "string",
                              "description": "BUY or SELL",
                              "example": "BUY"
                            },
                            "status": {
                              "type": "string",
                              "description": "ACTIVE, CANCELLED or COMPLETED",
                              "example": "ACTIVE"
                            },
                            "time": {
                              "type": "number",
                              "description": "Time of last update, in milliseconds",
                              "example": 1551128037224
                            },
                            "time_in_force": {
                              "type": "string",
                              "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                              "example": "GTC"
                            },
                            "type": {
                              "type": "string",
                              "description": "Type of order. Can be LIMIT or MARKET.",
                              "example": "LIMIT"
                            },
                            "oco": {
                              "type": "string",
                              "description": "OCO ID of order",
                              "example": "my-oco-id"
                            },
                            "icebergs": {
                              "type": "number",
                              "description": "Icebergs on order",
                              "example": 5
                            },
                            "trigger_price": {
                              "type": "number",
                              "description": "Trigger price of order",
                              "example": 210
                            },
                            "trigger_event": {
                              "type": "string",
                              "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                              "example": "MARK_PRICE"
                            },
                            "close_on_trigger": {
                              "type": "boolean",
                              "example": false
                            },
                            "reduce_only": {
                              "type": "boolean",
                              "description": "If true, the order can only decrease the size of your position.",
                              "example": false
                            },
                            "post_only": {
                              "type": "boolean",
                              "description": "If true, the order can only trade as maker.",
                              "example": false
                            },
                            "hidden": {
                              "type": "boolean",
                              "description": "If true, the order does not show in the order book.",
                              "example": false
                            }
                          },
                          "description": "If your order is accepted, this field will contain information about the order"
                        },
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        },
                        "positions": {
                          "type": "object",
                          "properties": {
                            "USD_BTCCALL_PERP": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "free": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0.1
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "Margin locked within the position",
                                  "example": 0
                                },
                                "realized": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "funding": {
                                  "type": "number",
                                  "description": "Funding P&L (USD)",
                                  "example": 1
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fee P&L (USD)",
                                  "example": 1
                                },
                                "stats": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "number",
                                      "description": "Size of position",
                                      "example": 1
                                    },
                                    "notional": {
                                      "type": "number",
                                      "description": "Notional size of position",
                                      "example": 1
                                    },
                                    "margin": {
                                      "type": "number",
                                      "description": "Margin assigned to the position",
                                      "example": 0
                                    },
                                    "pnl": {
                                      "type": "number",
                                      "description": "Total P&L (USD)",
                                      "example": 1
                                    },
                                    "upnl": {
                                      "type": "number",
                                      "description": "Unrealised P&L (USD)",
                                      "example": 1
                                    },
                                    "rpnl": {
                                      "type": "number",
                                      "description": "Realised P&L (USD)",
                                      "example": 1
                                    },
                                    "equity": {
                                      "type": "number",
                                      "description": "Unrealised P&L + Margin",
                                      "example": 1
                                    },
                                    "roe": {
                                      "type": "number",
                                      "description": "P&L / Initial Margin",
                                      "example": 0
                                    },
                                    "mark": {
                                      "type": "number",
                                      "description": "Mark Price",
                                      "example": 2.1
                                    },
                                    "avg_entry": {
                                      "type": "number",
                                      "description": "VWAP Entry Price",
                                      "example": 3.4
                                    },
                                    "leverage": {
                                      "type": "number",
                                      "description": "Effective Leverage",
                                      "example": 2.82
                                    },
                                    "lp": {
                                      "type": "number",
                                      "description": "Liquidation Price",
                                      "example": 3.7
                                    },
                                    "bankrupt": {
                                      "type": "number",
                                      "description": "Bankruptcy Price",
                                      "example": 3.7
                                    },
                                    "direction": {
                                      "type": "string",
                                      "description": "BUY or SELL",
                                      "example": "BUY"
                                    }
                                  },
                                  "description": "Detailed Position Information"
                                }
                              },
                              "description": "Market of position"
                            }
                          },
                          "description": "Account positions"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "order": {
                          "pair": "USD_BTCCALL_PERP",
                          "type": "LIMIT",
                          "side": "SELL",
                          "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                          "qty_orig": 0.002,
                          "qty_remaining": 0.002,
                          "price": 120,
                          "price_orig": 120,
                          "time_in_force": "GTC",
                          "status": "ACTIVE",
                          "time": 1551137077642,
                          "fills": [],
                          "id": "849cdea0395411e98f54b395ae9c7bb6",
                          "qty_orig_usd": 0.28101585963,
                          "leverage": 1,
                          "post_only": false,
                          "reduce_only": false,
                          "hidden": false
                        },
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "position": {
                          "size": 1,
                          "free": 1,
                          "locked": 0,
                          "realized": 0,
                          "fills": [],
                          "stats": {
                            "size": 1,
                            "notional": 0.14,
                            "margin": 1,
                            "pnl": 0,
                            "equity": 1,
                            "roe": 0,
                            "mark": 2.1,
                            "avg_entry": 3.4,
                            "leverage": 2.82,
                            "lp": 3.7,
                            "bankrupt": 3.78,
                            "direction": "BUY"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.limit({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  }, {\n    pair: \"<value>\",\n    qty: 7040.14,\n    side: \"<value>\",\n    timestamp: 920119,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/cancel": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Cancel",
        "description": "Cancel an order. Requires a signed payload in HMAC-SHA256 form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nJavascript example:\n\n  ```js\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {'id': '392392320eoweqwie3'};\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/cancel', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n\nPython example (Python3):\n\n  ```python\n  import requests\n  import urllib\n  import hmac\n  import hashlib\n  import base64\n  from time import time\n\n  api_key = '<YOUR_API_KEY>'\n  secret_key = '<YOUR_SECRET_KEY>'\n  url='https://api.testnet.everstrike.io/auth/cancel'\n  payload = {'id': '32302131320dqe'}\n  urlencoded_payload = urllib.parse.urlencode(payload)\n  hmac_signature = hmac.new(bytes(secret_key , 'utf-8'), msg = bytes(urlencoded_payload , 'utf-8'), digestmod = hashlib.sha256).digest()\n  hmac_signature_base64 = base64.b64encode(hmac_signature)\n  headers = {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': api_key, 'x-signature': hmac_signature_base64}\n\n  response = requests.post(url, data=payload, headers=headers)\n\n  print(response.text)\n  print(response.status_code, response.reason)\n\n  ```\n",
        "operationId": "cancel",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "id"
                ],
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Id of the order (the id is returned upon submitting the order)"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of order",
                          "example": "781a8e80393f11e98e2643f8c5a993ce"
                        },
                        "pair": {
                          "type": "string",
                          "description": "Market of order",
                          "example": "USD_BTCCALL_PERP"
                        },
                        "price": {
                          "type": "number",
                          "description": "Current price of order",
                          "example": 200
                        },
                        "price_orig": {
                          "type": "number",
                          "description": "Original price of order",
                          "example": 200
                        },
                        "qty_orig": {
                          "type": "number",
                          "description": "Original quantity of order",
                          "example": 0.02
                        },
                        "qty_orig_usd": {
                          "type": "number",
                          "description": "Original USD quantity of order",
                          "example": 20
                        },
                        "qty_remaining": {
                          "type": "number",
                          "description": "Quantity not yet filled",
                          "example": 0.02
                        },
                        "qty_filled": {
                          "type": "number",
                          "description": "Quantity that has been filled",
                          "example": 0
                        },
                        "side": {
                          "type": "string",
                          "description": "BUY or SELL",
                          "example": "BUY"
                        },
                        "status": {
                          "type": "string",
                          "description": "ACTIVE, CANCELLED or COMPLETED",
                          "example": "ACTIVE"
                        },
                        "time": {
                          "type": "number",
                          "description": "Time of last update, in milliseconds",
                          "example": 1551128037224
                        },
                        "time_in_force": {
                          "type": "string",
                          "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                          "example": "GTC"
                        },
                        "type": {
                          "type": "string",
                          "description": "Type of order. Can be LIMIT or MARKET.",
                          "example": "LIMIT"
                        },
                        "oco": {
                          "type": "string",
                          "description": "OCO ID of order",
                          "example": "my-oco-id"
                        },
                        "icebergs": {
                          "type": "number",
                          "description": "Icebergs on order",
                          "example": 5
                        },
                        "trigger_price": {
                          "type": "number",
                          "description": "Trigger price of order",
                          "example": 210
                        },
                        "trigger_event": {
                          "type": "string",
                          "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                          "example": "MARK_PRICE"
                        },
                        "close_on_trigger": {
                          "type": "boolean",
                          "example": false
                        },
                        "reduce_only": {
                          "type": "boolean",
                          "description": "If true, the order can only decrease the size of your position.",
                          "example": false
                        },
                        "post_only": {
                          "type": "boolean",
                          "description": "If true, the order can only trade as maker.",
                          "example": false
                        },
                        "hidden": {
                          "type": "boolean",
                          "description": "If true, the order does not show in the order book.",
                          "example": false
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "pair": "USD_BTCCALL_PERP",
                        "type": "LIMIT",
                        "side": "SELL",
                        "price": 100,
                        "time_in_force": "GTC",
                        "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                        "qty_orig": 0.002,
                        "qty_remaining": 0.002,
                        "status": "ACTIVE",
                        "time": 1551137077642,
                        "fills": [],
                        "id": "849cdea0395411e98f54b395ae9c7bb6",
                        "qty_orig_usd": 0.28101585963,
                        "leverage": 1,
                        "post_only": false,
                        "reduce_only": false,
                        "hidden": false
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.cancel({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  }, {\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/withdraw": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Withdraw",
        "description": "Submit a withdrawal. Requires a signed payload in HMAC form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nNote: For security reasons, withdrawals submitted through the API will only be processed once confirmed by email.\n\nJavascript example:\n\n  ```\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {'asset': 'ETH', qty: 5, address: '0x829bd824b016326a401d083b33d092293333a830', timestamp: Date.now()};\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/withdraw', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n\nPython example (Python3):\n\n  ```\n  import requests\n  import urllib\n  import hmac\n  import hashlib\n  import base64\n  from time import time\n\n  api_key = '<YOUR_API_KEY>'\n  secret_key = '<YOUR_SECRET_KEY>'\n  url='https://api.testnet.everstrike.io/auth/withdraw'\n  payload = {'asset': 'ETH', 'qty': 5, 'address': '0x829bd824b016326a401d083b33d092293333a830', 'timestamp': time()*1000.0}\n  urlencoded_payload = urllib.parse.urlencode(payload)\n  hmac_signature = hmac.new(bytes(secret_key , 'utf-8'), msg = bytes(urlencoded_payload , 'utf-8'), digestmod = hashlib.sha256).digest()\n  hmac_signature_base64 = base64.b64encode(hmac_signature)\n  headers = {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': api_key, 'x-signature': hmac_signature_base64}\n\n  response = requests.post(url, data=payload, headers=headers)\n\n  print(response.text)\n  print(response.status_code, response.reason)\n\n  ```\n",
        "operationId": "withdraw",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "address",
                  "asset",
                  "qty",
                  "timestamp"
                ],
                "type": "object",
                "properties": {
                  "asset": {
                    "type": "string",
                    "description": "Asset to withdraw (e.g. 'ETH')"
                  },
                  "qty": {
                    "type": "integer",
                    "description": "Quantity to withdraw (e.g. 100)",
                    "format": "int32"
                  },
                  "address": {
                    "type": "string",
                    "description": "Address to withdraw to (e.g. '0x829bd824b016326a401d083b33d092293333a830')"
                  },
                  "timestamp": {
                    "type": "integer",
                    "description": "UNIX timestamp in milliseconds",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "description": "Address of withdrawal",
                          "example": 8.267255226581598e+47
                        },
                        "customer_id": {
                          "type": "string",
                          "description": "Your unique Account ID",
                          "example": "5f9ca5f0380e11e9bf5191a076098e19"
                        },
                        "asset": {
                          "type": "string",
                          "description": "Asset of withdrawal",
                          "example": "ETH"
                        },
                        "time": {
                          "type": "number",
                          "description": "Time of withdrawal",
                          "example": 1551120600023
                        },
                        "qty": {
                          "type": "number",
                          "description": "Quantity of withdrawal",
                          "example": 0.1
                        },
                        "net": {
                          "type": "number",
                          "description": "Net Quantity of withdrawal. Net Quantity = Quantity - Fee.",
                          "example": 0.1
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of withdrawal. Can be PENDING or COMPLETED.",
                          "example": "COMPLETED"
                        },
                        "manually_approved": {
                          "type": "boolean",
                          "example": true
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of withdrawal.",
                          "example": "ETH0x4bab116ba887eeb9192a1b282766e58dfba65abf1d79548aad0636b89a21a7c3"
                        },
                        "qty_usd": {
                          "type": "number",
                          "description": "USD quantity of withdrawal, at time of withdrawal.",
                          "example": 14.3
                        },
                        "transaction": {
                          "type": "object",
                          "properties": {
                            "hash": {
                              "type": "string",
                              "description": "Transaction hash",
                              "example": 3.422571472397266e+76
                            },
                            "from": {
                              "type": "string",
                              "description": "Sender of transaction",
                              "example": 9.04896849601773e+47
                            }
                          },
                          "description": "Blockchain transaction associated with the withdrawal"
                        }
                      },
                      "description": "Request result",
                      "example": [
                        {
                          "qty": 0.01,
                          "net": 0.009,
                          "qty_usd": 1.3930651399,
                          "manually_approved": false,
                          "address": 9.04896849601773e+47,
                          "asset": "ETH",
                          "time": 1551127794034,
                          "status": "ACTIVE",
                          "customer_id": "5f9ca5f0380e11e9bf5191a076098e19"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.withdraw({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  }, {\n    asset: \"<value>\",\n    qty: 707513,\n    address: \"56133 Woodlands Road\",\n    timestamp: 70514,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/close": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Close",
        "description": "Close a position. Requires a signed payload in HMAC form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nJavascript example:\n\n  ```\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {pair: 'USD_BTCCALL_PERP', qty: 100, price: 100, timestamp: Date.now()};\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/close', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n\nPython example (Python3):\n\n  ```\n  import requests\n  import urllib\n  import hmac\n  import hashlib\n  import base64\n  from time import time\n\n  api_key = '<YOUR_API_KEY>'\n  secret_key = '<YOUR_SECRET_KEY>'\n  url='https://api.testnet.everstrike.io/auth/close'\n  payload = {'pair': 'USD_BTCCALL_PERP', 'qty': 0.001, 'price': 1, 'timestamp': time()*1000.0}\n  urlencoded_payload = urllib.parse.urlencode(payload)\n  hmac_signature = hmac.new(bytes(secret_key , 'utf-8'), msg = bytes(urlencoded_payload , 'utf-8'), digestmod = hashlib.sha256).digest()\n  hmac_signature_base64 = base64.b64encode(hmac_signature)\n  headers = {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': api_key, 'x-signature': hmac_signature_base64}\n\n  response = requests.post(url, data=payload, headers=headers)\n\n  print(response.text)\n  print(response.status_code, response.reason)\n\n  ```\n",
        "operationId": "close",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "pair",
                  "timestamp"
                ],
                "type": "object",
                "properties": {
                  "pair": {
                    "type": "string",
                    "description": "Market of position (e.g. \"USD_BTCCALL_PERP\")"
                  },
                  "qty": {
                    "type": "integer",
                    "description": "Quantity to close. To close the entire position, exclude this field.",
                    "format": "int32"
                  },
                  "price": {
                    "type": "integer",
                    "description": "The price to close the position at. To close at market, exclude this field.",
                    "format": "int32"
                  },
                  "trigger_price": {
                    "type": "integer",
                    "description": "The stop price to close the position at. To submit the close immediately, exclude this field.",
                    "format": "int32"
                  },
                  "trigger_event": {
                    "type": "string",
                    "description": "The price event that triggers the stop. Can be either MARK_PRICE, INDEX_PRICE or LAST_PRICE. The default is MARK_PRICE."
                  },
                  "close_on_trigger": {
                    "type": "boolean",
                    "description": "Whether to submit the close order as a Close on Trigger order. Close on Trigger orders cancel open reduce-only orders upon being triggered in an attempt to free up margin, making them less likely to fail due to an insufficient balance."
                  },
                  "timestamp": {
                    "type": "integer",
                    "description": "UNIX timestamp in milliseconds. As trading is all about timing, orders that reach the API 15 seconds or more after this timestamp will be rejected.",
                    "format": "int32"
                  },
                  "recv_window": {
                    "type": "integer",
                    "description": "A custom time window. Order is accepted if timestamp + recv_window <= now",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Unique identifier of order",
                              "example": "781a8e80393f11e98e2643f8c5a993ce"
                            },
                            "pair": {
                              "type": "string",
                              "description": "Market of order",
                              "example": "USD_BTCCALL_PERP"
                            },
                            "price": {
                              "type": "number",
                              "description": "Current price of order",
                              "example": 200
                            },
                            "price_orig": {
                              "type": "number",
                              "description": "Original price of order",
                              "example": 200
                            },
                            "qty_orig": {
                              "type": "number",
                              "description": "Original quantity of order",
                              "example": 0.02
                            },
                            "qty_orig_usd": {
                              "type": "number",
                              "description": "Original USD quantity of order",
                              "example": 20
                            },
                            "qty_remaining": {
                              "type": "number",
                              "description": "Quantity not yet filled",
                              "example": 0.02
                            },
                            "qty_filled": {
                              "type": "number",
                              "description": "Quantity that has been filled",
                              "example": 0
                            },
                            "side": {
                              "type": "string",
                              "description": "BUY or SELL",
                              "example": "BUY"
                            },
                            "status": {
                              "type": "string",
                              "description": "ACTIVE, CANCELLED or COMPLETED",
                              "example": "ACTIVE"
                            },
                            "time": {
                              "type": "number",
                              "description": "Time of last update, in milliseconds",
                              "example": 1551128037224
                            },
                            "time_in_force": {
                              "type": "string",
                              "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                              "example": "GTC"
                            },
                            "type": {
                              "type": "string",
                              "description": "Type of order. Can be LIMIT or MARKET.",
                              "example": "LIMIT"
                            },
                            "oco": {
                              "type": "string",
                              "description": "OCO ID of order",
                              "example": "my-oco-id"
                            },
                            "icebergs": {
                              "type": "number",
                              "description": "Icebergs on order",
                              "example": 5
                            },
                            "trigger_price": {
                              "type": "number",
                              "description": "Trigger price of order",
                              "example": 210
                            },
                            "trigger_event": {
                              "type": "string",
                              "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                              "example": "MARK_PRICE"
                            },
                            "close_on_trigger": {
                              "type": "boolean",
                              "example": false
                            },
                            "reduce_only": {
                              "type": "boolean",
                              "description": "If true, the order can only decrease the size of your position.",
                              "example": false
                            },
                            "post_only": {
                              "type": "boolean",
                              "description": "If true, the order can only trade as maker.",
                              "example": false
                            },
                            "hidden": {
                              "type": "boolean",
                              "description": "If true, the order does not show in the order book.",
                              "example": false
                            }
                          },
                          "description": "If your order is accepted, this field will contain information about the order"
                        },
                        "balances": {
                          "type": "object",
                          "properties": {
                            "ETH": {
                              "type": "object",
                              "properties": {
                                "free": {
                                  "type": "number",
                                  "description": "Available ETH balance",
                                  "example": 0.05
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "ETH balance in use for open orders",
                                  "example": 0.05
                                },
                                "withdrawn": {
                                  "type": "number",
                                  "description": "ETH balance in use for pending withdrawals",
                                  "example": 0.05
                                },
                                "pnl": {
                                  "type": "number",
                                  "description": "ETH P&L. This number is updated every time you close an ETH-related position.",
                                  "example": 0.05
                                },
                                "margin": {
                                  "type": "number",
                                  "description": "ETH position margin.",
                                  "example": 0.05
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fees paid since account creation.",
                                  "example": 0.05
                                }
                              },
                              "description": "ETH balance"
                            }
                          },
                          "description": "Account balances"
                        },
                        "positions": {
                          "type": "object",
                          "properties": {
                            "USD_BTCCALL_PERP": {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "number",
                                  "description": "Size of position",
                                  "example": 1
                                },
                                "free": {
                                  "type": "number",
                                  "description": "Margin assigned to the position",
                                  "example": 0.1
                                },
                                "locked": {
                                  "type": "number",
                                  "description": "Margin locked within the position",
                                  "example": 0
                                },
                                "realized": {
                                  "type": "number",
                                  "description": "Realised P&L (USD)",
                                  "example": 1
                                },
                                "funding": {
                                  "type": "number",
                                  "description": "Funding P&L (USD)",
                                  "example": 1
                                },
                                "fees": {
                                  "type": "number",
                                  "description": "Fee P&L (USD)",
                                  "example": 1
                                },
                                "stats": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "number",
                                      "description": "Size of position",
                                      "example": 1
                                    },
                                    "notional": {
                                      "type": "number",
                                      "description": "Notional size of position",
                                      "example": 1
                                    },
                                    "margin": {
                                      "type": "number",
                                      "description": "Margin assigned to the position",
                                      "example": 0
                                    },
                                    "pnl": {
                                      "type": "number",
                                      "description": "Total P&L (USD)",
                                      "example": 1
                                    },
                                    "upnl": {
                                      "type": "number",
                                      "description": "Unrealised P&L (USD)",
                                      "example": 1
                                    },
                                    "rpnl": {
                                      "type": "number",
                                      "description": "Realised P&L (USD)",
                                      "example": 1
                                    },
                                    "equity": {
                                      "type": "number",
                                      "description": "Unrealised P&L + Margin",
                                      "example": 1
                                    },
                                    "roe": {
                                      "type": "number",
                                      "description": "P&L / Initial Margin",
                                      "example": 0
                                    },
                                    "mark": {
                                      "type": "number",
                                      "description": "Mark Price",
                                      "example": 2.1
                                    },
                                    "avg_entry": {
                                      "type": "number",
                                      "description": "VWAP Entry Price",
                                      "example": 3.4
                                    },
                                    "leverage": {
                                      "type": "number",
                                      "description": "Effective Leverage",
                                      "example": 2.82
                                    },
                                    "lp": {
                                      "type": "number",
                                      "description": "Liquidation Price",
                                      "example": 3.7
                                    },
                                    "bankrupt": {
                                      "type": "number",
                                      "description": "Bankruptcy Price",
                                      "example": 3.7
                                    },
                                    "direction": {
                                      "type": "string",
                                      "description": "BUY or SELL",
                                      "example": "BUY"
                                    }
                                  },
                                  "description": "Detailed Position Information"
                                }
                              },
                              "description": "Market of position"
                            }
                          },
                          "description": "Account positions"
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "order": {
                          "pair": "USD_BTCCALL_PERP",
                          "type": "LIMIT",
                          "side": "SELL",
                          "price": 100,
                          "qty_orig": 100,
                          "qty_remaining": 100,
                          "status": "ACTIVE",
                          "time": 1551137077642,
                          "fills": [],
                          "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                          "id": "849cdea0395411e98f54b395ae9c7bb6",
                          "qty_orig_usd": 0.28101585963,
                          "leverage": 1,
                          "post_only": false,
                          "reduce_only": false,
                          "hidden": false
                        },
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "position": {
                          "size": 1,
                          "free": 1,
                          "locked": 0,
                          "realized": 0,
                          "fills": [],
                          "stats": {
                            "size": 1,
                            "notional": 0.14,
                            "margin": 1,
                            "pnl": 0,
                            "equity": 1,
                            "roe": 0,
                            "mark": 2.1,
                            "avg_entry": 3.4,
                            "leverage": 2.82,
                            "lp": 3.7,
                            "bankrupt": 3.78,
                            "direction": "BUY"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.close({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  }, {\n    pair: \"<value>\",\n    timestamp: 9549,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/order/bulk": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Bulk Order",
        "description": "Submit orders in bulk. This endpoint is recommended when you need to submit more than 5 orders at once.\n\nBy using this endpoint you will only consume a single rate limit request and not 5. It will also be much faster than submitting the orders individually.\n\nThere are certain restrictions in place for orders submitted through this endpoint:\n\n1) The orders must have the same market\n2) The orders can not be reduce only\n\nTo submit bulk orders for different markets you will need to split your orders into separate requests (one request for each market).\n\nA minimum of 1 order and a maximum of 50 orders can be submitted per request. The endpoint is currently rate limited at 1200 orders per minute. Contact us if you require higher limits.\n\nThe endpoint is all-or-nothing. If one of the included orders cannot be accepted (i.e. due to balance issues), all orders will be rejected.\n\nThe endpoint requires a signed payload in HMAC-SHA256 form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nJavascript example:\n\n  ```\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {orders: [{pair: 'USD_BTCCALL_PERP', side: 'BUY', price: 1, qty: 0.001, timestamp: Date.now()}, {pair: 'USD_BTCCALL_PERP', side: 'BUY', price: 0.5, qty: 0.002, timestamp: Date.now()}]}\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/order/bulk', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n",
        "operationId": "bulk_order",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "orders",
                  "timestamp"
                ],
                "type": "object",
                "properties": {
                  "orders": {
                    "type": "array",
                    "description": "An array of orders to submit. Each order must be a valid JSON object. The properties available for each order can be seen in the description of the /auth/order endpoint.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "is_test": {
                    "type": "boolean",
                    "description": "Whether the bulk order request is a test or not. Tests will just validate that the submitted orders are well-formed. The orders will not be sent to the matching engine and your account balance is not debited."
                  },
                  "timestamp": {
                    "type": "integer",
                    "description": "UNIX timestamp in milliseconds. As trading is all about timing, orders that reach the API 15 seconds or more after this timestamp will be rejected.",
                    "format": "int32"
                  },
                  "recv_window": {
                    "type": "integer",
                    "description": "A custom time window. Order is accepted if timestamp + recv_window <= now",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "orders": {
                          "type": "array",
                          "description": "If your orders are accepted, this field will contain information about them.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Unique identifier of order",
                                "example": "781a8e80393f11e98e2643f8c5a993ce"
                              },
                              "pair": {
                                "type": "string",
                                "description": "Market of order",
                                "example": "USD_BTCCALL_PERP"
                              },
                              "price": {
                                "type": "number",
                                "description": "Current price of order",
                                "example": 200
                              },
                              "price_orig": {
                                "type": "number",
                                "description": "Original price of order",
                                "example": 200
                              },
                              "qty_orig": {
                                "type": "number",
                                "description": "Original quantity of order",
                                "example": 0.02
                              },
                              "qty_orig_usd": {
                                "type": "number",
                                "description": "Original USD quantity of order",
                                "example": 20
                              },
                              "qty_remaining": {
                                "type": "number",
                                "description": "Quantity not yet filled",
                                "example": 0.02
                              },
                              "qty_filled": {
                                "type": "number",
                                "description": "Quantity that has been filled",
                                "example": 0
                              },
                              "side": {
                                "type": "string",
                                "description": "BUY or SELL",
                                "example": "BUY"
                              },
                              "status": {
                                "type": "string",
                                "description": "ACTIVE, CANCELLED or COMPLETED",
                                "example": "ACTIVE"
                              },
                              "time": {
                                "type": "number",
                                "description": "Time of last update, in milliseconds",
                                "example": 1551128037224
                              },
                              "time_in_force": {
                                "type": "string",
                                "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                                "example": "GTC"
                              },
                              "type": {
                                "type": "string",
                                "description": "Type of order. Can be LIMIT or MARKET.",
                                "example": "LIMIT"
                              },
                              "oco": {
                                "type": "string",
                                "description": "OCO ID of order",
                                "example": "my-oco-id"
                              },
                              "icebergs": {
                                "type": "number",
                                "description": "Icebergs on order",
                                "example": 5
                              },
                              "trigger_price": {
                                "type": "number",
                                "description": "Trigger price of order",
                                "example": 210
                              },
                              "trigger_event": {
                                "type": "string",
                                "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                                "example": "MARK_PRICE"
                              },
                              "close_on_trigger": {
                                "type": "boolean",
                                "example": false
                              },
                              "reduce_only": {
                                "type": "boolean",
                                "description": "If true, the order can only decrease the size of your position.",
                                "example": false
                              },
                              "post_only": {
                                "type": "boolean",
                                "description": "If true, the order can only trade as maker.",
                                "example": false
                              },
                              "hidden": {
                                "type": "boolean",
                                "description": "If true, the order does not show in the order book.",
                                "example": false
                              }
                            },
                            "description": "Order information"
                          }
                        }
                      },
                      "description": "Request result",
                      "example": {
                        "orders": [
                          {
                            "pair": "USD_BTCCALL_PERP",
                            "type": "LIMIT",
                            "side": "SELL",
                            "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                            "qty_orig": 0.002,
                            "qty_remaining": 0.002,
                            "price": 120,
                            "price_orig": 120,
                            "time_in_force": "GTC",
                            "status": "ACTIVE",
                            "time": 1551137077642,
                            "fills": [],
                            "id": "849cdea0395411e98f54b395ae9c7bb6",
                            "qty_orig_usd": 0.28101585963,
                            "leverage": 1,
                            "post_only": false,
                            "reduce_only": false,
                            "hidden": false
                          },
                          {
                            "pair": "USD_BTCCALL_PERP",
                            "type": "LIMIT",
                            "side": "SELL",
                            "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                            "qty_orig": 0.005,
                            "qty_remaining": 0.005,
                            "price": 130,
                            "price_orig": 130,
                            "time_in_force": "GTC",
                            "status": "ACTIVE",
                            "time": 1551137077642,
                            "fills": [],
                            "id": "249cdea0395411e98f54b395ae9c7bc7",
                            "qty_orig_usd": 0.29101585963,
                            "leverage": 1,
                            "post_only": false,
                            "reduce_only": false,
                            "hidden": false
                          }
                        ],
                        "balances": {
                          "BTC": {
                            "free": 21,
                            "locked": 2,
                            "withdrawn": 0
                          }
                        },
                        "position": {
                          "size": 1,
                          "free": 1,
                          "locked": 0,
                          "realized": 0,
                          "fills": [],
                          "stats": {
                            "size": 1,
                            "notional": 0.14,
                            "margin": 1,
                            "pnl": 0,
                            "equity": 1,
                            "roe": 0,
                            "mark": 2.1,
                            "avg_entry": 3.4,
                            "leverage": 2.82,
                            "lp": 3.7,
                            "bankrupt": 3.78,
                            "direction": "BUY"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.bulkOrder({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  }, {\n    orders: [\n      \"<value 1>\",\n      \"<value 2>\",\n      \"<value 3>\",\n    ],\n    timestamp: 25543,\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    },
    "/auth/cancel/bulk": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Bulk Cancel",
        "description": "Cancel orders in bulk. This endpoint is recommended when you need to cancel more than 5 orders at once.\n\nBy using this endpoint you will only consume a single rate limit request and not 5. It will also be much faster than cancelling the orders individually.\n\nRequires a signed payload in HMAC-SHA256 form to be appended to the x-signature header. The signed payload must be base64-encoded.\n\nJavascript example:\n\n  ```\n  const formurlencoded = require('form-urlencoded').default;\n  const crypto = require(\"crypto-js\");\n  const fetch = require(\"node-fetch\");\n  const API_KEY = \"<YOUR_API_KEY>\";\n  const SECRET_KEY = \"<YOUR_SECRET_KEY>\";\n\n  (async function() {\n    const payload = {'ids': ['392392320eoweqwie3', '482392320eoweqwii5']};\n    const payload_url_encoded = formurlencoded(payload);\n    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);\n    const submitted = await fetch('https://api.testnet.everstrike.io/auth/cancel/bulk', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});\n    const response = await submitted.json();\n    console.log(response);\n  })();\n  ```\n",
        "operationId": "bulk_cancel",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Id's of the orders to cancel (the id is returned upon submitting the order). If left empty or undefined, all active orders will be cancelled. You can submit up to 100 unique id's per request.",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response code",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Diagnostic message",
                      "example": "null"
                    },
                    "result": {
                      "type": "array",
                      "example": [
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "type": "LIMIT",
                          "side": "SELL",
                          "price": 100,
                          "time_in_force": "GTC",
                          "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                          "qty_orig": 0.002,
                          "qty_remaining": 0.002,
                          "status": "ACTIVE",
                          "time": 1551137077642,
                          "fills": [],
                          "id": "849cdea0395411e98f54b395ae9c7bb6",
                          "qty_orig_usd": 0.28101585963,
                          "leverage": 1,
                          "post_only": false,
                          "reduce_only": false,
                          "hidden": false
                        },
                        {
                          "pair": "USD_BTCCALL_PERP",
                          "type": "LIMIT",
                          "side": "SELL",
                          "price": 102,
                          "time_in_force": "GTC",
                          "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
                          "qty_orig": 0.003,
                          "qty_remaining": 0.003,
                          "status": "ACTIVE",
                          "time": 1551137077642,
                          "fills": [],
                          "id": "249cdea0395411e98f54b395ae9c7bc7",
                          "qty_orig_usd": 0.30101585963,
                          "leverage": 1,
                          "post_only": false,
                          "reduce_only": false,
                          "hidden": false
                        }
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of order",
                            "example": "781a8e80393f11e98e2643f8c5a993ce"
                          },
                          "pair": {
                            "type": "string",
                            "description": "Market of order",
                            "example": "USD_BTCCALL_PERP"
                          },
                          "price": {
                            "type": "number",
                            "description": "Current price of order",
                            "example": 200
                          },
                          "price_orig": {
                            "type": "number",
                            "description": "Original price of order",
                            "example": 200
                          },
                          "qty_orig": {
                            "type": "number",
                            "description": "Original quantity of order",
                            "example": 0.02
                          },
                          "qty_orig_usd": {
                            "type": "number",
                            "description": "Original USD quantity of order",
                            "example": 20
                          },
                          "qty_remaining": {
                            "type": "number",
                            "description": "Quantity not yet filled",
                            "example": 0.02
                          },
                          "qty_filled": {
                            "type": "number",
                            "description": "Quantity that has been filled",
                            "example": 0
                          },
                          "side": {
                            "type": "string",
                            "description": "BUY or SELL",
                            "example": "BUY"
                          },
                          "status": {
                            "type": "string",
                            "description": "ACTIVE, CANCELLED or COMPLETED",
                            "example": "ACTIVE"
                          },
                          "time": {
                            "type": "number",
                            "description": "Time of last update, in milliseconds",
                            "example": 1551128037224
                          },
                          "time_in_force": {
                            "type": "string",
                            "description": "Time in force. Can be GTC (Good Till Cancelled), FOK (Fill Or Kill) or IOC (Immediate Or Cancel).",
                            "example": "GTC"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of order. Can be LIMIT or MARKET.",
                            "example": "LIMIT"
                          },
                          "oco": {
                            "type": "string",
                            "description": "OCO ID of order",
                            "example": "my-oco-id"
                          },
                          "icebergs": {
                            "type": "number",
                            "description": "Icebergs on order",
                            "example": 5
                          },
                          "trigger_price": {
                            "type": "number",
                            "description": "Trigger price of order",
                            "example": 210
                          },
                          "trigger_event": {
                            "type": "string",
                            "description": "Trigger event of order. Can be MARK_PRICE, INDEX_PRICE, LAST_PRICE or null.",
                            "example": "MARK_PRICE"
                          },
                          "close_on_trigger": {
                            "type": "boolean",
                            "example": false
                          },
                          "reduce_only": {
                            "type": "boolean",
                            "description": "If true, the order can only decrease the size of your position.",
                            "example": false
                          },
                          "post_only": {
                            "type": "boolean",
                            "description": "If true, the order can only trade as maker.",
                            "example": false
                          },
                          "hidden": {
                            "type": "boolean",
                            "description": "If true, the order does not show in the order book.",
                            "example": false
                          }
                        },
                        "description": "Order information"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 503
                    },
                    "msg": {
                      "type": "string",
                      "example": "Invalid request"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "example": null
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          },
          {
            "HMAC_signature": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "typescript",
            "lang": "typescript",
            "source": "import { EverstrikeRestApiTypescript } from \"@default-team-2onip/everstrike-rest-api-typescript\";\n\nconst everstrikeRestApiTypescript = new EverstrikeRestApiTypescript();\n\nasync function run() {\n  const result = await everstrikeRestApiTypescript.auth.bulkCancel({\n    apiKey: \"<YOUR_API_KEY_HERE>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "HMAC_signature": {
        "type": "apiKey",
        "name": "x-signature",
        "in": "header"
      }
    }
  },
  "x-original-swagger-version": "2.0"
}