{
  "swagger": "2.0",
  "info": {
    "title": "",
    "version": ""
  },
  "host": "mainnet.zklighter.elliot.ai",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "status",
        "operationId": "status",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "root"
        ],
        "description": "Get status of zklighter"
      }
    },
    "/api/v1/account": {
      "get": {
        "summary": "account",
        "operationId": "account",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DetailedAccounts"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "index",
              "l1_address"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account by account's index. <br>More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position."
      }
    },
    "/api/v1/accountActiveOrders": {
      "get": {
        "summary": "accountActiveOrders",
        "operationId": "accountActiveOrders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Orders"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "spot",
              "perp"
            ],
            "default": "all"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account active orders. `auth` can be generated using the SDK."
      }
    },
    "/api/v1/accountInactiveOrders": {
      "get": {
        "summary": "accountInactiveOrders",
        "operationId": "accountInactiveOrders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Orders"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "spot",
              "perp"
            ],
            "default": "all"
          },
          {
            "name": "ask_filter",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int8",
            "default": "-1"
          },
          {
            "name": "between_timestamps",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account inactive orders"
      }
    },
    "/api/v1/accountLimits": {
      "get": {
        "summary": "accountLimits",
        "operationId": "accountLimits",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AccountLimits"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account limits"
      }
    },
    "/api/v1/accountMetadata": {
      "get": {
        "summary": "accountMetadata",
        "operationId": "accountMetadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AccountMetadatas"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "index",
              "l1_address"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account metadatas"
      }
    },
    "/api/v1/accountTxs": {
      "get": {
        "summary": "accountTxs",
        "operationId": "accountTxs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Txs"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          },
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "account_index"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint8"
            }
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get transactions of a specific account"
      }
    },
    "/api/v1/accountsByL1Address": {
      "get": {
        "summary": "accountsByL1Address",
        "operationId": "accountsByL1Address",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SubAccounts"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get accounts by l1_address returns all accounts associated with the given L1 address"
      }
    },
    "/api/v1/airdrop": {
      "get": {
        "summary": "airdrop",
        "operationId": "airdrop",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AirdropAllocations"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get airdrop allocation"
      }
    },
    "/api/v1/airdrop/create": {
      "post": {
        "summary": "airdrop_create",
        "operationId": "airdrop_create",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqCreateAirdropAllocations"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Create airdrop allocation"
      }
    },
    "/api/v1/announcement": {
      "get": {
        "summary": "announcement",
        "operationId": "announcement",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Announcements"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "announcement"
        ],
        "description": "Get announcement"
      }
    },
    "/api/v1/apikeys": {
      "get": {
        "summary": "apikeys",
        "operationId": "apikeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AccountApiKeys"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "api_key_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "uint8",
            "default": "255"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account."
      }
    },
    "/api/v1/assetDetails": {
      "get": {
        "summary": "assetDetails",
        "operationId": "assetDetails",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AssetDetails"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "asset_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get asset details"
      }
    },
    "/api/v1/block": {
      "get": {
        "summary": "block",
        "operationId": "block",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Blocks"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "commitment",
              "height"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "block"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get block by its height or commitment"
      }
    },
    "/api/v1/blockTxs": {
      "get": {
        "summary": "blockTxs",
        "operationId": "blockTxs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Txs"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "block_height",
              "block_commitment"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get transactions in a block"
      }
    },
    "/api/v1/blocks": {
      "get": {
        "summary": "blocks",
        "operationId": "blocks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Blocks"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "default": "asc"
          }
        ],
        "tags": [
          "block"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get blocks"
      }
    },
    "/api/v1/bridges": {
      "get": {
        "summary": "bridges",
        "operationId": "bridges",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetBridgesByL1Addr"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get bridges for given l1 address"
      }
    },
    "/api/v1/bridges/isNextBridgeFast": {
      "get": {
        "summary": "bridges_isNextBridgeFast",
        "operationId": "bridges_isNextBridgeFast",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetIsNextBridgeFast"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get if next bridge is fast"
      }
    },
    "/api/v1/candles": {
      "get": {
        "summary": "candles",
        "operationId": "candles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Candles"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int16"
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "4h",
              "12h",
              "1d",
              "1w"
            ]
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "set_timestamp_to_end",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          }
        ],
        "tags": [
          "candlestick"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get candles (optimized with shortened fields and smaller response size)"
      }
    },
    "/api/v1/candlesticks": {
      "get": {
        "summary": "candlesticks",
        "operationId": "candlesticks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Candlesticks"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int16"
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "4h",
              "12h",
              "1d",
              "1w"
            ]
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "set_timestamp_to_end",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          }
        ],
        "tags": [
          "candlestick"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get candlesticks"
      }
    },
    "/api/v1/changeAccountTier": {
      "post": {
        "summary": "changeAccountTier",
        "operationId": "changeAccountTier",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespChangeAccountTier"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqChangeAccountTier"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Change account tier"
      }
    },
    "/api/v1/createIntentAddress": {
      "post": {
        "summary": "createIntentAddress",
        "operationId": "createIntentAddress",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CreateIntentAddressResp"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqCreateIntentAddress"
            }
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Create a bridge intent address for CCTP bridge"
      }
    },
    "/api/v1/currentHeight": {
      "get": {
        "summary": "currentHeight",
        "operationId": "currentHeight",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CurrentHeight"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "block"
        ],
        "description": "Get current height"
      }
    },
    "/api/v1/deposit/history": {
      "get": {
        "summary": "deposit_history",
        "operationId": "deposit_history",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DepositHistory"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "pending",
              "claimable"
            ]
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get deposit history"
      }
    },
    "/api/v1/deposit/latest": {
      "get": {
        "summary": "deposit_latest",
        "operationId": "deposit_latest",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Deposit"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get most recent deposit for given l1 address"
      }
    },
    "/api/v1/deposit/networks": {
      "get": {
        "summary": "deposit_networks",
        "operationId": "deposit_networks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BridgeSupportedNetworks"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "bridge"
        ],
        "description": "Get deposit supporting networks"
      }
    },
    "/api/v1/exchangeMetrics": {
      "get": {
        "summary": "exchangeMetrics",
        "operationId": "exchangeMetrics",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetExchangeMetrics"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "h",
              "d",
              "w",
              "m",
              "q",
              "y",
              "all"
            ]
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "volume",
              "maker_fee",
              "taker_fee",
              "liquidation_fee",
              "trade_count",
              "liquidation_count",
              "liquidation_volume",
              "inflow",
              "outflow",
              "transfer_fee",
              "withdraw_fee",
              "open_interest",
              "account_count",
              "active_account_count",
              "tps",
              "buyback"
            ]
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "byMarket"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get exchange metrics"
      }
    },
    "/api/v1/exchangeStats": {
      "get": {
        "summary": "exchangeStats",
        "operationId": "exchangeStats",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ExchangeStats"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "order"
        ],
        "description": "Get exchange stats"
      }
    },
    "/api/v1/executeStats": {
      "get": {
        "summary": "executeStats",
        "operationId": "executeStats",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetExecuteStats"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "d",
              "w",
              "m",
              "q",
              "y",
              "all"
            ]
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get execute stats"
      }
    },
    "/api/v1/export": {
      "get": {
        "summary": "export",
        "operationId": "export",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ExportData"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "-1"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "funding",
              "trade"
            ]
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "minimum": 1735689600000,
            "maximum": 1830297600000
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "minimum": 1735689600000,
            "maximum": 1830297600000
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "long",
              "short"
            ],
            "default": "all"
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "maker",
              "taker"
            ],
            "default": "all"
          },
          {
            "name": "trade_type",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "trade",
              "liquidation",
              "deleverage",
              "market-settlement"
            ],
            "default": "all"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Export data"
      }
    },
    "/api/v1/fastbridge/info": {
      "get": {
        "summary": "fastbridge_info",
        "operationId": "fastbridge_info",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetFastBridgeInfo"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "bridge"
        ],
        "description": "Get fast bridge info"
      }
    },
    "/api/v1/fastwithdraw": {
      "post": {
        "summary": "fastwithdraw",
        "operationId": "fastwithdraw",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqFastwithdraw"
            }
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Fast withdraw"
      }
    },
    "/api/v1/fastwithdraw/info": {
      "get": {
        "summary": "fastwithdraw_info",
        "operationId": "fastwithdraw_info",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetFastwithdrawalInfo"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "bridge"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get fast withdraw info"
      }
    },
    "/api/v1/faucet": {
      "get": {
        "summary": "faucet",
        "operationId": "faucet",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "do_l1_transfer",
            "in": "query",
            "required": true,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Request funds from faucet"
      }
    },
    "/api/v1/funding-rates": {
      "get": {
        "summary": "funding-rates",
        "operationId": "funding-rates",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/FundingRates"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "funding"
        ],
        "description": "Get funding rates"
      }
    },
    "/api/v1/fundings": {
      "get": {
        "summary": "fundings",
        "operationId": "fundings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Fundings"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int16"
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "1h",
              "1d"
            ]
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "candlestick"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get fundings"
      }
    },
    "/api/v1/gecko/contracts": {
      "get": {
        "summary": "gecko_contracts",
        "operationId": "gecko_contracts",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GeckoContracts"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "auth",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "gecko"
        ],
        "description": "Coin Gecko Contracts"
      }
    },
    "/api/v1/gecko/orderbook": {
      "get": {
        "summary": "gecko_orderbook",
        "operationId": "gecko_orderbook",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GeckoOrderbook"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "auth",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "ticker_id",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "gecko"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Coin Gecko Orderbook"
      }
    },
    "/api/v1/gecko/tickers": {
      "get": {
        "summary": "gecko_tickers",
        "operationId": "gecko_tickers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GeckoTickers"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "auth",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "gecko"
        ],
        "description": "Coin Gecko Spot Tickers"
      }
    },
    "/api/v1/geoLocation": {
      "get": {
        "summary": "geoLocation",
        "operationId": "geoLocation",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "geo"
        ],
        "description": "Get geo location"
      }
    },
    "/api/v1/getMakerOnlyApiKeys": {
      "get": {
        "summary": "getMakerOnlyApiKeys",
        "operationId": "getMakerOnlyApiKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetMakerOnlyApiKeys"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get maker-only API key indexes"
      }
    },
    "/api/v1/isWhitelisted": {
      "get": {
        "summary": "isWhitelisted",
        "operationId": "isWhitelisted",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/IsWhitelisted"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get is account whitelisted"
      }
    },
    "/api/v1/l1Metadata": {
      "get": {
        "summary": "l1Metadata",
        "operationId": "l1Metadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/L1Metadata"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get L1 metadata"
      }
    },
    "/api/v1/layer1BasicInfo": {
      "get": {
        "summary": "layer1BasicInfo",
        "operationId": "layer1BasicInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Layer1BasicInfo"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "info"
        ],
        "description": "Get zklighter l1 general info, including contract address and rpc info"
      }
    },
    "/api/v1/leaderboard": {
      "get": {
        "summary": "leaderboard",
        "operationId": "leaderboard",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Leaderboard"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "weekly",
              "all",
              "competition"
            ]
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "competition_id",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get points leaderboard"
      }
    },
    "/api/v1/leaseOptions": {
      "get": {
        "summary": "leaseOptions",
        "operationId": "leaseOptions",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetLeaseOptions"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "account"
        ],
        "description": "Get lease options"
      }
    },
    "/api/v1/leases": {
      "get": {
        "summary": "leases",
        "operationId": "leases",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetLeases"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "20"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get leases"
      }
    },
    "/api/v1/liquidations": {
      "get": {
        "summary": "liquidations",
        "operationId": "liquidations",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LiquidationInfos"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get liquidation infos"
      }
    },
    "/api/v1/litLease": {
      "post": {
        "summary": "litLease",
        "operationId": "litLease",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TxHash"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqLITLease"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Submit LIT lease transfer"
      }
    },
    "/api/v1/marketMetrics": {
      "get": {
        "summary": "marketMetrics",
        "operationId": "marketMetrics",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetMarketMetrics"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "volume"
            ]
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get market metrics for a specific timestamp, returns data for all markets"
      }
    },
    "/api/v1/nextNonce": {
      "get": {
        "summary": "nextNonce",
        "operationId": "nextNonce",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/NextNonce"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "api_key_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "uint8"
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get next nonce for a specific account and api key"
      }
    },
    "/api/v1/notification/ack": {
      "post": {
        "summary": "notification_ack",
        "operationId": "notification_ack",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqAckNotif"
            }
          }
        ],
        "tags": [
          "notification"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Ack notification"
      }
    },
    "/api/v1/orderBookDetails": {
      "get": {
        "summary": "orderBookDetails",
        "operationId": "orderBookDetails",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/OrderBookDetails"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "spot",
              "perp"
            ],
            "default": "all"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get order books metadata"
      }
    },
    "/api/v1/orderBookOrders": {
      "get": {
        "summary": "orderBookOrders",
        "operationId": "orderBookOrders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/OrderBookOrders"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int16"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 250
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get order book orders"
      }
    },
    "/api/v1/orderBooks": {
      "get": {
        "summary": "orderBooks",
        "operationId": "orderBooks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/OrderBooks"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "spot",
              "perp"
            ],
            "default": "all"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get order books metadata.<hr>**Response Description:**<br><br>1) **Taker and maker fees** are in percentage.<br>2) **Min base amount:** The amount of base token that can be traded in a single order.<br>3) **Min quote amount:** The amount of quote token that can be traded in a single order.<br>4) **Supported size decimals:** The number of decimal places that can be used for the size of the order.<br>5) **Supported price decimals:** The number of decimal places that can be used for the price of the order.<br>6) **Supported quote decimals:** Size Decimals + Quote Decimals."
      }
    },
    "/api/v1/partnerStats": {
      "get": {
        "summary": "partnerStats",
        "operationId": "partnerStats",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/PartnerStats"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get partner stats"
      }
    },
    "/api/v1/pnl": {
      "get": {
        "summary": "pnl",
        "operationId": "pnl",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AccountPnL"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "index"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "1m",
              "5m",
              "15m",
              "1h",
              "4h",
              "1d"
            ]
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 5000000000000
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "ignore_transfers",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get account PnL chart"
      }
    },
    "/api/v1/positionFunding": {
      "get": {
        "summary": "positionFunding",
        "operationId": "positionFunding",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/PositionFundings"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "long",
              "short",
              "all"
            ],
            "default": "all"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get accounts position fundings"
      }
    },
    "/api/v1/publicPoolsMetadata": {
      "get": {
        "summary": "publicPoolsMetadata",
        "operationId": "publicPoolsMetadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespPublicPoolsMetadata"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "user",
              "protocol",
              "account_index",
              "stake"
            ]
          },
          {
            "name": "index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get public pools metadata"
      }
    },
    "/api/v1/pushnotif/register": {
      "post": {
        "summary": "pushnotif_register",
        "operationId": "pushnotif_register",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqRegisterPushNotifToken"
            }
          }
        ],
        "tags": [
          "pushnotif"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Register device for push notifications"
      }
    },
    "/api/v1/pushnotif/settings": {
      "get": {
        "summary": "pushnotif_settings",
        "operationId": "pushnotif_settings_get",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetPushNotifSettings"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "expo_token",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "pushnotif"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get push notification settings"
      },
      "post": {
        "summary": "pushnotif_settings",
        "operationId": "pushnotif_settings_post",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUpdatePushNotifSettings"
            }
          }
        ],
        "tags": [
          "pushnotif"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update push notification settings"
      }
    },
    "/api/v1/pushnotif/unregister": {
      "post": {
        "summary": "pushnotif_unregister",
        "operationId": "pushnotif_unregister",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUnregisterPushNotifToken"
            }
          }
        ],
        "tags": [
          "pushnotif"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Unregister device from push notifications"
      }
    },
    "/api/v1/recentTrades": {
      "get": {
        "summary": "recentTrades",
        "operationId": "recentTrades",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Trades"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int16"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get recent trades"
      }
    },
    "/api/v1/referral/create": {
      "post": {
        "summary": "referral_create",
        "operationId": "referral_create",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ReferralCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqCreateReferralCode"
            }
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Create referral code"
      }
    },
    "/api/v1/referral/get": {
      "get": {
        "summary": "referral_get",
        "operationId": "referral_get",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ReferralCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get referral code"
      }
    },
    "/api/v1/referral/kickback/update": {
      "post": {
        "summary": "referral_kickback_update",
        "operationId": "referral_kickback_update",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespUpdateKickback"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUpdateKickback"
            }
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update kickback percentage for referral rewards"
      }
    },
    "/api/v1/referral/points": {
      "get": {
        "summary": "referral_points",
        "operationId": "referral_points",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ReferralPoints"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get referral points"
      }
    },
    "/api/v1/referral/update": {
      "post": {
        "summary": "referral_update",
        "operationId": "referral_update",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespUpdateReferralCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUpdateReferralCode"
            }
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update referral code (allowed once per account)"
      }
    },
    "/api/v1/referral/use": {
      "post": {
        "summary": "referral_use",
        "operationId": "referral_use",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUseReferralCode"
            }
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Use referral code"
      }
    },
    "/api/v1/referral/userReferrals": {
      "get": {
        "summary": "referral_userReferrals",
        "operationId": "referral_userReferrals",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/UserReferrals"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "stats_start_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "stats_end_timestamp",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "referral"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get user referrals"
      }
    },
    "/api/v1/rfq/create": {
      "post": {
        "summary": "rfq_create",
        "operationId": "rfq_create",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespCreateRFQ"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqCreateRFQ"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Create RFQ"
      }
    },
    "/api/v1/rfq/get": {
      "get": {
        "summary": "rfq_get",
        "operationId": "rfq_get",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetRFQ"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "rfq_id",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get RFQ by ID"
      }
    },
    "/api/v1/rfq/list": {
      "get": {
        "summary": "rfq_list",
        "operationId": "rfq_list",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespListRFQs"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "281474976710655"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "20"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "List RFQs"
      }
    },
    "/api/v1/rfq/respond": {
      "post": {
        "summary": "rfq_respond",
        "operationId": "rfq_respond",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespRespondToRFQ"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqRespondToRFQ"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Respond to RFQ"
      }
    },
    "/api/v1/rfq/update": {
      "post": {
        "summary": "rfq_update",
        "operationId": "rfq_update",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespUpdateRFQ"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqUpdateRFQ"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update RFQ status"
      }
    },
    "/api/v1/sendTx": {
      "post": {
        "summary": "sendTx",
        "operationId": "sendTx",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespSendTx"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqSendTx"
            }
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
      }
    },
    "/api/v1/sendTxBatch": {
      "post": {
        "summary": "sendTxBatch",
        "operationId": "sendTxBatch",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespSendTxBatch"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqSendTxBatch"
            }
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
      }
    },
    "/api/v1/setAccountMetadata": {
      "post": {
        "summary": "setAccountMetadata",
        "operationId": "setAccountMetadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqSetAccountMetadata"
            }
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Set account metadata"
      }
    },
    "/api/v1/setMakerOnlyApiKeys": {
      "post": {
        "summary": "setMakerOnlyApiKeys",
        "operationId": "setMakerOnlyApiKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespSetMakerOnlyApiKeys"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqSetMakerOnlyApiKeys"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Set maker-only API key indexes"
      }
    },
    "/api/v1/systemConfig": {
      "get": {
        "summary": "systemConfig",
        "operationId": "systemConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SystemConfig"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "info"
        ],
        "description": "Get system configuration including pool indexes and lockup/cooldown periods"
      }
    },
    "/api/v1/tokenlist": {
      "get": {
        "summary": "tokenlist",
        "operationId": "tokenlist",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TokenList"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "tokenlist"
        ],
        "description": "Get token list and their metadata"
      }
    },
    "/api/v1/tokens": {
      "get": {
        "summary": "tokens",
        "operationId": "tokens",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespGetApiTokens"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get api tokens of an account"
      }
    },
    "/api/v1/tokens/create": {
      "post": {
        "summary": "tokens_create",
        "operationId": "tokens_create",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespPostApiToken"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqPostApiToken"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Create api token"
      }
    },
    "/api/v1/tokens/revoke": {
      "post": {
        "summary": "tokens_revoke",
        "operationId": "tokens_revoke",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespRevokeApiToken"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReqRevokeApiToken"
            }
          }
        ],
        "tags": [
          "account"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Revoke api token"
      }
    },
    "/api/v1/trades": {
      "get": {
        "summary": "trades",
        "operationId": "trades",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Trades"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int16",
            "default": "255"
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "spot",
              "perp"
            ],
            "default": "all"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "-1"
          },
          {
            "name": "order_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "block_height",
              "timestamp",
              "trade_id"
            ]
          },
          {
            "name": "sort_dir",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "desc"
            ],
            "default": "desc"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "-1"
          },
          {
            "name": "ask_filter",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int8",
            "default": "-1"
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "maker",
              "taker"
            ],
            "default": "all"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "trade",
              "liquidation",
              "deleverage",
              "market-settlement"
            ],
            "default": "all"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean",
            "default": "false"
          }
        ],
        "tags": [
          "order"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get trades"
      }
    },
    "/api/v1/transfer/history": {
      "get": {
        "summary": "transfer_history",
        "operationId": "transfer_history",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TransferHistory"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "L2Transfer",
                "L2MintShares",
                "L2BurnShares",
                "L2StakeAssets",
                "L2UnstakeAssets"
              ]
            }
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get transfer history"
      }
    },
    "/api/v1/transferFeeInfo": {
      "get": {
        "summary": "transferFeeInfo",
        "operationId": "transferFeeInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TransferFeeInfo"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "to_account_index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64",
            "default": "-1"
          }
        ],
        "tags": [
          "info"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transfer fee info"
      }
    },
    "/api/v1/tx": {
      "get": {
        "summary": "tx",
        "operationId": "tx",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/EnrichedTx"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "hash",
              "sequence_index"
            ]
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get transaction by hash or sequence index"
      }
    },
    "/api/v1/txFromL1TxHash": {
      "get": {
        "summary": "txFromL1TxHash",
        "operationId": "txFromL1TxHash",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/EnrichedTx"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get L1 transaction by L1 transaction hash"
      }
    },
    "/api/v1/txs": {
      "get": {
        "summary": "txs",
        "operationId": "txs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Txs"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get transactions which are already packed into blocks"
      }
    },
    "/api/v1/withdraw/history": {
      "get": {
        "summary": "withdraw_history",
        "operationId": "withdraw_history",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/WithdrawHistory"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "parameters": [
          {
            "name": "authorization",
            "description": " make required after integ is done",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "auth",
            "description": " made optional to support header auth clients",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "all",
              "pending",
              "claimable"
            ]
          }
        ],
        "tags": [
          "transaction"
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Get withdraw history"
      }
    },
    "/api/v1/withdrawalDelay": {
      "get": {
        "summary": "withdrawalDelay",
        "operationId": "withdrawalDelay",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/RespWithdrawalDelay"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "info"
        ],
        "description": "Withdrawal delay in seconds"
      }
    },
    "/info": {
      "get": {
        "summary": "info",
        "operationId": "info",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ZkLighterInfo"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "tags": [
          "root"
        ],
        "description": "Get info of zklighter"
      }
    }
  },
  "definitions": {
    "Account": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "account_type": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "cancel_all_time": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "total_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "total_isolated_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "pending_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "available_balance": {
          "type": "string",
          "example": "19995"
        },
        "status": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "collateral": {
          "type": "string",
          "example": "46342"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        },
        "account_trading_mode": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        }
      },
      "title": "Account",
      "required": [
        "code",
        "account_type",
        "index",
        "l1_address",
        "cancel_all_time",
        "total_order_count",
        "total_isolated_order_count",
        "pending_order_count",
        "available_balance",
        "status",
        "collateral",
        "transaction_time"
      ]
    },
    "AccountApiKeys": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "api_keys": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApiKey"
          }
        }
      },
      "title": "AccountApiKeys",
      "required": [
        "code",
        "api_keys"
      ]
    },
    "AccountAsset": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "USDC"
        },
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "balance": {
          "type": "string",
          "example": "1000"
        },
        "locked_balance": {
          "type": "string",
          "example": "1000"
        },
        "margin_mode": {
          "type": "string",
          "example": "enabled",
          "enum": [
            "enabled",
            "disabled"
          ]
        },
        "margin_balance": {
          "type": "string",
          "example": "1000"
        }
      },
      "title": "AccountAsset",
      "required": [
        "symbol",
        "asset_id",
        "balance",
        "locked_balance",
        "margin_mode",
        "margin_balance"
      ]
    },
    "AccountLimits": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "max_llp_percentage": {
          "type": "integer",
          "format": "int32",
          "example": "25"
        },
        "max_llp_amount": {
          "type": "string",
          "example": "1000000"
        },
        "user_tier": {
          "type": "string",
          "example": "std"
        },
        "can_create_public_pool": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "user_tier_name": {
          "type": "string",
          "example": "standard"
        },
        "current_maker_fee_tick": {
          "type": "integer",
          "format": "int32",
          "example": "0"
        },
        "current_taker_fee_tick": {
          "type": "integer",
          "format": "int32",
          "example": "0"
        },
        "leased_lit": {
          "type": "string"
        },
        "effective_lit_stakes": {
          "type": "string"
        }
      },
      "title": "AccountLimits",
      "required": [
        "code",
        "max_llp_percentage",
        "max_llp_amount",
        "user_tier",
        "can_create_public_pool",
        "user_tier_name",
        "current_maker_fee_tick",
        "current_taker_fee_tick",
        "leased_lit",
        "effective_lit_stakes"
      ]
    },
    "AccountMarginStats": {
      "type": "object",
      "properties": {
        "collateral": {
          "type": "string",
          "example": "199955"
        },
        "portfolio_value": {
          "type": "string",
          "example": "199955"
        },
        "leverage": {
          "type": "string",
          "example": "1.0"
        },
        "available_balance": {
          "type": "string",
          "example": "199955"
        },
        "margin_usage": {
          "type": "string",
          "example": "0.0"
        },
        "buying_power": {
          "type": "string",
          "example": "199955"
        }
      },
      "title": "AccountMarginStats",
      "required": [
        "collateral",
        "portfolio_value",
        "leverage",
        "available_balance",
        "margin_usage",
        "buying_power"
      ]
    },
    "AccountMarketStats": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "weekly_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "weekly_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "weekly_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "monthly_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "monthly_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "monthly_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "total_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "total_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "total_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        }
      },
      "title": "AccountMarketStats",
      "required": [
        "market_id",
        "daily_trades_count",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "weekly_trades_count",
        "weekly_base_token_volume",
        "weekly_quote_token_volume",
        "monthly_trades_count",
        "monthly_base_token_volume",
        "monthly_quote_token_volume",
        "total_trades_count",
        "total_base_token_volume",
        "total_quote_token_volume"
      ]
    },
    "AccountMetadata": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "can_invite": {
          "type": "boolean",
          "format": "boolean",
          "description": " Remove After FE uses L1 meta endpoint"
        },
        "referral_points_percentage": {
          "type": "string",
          "description": " Remove After FE uses L1 meta endpoint"
        },
        "can_rfq": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "AccountMetadata",
      "required": [
        "account_index",
        "name",
        "description",
        "can_invite",
        "referral_points_percentage",
        "can_rfq",
        "created_at"
      ]
    },
    "AccountMetadatas": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "account_metadatas": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AccountMetadata"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "AccountMetadatas",
      "required": [
        "code",
        "account_metadatas"
      ]
    },
    "AccountPnL": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string",
          "example": "15m"
        },
        "pnl": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PnLEntry"
          }
        }
      },
      "title": "AccountPnL",
      "required": [
        "code",
        "resolution",
        "pnl"
      ]
    },
    "AccountPosition": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "initial_margin_fraction": {
          "type": "string",
          "example": "20.00"
        },
        "open_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "pending_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "position_tied_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "sign": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "position": {
          "type": "string",
          "example": "3.6956"
        },
        "avg_entry_price": {
          "type": "string",
          "example": "3024.66"
        },
        "position_value": {
          "type": "string",
          "example": "3019.92"
        },
        "unrealized_pnl": {
          "type": "string",
          "example": "17.521309"
        },
        "realized_pnl": {
          "type": "string",
          "example": "2.000000"
        },
        "liquidation_price": {
          "type": "string",
          "example": "3024.66"
        },
        "total_funding_paid_out": {
          "type": "string",
          "example": "34.2"
        },
        "margin_mode": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "allocated_margin": {
          "type": "string",
          "example": "46342"
        },
        "total_discount": {
          "type": "string",
          "example": "34.2"
        }
      },
      "title": "AccountPosition",
      "required": [
        "market_id",
        "symbol",
        "initial_margin_fraction",
        "open_order_count",
        "pending_order_count",
        "position_tied_order_count",
        "sign",
        "position",
        "avg_entry_price",
        "position_value",
        "unrealized_pnl",
        "realized_pnl",
        "liquidation_price",
        "margin_mode",
        "allocated_margin",
        "total_discount"
      ]
    },
    "AccountStats": {
      "type": "object",
      "properties": {
        "collateral": {
          "type": "string",
          "example": "199955"
        },
        "portfolio_value": {
          "type": "string",
          "example": "199955"
        },
        "leverage": {
          "type": "string",
          "example": "1.0"
        },
        "available_balance": {
          "type": "string",
          "example": "199955"
        },
        "margin_usage": {
          "type": "string",
          "example": "0.0"
        },
        "buying_power": {
          "type": "string",
          "example": "199955"
        },
        "account_trading_mode": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "cross_stats": {
          "$ref": "#/definitions/AccountMarginStats"
        },
        "total_stats": {
          "$ref": "#/definitions/AccountMarginStats"
        }
      },
      "title": "AccountStats",
      "required": [
        "collateral",
        "portfolio_value",
        "leverage",
        "available_balance",
        "margin_usage",
        "buying_power",
        "cross_stats",
        "total_stats"
      ]
    },
    "AccountTradeStats": {
      "type": "object",
      "properties": {
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "daily_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "weekly_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "weekly_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "monthly_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "monthly_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "total_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "total_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        }
      },
      "title": "AccountTradeStats",
      "required": [
        "daily_trades_count",
        "daily_volume",
        "weekly_trades_count",
        "weekly_volume",
        "monthly_trades_count",
        "monthly_volume",
        "total_trades_count",
        "total_volume"
      ]
    },
    "AirdropAllocationItem": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "allocation": {
          "type": "string"
        }
      },
      "title": "AirdropAllocationItem",
      "required": [
        "l1_address",
        "allocation"
      ]
    },
    "AirdropAllocations": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "allocations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AirdropAllocationItem"
          }
        }
      },
      "title": "AirdropAllocations",
      "required": [
        "l1_address",
        "allocations"
      ]
    },
    "Announcement": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "expired_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Announcement",
      "required": [
        "title",
        "content",
        "created_at",
        "expired_at"
      ]
    },
    "Announcements": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "announcements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Announcement"
          }
        }
      },
      "title": "Announcements",
      "required": [
        "code",
        "announcements"
      ]
    },
    "ApiKey": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8",
          "example": "0"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "722"
        },
        "public_key": {
          "type": "string"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        }
      },
      "title": "ApiKey",
      "required": [
        "account_index",
        "api_key_index",
        "nonce",
        "public_key",
        "transaction_time"
      ]
    },
    "ApiToken": {
      "type": "object",
      "properties": {
        "token_id": {
          "type": "integer",
          "format": "int64"
        },
        "api_token": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expiry": {
          "type": "integer",
          "format": "int64"
        },
        "sub_account_access": {
          "type": "boolean",
          "format": "boolean"
        },
        "revoked": {
          "type": "boolean",
          "format": "boolean"
        },
        "scopes": {
          "type": "string"
        }
      },
      "title": "ApiToken",
      "required": [
        "token_id",
        "api_token",
        "name",
        "account_index",
        "expiry",
        "sub_account_access",
        "revoked",
        "scopes"
      ]
    },
    "ApprovedIntegrator": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64",
          "example": "54621"
        },
        "name": {
          "type": "string",
          "example": "Integrator1"
        },
        "max_perps_taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "10"
        },
        "max_perps_maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "max_spot_taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "10"
        },
        "max_spot_maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "approval_expiry": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200",
          "description": " Timestamp in milliseconds, after which the integrator is no longer approved"
        }
      },
      "title": "ApprovedIntegrator",
      "required": [
        "account_index",
        "name",
        "max_perps_taker_fee",
        "max_perps_maker_fee",
        "max_spot_taker_fee",
        "max_spot_maker_fee",
        "approval_expiry"
      ]
    },
    "Asset": {
      "type": "object",
      "properties": {
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "l1_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "18"
        },
        "decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "2"
        },
        "min_transfer_amount": {
          "type": "string",
          "example": "0.01"
        },
        "min_withdrawal_amount": {
          "type": "string",
          "example": "0.01"
        },
        "margin_mode": {
          "type": "string",
          "example": "enabled",
          "enum": [
            "enabled",
            "disabled"
          ]
        },
        "index_price": {
          "type": "string",
          "example": "3024.66"
        },
        "price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "l1_address": {
          "type": "string",
          "example": "0x0000000000000000000000000000000000000000"
        },
        "loan_to_value": {
          "type": "string",
          "example": "0.5"
        },
        "liquidation_threshold": {
          "type": "string",
          "example": "0.8"
        },
        "liquidation_fee": {
          "type": "string",
          "example": "0.01"
        },
        "global_supply_cap": {
          "type": "string",
          "example": "1000000"
        },
        "user_supply_cap": {
          "type": "string",
          "example": "1000"
        },
        "total_supplied": {
          "type": "string",
          "example": "100"
        }
      },
      "title": "Asset",
      "required": [
        "asset_id",
        "symbol",
        "l1_decimals",
        "decimals",
        "min_transfer_amount",
        "min_withdrawal_amount",
        "margin_mode",
        "index_price",
        "price_decimals",
        "l1_address",
        "loan_to_value",
        "liquidation_threshold",
        "liquidation_fee",
        "global_supply_cap",
        "user_supply_cap",
        "total_supplied"
      ]
    },
    "AssetDetails": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "asset_details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Asset"
          }
        }
      },
      "title": "AssetDetails",
      "required": [
        "code",
        "asset_details"
      ]
    },
    "AssetStats": {
      "type": "object",
      "properties": {
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "index_price": {
          "type": "string",
          "example": "3024.66"
        }
      },
      "title": "AssetStats",
      "required": [
        "asset_id",
        "index_price"
      ]
    },
    "Auth": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        }
      },
      "title": "Auth",
      "required": [
        "auth"
      ]
    },
    "Block": {
      "type": "object",
      "properties": {
        "commitment": {
          "type": "string"
        },
        "height": {
          "type": "integer",
          "format": "int64"
        },
        "state_root": {
          "type": "string"
        },
        "priority_operations": {
          "type": "integer",
          "format": "int32"
        },
        "on_chain_l2_operations": {
          "type": "integer",
          "format": "int32"
        },
        "pending_on_chain_operations_pub_data": {
          "type": "string"
        },
        "committed_tx_hash": {
          "type": "string"
        },
        "committed_at": {
          "type": "integer",
          "format": "int64"
        },
        "verified_tx_hash": {
          "type": "string"
        },
        "verified_at": {
          "type": "integer",
          "format": "int64"
        },
        "txs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tx"
          }
        },
        "status": {
          "type": "integer",
          "format": "int64"
        },
        "size": {
          "type": "integer",
          "format": "uin16"
        }
      },
      "title": "Block",
      "required": [
        "commitment",
        "height",
        "state_root",
        "priority_operations",
        "on_chain_l2_operations",
        "pending_on_chain_operations_pub_data",
        "committed_tx_hash",
        "committed_at",
        "verified_tx_hash",
        "verified_at",
        "txs",
        "status",
        "size"
      ]
    },
    "Blocks": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "blocks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Block"
          }
        }
      },
      "title": "Blocks",
      "required": [
        "code",
        "total",
        "blocks"
      ]
    },
    "Bridge": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "version": {
          "type": "integer",
          "format": "int32",
          "enum": [
            "1",
            "2"
          ]
        },
        "source": {
          "type": "string",
          "example": "Arbitrum"
        },
        "source_chain_id": {
          "type": "string",
          "example": "42161"
        },
        "fast_bridge_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "batch_claim_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "cctp_burn_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "amount": {
          "type": "string"
        },
        "intent_address": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "bridging",
            "completed"
          ]
        },
        "step": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        },
        "is_external_deposit": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "Bridge",
      "required": [
        "id",
        "version",
        "source",
        "source_chain_id",
        "fast_bridge_tx_hash",
        "batch_claim_tx_hash",
        "cctp_burn_tx_hash",
        "amount",
        "intent_address",
        "status",
        "step",
        "description",
        "created_at",
        "updated_at",
        "is_external_deposit"
      ]
    },
    "BridgeSupportedNetwork": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "Arbitrum"
        },
        "chain_id": {
          "type": "string",
          "example": "4164"
        },
        "explorer": {
          "type": "string",
          "example": "https://arbiscan.io/"
        }
      },
      "title": "BridgeSupportedNetwork",
      "required": [
        "name",
        "chain_id",
        "explorer"
      ]
    },
    "BridgeSupportedNetworks": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "networks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BridgeSupportedNetwork"
          }
        }
      },
      "title": "BridgeSupportedNetworks",
      "required": [
        "code",
        "networks"
      ]
    },
    "Candle": {
      "type": "object",
      "properties": {
        "t": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200",
          "description": " timestamp"
        },
        "o": {
          "type": "number",
          "format": "double",
          "example": "3024.66",
          "description": " open"
        },
        "h": {
          "type": "number",
          "format": "double",
          "example": "3034.66",
          "description": " high"
        },
        "l": {
          "type": "number",
          "format": "double",
          "example": "3014.66",
          "description": " low"
        },
        "c": {
          "type": "number",
          "format": "double",
          "example": "3024.66",
          "description": " close"
        },
        "O": {
          "type": "number",
          "format": "double",
          "example": "3024.66",
          "description": " open_raw"
        },
        "H": {
          "type": "number",
          "format": "double",
          "example": "3034.66",
          "description": " high_raw"
        },
        "L": {
          "type": "number",
          "format": "double",
          "example": "3014.66",
          "description": " low_raw"
        },
        "C": {
          "type": "number",
          "format": "double",
          "example": "3024.66",
          "description": " close_raw"
        },
        "v": {
          "type": "number",
          "format": "double",
          "example": "235.25",
          "description": " volume0"
        },
        "V": {
          "type": "number",
          "format": "double",
          "example": "93566.25",
          "description": " volume1"
        },
        "i": {
          "type": "integer",
          "format": "int64",
          "example": "1",
          "description": " last_trade_id"
        }
      },
      "title": "Candle",
      "required": [
        "t",
        "o",
        "h",
        "l",
        "c",
        "O",
        "H",
        "L",
        "C",
        "v",
        "V",
        "i"
      ]
    },
    "Candles": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "r": {
          "type": "string",
          "example": "15m",
          "description": " resolution"
        },
        "c": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Candle"
          },
          "description": " candles"
        }
      },
      "title": "Candles",
      "required": [
        "code",
        "r",
        "c"
      ]
    },
    "Candlestick": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "open": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "high": {
          "type": "number",
          "format": "double",
          "example": "3034.66"
        },
        "low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "close": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "open_raw": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "high_raw": {
          "type": "number",
          "format": "double",
          "example": "3034.66"
        },
        "low_raw": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "close_raw": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "volume0": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "volume1": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "last_trade_id": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "trade_count": {
          "type": "integer",
          "format": "int64",
          "example": "1503241"
        }
      },
      "title": "Candlestick",
      "required": [
        "timestamp",
        "open",
        "high",
        "low",
        "close",
        "open_raw",
        "high_raw",
        "low_raw",
        "close_raw",
        "volume0",
        "volume1",
        "last_trade_id",
        "trade_count"
      ]
    },
    "Candlesticks": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string",
          "example": "15m"
        },
        "candlesticks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Candlestick"
          }
        }
      },
      "title": "Candlesticks",
      "required": [
        "code",
        "resolution",
        "candlesticks"
      ]
    },
    "ContractAddress": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "1"
        },
        "address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "ContractAddress",
      "required": [
        "name",
        "address"
      ]
    },
    "CreateIntentAddressResp": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "intent_address": {
          "type": "string"
        }
      },
      "title": "CreateIntentAddressResp",
      "required": [
        "code",
        "intent_address"
      ]
    },
    "CurrentHeight": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "height": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "CurrentHeight",
      "required": [
        "code",
        "height"
      ]
    },
    "Cursor": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "Cursor"
    },
    "DailyReturn": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "daily_return": {
          "type": "number",
          "format": "double",
          "example": "0.0001"
        }
      },
      "title": "DailyReturn",
      "required": [
        "timestamp",
        "daily_return"
      ]
    },
    "Deposit": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "example": "Arbitrum"
        },
        "source_chain_id": {
          "type": "string",
          "example": "42161"
        },
        "fast_bridge_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "batch_claim_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "cctp_burn_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "amount": {
          "type": "string"
        },
        "intent_address": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "step": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        },
        "is_external_deposit": {
          "type": "boolean",
          "format": "boolean"
        },
        "is_next_bridge_fast": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "Deposit",
      "required": [
        "code",
        "source",
        "source_chain_id",
        "fast_bridge_tx_hash",
        "batch_claim_tx_hash",
        "cctp_burn_tx_hash",
        "amount",
        "intent_address",
        "status",
        "step",
        "description",
        "created_at",
        "updated_at",
        "is_external_deposit",
        "is_next_bridge_fast"
      ]
    },
    "DepositHistory": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "deposits": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DepositHistoryItem"
          }
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "DepositHistory",
      "required": [
        "code",
        "deposits",
        "cursor"
      ]
    },
    "DepositHistoryItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "amount": {
          "type": "string",
          "example": "0.1"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "status": {
          "type": "string",
          "enum": [
            "failed",
            "pending",
            "completed",
            "claimable"
          ]
        },
        "l1_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "DepositHistoryItem",
      "required": [
        "id",
        "asset_id",
        "amount",
        "timestamp",
        "status",
        "l1_tx_hash"
      ]
    },
    "DetailedAccount": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "account_type": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "cancel_all_time": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "total_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "total_isolated_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "pending_order_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        },
        "available_balance": {
          "type": "string",
          "example": "19995"
        },
        "status": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "collateral": {
          "type": "string",
          "example": "46342"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        },
        "account_trading_mode": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "can_invite": {
          "type": "boolean",
          "format": "boolean",
          "description": " Remove After FE uses L1 meta endpoint"
        },
        "referral_points_percentage": {
          "type": "string",
          "description": " Remove After FE uses L1 meta endpoint"
        },
        "can_rfq": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "positions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AccountPosition"
          }
        },
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AccountAsset"
          }
        },
        "total_asset_value": {
          "type": "string",
          "example": "19995"
        },
        "cross_asset_value": {
          "type": "string",
          "example": "19995"
        },
        "cross_initial_margin_requirement": {
          "type": "string",
          "example": "5998.500000"
        },
        "cross_maintenance_margin_requirement": {
          "type": "string",
          "example": "2999.250000"
        },
        "pool_info": {
          "$ref": "#/definitions/PublicPoolInfo"
        },
        "shares": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PublicPoolShare"
          }
        },
        "pending_unlocks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PendingUnlock"
          }
        },
        "approved_integrators": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApprovedIntegrator"
          }
        }
      },
      "title": "DetailedAccount",
      "required": [
        "code",
        "account_type",
        "index",
        "l1_address",
        "cancel_all_time",
        "total_order_count",
        "total_isolated_order_count",
        "pending_order_count",
        "available_balance",
        "status",
        "collateral",
        "transaction_time",
        "account_index",
        "name",
        "description",
        "can_invite",
        "referral_points_percentage",
        "can_rfq",
        "created_at",
        "positions",
        "assets",
        "total_asset_value",
        "cross_asset_value",
        "cross_initial_margin_requirement",
        "cross_maintenance_margin_requirement",
        "pool_info",
        "shares"
      ]
    },
    "DetailedAccounts": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "total": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DetailedAccount"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "DetailedAccounts",
      "required": [
        "code",
        "total",
        "accounts"
      ]
    },
    "DetailedCandlestick": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "open": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "high": {
          "type": "number",
          "format": "double",
          "example": "3034.66"
        },
        "low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "close": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "open_raw": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "high_raw": {
          "type": "number",
          "format": "double",
          "example": "3034.66"
        },
        "low_raw": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "close_raw": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "volume0": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "volume1": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "last_trade_id": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "trade_count": {
          "type": "integer",
          "format": "int64",
          "example": "1503241"
        }
      },
      "title": "DetailedCandlestick",
      "required": [
        "timestamp",
        "open",
        "high",
        "low",
        "close",
        "open_raw",
        "high_raw",
        "low_raw",
        "close_raw",
        "volume0",
        "volume1",
        "last_trade_id",
        "trade_count"
      ]
    },
    "EnrichedTx": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "type": {
          "type": "integer",
          "format": "uint8",
          "example": "1",
          "maximum": 64,
          "minimum": 1
        },
        "info": {
          "type": "string",
          "example": "{}"
        },
        "event_info": {
          "type": "string",
          "example": "{}"
        },
        "status": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "transaction_index": {
          "type": "integer",
          "format": "int64",
          "example": "8761"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "722"
        },
        "expire_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "block_height": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "queued_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "executed_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "sequence_index": {
          "type": "integer",
          "format": "int64",
          "example": "8761"
        },
        "parent_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8",
          "example": "0"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        },
        "committed_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "verified_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        }
      },
      "title": "EnrichedTx",
      "required": [
        "code",
        "hash",
        "type",
        "info",
        "event_info",
        "status",
        "transaction_index",
        "l1_address",
        "account_index",
        "nonce",
        "expire_at",
        "block_height",
        "queued_at",
        "executed_at",
        "sequence_index",
        "parent_hash",
        "api_key_index",
        "transaction_time",
        "committed_at",
        "verified_at"
      ]
    },
    "ExchangeMetric": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "data": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        }
      },
      "title": "ExchangeMetric",
      "required": [
        "timestamp",
        "data"
      ]
    },
    "ExchangeStats": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "total": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "order_book_stats": {
          "type": "array",
          "example": "1",
          "items": {
            "$ref": "#/definitions/OrderBookStats"
          }
        },
        "daily_usd_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        }
      },
      "title": "ExchangeStats",
      "required": [
        "code",
        "total",
        "order_book_stats",
        "daily_usd_volume",
        "daily_trades_count"
      ]
    },
    "ExecuteStat": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "slippage": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SlippageResult"
          }
        }
      },
      "title": "ExecuteStat",
      "required": [
        "timestamp",
        "slippage"
      ]
    },
    "ExportData": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "data_url": {
          "type": "string"
        }
      },
      "title": "ExportData",
      "required": [
        "code",
        "data_url"
      ]
    },
    "Funding": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "value": {
          "type": "string",
          "example": "0.0001"
        },
        "rate": {
          "type": "string",
          "example": "0.0001"
        },
        "direction": {
          "type": "string",
          "example": "long"
        }
      },
      "title": "Funding",
      "required": [
        "timestamp",
        "value",
        "rate",
        "direction"
      ]
    },
    "FundingRate": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "exchange": {
          "type": "string",
          "enum": [
            "binance",
            "bybit",
            "hyperliquid",
            "lighter"
          ]
        },
        "symbol": {
          "type": "string"
        },
        "rate": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "FundingRate",
      "required": [
        "market_id",
        "exchange",
        "symbol",
        "rate"
      ]
    },
    "FundingRates": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "funding_rates": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FundingRate"
          }
        }
      },
      "title": "FundingRates",
      "required": [
        "code",
        "funding_rates"
      ]
    },
    "Fundings": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string",
          "example": "1h"
        },
        "fundings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Funding"
          }
        }
      },
      "title": "Fundings",
      "required": [
        "code",
        "resolution",
        "fundings"
      ]
    },
    "GeckoContract": {
      "type": "object",
      "properties": {
        "ticker_id": {
          "type": "string"
        },
        "base_currency": {
          "type": "string"
        },
        "target_currency": {
          "type": "string"
        },
        "last_price": {
          "type": "number",
          "format": "double"
        },
        "base_volume": {
          "type": "number",
          "format": "double"
        },
        "target_volume": {
          "type": "number",
          "format": "double"
        },
        "bid": {
          "type": "number",
          "format": "double"
        },
        "ask": {
          "type": "number",
          "format": "double"
        },
        "high": {
          "type": "number",
          "format": "double"
        },
        "low": {
          "type": "number",
          "format": "double"
        },
        "product_type": {
          "type": "string"
        },
        "open_interest": {
          "type": "number",
          "format": "double"
        },
        "open_interest_usd": {
          "type": "number",
          "format": "double"
        },
        "index_price": {
          "type": "number",
          "format": "double"
        },
        "index_name": {
          "type": "string"
        },
        "index_currency": {
          "type": "string"
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "funding_rate": {
          "type": "number",
          "format": "double"
        },
        "next_funding_rate": {
          "type": "number",
          "format": "double"
        },
        "next_funding_rate_timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "contract_type": {
          "type": "string"
        },
        "contract_price_currency": {
          "type": "string"
        },
        "contract_price": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "GeckoContract",
      "required": [
        "ticker_id",
        "base_currency",
        "target_currency",
        "last_price",
        "base_volume",
        "target_volume",
        "bid",
        "ask",
        "high",
        "low",
        "product_type",
        "open_interest",
        "open_interest_usd",
        "index_price",
        "index_name",
        "index_currency",
        "start_timestamp",
        "end_timestamp",
        "funding_rate",
        "next_funding_rate",
        "next_funding_rate_timestamp",
        "contract_type",
        "contract_price_currency",
        "contract_price"
      ]
    },
    "GeckoContracts": {
      "type": "object",
      "properties": {
        "contracts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GeckoContract"
          }
        }
      },
      "title": "GeckoContracts",
      "required": [
        "contracts"
      ]
    },
    "GeckoOrderbook": {
      "type": "object",
      "properties": {
        "ticker_id": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "bids": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            }
          }
        },
        "asks": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            }
          }
        }
      },
      "title": "GeckoOrderbook",
      "required": [
        "ticker_id",
        "timestamp",
        "bids",
        "asks"
      ]
    },
    "GeckoTicker": {
      "type": "object",
      "properties": {
        "ticker_id": {
          "type": "string"
        },
        "base_currency": {
          "type": "string"
        },
        "target_currency": {
          "type": "string"
        },
        "last_price": {
          "type": "number",
          "format": "double"
        },
        "base_volume": {
          "type": "number",
          "format": "double"
        },
        "target_volume": {
          "type": "number",
          "format": "double"
        },
        "pool_id": {
          "type": "string"
        },
        "bid": {
          "type": "number",
          "format": "double"
        },
        "ask": {
          "type": "number",
          "format": "double"
        },
        "high": {
          "type": "number",
          "format": "double"
        },
        "low": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "GeckoTicker",
      "required": [
        "ticker_id",
        "base_currency",
        "target_currency",
        "last_price",
        "base_volume",
        "target_volume",
        "pool_id",
        "bid",
        "ask",
        "high",
        "low"
      ]
    },
    "GeckoTickers": {
      "type": "object",
      "properties": {
        "tickers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GeckoTicker"
          }
        }
      },
      "title": "GeckoTickers",
      "required": [
        "tickers"
      ]
    },
    "IsWhitelisted": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "whitelisted": {
          "type": "boolean",
          "format": "boolean"
        },
        "deposit_amount_left": {
          "type": "string"
        }
      },
      "title": "IsWhitelisted",
      "required": [
        "code",
        "whitelisted",
        "deposit_amount_left"
      ]
    },
    "L1Metadata": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "can_invite": {
          "type": "boolean",
          "format": "boolean"
        },
        "referral_points_percentage": {
          "type": "string"
        }
      },
      "title": "L1Metadata",
      "required": [
        "l1_address",
        "can_invite",
        "referral_points_percentage"
      ]
    },
    "L1ProviderInfo": {
      "type": "object",
      "properties": {
        "chainId": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "networkId": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "latestBlockNumber": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        }
      },
      "title": "L1ProviderInfo",
      "required": [
        "chainId",
        "networkId",
        "latestBlockNumber"
      ]
    },
    "Layer1BasicInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "l1_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/L1ProviderInfo"
          }
        },
        "l1_providers_health": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "validator_info": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ValidatorInfo"
          }
        },
        "contract_addresses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ContractAddress"
          }
        },
        "latest_l1_generic_block": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "latest_l1_governance_block": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "latest_l1_desert_block": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        }
      },
      "title": "Layer1BasicInfo",
      "required": [
        "code",
        "l1_providers",
        "l1_providers_health",
        "validator_info",
        "contract_addresses",
        "latest_l1_generic_block",
        "latest_l1_governance_block",
        "latest_l1_desert_block"
      ]
    },
    "Leaderboard": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaderboardEntry"
          }
        }
      },
      "title": "Leaderboard",
      "required": [
        "entries"
      ]
    },
    "LeaderboardEntry": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "points": {
          "type": "number",
          "format": "float",
          "example": "1000.01"
        },
        "entry": {
          "type": "integer",
          "format": "int32"
        },
        "entryId": {
          "type": "integer",
          "format": "int32"
        },
        "metadata": {
          "type": "string",
          "example": "{}"
        }
      },
      "title": "LeaderboardEntry",
      "required": [
        "l1_address",
        "points",
        "entry",
        "entryId",
        "metadata"
      ]
    },
    "LeaseEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "master_account_index": {
          "type": "integer",
          "format": "int64"
        },
        "lease_amount": {
          "type": "integer",
          "format": "int64"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int64"
        },
        "end": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string",
          "enum": [
            "waiting_fee",
            "leased",
            "expired",
            "canceled"
          ]
        },
        "error": {
          "type": "string"
        }
      },
      "title": "LeaseEntry",
      "required": [
        "id",
        "master_account_index",
        "lease_amount",
        "fee_amount",
        "start",
        "end",
        "status",
        "error"
      ]
    },
    "LeaseOptionEntry": {
      "type": "object",
      "properties": {
        "duration_days": {
          "type": "integer",
          "format": "int32"
        },
        "annual_rate": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "LeaseOptionEntry",
      "required": [
        "duration_days",
        "annual_rate"
      ]
    },
    "LiqTrade": {
      "type": "object",
      "properties": {
        "price": {
          "type": "string"
        },
        "size": {
          "type": "string"
        },
        "taker_fee": {
          "type": "string"
        },
        "maker_fee": {
          "type": "string"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "LiqTrade",
      "required": [
        "price",
        "size",
        "taker_fee",
        "maker_fee",
        "transaction_time"
      ]
    },
    "Liquidation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "type": {
          "type": "string",
          "enum": [
            "partial",
            "deleverage"
          ]
        },
        "trade": {
          "$ref": "#/definitions/LiqTrade"
        },
        "info": {
          "$ref": "#/definitions/LiquidationInfo"
        },
        "executed_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Liquidation",
      "required": [
        "id",
        "market_id",
        "type",
        "trade",
        "info",
        "executed_at"
      ]
    },
    "LiquidationInfo": {
      "type": "object",
      "properties": {
        "positions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AccountPosition"
          }
        },
        "risk_info_before": {
          "$ref": "#/definitions/RiskInfo"
        },
        "risk_info_after": {
          "$ref": "#/definitions/RiskInfo"
        },
        "mark_prices": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "title": "LiquidationInfo",
      "required": [
        "positions",
        "risk_info_before",
        "risk_info_after",
        "mark_prices"
      ]
    },
    "LiquidationInfos": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "liquidations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Liquidation"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "LiquidationInfos",
      "required": [
        "code",
        "liquidations"
      ]
    },
    "MarketConfig": {
      "type": "object",
      "properties": {
        "market_margin_mode": {
          "type": "integer",
          "format": "int32"
        },
        "insurance_fund_account_index": {
          "type": "integer",
          "format": "int64"
        },
        "liquidation_mode": {
          "type": "integer",
          "format": "int32"
        },
        "force_reduce_only": {
          "type": "boolean",
          "format": "boolean"
        },
        "trading_hours": {
          "type": "string"
        },
        "funding_fee_discounts_enabled": {
          "type": "boolean",
          "format": "boolean"
        },
        "hidden": {
          "type": "boolean",
          "format": "boolean"
        },
        "rfq_enabled": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "MarketConfig",
      "required": [
        "market_margin_mode",
        "insurance_fund_account_index",
        "liquidation_mode",
        "force_reduce_only",
        "trading_hours",
        "rfq_enabled"
      ]
    },
    "MarketMetricData": {
      "type": "object",
      "properties": {
        "market": {
          "type": "string"
        },
        "data": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "MarketMetricData",
      "required": [
        "market",
        "data"
      ]
    },
    "NextNonce": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "722"
        }
      },
      "title": "NextNonce",
      "required": [
        "code",
        "nonce"
      ]
    },
    "Order": {
      "type": "object",
      "properties": {
        "order_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "client_order_index": {
          "type": "integer",
          "format": "int64",
          "example": "234"
        },
        "order_id": {
          "type": "string",
          "example": "1"
        },
        "client_order_id": {
          "type": "string",
          "example": "234"
        },
        "market_index": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "owner_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "initial_base_amount": {
          "type": "string",
          "example": "0.1"
        },
        "price": {
          "type": "string",
          "example": "3024.66"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "722"
        },
        "remaining_base_amount": {
          "type": "string",
          "example": "0.1"
        },
        "is_ask": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "base_size": {
          "type": "integer",
          "format": "int64",
          "example": "12354"
        },
        "base_price": {
          "type": "integer",
          "format": "int32",
          "example": "3024"
        },
        "filled_base_amount": {
          "type": "string",
          "example": "0.1"
        },
        "filled_quote_amount": {
          "type": "string",
          "example": "0.1"
        },
        "side": {
          "type": "string",
          "example": "buy",
          "default": "buy",
          "description": " TODO: remove this"
        },
        "type": {
          "type": "string",
          "example": "limit",
          "enum": [
            "limit",
            "market",
            "stop-loss",
            "stop-loss-limit",
            "take-profit",
            "take-profit-limit",
            "twap",
            "twap-sub",
            "liquidation"
          ]
        },
        "time_in_force": {
          "type": "string",
          "enum": [
            "good-till-time",
            "immediate-or-cancel",
            "post-only",
            "Unknown"
          ],
          "default": "good-till-time"
        },
        "reduce_only": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "trigger_price": {
          "type": "string",
          "example": "3024.66"
        },
        "order_expiry": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "status": {
          "type": "string",
          "example": "open",
          "enum": [
            "in-progress",
            "pending",
            "open",
            "filled",
            "canceled",
            "canceled-post-only",
            "canceled-reduce-only",
            "canceled-position-not-allowed",
            "canceled-margin-not-allowed",
            "canceled-too-much-slippage",
            "canceled-not-enough-liquidity",
            "canceled-self-trade",
            "canceled-expired",
            "canceled-oco",
            "canceled-child",
            "canceled-liquidation",
            "canceled-invalid-balance"
          ]
        },
        "trigger_status": {
          "type": "string",
          "example": "twap",
          "enum": [
            "na",
            "ready",
            "mark-price",
            "twap",
            "parent-order"
          ]
        },
        "trigger_time": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "parent_order_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "parent_order_id": {
          "type": "string",
          "example": "1"
        },
        "to_trigger_order_id_0": {
          "type": "string",
          "example": "1"
        },
        "to_trigger_order_id_1": {
          "type": "string",
          "example": "1"
        },
        "to_cancel_order_id_0": {
          "type": "string",
          "example": "1"
        },
        "integrator_fee_collector_index": {
          "type": "string",
          "example": "1"
        },
        "integrator_taker_fee": {
          "type": "string",
          "example": "1"
        },
        "integrator_maker_fee": {
          "type": "string",
          "example": "1"
        },
        "block_height": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "created_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        }
      },
      "title": "Order",
      "required": [
        "order_index",
        "client_order_index",
        "order_id",
        "client_order_id",
        "market_index",
        "owner_account_index",
        "initial_base_amount",
        "price",
        "nonce",
        "remaining_base_amount",
        "is_ask",
        "base_size",
        "base_price",
        "filled_base_amount",
        "filled_quote_amount",
        "side",
        "type",
        "time_in_force",
        "reduce_only",
        "trigger_price",
        "order_expiry",
        "status",
        "trigger_status",
        "trigger_time",
        "parent_order_index",
        "parent_order_id",
        "to_trigger_order_id_0",
        "to_trigger_order_id_1",
        "to_cancel_order_id_0",
        "integrator_fee_collector_index",
        "integrator_taker_fee",
        "integrator_maker_fee",
        "block_height",
        "timestamp",
        "created_at",
        "updated_at",
        "transaction_time"
      ]
    },
    "OrderBook": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "market_type": {
          "type": "string",
          "example": "perp",
          "enum": [
            "perp",
            "spot"
          ]
        },
        "base_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "quote_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "2"
        },
        "status": {
          "type": "string",
          "example": "active",
          "enum": [
            "inactive",
            "active"
          ]
        },
        "taker_fee": {
          "type": "string",
          "example": "0.0001"
        },
        "is_taker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "maker_fee": {
          "type": "string",
          "example": "0.0000"
        },
        "is_maker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "liquidation_fee": {
          "type": "string",
          "example": "0.01"
        },
        "min_base_amount": {
          "type": "string",
          "example": "0.01"
        },
        "min_quote_amount": {
          "type": "string",
          "example": "0.1"
        },
        "order_quote_limit": {
          "type": "string",
          "example": "235.25"
        },
        "supported_size_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_quote_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        }
      },
      "title": "OrderBook",
      "required": [
        "symbol",
        "market_id",
        "market_type",
        "base_asset_id",
        "quote_asset_id",
        "status",
        "taker_fee",
        "is_taker_fee_enabled",
        "maker_fee",
        "is_maker_fee_enabled",
        "liquidation_fee",
        "min_base_amount",
        "min_quote_amount",
        "order_quote_limit",
        "supported_size_decimals",
        "supported_price_decimals",
        "supported_quote_decimals"
      ]
    },
    "OrderBookDepth": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "asks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PriceLevel"
          }
        },
        "bids": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PriceLevel"
          }
        },
        "offset": {
          "type": "integer",
          "format": "int64",
          "example": "0"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "0"
        },
        "last_updated_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        }
      },
      "title": "OrderBookDepth",
      "required": [
        "code",
        "asks",
        "bids",
        "offset",
        "nonce",
        "last_updated_at"
      ]
    },
    "OrderBookDepthWithBeginNonce": {
      "type": "object",
      "properties": {
        "asks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PriceLevel"
          }
        },
        "bids": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PriceLevel"
          }
        },
        "offset": {
          "type": "integer",
          "format": "int64",
          "example": "0"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "0"
        },
        "last_updated_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "begin_nonce": {
          "type": "integer",
          "format": "int64",
          "example": "0"
        }
      },
      "title": "OrderBookDepthWithBeginNonce",
      "required": [
        "asks",
        "bids",
        "offset",
        "nonce",
        "last_updated_at",
        "begin_nonce"
      ]
    },
    "OrderBookDetails": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "order_book_details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PerpsOrderBookDetail"
          }
        },
        "spot_order_book_details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SpotOrderBookDetail"
          }
        }
      },
      "title": "OrderBookDetails",
      "required": [
        "code",
        "order_book_details",
        "spot_order_book_details"
      ]
    },
    "OrderBookOrders": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "total_asks": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "asks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SimpleOrder"
          }
        },
        "total_bids": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "bids": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SimpleOrder"
          }
        }
      },
      "title": "OrderBookOrders",
      "required": [
        "code",
        "total_asks",
        "asks",
        "total_bids",
        "bids"
      ]
    },
    "OrderBookStats": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "last_trade_price": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_price_change": {
          "type": "number",
          "format": "double",
          "example": "3.66"
        }
      },
      "title": "OrderBookStats",
      "required": [
        "symbol",
        "last_trade_price",
        "daily_trades_count",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "daily_price_change"
      ]
    },
    "OrderBooks": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "order_books": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderBook"
          }
        }
      },
      "title": "OrderBooks",
      "required": [
        "code",
        "order_books"
      ]
    },
    "Orders": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "next_cursor": {
          "type": "string"
        },
        "orders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Order"
          }
        }
      },
      "title": "Orders",
      "required": [
        "code",
        "orders"
      ]
    },
    "PartnerStats": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "total_fees_earned": {
          "type": "string"
        },
        "total_taker_fees_earned": {
          "type": "string"
        },
        "total_maker_fees_earned": {
          "type": "string"
        },
        "total_volume": {
          "type": "string"
        },
        "total_taker_volume": {
          "type": "string"
        },
        "total_maker_volume": {
          "type": "string"
        },
        "total_trades": {
          "type": "integer",
          "format": "int64"
        },
        "total_taker_trades": {
          "type": "integer",
          "format": "int64"
        },
        "total_maker_trades": {
          "type": "integer",
          "format": "int64"
        },
        "unique_clients": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "PartnerStats",
      "required": [
        "code",
        "total_fees_earned",
        "total_taker_fees_earned",
        "total_maker_fees_earned",
        "total_volume",
        "total_taker_volume",
        "total_maker_volume",
        "total_trades",
        "total_taker_trades",
        "total_maker_trades",
        "unique_clients"
      ]
    },
    "PendingUnlock": {
      "type": "object",
      "properties": {
        "unlock_timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "asset_index": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "amount": {
          "type": "string",
          "example": "1"
        }
      },
      "title": "PendingUnlock",
      "required": [
        "unlock_timestamp",
        "asset_index",
        "amount"
      ]
    },
    "PerpsMarketStats": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "index_price": {
          "type": "string",
          "example": "3024.66"
        },
        "mark_price": {
          "type": "string",
          "example": "3024.66"
        },
        "mid_price": {
          "type": "string",
          "example": "3024.66"
        },
        "open_interest": {
          "type": "string",
          "example": "235.25"
        },
        "open_interest_limit": {
          "type": "string",
          "example": "235.25"
        },
        "funding_clamp_small": {
          "type": "string",
          "example": "0.005"
        },
        "funding_clamp_big": {
          "type": "string",
          "example": "0.4"
        },
        "last_trade_price": {
          "type": "string",
          "example": "3024.66"
        },
        "current_funding_rate": {
          "type": "string",
          "example": "0.0001"
        },
        "funding_rate": {
          "type": "string",
          "example": "0.0001"
        },
        "funding_timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_price_low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "daily_price_high": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_price_change": {
          "type": "number",
          "format": "double",
          "example": "3.66"
        }
      },
      "title": "PerpsMarketStats",
      "required": [
        "symbol",
        "market_id",
        "index_price",
        "mark_price",
        "mid_price",
        "open_interest",
        "open_interest_limit",
        "funding_clamp_small",
        "funding_clamp_big",
        "last_trade_price",
        "current_funding_rate",
        "funding_rate",
        "funding_timestamp",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "daily_price_low",
        "daily_price_high",
        "daily_price_change"
      ]
    },
    "PerpsOrderBookDetail": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "market_type": {
          "type": "string",
          "example": "perp",
          "enum": [
            "perp",
            "spot"
          ]
        },
        "base_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "quote_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "2"
        },
        "status": {
          "type": "string",
          "example": "active",
          "enum": [
            "inactive",
            "active"
          ]
        },
        "taker_fee": {
          "type": "string",
          "example": "0.0001"
        },
        "is_taker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "maker_fee": {
          "type": "string",
          "example": "0.0000"
        },
        "is_maker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "liquidation_fee": {
          "type": "string",
          "example": "0.01"
        },
        "min_base_amount": {
          "type": "string",
          "example": "0.01"
        },
        "min_quote_amount": {
          "type": "string",
          "example": "0.1"
        },
        "order_quote_limit": {
          "type": "string",
          "example": "235.25"
        },
        "supported_size_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_quote_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "size_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "quote_multiplier": {
          "type": "integer",
          "format": "int64",
          "example": "10000"
        },
        "default_initial_margin_fraction": {
          "type": "integer",
          "format": "uin16",
          "example": "100"
        },
        "min_initial_margin_fraction": {
          "type": "integer",
          "format": "uin16",
          "example": "100"
        },
        "maintenance_margin_fraction": {
          "type": "integer",
          "format": "uin16",
          "example": "50"
        },
        "closeout_margin_fraction": {
          "type": "integer",
          "format": "uin16",
          "example": "100"
        },
        "last_trade_price": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_price_low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "daily_price_high": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_price_change": {
          "type": "number",
          "format": "double",
          "example": "3.66"
        },
        "open_interest": {
          "type": "number",
          "format": "double",
          "example": "93.0"
        },
        "daily_chart": {
          "type": "object",
          "example": "{1640995200:3024.66}",
          "additionalProperties": {
            "type": "number",
            "format": "double"
          }
        },
        "market_config": {
          "$ref": "#/definitions/MarketConfig"
        },
        "strategy_index": {
          "type": "integer",
          "format": "uint8"
        }
      },
      "title": "PerpsOrderBookDetail",
      "required": [
        "symbol",
        "market_id",
        "market_type",
        "base_asset_id",
        "quote_asset_id",
        "status",
        "taker_fee",
        "is_taker_fee_enabled",
        "maker_fee",
        "is_maker_fee_enabled",
        "liquidation_fee",
        "min_base_amount",
        "min_quote_amount",
        "order_quote_limit",
        "supported_size_decimals",
        "supported_price_decimals",
        "supported_quote_decimals",
        "size_decimals",
        "price_decimals",
        "quote_multiplier",
        "default_initial_margin_fraction",
        "min_initial_margin_fraction",
        "maintenance_margin_fraction",
        "closeout_margin_fraction",
        "last_trade_price",
        "daily_trades_count",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "daily_price_low",
        "daily_price_high",
        "daily_price_change",
        "open_interest",
        "daily_chart",
        "market_config",
        "strategy_index"
      ]
    },
    "PnLEntry": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "trade_pnl": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "trade_spot_pnl": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "inflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "outflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "spot_outflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "spot_inflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "pool_pnl": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "pool_inflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "pool_outflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "staking_pnl": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "staking_inflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "staking_outflow": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "pool_total_shares": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "staked_lit": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        },
        "volume": {
          "type": "number",
          "format": "double",
          "example": "12.0"
        }
      },
      "title": "PnLEntry",
      "required": [
        "timestamp",
        "trade_pnl",
        "trade_spot_pnl",
        "inflow",
        "outflow",
        "spot_outflow",
        "spot_inflow",
        "pool_pnl",
        "pool_inflow",
        "pool_outflow",
        "staking_pnl",
        "staking_inflow",
        "staking_outflow",
        "pool_total_shares",
        "staked_lit",
        "volume"
      ]
    },
    "PositionFunding": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "funding_id": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "change": {
          "type": "string",
          "example": "1"
        },
        "rate": {
          "type": "string",
          "example": "1"
        },
        "position_size": {
          "type": "string",
          "example": "1"
        },
        "position_side": {
          "type": "string",
          "example": "long",
          "enum": [
            "long",
            "short"
          ]
        },
        "discount": {
          "type": "string",
          "example": "1"
        }
      },
      "title": "PositionFunding",
      "required": [
        "timestamp",
        "market_id",
        "funding_id",
        "change",
        "rate",
        "position_size",
        "position_side",
        "discount"
      ]
    },
    "PositionFundings": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "position_fundings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PositionFunding"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "PositionFundings",
      "required": [
        "code",
        "position_fundings"
      ]
    },
    "PriceLevel": {
      "type": "object",
      "properties": {
        "price": {
          "type": "string",
          "example": "3024.66"
        },
        "size": {
          "type": "string",
          "example": "0.1"
        }
      },
      "title": "PriceLevel",
      "required": [
        "price",
        "size"
      ]
    },
    "PublicPoolInfo": {
      "type": "object",
      "properties": {
        "status": {
          "type": "integer",
          "format": "uint8",
          "example": "0"
        },
        "operator_fee": {
          "type": "string",
          "example": "100"
        },
        "min_operator_share_rate": {
          "type": "string",
          "example": "200"
        },
        "total_shares": {
          "type": "integer",
          "format": "int64",
          "example": "100000"
        },
        "operator_shares": {
          "type": "integer",
          "format": "int64",
          "example": "20000"
        },
        "annual_percentage_yield": {
          "type": "number",
          "format": "double",
          "example": "20.5000"
        },
        "sharpe_ratio": {
          "type": "number",
          "format": "double",
          "example": "1.5"
        },
        "daily_returns": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DailyReturn"
          }
        },
        "share_prices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SharePrice"
          }
        },
        "strategies": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Strategy"
          }
        }
      },
      "title": "PublicPoolInfo",
      "required": [
        "status",
        "operator_fee",
        "min_operator_share_rate",
        "total_shares",
        "operator_shares",
        "annual_percentage_yield",
        "sharpe_ratio",
        "daily_returns",
        "share_prices",
        "strategies"
      ]
    },
    "PublicPoolMetadata": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "master_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "61"
        },
        "account_type": {
          "type": "integer",
          "format": "uint8",
          "example": "1"
        },
        "name": {
          "type": "string"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "annual_percentage_yield": {
          "type": "number",
          "format": "double",
          "example": "20.5000"
        },
        "sharpe_ratio": {
          "type": "number",
          "format": "double",
          "example": "1.5"
        },
        "status": {
          "type": "integer",
          "format": "uint8",
          "example": "0"
        },
        "operator_fee": {
          "type": "string",
          "example": "100"
        },
        "total_asset_value": {
          "type": "string",
          "example": "19995"
        },
        "total_spot_value": {
          "type": "string",
          "example": "19995"
        },
        "total_perps_value": {
          "type": "string",
          "example": "19995"
        },
        "total_shares": {
          "type": "integer",
          "format": "int64",
          "example": "100000"
        },
        "account_share": {
          "$ref": "#/definitions/PublicPoolShare"
        },
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AccountAsset"
          }
        }
      },
      "title": "PublicPoolMetadata",
      "required": [
        "code",
        "account_index",
        "created_at",
        "master_account_index",
        "account_type",
        "name",
        "l1_address",
        "annual_percentage_yield",
        "sharpe_ratio",
        "status",
        "operator_fee",
        "total_asset_value",
        "total_spot_value",
        "total_perps_value",
        "total_shares",
        "assets"
      ]
    },
    "PublicPoolShare": {
      "type": "object",
      "properties": {
        "public_pool_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "shares_amount": {
          "type": "integer",
          "format": "int64",
          "example": "3000"
        },
        "entry_usdc": {
          "type": "string",
          "example": "3000",
          "description": " For public pools and insurance fund"
        },
        "principal_amount": {
          "type": "string",
          "example": "3000"
        },
        "entry_timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "3600000"
        }
      },
      "title": "PublicPoolShare",
      "required": [
        "public_pool_index",
        "shares_amount",
        "entry_usdc",
        "principal_amount",
        "entry_timestamp"
      ]
    },
    "PushNotifDeliveryResult": {
      "type": "object",
      "properties": {
        "expo_token": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "error": {
          "type": "string"
        }
      },
      "title": "PushNotifDeliveryResult",
      "required": [
        "expo_token",
        "status",
        "error"
      ]
    },
    "RFQEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "direction": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/RFQMetadata"
        },
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQResponseEntry"
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RFQEntry",
      "required": [
        "id",
        "account_index",
        "market_index",
        "direction",
        "base_amount",
        "quote_amount",
        "status",
        "metadata",
        "responses",
        "created_at",
        "updated_at"
      ]
    },
    "RFQMetadata": {
      "type": "object",
      "properties": {
        "requested_est_price": {
          "type": "string"
        },
        "requested_max_slippage": {
          "type": "string"
        },
        "requested_slippage": {
          "type": "string"
        },
        "worst_price": {
          "type": "string"
        }
      },
      "title": "RFQMetadata",
      "required": [
        "requested_est_price",
        "requested_max_slippage",
        "requested_slippage",
        "worst_price"
      ]
    },
    "RFQResponseEntry": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string",
          "enum": [
            "acknowledged",
            "liquidity_provided",
            "not_interested"
          ]
        },
        "responded_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RFQResponseEntry",
      "required": [
        "account_index",
        "status",
        "responded_at",
        "updated_at"
      ]
    },
    "Referral": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "referral_code": {
          "type": "string"
        },
        "used_at": {
          "type": "integer",
          "format": "int64"
        },
        "tier": {
          "type": "string"
        },
        "trade_stats": {
          "$ref": "#/definitions/TradeStats"
        }
      },
      "title": "Referral",
      "required": [
        "l1_address",
        "referral_code",
        "used_at",
        "tier",
        "trade_stats"
      ]
    },
    "ReferralCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "referral_code": {
          "type": "string",
          "example": "5V24K3MJ"
        },
        "remaining_usage": {
          "type": "integer",
          "format": "int32",
          "example": "3"
        }
      },
      "title": "ReferralCode",
      "required": [
        "code",
        "referral_code",
        "remaining_usage"
      ]
    },
    "ReferralPointEntry": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "total_points": {
          "type": "number",
          "format": "float",
          "example": "1000.01"
        },
        "week_points": {
          "type": "number",
          "format": "float",
          "example": "1000.01"
        },
        "total_reward_points": {
          "type": "number",
          "format": "float",
          "example": "200"
        },
        "week_reward_points": {
          "type": "number",
          "format": "float",
          "example": "200"
        },
        "reward_point_multiplier": {
          "type": "string",
          "example": "0.1"
        }
      },
      "title": "ReferralPointEntry",
      "required": [
        "l1_address",
        "total_points",
        "week_points",
        "total_reward_points",
        "week_reward_points",
        "reward_point_multiplier"
      ]
    },
    "ReferralPoints": {
      "type": "object",
      "properties": {
        "referrals": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ReferralPointEntry"
          }
        },
        "user_total_points": {
          "type": "number",
          "format": "float",
          "example": "1000"
        },
        "user_last_week_points": {
          "type": "number",
          "format": "float",
          "example": "1000"
        },
        "user_total_referral_reward_points": {
          "type": "number",
          "format": "float",
          "example": "1000"
        },
        "user_last_week_referral_reward_points": {
          "type": "number",
          "format": "float",
          "example": "1000"
        },
        "reward_point_multiplier": {
          "type": "string",
          "example": "0.1"
        }
      },
      "title": "ReferralPoints",
      "required": [
        "referrals",
        "user_total_points",
        "user_last_week_points",
        "user_total_referral_reward_points",
        "user_last_week_referral_reward_points",
        "reward_point_multiplier"
      ]
    },
    "ReqAckNotif": {
      "type": "object",
      "properties": {
        "notif_id": {
          "type": "string",
          "example": "'liq:17:5898'"
        },
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqAckNotif",
      "required": [
        "notif_id",
        "account_index"
      ]
    },
    "ReqChangeAccountTier": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "new_tier": {
          "type": "string"
        }
      },
      "title": "ReqChangeAccountTier",
      "required": [
        "account_index",
        "new_tier"
      ]
    },
    "ReqCreateAirdropAllocations": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "allocations": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        }
      },
      "title": "ReqCreateAirdropAllocations",
      "required": [
        "l1_address",
        "allocations",
        "signature"
      ]
    },
    "ReqCreateIntentAddress": {
      "type": "object",
      "properties": {
        "chain_id": {
          "type": "string"
        },
        "from_addr": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "is_external_deposit": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "ReqCreateIntentAddress",
      "required": [
        "chain_id",
        "from_addr",
        "amount"
      ]
    },
    "ReqCreateRFQ": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "direction": {
          "type": "integer",
          "format": "int16",
          "enum": [
            "0",
            "1"
          ]
        },
        "metadata": {
          "type": "string"
        }
      },
      "title": "ReqCreateRFQ",
      "required": [
        "market_index",
        "direction"
      ]
    },
    "ReqCreateReferralCode": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqCreateReferralCode",
      "required": [
        "account_index"
      ]
    },
    "ReqDoFaucet": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "do_l1_transfer": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        }
      },
      "title": "ReqDoFaucet",
      "required": [
        "l1_address",
        "do_l1_transfer"
      ]
    },
    "ReqExportData": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "default": "-1"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "type": {
          "type": "string",
          "enum": [
            "funding",
            "trade"
          ]
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 1830297600000,
          "minimum": 1735689600000
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 1830297600000,
          "minimum": 1735689600000
        },
        "side": {
          "type": "string",
          "enum": [
            "all",
            "long",
            "short"
          ],
          "default": "all"
        },
        "role": {
          "type": "string",
          "enum": [
            "all",
            "maker",
            "taker"
          ],
          "default": "all"
        },
        "trade_type": {
          "type": "string",
          "enum": [
            "all",
            "trade",
            "liquidation",
            "deleverage",
            "market-settlement"
          ],
          "default": "all"
        }
      },
      "title": "ReqExportData",
      "required": [
        "type"
      ]
    },
    "ReqFastwithdraw": {
      "type": "object",
      "properties": {
        "tx_info": {
          "type": "string"
        },
        "to_address": {
          "type": "string"
        },
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        }
      },
      "title": "ReqFastwithdraw",
      "required": [
        "tx_info",
        "to_address"
      ]
    },
    "ReqGetAccount": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "index",
            "l1_address"
          ]
        },
        "value": {
          "type": "string"
        },
        "active_only": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "ReqGetAccount",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetAccountActiveOrders": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "market_type": {
          "type": "string",
          "enum": [
            "all",
            "spot",
            "perp"
          ],
          "default": "all"
        }
      },
      "title": "ReqGetAccountActiveOrders",
      "required": [
        "account_index"
      ]
    },
    "ReqGetAccountApiKeys": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8",
          "default": "255"
        }
      },
      "title": "ReqGetAccountApiKeys",
      "required": [
        "account_index"
      ]
    },
    "ReqGetAccountByL1Address": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "ReqGetAccountByL1Address",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetAccountInactiveOrders": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "market_type": {
          "type": "string",
          "enum": [
            "all",
            "spot",
            "perp"
          ],
          "default": "all"
        },
        "ask_filter": {
          "type": "integer",
          "format": "int8",
          "default": "-1"
        },
        "between_timestamps": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        }
      },
      "title": "ReqGetAccountInactiveOrders",
      "required": [
        "account_index",
        "limit"
      ]
    },
    "ReqGetAccountLimits": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        }
      },
      "title": "ReqGetAccountLimits",
      "required": [
        "account_index"
      ]
    },
    "ReqGetAccountMetadata": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "index",
            "l1_address"
          ]
        },
        "value": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "ReqGetAccountMetadata",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetAccountPnL": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "by": {
          "type": "string",
          "enum": [
            "index"
          ]
        },
        "value": {
          "type": "string"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "1m",
            "5m",
            "15m",
            "1h",
            "4h",
            "1d"
          ]
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "count_back": {
          "type": "integer",
          "format": "int64"
        },
        "ignore_transfers": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        }
      },
      "title": "ReqGetAccountPnL",
      "required": [
        "by",
        "value",
        "resolution",
        "start_timestamp",
        "end_timestamp",
        "count_back"
      ]
    },
    "ReqGetAccountTxs": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "int64"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        },
        "by": {
          "type": "string",
          "enum": [
            "account_index"
          ]
        },
        "value": {
          "type": "string"
        },
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "types": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint8"
          }
        }
      },
      "title": "ReqGetAccountTxs"
    },
    "ReqGetAirdropAllocations": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        }
      },
      "title": "ReqGetAirdropAllocations",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetApiTokens": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetApiTokens",
      "required": [
        "account_index"
      ]
    },
    "ReqGetAssetDetails": {
      "type": "object",
      "properties": {
        "asset_id": {
          "type": "integer",
          "format": "int16"
        }
      },
      "title": "ReqGetAssetDetails"
    },
    "ReqGetBlock": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "commitment",
            "height"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "title": "ReqGetBlock",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetBlockTxs": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "block_height",
            "block_commitment"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "title": "ReqGetBlockTxs",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetBridgesByL1Addr": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        }
      },
      "title": "ReqGetBridgesByL1Addr",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetByAccount": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "account_index"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "title": "ReqGetByAccount",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetCandles": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "4h",
            "12h",
            "1d",
            "1w"
          ]
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "count_back": {
          "type": "integer",
          "format": "int64"
        },
        "set_timestamp_to_end": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        }
      },
      "title": "ReqGetCandles",
      "required": [
        "market_id",
        "resolution",
        "start_timestamp",
        "end_timestamp",
        "count_back"
      ]
    },
    "ReqGetCandlesticks": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "4h",
            "12h",
            "1d",
            "1w"
          ]
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "count_back": {
          "type": "integer",
          "format": "int64"
        },
        "set_timestamp_to_end": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        }
      },
      "title": "ReqGetCandlesticks",
      "required": [
        "market_id",
        "resolution",
        "start_timestamp",
        "end_timestamp",
        "count_back"
      ]
    },
    "ReqGetDepositHistory": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "l1_address": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        },
        "filter": {
          "type": "string",
          "enum": [
            "all",
            "pending",
            "claimable"
          ]
        }
      },
      "title": "ReqGetDepositHistory",
      "required": [
        "account_index",
        "l1_address"
      ]
    },
    "ReqGetExchangeMetrics": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "enum": [
            "h",
            "d",
            "w",
            "m",
            "q",
            "y",
            "all"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "volume",
            "maker_fee",
            "taker_fee",
            "liquidation_fee",
            "trade_count",
            "liquidation_count",
            "liquidation_volume",
            "inflow",
            "outflow",
            "transfer_fee",
            "withdraw_fee",
            "open_interest",
            "account_count",
            "active_account_count",
            "tps",
            "buyback"
          ]
        },
        "filter": {
          "type": "string",
          "enum": [
            "byMarket"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "title": "ReqGetExchangeMetrics",
      "required": [
        "period",
        "kind"
      ]
    },
    "ReqGetExchangeStats": {
      "type": "object",
      "title": "ReqGetExchangeStats"
    },
    "ReqGetExecuteStats": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "enum": [
            "d",
            "w",
            "m",
            "q",
            "y",
            "all"
          ]
        }
      },
      "title": "ReqGetExecuteStats",
      "required": [
        "period"
      ]
    },
    "ReqGetFastWithdrawInfo": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetFastWithdrawInfo",
      "required": [
        "account_index"
      ]
    },
    "ReqGetFundings": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "1h",
            "1d"
          ]
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64",
          "maximum": 5000000000000
        },
        "count_back": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetFundings",
      "required": [
        "market_id",
        "resolution",
        "start_timestamp",
        "end_timestamp",
        "count_back"
      ]
    },
    "ReqGetGeckoContracts": {
      "type": "object",
      "title": "ReqGetGeckoContracts"
    },
    "ReqGetGeckoOrderbook": {
      "type": "object",
      "properties": {
        "ticker_id": {
          "type": "string"
        }
      },
      "title": "ReqGetGeckoOrderbook",
      "required": [
        "ticker_id"
      ]
    },
    "ReqGetGeckoTickers": {
      "type": "object",
      "title": "ReqGetGeckoTickers"
    },
    "ReqGetL1Metadata": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "l1_address": {
          "type": "string"
        }
      },
      "title": "ReqGetL1Metadata",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetL1Tx": {
      "type": "object",
      "properties": {
        "hash": {
          "type": "string"
        }
      },
      "title": "ReqGetL1Tx",
      "required": [
        "hash"
      ]
    },
    "ReqGetLatestDeposit": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        }
      },
      "title": "ReqGetLatestDeposit",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetLeaderboard": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "weekly",
            "all",
            "competition"
          ]
        },
        "l1_address": {
          "type": "string"
        },
        "competition_id": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        }
      },
      "title": "ReqGetLeaderboard",
      "required": [
        "type"
      ]
    },
    "ReqGetLeases": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "default": "20"
        }
      },
      "title": "ReqGetLeases",
      "required": [
        "account_index"
      ]
    },
    "ReqGetLiquidationInfos": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        }
      },
      "title": "ReqGetLiquidationInfos",
      "required": [
        "account_index",
        "limit"
      ]
    },
    "ReqGetMakerOnlyApiKeys": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetMakerOnlyApiKeys",
      "required": [
        "account_index"
      ]
    },
    "ReqGetMarketMetrics": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "kind": {
          "type": "string",
          "enum": [
            "volume"
          ]
        }
      },
      "title": "ReqGetMarketMetrics",
      "required": [
        "timestamp",
        "kind"
      ]
    },
    "ReqGetNextNonce": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8"
        }
      },
      "title": "ReqGetNextNonce",
      "required": [
        "account_index",
        "api_key_index"
      ]
    },
    "ReqGetOrderBookDetails": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "filter": {
          "type": "string",
          "enum": [
            "all",
            "spot",
            "perp"
          ],
          "default": "all"
        }
      },
      "title": "ReqGetOrderBookDetails"
    },
    "ReqGetOrderBookOrders": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 250,
          "minimum": 1
        }
      },
      "title": "ReqGetOrderBookOrders",
      "required": [
        "market_id",
        "limit"
      ]
    },
    "ReqGetOrderBooks": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "filter": {
          "type": "string",
          "enum": [
            "all",
            "spot",
            "perp"
          ],
          "default": "all"
        }
      },
      "title": "ReqGetOrderBooks"
    },
    "ReqGetPartnerStats": {
      "type": "object",
      "properties": {
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "start_timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "end_timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetPartnerStats",
      "required": [
        "account_index"
      ]
    },
    "ReqGetPositionFunding": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        },
        "side": {
          "type": "string",
          "enum": [
            "long",
            "short",
            "all"
          ],
          "default": "all"
        }
      },
      "title": "ReqGetPositionFunding",
      "required": [
        "account_index",
        "limit"
      ]
    },
    "ReqGetPublicPoolsMetadata": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "filter": {
          "type": "string",
          "enum": [
            "all",
            "user",
            "protocol",
            "account_index",
            "stake"
          ]
        },
        "index": {
          "type": "integer",
          "format": "int64"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetPublicPoolsMetadata",
      "required": [
        "index",
        "limit"
      ]
    },
    "ReqGetPushNotifSettings": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expo_token": {
          "type": "string"
        }
      },
      "title": "ReqGetPushNotifSettings",
      "required": [
        "account_index",
        "expo_token"
      ]
    },
    "ReqGetRFQ": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "rfq_id": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetRFQ",
      "required": [
        "rfq_id"
      ]
    },
    "ReqGetRangeWithCursor": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        }
      },
      "title": "ReqGetRangeWithCursor",
      "required": [
        "limit"
      ]
    },
    "ReqGetRangeWithIndex": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "int64"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        }
      },
      "title": "ReqGetRangeWithIndex",
      "required": [
        "limit"
      ]
    },
    "ReqGetRangeWithIndexSortable": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "int64"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        },
        "sort": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "asc"
        }
      },
      "title": "ReqGetRangeWithIndexSortable"
    },
    "ReqGetRecentTrades": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        }
      },
      "title": "ReqGetRecentTrades",
      "required": [
        "market_id",
        "limit"
      ]
    },
    "ReqGetReferralCode": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetReferralCode",
      "required": [
        "account_index"
      ]
    },
    "ReqGetReferralPoints": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetReferralPoints",
      "required": [
        "account_index"
      ]
    },
    "ReqGetTrades": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "default": "255"
        },
        "market_type": {
          "type": "string",
          "enum": [
            "all",
            "spot",
            "perp"
          ],
          "default": "all"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "default": "-1"
        },
        "order_index": {
          "type": "integer",
          "format": "int64"
        },
        "sort_by": {
          "type": "string",
          "enum": [
            "block_height",
            "timestamp",
            "trade_id"
          ]
        },
        "sort_dir": {
          "type": "string",
          "enum": [
            "desc"
          ],
          "default": "desc"
        },
        "cursor": {
          "type": "string"
        },
        "from": {
          "type": "integer",
          "format": "int64",
          "default": "-1"
        },
        "ask_filter": {
          "type": "integer",
          "format": "int8",
          "default": "-1"
        },
        "role": {
          "type": "string",
          "enum": [
            "all",
            "maker",
            "taker"
          ],
          "default": "all"
        },
        "type": {
          "type": "string",
          "enum": [
            "all",
            "trade",
            "liquidation",
            "deleverage",
            "market-settlement"
          ],
          "default": "all"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "maximum": 100,
          "minimum": 1
        },
        "aggregate": {
          "type": "boolean",
          "format": "boolean",
          "default": "false"
        }
      },
      "title": "ReqGetTrades",
      "required": [
        "sort_by",
        "limit"
      ]
    },
    "ReqGetTransferFeeInfo": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "to_account_index": {
          "type": "integer",
          "format": "int64",
          "default": "-1"
        }
      },
      "title": "ReqGetTransferFeeInfo",
      "required": [
        "account_index"
      ]
    },
    "ReqGetTransferHistory": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "cursor": {
          "type": "string"
        },
        "type": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "all",
              "L2Transfer",
              "L2MintShares",
              "L2BurnShares",
              "L2StakeAssets",
              "L2UnstakeAssets"
            ]
          }
        }
      },
      "title": "ReqGetTransferHistory",
      "required": [
        "account_index"
      ]
    },
    "ReqGetTx": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "enum": [
            "hash",
            "sequence_index"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "title": "ReqGetTx",
      "required": [
        "by",
        "value"
      ]
    },
    "ReqGetUserReferrals": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "l1_address": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        },
        "stats_start_timestamp": {
          "type": "integer",
          "format": "int64"
        },
        "stats_end_timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqGetUserReferrals",
      "required": [
        "l1_address"
      ]
    },
    "ReqGetWithdrawHistory": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "cursor": {
          "type": "string"
        },
        "filter": {
          "type": "string",
          "enum": [
            "all",
            "pending",
            "claimable"
          ]
        }
      },
      "title": "ReqGetWithdrawHistory",
      "required": [
        "account_index"
      ]
    },
    "ReqIsWhitelisted": {
      "type": "object",
      "properties": {
        "l1_address": {
          "type": "string"
        }
      },
      "title": "ReqIsWhitelisted",
      "required": [
        "l1_address"
      ]
    },
    "ReqLITLease": {
      "type": "object",
      "properties": {
        "tx_info": {
          "type": "string"
        },
        "lease_amount": {
          "type": "string"
        },
        "duration_days": {
          "type": "integer",
          "format": "int32"
        }
      },
      "title": "ReqLITLease",
      "required": [
        "tx_info",
        "lease_amount",
        "duration_days"
      ]
    },
    "ReqListRFQs": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "default": "281474976710655"
        },
        "status": {
          "type": "string",
          "enum": [
            "opened",
            "order_created",
            "closed"
          ]
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "format": "int64",
          "default": "20"
        }
      },
      "title": "ReqListRFQs"
    },
    "ReqPostApiToken": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expiry": {
          "type": "integer",
          "format": "int64"
        },
        "sub_account_access": {
          "type": "boolean",
          "format": "boolean"
        },
        "scopes": {
          "type": "string",
          "example": "read.*",
          "default": "read.*"
        }
      },
      "title": "ReqPostApiToken",
      "required": [
        "name",
        "account_index",
        "expiry",
        "sub_account_access"
      ]
    },
    "ReqRegisterPushNotifToken": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expo_token": {
          "type": "string"
        },
        "platform": {
          "type": "string",
          "enum": [
            "ios",
            "android"
          ]
        },
        "app_version": {
          "type": "string"
        }
      },
      "title": "ReqRegisterPushNotifToken",
      "required": [
        "account_index",
        "expo_token",
        "platform"
      ]
    },
    "ReqRespondToRFQ": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "rfq_id": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string",
          "enum": [
            "acknowledged",
            "liquidity_provided",
            "not_interested"
          ]
        }
      },
      "title": "ReqRespondToRFQ",
      "required": [
        "rfq_id",
        "status"
      ]
    },
    "ReqRevokeApiToken": {
      "type": "object",
      "properties": {
        "token_id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ReqRevokeApiToken",
      "required": [
        "token_id",
        "account_index"
      ]
    },
    "ReqSendTx": {
      "type": "object",
      "properties": {
        "tx_type": {
          "type": "integer",
          "format": "uint8"
        },
        "tx_info": {
          "type": "string"
        },
        "price_protection": {
          "type": "boolean",
          "format": "boolean",
          "default": "true"
        }
      },
      "title": "ReqSendTx",
      "required": [
        "tx_type",
        "tx_info"
      ]
    },
    "ReqSendTxBatch": {
      "type": "object",
      "properties": {
        "tx_types": {
          "type": "string"
        },
        "tx_infos": {
          "type": "string"
        }
      },
      "title": "ReqSendTxBatch",
      "required": [
        "tx_types",
        "tx_infos"
      ]
    },
    "ReqSetAccountMetadata": {
      "type": "object",
      "properties": {
        "master_account_index": {
          "type": "integer",
          "format": "int64"
        },
        "target_account_index": {
          "type": "integer",
          "format": "int64"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8"
        },
        "metadata": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        }
      },
      "title": "ReqSetAccountMetadata",
      "required": [
        "master_account_index",
        "target_account_index",
        "api_key_index",
        "metadata"
      ]
    },
    "ReqSetMakerOnlyApiKeys": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "api_key_indexes": {
          "type": "string",
          "description": " JSON array of int16, e.g. \"[1,2]\""
        }
      },
      "title": "ReqSetMakerOnlyApiKeys",
      "required": [
        "account_index",
        "api_key_indexes"
      ]
    },
    "ReqUnregisterPushNotifToken": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expo_token": {
          "type": "string"
        }
      },
      "title": "ReqUnregisterPushNotifToken",
      "required": [
        "account_index",
        "expo_token"
      ]
    },
    "ReqUpdateKickback": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "kickback_percentage": {
          "type": "number",
          "format": "double",
          "maximum": 100
        }
      },
      "title": "ReqUpdateKickback",
      "required": [
        "account_index",
        "kickback_percentage"
      ]
    },
    "ReqUpdatePushNotifSettings": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expo_token": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "ReqUpdatePushNotifSettings",
      "required": [
        "account_index",
        "expo_token",
        "enabled"
      ]
    },
    "ReqUpdateRFQ": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string"
        },
        "rfq_id": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string",
          "enum": [
            "order_created",
            "closed"
          ]
        }
      },
      "title": "ReqUpdateRFQ",
      "required": [
        "rfq_id",
        "status"
      ]
    },
    "ReqUpdateReferralCode": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "new_referral_code": {
          "type": "string"
        }
      },
      "title": "ReqUpdateReferralCode",
      "required": [
        "account_index",
        "new_referral_code"
      ]
    },
    "ReqUseReferralCode": {
      "type": "object",
      "properties": {
        "auth": {
          "type": "string",
          "description": " made optional to support header auth clients"
        },
        "l1_address": {
          "type": "string"
        },
        "referral_code": {
          "type": "string"
        },
        "discord": {
          "type": "string"
        },
        "telegram": {
          "type": "string"
        },
        "x": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        }
      },
      "title": "ReqUseReferralCode",
      "required": [
        "l1_address",
        "referral_code",
        "x"
      ]
    },
    "RespChangeAccountTier": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        }
      },
      "title": "RespChangeAccountTier",
      "required": [
        "code"
      ]
    },
    "RespCreateRFQ": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "direction": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/RFQMetadata"
        },
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQResponseEntry"
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespCreateRFQ",
      "required": [
        "code",
        "id",
        "account_index",
        "market_index",
        "direction",
        "base_amount",
        "quote_amount",
        "status",
        "metadata",
        "responses",
        "created_at",
        "updated_at"
      ]
    },
    "RespGetApiTokens": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "api_tokens": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApiToken"
          }
        }
      },
      "title": "RespGetApiTokens",
      "required": [
        "code",
        "api_tokens"
      ]
    },
    "RespGetBridgesByL1Addr": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "bridges": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Bridge"
          }
        }
      },
      "title": "RespGetBridgesByL1Addr",
      "required": [
        "code",
        "bridges"
      ]
    },
    "RespGetExchangeMetrics": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "metrics": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExchangeMetric"
          }
        }
      },
      "title": "RespGetExchangeMetrics",
      "required": [
        "code",
        "metrics"
      ]
    },
    "RespGetExecuteStats": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "enum": [
            "d",
            "w",
            "m",
            "q",
            "y",
            "all"
          ]
        },
        "result": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExecuteStat"
          }
        }
      },
      "title": "RespGetExecuteStats",
      "required": [
        "period",
        "result"
      ]
    },
    "RespGetFastBridgeInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "fast_bridge_limit": {
          "type": "string"
        }
      },
      "title": "RespGetFastBridgeInfo",
      "required": [
        "code",
        "fast_bridge_limit"
      ]
    },
    "RespGetFastwithdrawalInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "to_account_index": {
          "type": "integer",
          "format": "int64"
        },
        "withdraw_limit": {
          "type": "string"
        },
        "max_withdrawal_amount": {
          "type": "string"
        }
      },
      "title": "RespGetFastwithdrawalInfo",
      "required": [
        "code",
        "to_account_index",
        "withdraw_limit",
        "max_withdrawal_amount"
      ]
    },
    "RespGetIsNextBridgeFast": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "is_next_bridge_fast": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "RespGetIsNextBridgeFast",
      "required": [
        "code",
        "is_next_bridge_fast"
      ]
    },
    "RespGetLeaseOptions": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseOptionEntry"
          }
        },
        "lit_incentives_account_index": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespGetLeaseOptions",
      "required": [
        "code",
        "options",
        "lit_incentives_account_index"
      ]
    },
    "RespGetLeases": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "leases": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseEntry"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "RespGetLeases",
      "required": [
        "code",
        "leases"
      ]
    },
    "RespGetMakerOnlyApiKeys": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "api_key_indexes": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "title": "RespGetMakerOnlyApiKeys",
      "required": [
        "code",
        "api_key_indexes"
      ]
    },
    "RespGetMarketMetrics": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "metrics": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MarketMetricData"
          }
        }
      },
      "title": "RespGetMarketMetrics",
      "required": [
        "code",
        "metrics"
      ]
    },
    "RespGetPushNotifSettings": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "enabled": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "RespGetPushNotifSettings",
      "required": [
        "code",
        "account_index",
        "enabled"
      ]
    },
    "RespGetRFQ": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "direction": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/RFQMetadata"
        },
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQResponseEntry"
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespGetRFQ",
      "required": [
        "code",
        "id",
        "account_index",
        "market_index",
        "direction",
        "base_amount",
        "quote_amount",
        "status",
        "metadata",
        "responses",
        "created_at",
        "updated_at"
      ]
    },
    "RespListRFQs": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "rfqs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQEntry"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "RespListRFQs",
      "required": [
        "code",
        "rfqs"
      ]
    },
    "RespPostApiToken": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "token_id": {
          "type": "integer",
          "format": "int64"
        },
        "api_token": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "expiry": {
          "type": "integer",
          "format": "int64"
        },
        "sub_account_access": {
          "type": "boolean",
          "format": "boolean"
        },
        "revoked": {
          "type": "boolean",
          "format": "boolean"
        },
        "scopes": {
          "type": "string"
        }
      },
      "title": "RespPostApiToken",
      "required": [
        "code",
        "token_id",
        "api_token",
        "name",
        "account_index",
        "expiry",
        "sub_account_access",
        "revoked",
        "scopes"
      ]
    },
    "RespPublicPoolsMetadata": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "public_pools": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PublicPoolMetadata"
          }
        }
      },
      "title": "RespPublicPoolsMetadata",
      "required": [
        "code",
        "public_pools"
      ]
    },
    "RespRespondToRFQ": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "direction": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/RFQMetadata"
        },
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQResponseEntry"
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespRespondToRFQ",
      "required": [
        "code",
        "id",
        "account_index",
        "market_index",
        "direction",
        "base_amount",
        "quote_amount",
        "status",
        "metadata",
        "responses",
        "created_at",
        "updated_at"
      ]
    },
    "RespRevokeApiToken": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "token_id": {
          "type": "integer",
          "format": "int64"
        },
        "revoked": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "RespRevokeApiToken",
      "required": [
        "code",
        "token_id",
        "revoked"
      ]
    },
    "RespSendTx": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "predicted_execution_time_ms": {
          "type": "integer",
          "format": "int64",
          "example": "1751465474"
        },
        "volume_quota_remaining": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespSendTx",
      "required": [
        "code",
        "tx_hash",
        "predicted_execution_time_ms",
        "volume_quota_remaining"
      ]
    },
    "RespSendTxBatch": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "tx_hash": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "predicted_execution_time_ms": {
          "type": "integer",
          "format": "int64",
          "example": "1751465474"
        },
        "volume_quota_remaining": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespSendTxBatch",
      "required": [
        "code",
        "tx_hash",
        "predicted_execution_time_ms",
        "volume_quota_remaining"
      ]
    },
    "RespSetMakerOnlyApiKeys": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        }
      },
      "title": "RespSetMakerOnlyApiKeys",
      "required": [
        "code"
      ]
    },
    "RespUpdateKickback": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "success": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        }
      },
      "title": "RespUpdateKickback",
      "required": [
        "code",
        "success"
      ]
    },
    "RespUpdateRFQ": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "account_index": {
          "type": "integer",
          "format": "int64"
        },
        "market_index": {
          "type": "integer",
          "format": "int16"
        },
        "direction": {
          "type": "integer",
          "format": "int16"
        },
        "base_amount": {
          "type": "string"
        },
        "quote_amount": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/RFQMetadata"
        },
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RFQResponseEntry"
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/ResultCode"
            }
          }
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RespUpdateRFQ",
      "required": [
        "code",
        "id",
        "account_index",
        "market_index",
        "direction",
        "base_amount",
        "quote_amount",
        "status",
        "metadata",
        "responses",
        "created_at",
        "updated_at"
      ]
    },
    "RespUpdateReferralCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "success": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        }
      },
      "title": "RespUpdateReferralCode",
      "required": [
        "code",
        "success"
      ]
    },
    "RespWithdrawalDelay": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "integer",
          "format": "int64",
          "example": "86400"
        }
      },
      "title": "RespWithdrawalDelay",
      "required": [
        "seconds"
      ]
    },
    "ResultCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        }
      },
      "title": "ResultCode",
      "required": [
        "code"
      ]
    },
    "RiskInfo": {
      "type": "object",
      "properties": {
        "cross_risk_parameters": {
          "$ref": "#/definitions/RiskParameters"
        },
        "isolated_risk_parameters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RiskParameters"
          }
        }
      },
      "title": "RiskInfo",
      "required": [
        "cross_risk_parameters",
        "isolated_risk_parameters"
      ]
    },
    "RiskParameters": {
      "type": "object",
      "properties": {
        "market_id": {
          "type": "integer",
          "format": "int16"
        },
        "collateral": {
          "type": "string"
        },
        "total_account_value": {
          "type": "string"
        },
        "initial_margin_req": {
          "type": "string"
        },
        "maintenance_margin_req": {
          "type": "string"
        },
        "close_out_margin_req": {
          "type": "string"
        }
      },
      "title": "RiskParameters",
      "required": [
        "market_id",
        "collateral",
        "total_account_value",
        "initial_margin_req",
        "maintenance_margin_req",
        "close_out_margin_req"
      ]
    },
    "SharePrice": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "share_price": {
          "type": "number",
          "format": "double",
          "example": "0.0001"
        }
      },
      "title": "SharePrice",
      "required": [
        "timestamp",
        "share_price"
      ]
    },
    "SimpleOrder": {
      "type": "object",
      "properties": {
        "order_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "order_id": {
          "type": "string",
          "example": "1"
        },
        "owner_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "initial_base_amount": {
          "type": "string",
          "example": "0.1"
        },
        "remaining_base_amount": {
          "type": "string",
          "example": "0.1"
        },
        "price": {
          "type": "string",
          "example": "3024.66"
        },
        "order_expiry": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        }
      },
      "title": "SimpleOrder",
      "required": [
        "order_index",
        "order_id",
        "owner_account_index",
        "initial_base_amount",
        "remaining_base_amount",
        "price",
        "order_expiry",
        "transaction_time"
      ]
    },
    "SlippageResult": {
      "type": "object",
      "properties": {
        "exchange": {
          "type": "string",
          "example": "lighter"
        },
        "market": {
          "type": "string",
          "example": "ETH"
        },
        "size_usd": {
          "type": "integer",
          "format": "int64",
          "example": "1000"
        },
        "avg_slippage": {
          "type": "number",
          "format": "double",
          "example": "0.5"
        },
        "data_count": {
          "type": "integer",
          "format": "int64",
          "example": "100"
        }
      },
      "title": "SlippageResult",
      "required": [
        "exchange",
        "market",
        "size_usd",
        "avg_slippage",
        "data_count"
      ]
    },
    "SpotAvgEntryPrice": {
      "type": "object",
      "properties": {
        "asset_id": {
          "type": "integer",
          "format": "int16"
        },
        "avg_entry_price": {
          "type": "string"
        },
        "asset_size": {
          "type": "string"
        },
        "last_trade_id": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "SpotAvgEntryPrice",
      "required": [
        "asset_id",
        "avg_entry_price",
        "asset_size",
        "last_trade_id"
      ]
    },
    "SpotMarketStats": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH/USDC"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "index_price": {
          "type": "string",
          "example": "3024.66"
        },
        "mid_price": {
          "type": "string",
          "example": "3024.66"
        },
        "last_trade_price": {
          "type": "string",
          "example": "3024.66"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_price_low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "daily_price_high": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_price_change": {
          "type": "number",
          "format": "double",
          "example": "3.66"
        }
      },
      "title": "SpotMarketStats",
      "required": [
        "symbol",
        "market_id",
        "index_price",
        "mid_price",
        "last_trade_price",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "daily_price_low",
        "daily_price_high",
        "daily_price_change"
      ]
    },
    "SpotOrderBookDetail": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "market_type": {
          "type": "string",
          "example": "perp",
          "enum": [
            "perp",
            "spot"
          ]
        },
        "base_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "quote_asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "2"
        },
        "status": {
          "type": "string",
          "example": "active",
          "enum": [
            "inactive",
            "active"
          ]
        },
        "taker_fee": {
          "type": "string",
          "example": "0.0001"
        },
        "is_taker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "maker_fee": {
          "type": "string",
          "example": "0.0000"
        },
        "is_maker_fee_enabled": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "liquidation_fee": {
          "type": "string",
          "example": "0.01"
        },
        "min_base_amount": {
          "type": "string",
          "example": "0.01"
        },
        "min_quote_amount": {
          "type": "string",
          "example": "0.1"
        },
        "order_quote_limit": {
          "type": "string",
          "example": "235.25"
        },
        "supported_size_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "supported_quote_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "size_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "price_decimals": {
          "type": "integer",
          "format": "uint8",
          "example": "4"
        },
        "last_trade_price": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_trades_count": {
          "type": "integer",
          "format": "int64",
          "example": "68"
        },
        "daily_base_token_volume": {
          "type": "number",
          "format": "double",
          "example": "235.25"
        },
        "daily_quote_token_volume": {
          "type": "number",
          "format": "double",
          "example": "93566.25"
        },
        "daily_price_low": {
          "type": "number",
          "format": "double",
          "example": "3014.66"
        },
        "daily_price_high": {
          "type": "number",
          "format": "double",
          "example": "3024.66"
        },
        "daily_price_change": {
          "type": "number",
          "format": "double",
          "example": "3.66"
        },
        "daily_chart": {
          "type": "object",
          "example": "{1640995200:3024.66}",
          "additionalProperties": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "title": "SpotOrderBookDetail",
      "required": [
        "symbol",
        "market_id",
        "market_type",
        "base_asset_id",
        "quote_asset_id",
        "status",
        "taker_fee",
        "is_taker_fee_enabled",
        "maker_fee",
        "is_maker_fee_enabled",
        "liquidation_fee",
        "min_base_amount",
        "min_quote_amount",
        "order_quote_limit",
        "supported_size_decimals",
        "supported_price_decimals",
        "supported_quote_decimals",
        "size_decimals",
        "price_decimals",
        "last_trade_price",
        "daily_trades_count",
        "daily_base_token_volume",
        "daily_quote_token_volume",
        "daily_price_low",
        "daily_price_high",
        "daily_price_change",
        "daily_chart"
      ]
    },
    "Status": {
      "type": "object",
      "properties": {
        "status": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "network_id": {
          "type": "integer",
          "format": "int32",
          "example": "1"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1717777777"
        }
      },
      "title": "Status",
      "required": [
        "status",
        "network_id",
        "timestamp"
      ]
    },
    "Strategy": {
      "type": "object",
      "properties": {
        "collateral": {
          "type": "string",
          "example": "199955"
        }
      },
      "title": "Strategy",
      "required": [
        "collateral"
      ]
    },
    "SubAccounts": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "sub_accounts": {
          "type": "array",
          "example": "1",
          "items": {
            "$ref": "#/definitions/Account"
          }
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "title": "SubAccounts",
      "required": [
        "code",
        "l1_address",
        "sub_accounts"
      ]
    },
    "SystemConfig": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "liquidity_pool_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "staking_pool_index": {
          "type": "integer",
          "format": "int64",
          "example": "2"
        },
        "funding_fee_rebate_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "2"
        },
        "liquidity_pool_cooldown_period": {
          "type": "integer",
          "format": "int64",
          "example": "86400"
        },
        "staking_pool_lockup_period": {
          "type": "integer",
          "format": "int64",
          "example": "604800"
        },
        "max_integrator_spot_taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "max_integrator_spot_maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "max_integrator_perps_taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "max_integrator_perps_maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        }
      },
      "title": "SystemConfig",
      "required": [
        "code",
        "liquidity_pool_index",
        "staking_pool_index",
        "funding_fee_rebate_account_index",
        "liquidity_pool_cooldown_period",
        "staking_pool_lockup_period",
        "max_integrator_spot_taker_fee",
        "max_integrator_spot_maker_fee",
        "max_integrator_perps_taker_fee",
        "max_integrator_perps_maker_fee"
      ]
    },
    "Ticker": {
      "type": "object",
      "properties": {
        "s": {
          "type": "string",
          "example": "ETH"
        },
        "a": {
          "$ref": "#/definitions/PriceLevel"
        },
        "b": {
          "$ref": "#/definitions/PriceLevel"
        },
        "last_updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Ticker",
      "required": [
        "s",
        "a",
        "b",
        "last_updated_at"
      ]
    },
    "Token": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "example": "ETH"
        },
        "name": {
          "type": "string",
          "example": "Ethereum"
        },
        "logo": {
          "type": "string",
          "example": "eth"
        },
        "logo_extension": {
          "type": "string",
          "example": "svg",
          "enum": [
            "svg",
            "png"
          ]
        },
        "description_key": {
          "type": "string",
          "example": "token_description_eth"
        },
        "gecko_id": {
          "type": "string",
          "example": "ethereum"
        },
        "paprika_id": {
          "type": "string",
          "example": "eth-ethereum"
        },
        "market": {
          "type": "string",
          "enum": [
            "SPOT",
            "PERPS"
          ]
        },
        "asset_type": {
          "type": "string",
          "enum": [
            "CRYPTO",
            "RWA"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_allowed_mainnet": {
          "type": "boolean",
          "format": "boolean"
        },
        "is_asset_allowed_mainnet": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "Token",
      "required": [
        "symbol",
        "name",
        "logo",
        "logo_extension",
        "description_key",
        "gecko_id",
        "paprika_id",
        "market",
        "asset_type",
        "categories",
        "is_allowed_mainnet",
        "is_asset_allowed_mainnet"
      ]
    },
    "TokenList": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "tokens": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Token"
          }
        }
      },
      "title": "TokenList",
      "required": [
        "code",
        "tokens"
      ]
    },
    "Trade": {
      "type": "object",
      "properties": {
        "trade_id": {
          "type": "integer",
          "format": "int64",
          "example": "145"
        },
        "trade_id_str": {
          "type": "string",
          "example": "145"
        },
        "tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "type": {
          "type": "string",
          "example": "trade",
          "enum": [
            "trade",
            "liquidation",
            "deleverage",
            "market-settlement"
          ]
        },
        "market_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "size": {
          "type": "string",
          "example": "0.1"
        },
        "price": {
          "type": "string",
          "example": "3024.66"
        },
        "usd_amount": {
          "type": "string",
          "example": "3024.66"
        },
        "ask_id": {
          "type": "integer",
          "format": "int64",
          "example": "145"
        },
        "ask_id_str": {
          "type": "string",
          "example": "145"
        },
        "bid_id": {
          "type": "integer",
          "format": "int64",
          "example": "245"
        },
        "bid_id_str": {
          "type": "string",
          "example": "245"
        },
        "ask_client_id": {
          "type": "integer",
          "format": "int64",
          "example": "145"
        },
        "ask_client_id_str": {
          "type": "string",
          "example": "145"
        },
        "bid_client_id": {
          "type": "integer",
          "format": "int64",
          "example": "245"
        },
        "bid_client_id_str": {
          "type": "string",
          "example": "245"
        },
        "ask_account_id": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "bid_account_id": {
          "type": "integer",
          "format": "int64",
          "example": "3"
        },
        "is_maker_ask": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "block_height": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "0"
        },
        "taker_position_size_before": {
          "type": "string",
          "example": "0"
        },
        "taker_entry_quote_before": {
          "type": "string",
          "example": "0"
        },
        "taker_initial_margin_fraction_before": {
          "type": "integer",
          "format": "uin16",
          "example": "0"
        },
        "taker_position_sign_changed": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "0"
        },
        "maker_position_size_before": {
          "type": "string",
          "example": "0"
        },
        "maker_entry_quote_before": {
          "type": "string",
          "example": "0"
        },
        "maker_initial_margin_fraction_before": {
          "type": "integer",
          "format": "uin16",
          "example": "0"
        },
        "maker_position_sign_changed": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        },
        "ask_account_pnl": {
          "type": "string",
          "example": "1967"
        },
        "bid_account_pnl": {
          "type": "string",
          "example": "1967"
        },
        "integrator_taker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "50"
        },
        "integrator_taker_fee_collector_index": {
          "type": "integer",
          "format": "int64",
          "example": "156"
        },
        "integrator_maker_fee": {
          "type": "integer",
          "format": "int32",
          "example": "50"
        },
        "integrator_maker_fee_collector_index": {
          "type": "integer",
          "format": "int64",
          "example": "156"
        },
        "taker_allocated_margin_usdc_before": {
          "type": "integer",
          "format": "int64",
          "example": "1100000000000000"
        },
        "taker_allocated_margin_usdc_after": {
          "type": "integer",
          "format": "int64",
          "example": "150000000000000"
        },
        "maker_allocated_margin_usdc_before": {
          "type": "integer",
          "format": "int64",
          "example": "210000000000000"
        },
        "maker_allocated_margin_usdc_after": {
          "type": "integer",
          "format": "int64",
          "example": "250000000000000"
        }
      },
      "title": "Trade",
      "required": [
        "trade_id",
        "trade_id_str",
        "tx_hash",
        "type",
        "market_id",
        "size",
        "price",
        "usd_amount",
        "ask_id",
        "bid_id",
        "ask_client_id",
        "ask_client_id_str",
        "bid_client_id",
        "bid_client_id_str",
        "ask_account_id",
        "bid_account_id",
        "is_maker_ask",
        "block_height",
        "timestamp",
        "taker_position_size_before",
        "taker_entry_quote_before",
        "taker_initial_margin_fraction_before",
        "taker_position_sign_changed",
        "maker_position_size_before",
        "maker_entry_quote_before",
        "maker_initial_margin_fraction_before",
        "maker_position_sign_changed",
        "transaction_time",
        "ask_account_pnl",
        "bid_account_pnl",
        "integrator_taker_fee",
        "integrator_taker_fee_collector_index",
        "integrator_maker_fee",
        "integrator_maker_fee_collector_index",
        "taker_allocated_margin_usdc_before",
        "taker_allocated_margin_usdc_after",
        "maker_allocated_margin_usdc_before",
        "maker_allocated_margin_usdc_after"
      ]
    },
    "TradeStats": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "format": "int64"
        },
        "volume": {
          "type": "string"
        },
        "web_count": {
          "type": "integer",
          "format": "int64"
        },
        "web_volume": {
          "type": "string"
        },
        "mobile_app_count": {
          "type": "integer",
          "format": "int64"
        },
        "mobile_app_volume": {
          "type": "string"
        },
        "mobile_browser_count": {
          "type": "integer",
          "format": "int64"
        },
        "mobile_browser_volume": {
          "type": "string"
        }
      },
      "title": "TradeStats",
      "required": [
        "count",
        "volume",
        "web_count",
        "web_volume",
        "mobile_app_count",
        "mobile_app_volume",
        "mobile_browser_count",
        "mobile_browser_volume"
      ]
    },
    "Trades": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "next_cursor": {
          "type": "string"
        },
        "trades": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Trade"
          }
        }
      },
      "title": "Trades",
      "required": [
        "code",
        "trades"
      ]
    },
    "TransferFeeInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "transfer_fee_usdc": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "TransferFeeInfo",
      "required": [
        "code",
        "transfer_fee_usdc"
      ]
    },
    "TransferHistory": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "transfers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransferHistoryItem"
          }
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "TransferHistory",
      "required": [
        "code",
        "transfers",
        "cursor"
      ]
    },
    "TransferHistoryItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "amount": {
          "type": "string",
          "example": "0.1"
        },
        "fee": {
          "type": "string",
          "example": "3"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "type": {
          "type": "string",
          "enum": [
            "L2TransferInflow",
            "L2TransferOutflow",
            "L2BurnSharesInflow",
            "L2BurnSharesOutflow",
            "L2MintSharesInflow",
            "L2MintSharesOutflow",
            "L2SelfTransfer",
            "L2StakeAssetInflow",
            "L2StakeAssetOutflow",
            "L2UnstakeAssetInflow",
            "L2UnstakeAssetOutflow",
            "L2ForceBurnSharesInflow",
            "L2ForceBurnSharesOutflow"
          ]
        },
        "from_l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "to_l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "from_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "to_account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "from_route": {
          "type": "string",
          "enum": [
            "spot",
            "perps"
          ]
        },
        "to_route": {
          "type": "string",
          "enum": [
            "spot",
            "perps"
          ]
        },
        "tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "TransferHistoryItem",
      "required": [
        "id",
        "asset_id",
        "amount",
        "fee",
        "timestamp",
        "type",
        "from_l1_address",
        "to_l1_address",
        "from_account_index",
        "to_account_index",
        "from_route",
        "to_route",
        "tx_hash"
      ]
    },
    "Tx": {
      "type": "object",
      "properties": {
        "hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "type": {
          "type": "integer",
          "format": "uint8",
          "example": "1",
          "maximum": 64,
          "minimum": 1
        },
        "info": {
          "type": "string",
          "example": "{}"
        },
        "event_info": {
          "type": "string",
          "example": "{}"
        },
        "status": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "transaction_index": {
          "type": "integer",
          "format": "int64",
          "example": "8761"
        },
        "l1_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "account_index": {
          "type": "integer",
          "format": "int64",
          "example": "1"
        },
        "nonce": {
          "type": "integer",
          "format": "int64",
          "example": "722"
        },
        "expire_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "block_height": {
          "type": "integer",
          "format": "int64",
          "example": "45434"
        },
        "queued_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "executed_at": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "sequence_index": {
          "type": "integer",
          "format": "int64",
          "example": "8761"
        },
        "parent_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "api_key_index": {
          "type": "integer",
          "format": "uint8",
          "example": "0"
        },
        "transaction_time": {
          "type": "integer",
          "format": "int64",
          "example": "1257894000000000"
        }
      },
      "title": "Tx",
      "required": [
        "hash",
        "type",
        "info",
        "event_info",
        "status",
        "transaction_index",
        "l1_address",
        "account_index",
        "nonce",
        "expire_at",
        "block_height",
        "queued_at",
        "executed_at",
        "sequence_index",
        "parent_hash",
        "api_key_index",
        "transaction_time"
      ]
    },
    "TxHash": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "TxHash",
      "required": [
        "code",
        "tx_hash"
      ]
    },
    "TxHashes": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "tx_hash": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "TxHashes",
      "required": [
        "code",
        "tx_hash"
      ]
    },
    "Txs": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "txs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tx"
          }
        }
      },
      "title": "Txs",
      "required": [
        "code",
        "txs"
      ]
    },
    "UserReferrals": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        },
        "used_code": {
          "type": "string"
        },
        "referrals": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Referral"
          }
        }
      },
      "title": "UserReferrals",
      "required": [
        "code",
        "cursor",
        "used_code",
        "referrals"
      ]
    },
    "ValidatorInfo": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        },
        "is_active": {
          "type": "boolean",
          "format": "boolean",
          "example": "true"
        }
      },
      "title": "ValidatorInfo",
      "required": [
        "address",
        "is_active"
      ]
    },
    "WithdrawHistory": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "example": "200"
        },
        "message": {
          "type": "string"
        },
        "withdraws": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/WithdrawHistoryItem"
          }
        },
        "cursor": {
          "type": "string"
        }
      },
      "title": "WithdrawHistory",
      "required": [
        "code",
        "withdraws",
        "cursor"
      ]
    },
    "WithdrawHistoryItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "asset_id": {
          "type": "integer",
          "format": "int16",
          "example": "1"
        },
        "amount": {
          "type": "string",
          "example": "0.1"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64",
          "example": "1640995200"
        },
        "status": {
          "type": "string",
          "enum": [
            "failed",
            "pending",
            "claimable",
            "refunded",
            "completed"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "secure",
            "fast"
          ]
        },
        "l1_tx_hash": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "WithdrawHistoryItem",
      "required": [
        "id",
        "asset_id",
        "amount",
        "timestamp",
        "status",
        "type",
        "l1_tx_hash"
      ]
    },
    "ZkLighterInfo": {
      "type": "object",
      "properties": {
        "contract_address": {
          "type": "string",
          "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
        }
      },
      "title": "ZkLighterInfo",
      "required": [
        "contract_address"
      ]
    }
  },
  "securityDefinitions": {
    "apiKey": {
      "type": "apiKey",
      "description": "Enter JWT Bearer token **_only_**",
      "name": "Authorization",
      "in": "header"
    }
  }
}