{
  "openapi": "3.0.0",
  "info": {
    "title": "Lighter API",
    "version": "1.0.0",
    "description": "REST API for Lighter and Lighter on Robinhood Chain. Both exchanges expose the same API; pick the server that matches the exchange you are integrating.\n\nThe Explorer API endpoints use the explorer servers."
  },
  "paths": {
    "/": {
      "get": {
        "summary": "status",
        "operationId": "status",
        "tags": [
          "system"
        ],
        "description": "Get status of Lighter The response timestamp is a UNIX timestamp in seconds.",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account": {
      "get": {
        "summary": "account",
        "operationId": "account",
        "tags": [
          "account"
        ],
        "description": "Get account by an account's index, or L1 address",
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "index",
                "l1_address"
              ]
            },
            "description": "Field used to identify the requested record."
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Identifier corresponding to the selected by field."
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "description": "Hide markets for which leverage and margin settings are present (meaning the account traded it at least once), but with no active position.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedAccounts"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountActiveOrders": {
      "get": {
        "summary": "accountActiveOrders",
        "operationId": "accountActiveOrders",
        "tags": [
          "orders"
        ],
        "description": "Get account active orders. `auth` can be generated using the SDK.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "description": "If not specified, returns active orders for all markets.",
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            }
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "spot",
                "perp"
              ],
              "default": "all"
            },
            "description": "Market filter: perp, spot or bo; comma-separated values or all."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Orders"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountInactiveOrders": {
      "get": {
        "summary": "accountInactiveOrders",
        "operationId": "accountInactiveOrders",
        "tags": [
          "orders"
        ],
        "description": "Get account inactive orders. `auth` can be generated using the SDK.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "ask_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int8",
              "default": -1
            },
            "description": "Side filter: -1 = both sides, 0 = bids/buys, 1 = asks/sells."
          },
          {
            "name": "between_timestamps",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Inclusive start and end Unix timestamps in seconds, separated by a hyphen: 1792627200-1792713600."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "spot",
                "perp"
              ],
              "default": "all"
            },
            "description": "Market filter: perp, spot or bo; comma-separated values or all."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Orders"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountLimits": {
      "get": {
        "summary": "accountLimits",
        "operationId": "accountLimits",
        "tags": [
          "account"
        ],
        "description": "Get account limits. For more details on account types, see [Account types](https://docs.lighter.xyz/developers/reference/account-types)",
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLimits"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buyVolumeQuota": {
      "post": {
        "summary": "buyVolumeQuota",
        "operationId": "buyVolumeQuota",
        "tags": [
          "account"
        ],
        "description": "Buy volume quota with USDC. Submit a signed L2Transfer of quota × 500 USDC base units to the volume quota payment account; the server validates it, sends it and credits the quota to the payer's L1 address (or destination_l1_address) once the transfer executes. If execution takes longer than about 5 seconds the response is status=pending and the purchase is claimed by calling again with tx_hash. Exactly one of tx_info (new purchase) or tx_hash (claim) is sent per call. Each transfer is credited once. Only Plus and Premium/Advanced accounts can receive quota, and the balance after the purchase may not exceed 30,000,000. See [Volume Quota](https://docs.lighter.xyz/developers/reference/volume-quota#buying-volume-quota).",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header (or pass auth in the body)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqBuyVolumeQuota"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespBuyVolumeQuota"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountMetadata": {
      "get": {
        "summary": "accountMetadata",
        "operationId": "accountMetadata",
        "tags": [
          "account"
        ],
        "description": "Get account metadata",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "index",
                "l1_address"
              ]
            },
            "description": "Field used to identify the requested record."
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Identifier corresponding to the selected by field."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMetadatas"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assetDetails": {
      "get": {
        "summary": "assetDetails",
        "operationId": "assetDetails",
        "tags": [
          "info"
        ],
        "description": "Get asset details for a specific asset or all assets",
        "parameters": [
          {
            "name": "asset_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Asset identifier returned by assetDetails; omit to return all supported assets."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountsByL1Address": {
      "get": {
        "summary": "accountsByL1Address",
        "operationId": "accountsByL1Address",
        "tags": [
          "account"
        ],
        "description": "Returns all accounts associated with the given L1 address",
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccounts"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/announcement": {
      "get": {
        "summary": "announcement",
        "operationId": "announcement",
        "tags": [
          "announcements"
        ],
        "description": "Get announcements",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Announcements"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apikeys": {
      "get": {
        "summary": "apikeys",
        "operationId": "apikeys",
        "tags": [
          "api-keys"
        ],
        "description": "Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.",
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "api_key_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "uint8",
              "default": 255
            },
            "description": "API-key index for the specified account."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountApiKeys"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/candles": {
      "get": {
        "summary": "candles",
        "operationId": "candles",
        "tags": [
          "candlesticks"
        ],
        "description": "Get candles data. Returns at most 500 candles per call. Zero values are omitted from the response.",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "5m",
                "15m",
                "30m",
                "1h",
                "4h",
                "12h",
                "1d"
              ]
            },
            "description": "Time interval for each returned data point. Allowed values: 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length."
          },
          {
            "name": "set_timestamp_to_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Use the end of each candle interval for its timestamp instead of the start."
          },
          {
            "name": "merge_mark_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Merge mark-price samples into trade candle prices."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Candles"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/changeAccountTier": {
      "post": {
        "summary": "changeAccountTier",
        "operationId": "changeAccountTier",
        "tags": [
          "account"
        ],
        "description": "Downgrades: once per 24 hours (and sub-account count must fit the lower tier). Upgrades: any time.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqChangeAccountTier"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespChangeAccountTier"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deposit/history": {
      "get": {
        "summary": "deposit_history",
        "operationId": "deposit_history",
        "tags": [
          "transactions"
        ],
        "description": "Get deposit history",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "pending",
                "claimable"
              ]
            },
            "description": "Select the records to include using the listed filter values. Allowed values: all, pending, claimable."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositHistory"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchangeStats": {
      "get": {
        "summary": "exchangeStats",
        "operationId": "exchangeStats",
        "tags": [
          "info"
        ],
        "description": "Get exchange stats",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeStats"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/export": {
      "get": {
        "summary": "export",
        "operationId": "export",
        "tags": [
          "orders"
        ],
        "description": "Export trade or funding history for an account. Supply both start_timestamp and end_timestamp in Unix milliseconds, or omit both for available history. If supplied, start_timestamp must be on or after 2025-01-01 UTC and earlier than end_timestamp. Exports are processed asynchronously; large histories may require smaller date ranges. The current implementation limits output to 40 GiB and processing to four hours; a completed export URL is valid for six hours.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": -1
            },
            "description": "Account index to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "funding",
                "trade"
              ]
            },
            "description": "Select one of the listed record types."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1735689600000,
              "maximum": 1830297600000
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1735689600000,
              "maximum": 1830297600000
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "long",
                "short"
              ],
              "default": "all"
            },
            "description": "Position or trade side filter."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "maker",
                "taker"
              ],
              "default": "all"
            },
            "description": "Select fills where the account was the maker or taker, or all fills."
          },
          {
            "name": "trade_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "trade",
                "liquidation",
                "deleverage",
                "market-settlement"
              ],
              "default": "all"
            },
            "description": "Trade type to include in the export."
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include remaining fills for the last order on the page; requires account_index."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportData"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fastbridge/info": {
      "get": {
        "summary": "fastbridge_info",
        "operationId": "fastbridge_info",
        "tags": [
          "bridge"
        ],
        "description": "Get fast bridge info",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetFastBridgeInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/funding-rates": {
      "get": {
        "summary": "funding-rates",
        "operationId": "funding-rates",
        "tags": [
          "funding"
        ],
        "description": "Get funding rates across venues. For real-time funding rates, use the market_stats WebSocket channel.",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundingRates"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fundings": {
      "get": {
        "summary": "fundings",
        "operationId": "fundings",
        "tags": [
          "funding"
        ],
        "description": "Get fundings. At most 750 funding entries are returned per call. `count_back` indicates the number of fundings you would like to be returned, starting from `start_timestamp`, if set to 0, all fundings will be returned.",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "1d"
              ]
            },
            "description": "Time interval for each returned data point. Allowed values: 1h, 1d."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fundings"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/l1Metadata": {
      "get": {
        "summary": "l1Metadata",
        "operationId": "l1Metadata",
        "tags": [
          "account"
        ],
        "description": "Get L1 metadata",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/L1Metadata"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/liquidations": {
      "get": {
        "summary": "liquidations",
        "operationId": "liquidations",
        "tags": [
          "account"
        ],
        "description": "Get liquidation infos",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiquidationInfos"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/nextNonce": {
      "get": {
        "summary": "nextNonce",
        "operationId": "nextNonce",
        "tags": [
          "api-keys"
        ],
        "description": "Get next nonce for a specific account and api key",
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "api_key_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "uint8"
            },
            "description": "API-key index for the specified account."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextNonce"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notification/ack": {
      "post": {
        "summary": "notification_ack",
        "operationId": "notification_ack",
        "tags": [
          "notifications"
        ],
        "description": "Ack notification",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqAckNotif"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orderBookDetails": {
      "get": {
        "summary": "orderBookDetails",
        "operationId": "orderBookDetails",
        "tags": [
          "orders"
        ],
        "description": "Get order books metadata",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "spot",
                "perp"
              ],
              "default": "all"
            },
            "description": "Filter order books by type Allowed values: all, spot, perp."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBookDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orderBookOrders": {
      "get": {
        "summary": "orderBookOrders",
        "operationId": "orderBookOrders",
        "tags": [
          "orders"
        ],
        "description": "Get the best resting orders of an order book. With `n_sig_figs`, the response also returns `group_size` and up to 20 aggregated price levels per side in `ask_levels` and `bid_levels`. Levels are built from the whole order book, independent of `limit`; ask prices round up to a multiple of `group_size` and bid prices round down.",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 250
            },
            "description": "Maximum number of orders to return per side in `asks` and `bids`. Does not apply to `ask_levels` and `bid_levels`."
          },
          {
            "name": "n_sig_figs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "uint8",
              "minimum": 2,
              "maximum": 6
            },
            "description": "Number of significant figures of the mid price to group prices by. Example: with BTC at 63,920.0, `4` groups by 10.0 and `5` by 1.0. The group size is at least one price tick."
          },
          {
            "name": "mantissa",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "uint8",
              "enum": [
                1,
                2,
                5
              ],
              "default": 1
            },
            "description": "Multiplier of the group size. Only allowed when `n_sig_figs` is 5 or 6."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBookOrders"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orderBooks": {
      "get": {
        "summary": "orderBooks",
        "operationId": "orderBooks",
        "tags": [
          "orders"
        ],
        "description": "Get order books metadata.<hr>**Response Description:**<br><br>1) **Taker and maker fees** are in percentage.<br>2) **Min base amount:** The minimum 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:** supported size decimals + supported price decimals.",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "spot",
                "perp"
              ],
              "default": "all"
            },
            "description": "Select the records to include using the listed filter values. Allowed values: all, spot, perp."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBooks"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pnl": {
      "get": {
        "summary": "pnl",
        "operationId": "pnl",
        "tags": [
          "account"
        ],
        "description": "Get account PnL chart",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "index"
              ]
            },
            "description": "Field used to identify the requested record."
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Identifier corresponding to the selected by field."
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "description": "1h covers the last 10 days; 1d covers data since 2025-01-01 Allowed values: 1h, 1d.",
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "1d"
              ]
            }
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length."
          },
          {
            "name": "ignore_transfers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Exclude deposits, withdrawals and transfers from the PnL calculation when true."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPnL"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/positionFunding": {
      "get": {
        "summary": "positionFunding",
        "operationId": "positionFunding",
        "tags": [
          "account"
        ],
        "description": "Get accounts position fundings",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header. Required for main accounts."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "long",
                "short",
                "all"
              ],
              "default": "all"
            },
            "description": "Position or trade side filter."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "market_ids",
            "in": "query",
            "required": false,
            "description": "comma-separated int64s, e.g. \"1,2\"",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 255
            },
            "deprecated": true,
            "description": "Deprecated: use `market_ids`."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionFundings"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/publicPoolsMetadata": {
      "get": {
        "summary": "publicPoolsMetadata",
        "operationId": "publicPoolsMetadata",
        "tags": [
          "account"
        ],
        "description": "Results are returned in descending account-index order, starting at index - 1. To start from the top, pass index=281474976710655; for the next page, pass the last returned account_index. To fetch one pool, use index=<pool account_index>+1 and limit=1. Public pools do not require authentication; send an Authorization header to include private account data.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "user",
                "protocol",
                "account_index",
                "stake"
              ]
            },
            "description": "Select the records to include using the listed filter values. Allowed values: all, user, protocol, account_index, stake."
          },
          {
            "name": "index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Exclusive account-index cursor; return pools below this index."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespPublicPoolsMetadata"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/recentTrades": {
      "get": {
        "summary": "recentTrades",
        "operationId": "recentTrades",
        "tags": [
          "orders"
        ],
        "description": "Get recent trades",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trades"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/points": {
      "get": {
        "summary": "referral_points",
        "operationId": "referral_points",
        "tags": [
          "referral"
        ],
        "description": "**Lighter on Robinhood Chain only.**\n\nGet referral points",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralPoints"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.rh.lighter.xyz",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://api.rh-testnet.lighter.xyz",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/api/v1/sendTx": {
      "post": {
        "summary": "sendTx",
        "operationId": "sendTx",
        "tags": [
          "transactions"
        ],
        "description": "You need to sign the transaction body before sending it to the server. More details can be found here: https://docs.lighter.xyz/developers",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqSendTx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespSendTx"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sendTxBatch": {
      "post": {
        "summary": "sendTxBatch",
        "operationId": "sendTxBatch",
        "tags": [
          "transactions"
        ],
        "description": "You need to sign the transaction body before sending it to the server. More details can be found here: https://docs.lighter.xyz/developers",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqSendTxBatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespSendTxBatch"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/trades": {
      "get": {
        "summary": "trades",
        "operationId": "trades",
        "tags": [
          "orders"
        ],
        "description": "Get trades for lighter accounts, including sub-accounts and public pools. `auth` is required for master accounts and sub accounts.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int16",
              "default": 255
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "spot",
                "perp",
                "bo"
              ],
              "default": "all"
            },
            "description": "Market filter: perp, spot or bo; comma-separated values or all."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": -1
            },
            "description": "Account index to query."
          },
          {
            "name": "order_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by the exchange-assigned order index; not a trade ID."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "block_height",
                "timestamp",
                "trade_id"
              ]
            },
            "description": "Field to sort by."
          },
          {
            "name": "sort_dir",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "desc"
              ],
              "default": "desc"
            },
            "description": "Sort direction."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": -1
            },
            "description": "Exclusive starting value in the selected sort_by field; timestamp uses Unix milliseconds. cursor takes precedence."
          },
          {
            "name": "ask_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int8",
              "default": -1
            },
            "description": "Side filter: -1 = both sides, 0 = bids/buys, 1 = asks/sells."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "maker",
                "taker"
              ],
              "default": "all"
            },
            "description": "Select fills where the account was the maker or taker, or all fills."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "trade",
                "liquidation",
                "deleverage",
                "market-settlement"
              ],
              "default": "all"
            },
            "description": "Select one of the listed record types."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include remaining fills for the last order on the page; requires account_index."
          },
          {
            "name": "skip_ask_order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Skip fills belonging to this ask order ID (decimal string)."
          },
          {
            "name": "skip_bid_order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Skip fills belonging to this bid order ID (decimal string)."
          },
          {
            "name": "integrator_account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": -1
            },
            "description": "Filter trades or statistics attributed to this integrator account index."
          },
          {
            "name": "order_index_str",
            "in": "query",
            "description": "takes precedence over order_index; for clients that cannot represent uint64 exactly",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trades"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/aggregatedTrades": {
      "get": {
        "summary": "aggregatedTrades",
        "operationId": "aggregatedTrades",
        "tags": [
          "orders"
        ],
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai",
            "description": "Lighter mainnet"
          }
        ],
        "security": [],
        "description": "Returns an account's fills grouped by order, with separate entries for each trade type and maker/taker role. Each entry includes total filled size, notional, average price, fees, realized PnL and first/last fill details. Use `trades` for individual fills.\n\nThis guide covers Lighter mainnet. The endpoint does not require an authentication token.\n\n`GET https://mainnet.zklighter.elliot.ai/api/v1/aggregatedTrades`\n\n### Query parameters\n\n| Name | Type | Required | Default | Description |\n|---|---|---|---|---|\n| `account_index` | int64 | yes | – | Account to query. |\n| `market_id` | int64 | no | `255` (all) | Filter by market. |\n| `market_type` | string | no | all | `perps`, `spot`, `bo`. Comma-separated for several, e.g. `perps,spot`. |\n| `order_index_str` | string | no | – | Return only this order (order index as a string). |\n| `ask_filter` | int8 | no | `-1` | `-1` both sides, `0` buys only, `1` sells only. |\n| `role` | string | no | both | `maker` or `taker`. |\n| `type` | string | no | all | `trade`, `liquidation`, `deleverage`, `market_settlement`. Note the underscore here; the response uses `market-settlement`. |\n| `start_timestamp` | int64 (ms) | no | – | **Inclusive** lower bound on the stored order aggregate's last fill time. |\n| `end_timestamp` | int64 (ms) | no | – | **Exclusive** upper bound on the stored order aggregate's last fill time. |\n| `limit` | int64 | no | `100` | Number of orders per page, `1`–`1000`. |\n| `cursor` | string | no | – | `next_cursor` from the previous response. |\n\nTimestamp rules:\n- Both must be on or after the exchange start (Jan 17, 2025 UTC = `1737072000000`).\n- If both are set, `start_timestamp` must be less than `end_timestamp`.\n- Filtering selects stored order aggregates by their last fill time. It does not trim their individual fills to the requested window.\n- Results are then split by trade type and maker/taker role. Each returned entry's `first_timestamp` and `last_timestamp` describe that subgroup, so they need not both fall inside the requested window.\n- Omitting either timestamp leaves that side of the window unbounded.\n\n### Response\n\nIllustrative response:\n\n```json\n{\n  \"code\": 200,\n  \"next_cursor\": \"eyJ2ZXJzaW9uIjoxLCJ0cmFkZV9pZCI6MzgxODIxMDg1NTR9\",\n  \"trades\": [\n    {\n      \"account_index\": 281474976710654,\n      \"order_id\": \"36591746915350675\",\n      \"grouping_id\": \"36591746915350675\",\n      \"master_twap_id\": null,\n      \"market_id\": 128,\n      \"market_symbol\": \"SPY\",\n      \"market_kind\": \"perps\",\n      \"is_ask\": false,\n      \"type\": \"trade\",\n      \"role\": \"maker\",\n      \"first_trade_id\": \"38173459320\",\n      \"last_trade_id\": \"38182108554\",\n      \"first_timestamp\": 1793807287488,\n      \"last_timestamp\": 1793808698879,\n      \"first_block_height\": 374940593,\n      \"last_block_height\": 374991730,\n      \"fill_count\": 116,\n      \"size\": \"101.0104\",\n      \"usd_amount\": \"77395.189111\",\n      \"pnl\": null,\n      \"average_price\": \"766.21\",\n      \"fee\": \"2.438882286892\",\n      \"integrator_fee\": \"0.000000000000\",\n      \"fee_asset_id\": 3,\n      \"position_size_before\": \"2314.8726\",\n      \"entry_quote_before\": \"1778329.357642\",\n      \"position_sign_changed\": false,\n      \"initial_margin_fraction_before\": 500,\n      \"allocated_margin_usdc_before\": 0,\n      \"allocated_margin_usdc_after\": 0\n    }\n  ]\n}\n```\n\n| Field | Description |\n|---|---|\n| `account_index` | Queried account. |\n| `order_id` | Order index as a string; `\"0\"` can represent a synthetic entry without a normal order ID. |\n| `grouping_id` | Stored grouping identifier returned by the indexer, or `null`. Treat it as opaque; use `order_id` to identify the order. |\n| `master_twap_id` | Parent TWAP order id if the order is a TWAP child, else `null`. |\n| `market_id`, `market_symbol` | Market. |\n| `market_kind` | `perps`, `spot` or `bo`. |\n| `is_ask` | `true` = sell, `false` = buy. |\n| `type` | `trade`, `liquidation`, `deleverage`, `market-settlement`. |\n| `role` | `maker` or `taker`. |\n| `first_trade_id`, `last_trade_id` | First / last fill in this trade-type and role subgroup (strings). |\n| `first_timestamp`, `last_timestamp` | First / last fill time in this subgroup, in Unix milliseconds. |\n| `first_block_height`, `last_block_height` | First / last fill block in this subgroup. |\n| `fill_count` | Number of fills aggregated in this subgroup. |\n| `size` | Total filled base size. |\n| `usd_amount` | Total filled notional, USDC. |\n| `average_price` | Size-weighted average fill price. |\n| `pnl` | Realized PnL from these fills, USDC; `null` if the fills didn't reduce a position. |\n| `fee` | Total fee paid, in `fee_asset_id` units (USDC, or the base asset for spot buys). |\n| `integrator_fee` | Total integrator fee, same units as `fee`. |\n| `fee_asset_id` | Asset the fee is charged in (`3` = USDC). |\n| `position_size_before`, `entry_quote_before` | Position size and entry quote before the first fill in this subgroup; `null` when unavailable. |\n| `position_sign_changed` | Whether the position sign before the first fill differs from the sign after the last fill in this subgroup, including opening from or closing to zero; `null` when position data is unavailable. |\n| `initial_margin_fraction_before` | Initial margin fraction before the first fill (`500` = 5%). |\n| `allocated_margin_usdc_before`, `allocated_margin_usdc_after` | Isolated-margin allocation before the first / after the last fill (raw integer, same format as `*_allocated_margin_usdc_*` in `trades`). |\n\n### Pagination\n\n- Stored order aggregates are selected by their overall last trade ID, newest first. Within each order, returned trade-type/role entries are sorted by their own last trade IDs. The flattened response is not necessarily globally sorted by each entry's `last_trade_id`.\n- If more orders exist, the response includes `next_cursor`. Pass it as `cursor` with the same filters to get the next page. When `next_cursor` is missing, you've reached the end.\n- `limit` counts **orders**. If one order has fills of different `role` or `type` (e.g. part maker, part taker), it comes back as one entry per role/type, so `trades` can contain more entries than `limit`.\n- Orders still receiving fills can move between requests. A fixed `end_timestamp` bounds the query but does not freeze the aggregates or guarantee a stable snapshot. For exports, reconcile overlapping queries using order and fill identifiers. Synthetic entries can share order_id 0, so do not deduplicate on order_id alone.\n\n### Errors\n\n| Code | Message | Cause |\n|---|---|---|\n| `20001` | `invalid param` | Bad or out-of-range parameter (e.g. `limit` > 1000, unknown `type`/`market_type`). |\n| `20001` | `invalid param : timestamps must be on or after exchange start (January 17, 2025 UTC)` | `start_timestamp` / `end_timestamp` before `1737072000000`. |\n| `20001` | `invalid param : start_timestamp must be less than end_timestamp` | Empty or inverted window. |\n| `20001` | `invalid param : invalid order_index_str` | Non-numeric or ≤ 0 order index. |\n| `20009` | `invalid cursor` | Malformed cursor. |\n| `21100` | `account not found: <index>` | Unknown `account_index`. |\n\n### Examples\n\nA one-hour window for one account, maximum page size:\n```\nGET /api/v1/aggregatedTrades?account_index=220807&start_timestamp=1793805000000&end_timestamp=1793808600000&limit=1000\n```\n\nPerps + spot taker fills on one market:\n```\nGET /api/v1/aggregatedTrades?account_index=220807&market_id=1&market_type=perps,spot&role=taker\n```\n\nNext page of the same one-hour query (keep both timestamp filters):\n```\nGET /api/v1/aggregatedTrades?account_index=220807&start_timestamp=1793805000000&end_timestamp=1793808600000&limit=1000&cursor=<URL-encoded next_cursor>\n```\n\nFor the generated endpoint reference, see [aggregatedTrades](https://docs.lighter.xyz/api/orders/aggregatedtrades).",
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Account to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 255,
              "minimum": 0
            },
            "description": "Filter by market."
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "spot",
                  "perps",
                  "bo"
                ]
              }
            },
            "description": "`perps`, `spot`, `bo`. Comma-separated for several, e.g. `perps,spot`.",
            "style": "form",
            "explode": false,
            "example": [
              "perps",
              "spot"
            ]
          },
          {
            "name": "order_index_str",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return only this order (order index as a string). Must parse as a positive signed 64-bit integer."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`next_cursor` from the previous response."
          },
          {
            "name": "ask_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int8",
              "default": -1,
              "minimum": -1,
              "maximum": 1
            },
            "description": "`-1` both sides, `0` buys only, `1` sells only."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "maker",
                "taker"
              ]
            },
            "description": "`maker` or `taker`."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "trade",
                "liquidation",
                "deleverage",
                "market_settlement"
              ]
            },
            "description": "`trade`, `liquidation`, `deleverage`, `market_settlement`. Note the underscore here; the response uses `market-settlement`."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1737072000000
            },
            "description": "**Inclusive** lower bound on the stored order aggregate's last fill time."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1737072000000
            },
            "description": "**Exclusive** upper bound on the stored order aggregate's last fill time."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 100,
              "minimum": 1,
              "maximum": 1000
            },
            "description": "Number of orders per page, `1`–`1000`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregatedTrades"
                },
                "example": {
                  "code": 200,
                  "next_cursor": "eyJ2ZXJzaW9uIjoxLCJ0cmFkZV9pZCI6MzgxODIxMDg1NTR9",
                  "trades": [
                    {
                      "account_index": 281474976710654,
                      "order_id": "36591746915350675",
                      "grouping_id": "36591746915350675",
                      "master_twap_id": null,
                      "market_id": 128,
                      "market_symbol": "SPY",
                      "market_kind": "perps",
                      "is_ask": false,
                      "type": "trade",
                      "role": "maker",
                      "first_trade_id": "38173459320",
                      "last_trade_id": "38182108554",
                      "first_timestamp": 1793807287488,
                      "last_timestamp": 1793808698879,
                      "first_block_height": 374940593,
                      "last_block_height": 374991730,
                      "fill_count": 116,
                      "size": "101.0104",
                      "usd_amount": "77395.189111",
                      "pnl": null,
                      "average_price": "766.21",
                      "fee": "2.438882286892",
                      "integrator_fee": "0.000000000000",
                      "fee_asset_id": 3,
                      "position_size_before": "2314.8726",
                      "entry_quote_before": "1778329.357642",
                      "position_sign_changed": false,
                      "initial_margin_fraction_before": 500,
                      "allocated_margin_usdc_before": 0,
                      "allocated_margin_usdc_after": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or cursor, or account not found; see the error table.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfer/history": {
      "get": {
        "summary": "transfer_history",
        "operationId": "transfer_history",
        "tags": [
          "transactions"
        ],
        "description": "Get transfer history. To fetch an account index, you will need to `auth` the request, unless it's a public pool.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "all",
                  "L2Transfer",
                  "L2MintShares",
                  "L2BurnShares",
                  "L2StakeAssets",
                  "L2UnstakeAssets",
                  "L2CreatePublicPool",
                  "L2CreateStakingPool",
                  "L1BurnShares",
                  "L1UnstakeAssets",
                  "ReferralProgramPayout"
                ]
              }
            },
            "description": "Select one of the listed record types."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferHistory"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transferFeeInfo": {
      "get": {
        "summary": "transferFeeInfo",
        "operationId": "transferFeeInfo",
        "tags": [
          "info"
        ],
        "description": "Return the transfer fee for an account and optional destination. Use the returned fee when signing a transfer; it is charged in addition to the transferred amount.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "to_account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": -1
            },
            "description": "Destination account index; -1 means it is not specified."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferFeeInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tx": {
      "get": {
        "summary": "tx",
        "operationId": "tx",
        "tags": [
          "transactions"
        ],
        "description": "Get transaction by hash or sequence index",
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "hash",
                "sequence_index"
              ]
            },
            "description": "Field used to identify the requested record."
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Identifier corresponding to the selected by field."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichedTx"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/txFromL1TxHash": {
      "get": {
        "summary": "txFromL1TxHash",
        "operationId": "txFromL1TxHash",
        "tags": [
          "transactions"
        ],
        "description": "Get L1 transaction by L1 transaction hash",
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 transaction hash."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichedTx"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/withdraw/history": {
      "get": {
        "summary": "withdraw_history",
        "operationId": "withdraw_history",
        "tags": [
          "transactions"
        ],
        "description": "Get withdraw history. Secure withdrawals are only set to `claimable` when ready. You should only expect the `completed` status on fast withdrawals. The filter supports all, pending and claimable; completed, failed and refunded cannot be selected individually.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "pending",
                "claimable"
              ]
            },
            "description": "Select the records to include using the listed filter values. Allowed values: all, pending, claimable."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawHistory"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/withdrawalDelay": {
      "get": {
        "summary": "withdrawalDelay",
        "operationId": "withdrawalDelay",
        "tags": [
          "info"
        ],
        "description": "Withdrawal delay in seconds",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespWithdrawalDelay"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/info": {
      "get": {
        "summary": "info",
        "operationId": "info",
        "tags": [
          "system"
        ],
        "description": "Get info of Lighter",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZkLighterInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fastwithdraw": {
      "post": {
        "summary": "fastwithdraw",
        "operationId": "fastwithdraw",
        "tags": [
          "bridge"
        ],
        "description": "Submit a signed transfer to the fast-withdraw pool and specify the destination Ethereum address. Requires the Authorization header.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqFastwithdraw"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fastwithdraw/info": {
      "get": {
        "summary": "fastwithdraw_info",
        "operationId": "fastwithdraw_info",
        "tags": [
          "bridge"
        ],
        "description": "Get fast withdraw info",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetFastwithdrawalInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tokens": {
      "get": {
        "summary": "tokens",
        "operationId": "tokens",
        "tags": [
          "api-keys"
        ],
        "description": "Get read only auth tokens for an account",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetApiTokens"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tokens/create": {
      "post": {
        "summary": "tokens_create",
        "operationId": "tokens_create",
        "tags": [
          "api-keys"
        ],
        "description": "Create an API token for read-only access",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqPostApiToken"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespPostApiToken"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tokens/revoke": {
      "post": {
        "summary": "tokens_revoke",
        "operationId": "tokens_revoke",
        "tags": [
          "api-keys"
        ],
        "description": "Revoke read only auth token for an account",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqRevokeApiToken"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespRevokeApiToken"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/createIntentAddress": {
      "post": {
        "summary": "createIntentAddress",
        "operationId": "createIntentAddress",
        "tags": [
          "bridge"
        ],
        "description": "Create a bridge intent address for CCTP bridge",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqCreateIntentAddress"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateIntentAddressResp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deposit/networks": {
      "get": {
        "summary": "deposit_networks",
        "operationId": "deposit_networks",
        "tags": [
          "bridge"
        ],
        "description": "Get networks that support deposits via intent address",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeSupportedNetworks"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchangeMetrics": {
      "get": {
        "summary": "exchangeMetrics",
        "operationId": "exchangeMetrics",
        "tags": [
          "info"
        ],
        "description": "Get exchange metrics. When filtering by market, use the market symbol as a value.",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "h",
                "d",
                "w",
                "m",
                "q",
                "y",
                "all"
              ]
            },
            "description": "For tps: h, d or w. For buyback/buyback_usdc and all other kinds: w, m, q, y or all. Allowed values: h, d, w, m, q, y, all."
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "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",
                "buyback_usdc",
                "attribution_maker_fee",
                "attribution_taker_fee"
              ]
            },
            "description": "Metric to retrieve; period availability depends on this value."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "byMarket"
              ]
            },
            "description": "Use byMarket to select one market for trade-related metrics; omit for exchange totals. Allowed values: byMarket."
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Market symbol when filter=byMarket, for example ETH."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetExchangeMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/layer1BasicInfo": {
      "get": {
        "summary": "layer1BasicInfo",
        "operationId": "layer1BasicInfo",
        "tags": [
          "system"
        ],
        "description": "Get Lighter l1 general info, including contract address and rpc info. `contract_addresses` lists `ZkLighterContract` and `USDCContract`, plus `L1CoreMessagingContract` where the L1CoreMessaging contract is deployed and `FaucetContract` where a faucet is deployed (testnet).",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Layer1BasicInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/create": {
      "post": {
        "summary": "referral_create",
        "operationId": "referral_create",
        "tags": [
          "referral"
        ],
        "description": "Create referral code",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqCreateReferralCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/get": {
      "get": {
        "summary": "referral_get",
        "operationId": "referral_get",
        "tags": [
          "referral"
        ],
        "description": "Get referral code",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/kickback/update": {
      "post": {
        "summary": "referral_kickback_update",
        "operationId": "referral_kickback_update",
        "tags": [
          "referral"
        ],
        "description": "Update kickback percentage for referral rewards (allowed once per day)",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqUpdateKickback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespUpdateKickback"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/update": {
      "post": {
        "summary": "referral_update",
        "operationId": "referral_update",
        "tags": [
          "referral"
        ],
        "description": "Update referral code (allowed once per account)",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqUpdateReferralCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespUpdateReferralCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/use": {
      "post": {
        "summary": "referral_use",
        "operationId": "referral_use",
        "tags": [
          "referral"
        ],
        "description": "Use a referral code. You can change this at a later time.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqUseReferralCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/executeStats": {
      "get": {
        "summary": "executeStats",
        "operationId": "executeStats",
        "tags": [
          "info"
        ],
        "description": "Return execution statistics comparing slippage across exchanges for the requested reporting period.",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "d",
                "w",
                "m",
                "q",
                "y",
                "all"
              ]
            },
            "description": "Requested reporting period. Allowed values: d, w, m, q, y, all."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetExecuteStats"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leaseOptions": {
      "get": {
        "summary": "leaseOptions",
        "operationId": "leaseOptions",
        "tags": [
          "fee-credits"
        ],
        "description": "Returns available lease duration/rate tiers, sorted by duration descending.",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetLeaseOptions"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leases": {
      "get": {
        "summary": "leases",
        "operationId": "leases",
        "tags": [
          "fee-credits"
        ],
        "description": "Returns paginated lease entries for an account, most recent first. Supports read-only auth via signature/account_index/timestamp query params.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to fetch leases for"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pagination cursor from a previous response"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "format": "uint64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of results to return (1–100, default 20)"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetLeases"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/litLease": {
      "post": {
        "summary": "litLease",
        "operationId": "litLease",
        "tags": [
          "fee-credits"
        ],
        "description": "Submit a LIT lease transfer. The server calculates the required fee based on lease_amount and duration_days, then executes the transfer. Fee formula (integer arithmetic): fee = lease_amount × (annual_rate × 100) × duration_days / (360 × 10000).",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqLITLease"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TxHash"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referral/userReferrals": {
      "get": {
        "summary": "userReferrals",
        "operationId": "referral_userReferrals",
        "tags": [
          "referral"
        ],
        "description": "Get user referrals",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "stats_start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Inclusive start of referral statistics, as a Unix timestamp in milliseconds."
          },
          {
            "name": "stats_end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "End of referral statistics, as a Unix timestamp in milliseconds."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 300
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "is_eligible",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Restrict statistics to users eligible for the referral program when true."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserReferrals"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/systemConfig": {
      "get": {
        "summary": "systemConfig",
        "operationId": "systemConfig",
        "tags": [
          "system"
        ],
        "description": "Get system config",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemConfig"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tokenlist": {
      "get": {
        "summary": "tokenlist",
        "operationId": "tokenlist",
        "tags": [
          "info"
        ],
        "description": "Get token list and their metadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenList"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/getMakerOnlyApiKeys": {
      "get": {
        "summary": "getMakerOnlyApiKeys",
        "operationId": "getMakerOnlyApiKeys",
        "tags": [
          "api-keys"
        ],
        "description": "Get maker-only API key indexes",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetMakerOnlyApiKeys"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/setMakerOnlyApiKeys": {
      "post": {
        "summary": "setMakerOnlyApiKeys",
        "operationId": "setMakerOnlyApiKeys",
        "tags": [
          "api-keys"
        ],
        "description": "Set maker-only API key indexes. This replaces the current list; pass all indexes you want marked as maker-only. Pass [] to clear all maker-only restrictions.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqSetMakerOnlyApiKeys"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ReqSetMakerOnlyApiKeys"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespSetMakerOnlyApiKeys"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partnerStats": {
      "get": {
        "summary": "partnerStats",
        "operationId": "partnerStats",
        "description": "Get partner stats. If timestamps are not provided, all-time stats will be returned.",
        "tags": [
          "info"
        ],
        "parameters": [
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds."
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Requested reporting period."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStats"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deposit/latest": {
      "get": {
        "summary": "deposit_latest",
        "operationId": "deposit_latest",
        "tags": [
          "bridge"
        ],
        "description": "Return the latest bridge deposit for the given L1 address, including bridge stage and status. If no record is available, the API returns an error such as User has no pending deposit; a returned record can have status completed.",
        "parameters": [
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deposit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/syntheticSpotInfo": {
      "get": {
        "summary": "syntheticSpotInfo",
        "operationId": "syntheticSpotInfo",
        "tags": [
          "info"
        ],
        "description": "Get synthetic spot information for a symbol. See [RWA pricing](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism) for the pricing methodology.",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Market symbol, for example ETH."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespSyntheticSpotInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rfq/respond": {
      "post": {
        "summary": "rfq_respond",
        "operationId": "rfq_respond",
        "tags": [
          "rfq"
        ],
        "description": "Respond to RFQ. Makers have up to 1 minute to answer an RFQ, after which the user has up to 2 minutes to execute the trade. Quotes are not locked. Makers place orders directly into the order book and can dynamically adjust pricing.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqRespondToRFQ"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespRespondToRFQ"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rfq/list": {
      "get": {
        "summary": "rfq_list",
        "operationId": "rfq_list",
        "tags": [
          "rfq"
        ],
        "description": "List RFQs",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 281474976710655
            },
            "description": "Account index to query."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "opened",
                "order_created",
                "closed"
              ]
            },
            "description": "Filter requests by RFQ status."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 20
            },
            "description": "Maximum number of records to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespListRFQs"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rfq/get": {
      "get": {
        "summary": "rfq_get",
        "operationId": "rfq_get",
        "tags": [
          "rfq"
        ],
        "description": "Get RFQ by ID",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "rfq_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifier returned when the RFQ was created."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetRFQ"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rfq/create": {
      "post": {
        "summary": "rfq_create",
        "operationId": "rfq_create",
        "tags": [
          "rfq"
        ],
        "description": "Create RFQ. Makers have up to 1 minute to answer an RFQ, after which the user has up to 2 minutes to execute the trade. Quotes are not locked. Makers place orders directly into the order book and can dynamically adjust pricing.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqCreateRFQ"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespCreateRFQ"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rfq/update": {
      "post": {
        "summary": "rfq_update",
        "operationId": "rfq_update",
        "tags": [
          "rfq"
        ],
        "description": "Update RFQ status",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqUpdateRFQ"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespUpdateRFQ"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/markPriceCandles": {
      "get": {
        "summary": "markPriceCandles",
        "operationId": "markPriceCandles",
        "tags": [
          "candlesticks"
        ],
        "description": "Get mark price candles",
        "parameters": [
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int16"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "resolution",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "5m",
                "15m",
                "30m",
                "1h",
                "4h",
                "12h",
                "1d"
              ]
            },
            "description": "Time interval for each returned data point. Allowed values: 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000000
            },
            "description": "End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds."
          },
          {
            "name": "count_back",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length."
          },
          {
            "name": "connect_opens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Connect candle opens to the previous close."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkPriceCandles"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountOrderFills": {
      "get": {
        "summary": "accountOrderFills",
        "operationId": "accountOrderFills",
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai"
          }
        ],
        "tags": [
          "orders"
        ],
        "description": "Get an account's fills in one market and time range, newest first: filled orders (TWAP parent orders excluded) plus deleverage and market-settlement trades. Only filled orders are paged by `limit` and `next_cursor`; each page also returns the deleverage and market-settlement fills in its time span. `auth` can be generated using the SDK.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "market_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Public market identifier returned by orderBooks or events."
          },
          {
            "name": "between_timestamps",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start and end Unix timestamps in seconds, separated by a hyphen: 1792627200-1792713600. The start must be before the end."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 1000
            },
            "description": "Maximum number of filled orders to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderFills"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accountOrders": {
      "get": {
        "summary": "accountOrders",
        "operationId": "accountOrders",
        "tags": [
          "orders"
        ],
        "description": "Get account orders by client order indexes. Account index defaults to the authorization token's account. Supports the last 10K active orders (with no time limits), or the last 1K inactive orders (in the last 24 hours).",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 281474976710655
            },
            "description": "Account index to query."
          },
          {
            "name": "client_order_indexes",
            "in": "query",
            "description": "comma-separated int64s, e.g. \"123,456\", with a limit of 20.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Orders"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketPriceCharts": {
      "get": {
        "summary": "marketPriceCharts",
        "operationId": "marketPriceCharts",
        "tags": [
          "candlesticks"
        ],
        "description": "Get last 24h hourly prices for all markets (mark price for perps, index price for spot)",
        "parameters": [
          {
            "name": "market_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            },
            "description": "Comma-separated public market identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketPriceCharts"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/livePoints/total": {
      "get": {
        "summary": "livePoints_total",
        "operationId": "livePoints_total",
        "tags": [
          "points"
        ],
        "description": "**Lighter on Robinhood Chain only.**\n\nGet RH live points total for an account",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivePointsTotal"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.rh.lighter.xyz",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://api.rh-testnet.lighter.xyz",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/api/v1/leaderboard": {
      "get": {
        "summary": "leaderboard",
        "operationId": "leaderboard",
        "tags": [
          "points"
        ],
        "description": "**Lighter on Robinhood Chain only.**\n\nGet points leaderboard",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "weekly",
                "all",
                "competition"
              ]
            },
            "description": "Select one of the listed record types."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "competition_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Competition identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Leaderboard"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.rh.lighter.xyz",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://api.rh-testnet.lighter.xyz",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/api/v1/referral/stats": {
      "get": {
        "summary": "referral_stats",
        "operationId": "referral_stats",
        "tags": [
          "referral"
        ],
        "description": "Get trade stats summed across a referrer's referred users",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "is_eligible",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Restrict statistics to users eligible for the referral program when true."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralStats"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/export/historicalTrades": {
      "get": {
        "summary": "export_historicalTrades",
        "operationId": "export_historicalTrades",
        "tags": [
          "orders"
        ],
        "description": "Export global historical trades, updated daily at 8 PM UTC. Requires a one-time 100 LIT L2Transfer to 0x4FD058F25bE85E459ec552cA8e4C696FD1D34125. Returns a presigned S3 URL valid for 1 hour.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "l1_address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ethereum L1 wallet address."
          },
          {
            "name": "date",
            "in": "query",
            "description": "UTC day, YYYY-MM-DD",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoricalTradesExportData"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pnlLeaderboard": {
      "get": {
        "summary": "pnlLeaderboard",
        "operationId": "pnlLeaderboard",
        "tags": [
          "account"
        ],
        "description": "Get pnl leaderboard",
        "parameters": [
          {
            "name": "time_window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ],
              "default": "all"
            },
            "description": "Time window used to calculate leaderboard performance."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pnl",
                "roi",
                "volume",
                "account_value",
                "streak"
              ],
              "default": "pnl"
            },
            "description": "Field to sort by."
          },
          {
            "name": "sort_dir",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "description": "Sort direction."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "uint8",
              "default": 10,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "minimum": 0,
              "maximum": 100000
            },
            "description": "Number of records to skip."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search leaderboard entries by the supported account name or address."
          },
          {
            "name": "l1_addresses",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated L1 addresses; maximum 150."
          },
          {
            "name": "integrator_account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Filter trades or statistics attributed to this integrator account index."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PnlLeaderboard"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/priceOracleInfo": {
      "get": {
        "summary": "priceOracleInfo",
        "operationId": "priceOracleInfo",
        "tags": [
          "info"
        ],
        "description": "Get price oracle info (source in use, median exchanges, price cap) for all markets or a single symbol",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Market symbol, for example ETH."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespPriceOracleInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "summary": "events",
        "operationId": "events",
        "tags": [
          "binary-options"
        ],
        "description": "**Lighter only.**\n\nGet events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.\n\nUse this endpoint to discover binary options markets and read their actual trading windows, decimals and market fees. Binary options are excluded from `orderBookDetails`. See [Discover markets](https://docs.lighter.xyz/developers/binary-options/discover-markets) for examples, pagination and lifecycle statuses.",
        "parameters": [
          {
            "name": "event_ids",
            "in": "query",
            "description": "comma-separated positive IDs, max 50",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market_ids",
            "in": "query",
            "description": "comma-separated positive IDs, max 50",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "creator_account_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Only return events created by this account."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "active",
            "in": "query",
            "description": "true: at least one outcome still tradeable; false: none",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          },
          {
            "name": "tag",
            "in": "query",
            "description": "series tag; creator filter is optional",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "one_off",
                "recurrent"
              ]
            },
            "description": "Event category filter."
          },
          {
            "name": "start_from",
            "in": "query",
            "description": "inclusive start_at, Unix milliseconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "start_before",
            "in": "query",
            "description": "exclusive start_at, Unix milliseconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "start_at"
              ],
              "default": "id"
            },
            "description": "Field used to sort the result."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "description": "Ascending or descending result order."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetEvents"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://api.testnet.lighter.xyz",
            "description": "Lighter testnet"
          }
        ]
      }
    },
    "/api/v1/feeTiers": {
      "get": {
        "summary": "feeTiers",
        "operationId": "feeTiers",
        "tags": [
          "binary-options"
        ],
        "description": "**Lighter only.**\n\nGet fee tiers. filter=perps|spot returns the regular user tiers (both market types share them). filter=bo returns BO volume tiers and LIT staking discount tiers; filter=all returns everything. An account's BO multiplier is the BO tier fee_rate times the staking fee_rate, applied to each BO market's maker/taker fee (see /api/v1/events) and then scaled by 1 - trade_price / settlement_cap.\n\nUse `filter=bo` to retrieve binary options volume tiers (`bo_tiers`) and LIT staking discounts (`staking_tiers`). Fetch current values rather than hard-coding the tier table. [account limits](https://docs.lighter.xyz/api/account/accountlimits) returns the account-specific `bo_fee_rate`; see [Binary options fees](https://docs.lighter.xyz/developers/binary-options/trading-and-fees#fees) for the calculation.",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "bo",
                "perps",
                "spot"
              ],
              "default": "all"
            },
            "description": "Select the records to include using the listed filter values. Allowed values: all, bo, perps, spot."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeTiers"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://api.testnet.lighter.xyz",
            "description": "Lighter testnet"
          }
        ]
      }
    },
    "/api/v1/portfolio/boPnl": {
      "get": {
        "summary": "portfolio_boPnl",
        "operationId": "portfolio_boPnl",
        "tags": [
          "binary-options"
        ],
        "description": "Return realized binary options PnL grouped by event, newest first. Includes traded open and unsettled markets. total_pnl is gross of fees; settlement_pnl is null until a position settles. Available on Lighter only.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          },
          {
            "name": "account_index",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Account index to query."
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Binary options event identifier."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Opaque pagination cursor returned by the previous response; pass it unchanged."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of records to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetBoPnL"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://api.testnet.lighter.xyz",
            "description": "Lighter testnet"
          }
        ]
      }
    },
    "/api/v1/upDownCandles": {
      "get": {
        "summary": "upDownCandles",
        "operationId": "upDownCandles",
        "tags": [
          "binary-options"
        ],
        "description": "**Lighter only.**\n\nGet the OHLC candles (1s = the exact price observations, or 30s) of an up/down market series (symbol + duration, e.g. btc/5m) in a bounded time range (at most 24h), oldest first. Pass next_cursor as start_timestamp to page forward; live candles are on the `up_down_candle/{symbol}/{duration}/{resolution}` websocket channel.\n\nThese candles describe the underlying price used to resolve an Up/Down market. They are separate from order-book candles. Timestamps are in Unix seconds, and each request covers at most 24 hours. See [Underlying price](https://docs.lighter.xyz/developers/binary-options/discover-markets#underlying-price) and [Live Up/Down candlesticks](https://docs.lighter.xyz/developers/binary-options/websocket#up-down-candlesticks).",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "description": "market series: underlying (case-insensitive) ...",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "duration",
            "in": "query",
            "description": "... and market duration, e.g. 30s or 5m",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolution",
            "in": "query",
            "description": "1s candles are the observations themselves Allowed values: 1s, 30s.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1s",
                "30s"
              ],
              "default": "1s"
            }
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "description": "Inclusive start of the requested time range, as a Unix timestamp in milliseconds.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000
            }
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "description": "End of the requested time range, as a Unix timestamp in milliseconds.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 5000000000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 1000,
              "minimum": 1,
              "maximum": 3600
            },
            "description": "Maximum number of records to return."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespGetUpDownCandles"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mainnet.zklighter.elliot.ai",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://api.testnet.lighter.xyz",
            "description": "Lighter testnet"
          }
        ]
      }
    },
    "/api/v1/setAccountMetadata": {
      "post": {
        "summary": "setAccountMetadata",
        "operationId": "setAccountMetadata",
        "tags": [
          "transactions"
        ],
        "description": "Set JSON metadata on a target account. The master and target accounts must be under the same L1 address; an auth token from any account under that L1 address can be used.\n\nThe `metadata form field is a JSON-encoded string with optional `name` and `description` fields (each up to 256 characters) and an optional `metadata.color` value in `#RRGGBB` or `#RRGGBBAA` format.",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Auth token in the Authorization header."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReqSetAccountMetadata"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultCode"
                }
              }
            }
          }
        },
        "x-internal": false
      }
    },
    "/accounts/{param}/assets": {
      "get": {
        "tags": [
          "explorer-account"
        ],
        "summary": "Get Account Assets",
        "parameters": [
          {
            "description": "L1 Address or AccountIndex",
            "name": "param",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.AccountAssetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Account Assets. Account path parameters accept an L1 address or an account index.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/accounts/{param}/logs": {
      "get": {
        "tags": [
          "explorer-account"
        ],
        "summary": "Get Account by Address",
        "parameters": [
          {
            "description": "L1 Address or AccountIndex",
            "name": "param",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Log Types",
            "name": "pub_data_type",
            "in": "query",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "Empty",
                  "L1Deposit",
                  "L1CreateMarket",
                  "L1UpdateMarket",
                  "L2CreateSubAccount",
                  "L2CreatePublicPool",
                  "L2UpdatePublicPool",
                  "L2MintShares",
                  "L2UpdateLeverage",
                  "L2UpdateMargin",
                  "L2Transfer",
                  "Withdraw",
                  "Trade",
                  "TradeWithFunding",
                  "LiquidationTrade",
                  "LiquidationTradeWithFunding",
                  "BurnedShares",
                  "ExitPosition",
                  "ExitPositionWithFunding",
                  "Deleverage",
                  "DeleverageWithFunding",
                  "L1RegisterAsset",
                  "L1UpdateAsset",
                  "L1CreateSpotMarket",
                  "L1UpdateSpotMarket",
                  "WithdrawV2",
                  "L1CreateMarketV2",
                  "L1DepositV2",
                  "L1UpdateMarketV2",
                  "L2TransferV2",
                  "L2CreateStakingPool",
                  "L2UpdateStakingPool",
                  "L2StakeAssets",
                  "UnstakeAssets",
                  "L1SetSystemConfig",
                  "ExecutedPendingUnlock",
                  "L2UpdateAccountConfig",
                  "L2UpdateMarketConfig",
                  "InternalLiquidateSpot",
                  "L2UpdateAssetConfig",
                  "L2UpdateAccountAssetConfig"
                ],
                "type": "string"
              }
            }
          },
          {
            "description": "Limit",
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "description": "Offset",
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response.Tx"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Account Logs. Account path parameters accept an L1 address or an account index.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/accounts/{param}/positions": {
      "get": {
        "tags": [
          "explorer-account"
        ],
        "summary": "Get Account by Address",
        "parameters": [
          {
            "description": "L1 Address or AccountIndex",
            "name": "param",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.AccountPositionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Account Positions. Account path parameters accept an L1 address or an account index.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/batches": {
      "get": {
        "tags": [
          "explorer-batches"
        ],
        "summary": "Get Recent Batches",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response.RecentBatch"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Recent Batches. Returns the latest 20 items. The limit query parameter is not supported.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/batches/{batchId}": {
      "get": {
        "tags": [
          "explorer-batches"
        ],
        "summary": "Get Batch by Id",
        "parameters": [
          {
            "description": "Batch ID",
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.Batch"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Batch by Id.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/blocks": {
      "get": {
        "tags": [
          "explorer-blocks"
        ],
        "summary": "Get Recent Blocks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response.RecentBlock"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Recent Blocks. Returns the latest 20 items. The limit query parameter is not supported.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/blocks/{blockId}": {
      "get": {
        "tags": [
          "explorer-blocks"
        ],
        "summary": "Get Block by Id",
        "parameters": [
          {
            "description": "Block ID",
            "name": "blockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.Block"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Block by Id.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/logs/{hash}": {
      "get": {
        "tags": [
          "explorer-logs"
        ],
        "summary": "Get Log by Hash",
        "parameters": [
          {
            "description": "Log Hash",
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.TxDetailed"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Log by Hash.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/markets": {
      "get": {
        "tags": [
          "explorer-markets"
        ],
        "summary": "List all markets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response.Market"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "List all markets.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/markets/{symbol}/logs": {
      "get": {
        "tags": [
          "explorer-markets"
        ],
        "summary": "Get Market Latest Logs. To query perpetual markets, use the symbol alone. For spot markets, use `symbol-quote` e.g. `eth-usdc`",
        "parameters": [
          {
            "description": "Symbol",
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Limit",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100
            },
            "required": false
          },
          {
            "description": "Offset",
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response.MarketTx"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get logs for a market. Use the symbol alone for perpetual markets (eth), or symbol-quote for spot markets (eth-usdc).",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/search": {
      "get": {
        "tags": [
          "explorer-search"
        ],
        "summary": "Search for blocks, batches, transactions, or accounts",
        "parameters": [
          {
            "description": "Search query (block number, batch number, tx hash, account L1 address, or account index)",
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/handler.SearchResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Search for blocks, batches, transactions, or accounts.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/stats/tx": {
      "get": {
        "tags": [
          "explorer-stats"
        ],
        "summary": "Get Tx Stats",
        "parameters": [
          {
            "description": "Aggregation period; currently only 1h is supported.",
            "name": "aggregation_period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1h"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.StatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "Get Tx Stats.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    },
    "/total": {
      "get": {
        "tags": [
          "explorer-stats"
        ],
        "summary": "List Total Values",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.TotalValues"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "description": "List Total Values.",
        "servers": [
          {
            "url": "https://explorer.elliot.ai/api",
            "description": "Lighter mainnet"
          },
          {
            "url": "https://explorerapi.testnet.lighter.xyz/api",
            "description": "Lighter testnet"
          },
          {
            "url": "https://explorerapi.rh.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain mainnet"
          },
          {
            "url": "https://explorerapi.rh-testnet.lighter.xyz/api",
            "description": "Lighter on Robinhood Chain testnet"
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://mainnet.zklighter.elliot.ai",
      "description": "Lighter mainnet"
    },
    {
      "url": "https://api.testnet.lighter.xyz",
      "description": "Lighter testnet"
    },
    {
      "url": "https://api.rh.lighter.xyz",
      "description": "Lighter on Robinhood Chain mainnet"
    },
    {
      "url": "https://api.rh-testnet.lighter.xyz",
      "description": "Lighter on Robinhood Chain testnet"
    }
  ],
  "components": {
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200,
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "message": {
            "type": "string",
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "account_type": {
            "type": "integer",
            "format": "uint8",
            "example": 1
          },
          "account_trading_mode": {
            "type": "integer",
            "format": "uint8",
            "example": 1,
            "description": "Classic=0 and Unified=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",
            "description": "Transaction execution time in Unix microseconds."
          }
        },
        "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",
          "account_trading_mode",
          "transaction_time"
        ]
      },
      "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_balance": {
            "type": "string",
            "example": "1000"
          },
          "margin_mode": {
            "type": "string",
            "example": "enabled",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          }
        },
        "title": "AccountAsset",
        "required": [
          "symbol",
          "asset_id",
          "balance",
          "locked_balance",
          "margin_mode",
          "margin_balance",
          "multiplier"
        ]
      },
      "AccountApiKeys": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "api_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            }
          }
        },
        "title": "AccountApiKeys",
        "required": [
          "code",
          "api_keys"
        ]
      },
      "AccountLimits": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "max_llp_percentage": {
            "type": "integer",
            "format": "int32",
            "example": 25
          },
          "user_tier": {
            "type": "string",
            "example": "std"
          },
          "can_create_public_pool": {
            "type": "boolean",
            "example": true
          },
          "max_llp_amount": {
            "type": "string",
            "example": "1000000"
          },
          "current_maker_fee_tick": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "current_taker_fee_tick": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "effective_lit_stakes": {
            "type": "string",
            "description": "Effective staked LIT shares including active leases."
          },
          "leased_lit": {
            "type": "string",
            "description": "Total actively leased LIT."
          },
          "user_tier_name": {
            "type": "string",
            "example": "standard"
          },
          "user_tier_last_update": {
            "type": "integer",
            "format": "int64"
          },
          "bo_user_tier_name": {
            "type": "string",
            "example": "bo_standard",
            "description": "Lighter only; not returned on Robinhood Chain."
          },
          "bo_fee_rate": {
            "type": "number",
            "format": "double",
            "example": 0.72,
            "description": "Lighter only; not returned on Robinhood Chain. Product of the staking and BO volume multipliers; 0.72 means a 28% discount."
          },
          "volume_quota_remaining": {
            "type": "string",
            "example": "1010780",
            "description": "Volume quota left for the account's L1 address, in whole transactions (rounded down). Shared by all sub-accounts of the L1 address."
          },
          "volume_quota_cap": {
            "type": "string",
            "example": "15000000",
            "description": "Highest balance trading volume alone refills to."
          },
          "volume_quota_purchase_cap": {
            "type": "string",
            "example": "30000000",
            "description": "Highest balance reachable with purchased quota; buyVolumeQuota rejects purchases that would exceed it."
          }
        },
        "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"
        ]
      },
      "AccountMetadata": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "can_invite": {
            "type": "boolean"
          },
          "referral_points_percentage": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "can_rfq": {
            "type": "boolean"
          },
          "can_rfq_market_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/SubAccountMetadata"
          },
          "agent_enabled": {
            "type": "boolean"
          },
          "instance": {
            "type": "string"
          }
        },
        "title": "AccountMetadata",
        "required": [
          "account_index",
          "name",
          "description",
          "can_invite",
          "referral_points_percentage",
          "can_rfq",
          "can_rfq_market_ids",
          "agent_enabled",
          "created_at",
          "metadata"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "AccountMetadatas": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "account_metadatas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountMetadata"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "AccountMetadatas",
        "required": [
          "code",
          "account_metadatas"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "AccountPnL": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "example": "15m"
          },
          "pnl": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/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"
          },
          "margin_set_flag": {
            "type": "integer",
            "format": "int32",
            "example": 1
          }
        },
        "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",
          "margin_set_flag",
          "allocated_margin"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "Announcements": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "announcements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Announcement"
            }
          }
        },
        "title": "Announcements",
        "required": [
          "code",
          "announcements"
        ]
      },
      "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": 18
          },
          "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",
              "priced_only"
            ],
            "description": "enabled: asset can be used as margin; disabled: asset cannot be used as margin; priced_only: asset has a witnessed index price and is included in the margin-asset list, but cannot be used as margin."
          },
          "index_price": {
            "type": "string",
            "example": "3024.66"
          },
          "l1_address": {
            "type": "string",
            "example": "0x0000000000000000000000000000000000000000"
          },
          "global_supply_cap": {
            "type": "string",
            "example": "1000000"
          },
          "liquidation_fee": {
            "type": "string",
            "example": "0.01"
          },
          "liquidation_threshold": {
            "type": "string",
            "example": "0.8"
          },
          "loan_to_value": {
            "type": "string",
            "example": "0.5"
          },
          "price_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 4
          },
          "total_supplied": {
            "type": "string",
            "example": "100"
          },
          "user_supply_cap": {
            "type": "string",
            "example": "1000"
          },
          "liquidation_factor": {
            "type": "string",
            "example": "0.9"
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          }
        },
        "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_factor",
          "liquidation_fee",
          "global_supply_cap",
          "user_supply_cap",
          "total_supplied",
          "multiplier"
        ]
      },
      "AssetDetails": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "asset_details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            }
          }
        },
        "title": "AssetDetails",
        "required": [
          "code",
          "asset_details"
        ]
      },
      "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",
            "description": "Transaction execution time in Unix microseconds."
          }
        },
        "title": "ApiKey",
        "required": [
          "account_index",
          "api_key_index",
          "nonce",
          "public_key",
          "transaction_time"
        ]
      },
      "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"
        ]
      },
      "Candle": {
        "type": "object",
        "properties": {
          "t": {
            "type": "integer",
            "format": "int64",
            "example": 1767700500000,
            "description": "Timestamp Unix timestamp in milliseconds."
          },
          "o": {
            "type": "number",
            "format": "double",
            "example": 3236.86,
            "description": "Open price"
          },
          "h": {
            "type": "number",
            "format": "double",
            "example": 3237.78,
            "description": "High price"
          },
          "l": {
            "type": "number",
            "format": "double",
            "example": 3235.36,
            "description": "Low price"
          },
          "c": {
            "type": "number",
            "format": "double",
            "example": 3235.39,
            "description": "Close price"
          },
          "v": {
            "type": "number",
            "format": "double",
            "example": 55.1632,
            "description": "Base token volume (volume0)"
          },
          "V": {
            "type": "number",
            "format": "double",
            "example": 178530.793575,
            "description": "Quote token volume (volume1)"
          },
          "i": {
            "type": "integer",
            "format": "int64",
            "example": 779870452,
            "description": "Last trade ID"
          },
          "C": {
            "type": "number",
            "format": "double",
            "example": 3024.66,
            "description": "Unadjusted close price, present only when it differs from c."
          },
          "H": {
            "type": "number",
            "format": "double",
            "example": 3034.66,
            "description": "Unadjusted high price, present only when it differs from h."
          },
          "L": {
            "type": "number",
            "format": "double",
            "example": 3014.66,
            "description": "Unadjusted low price, present only when it differs from l."
          },
          "O": {
            "type": "number",
            "format": "double",
            "example": 3024.66,
            "description": "Unadjusted open price, present only when it differs from o."
          }
        },
        "title": "Candle",
        "description": "Abbreviated candle format. Zero values are omitted. Fields with zero or empty values may be omitted; handle optional properties when decoding responses.",
        "required": [
          "t",
          "o",
          "h",
          "l",
          "c",
          "v",
          "V",
          "i"
        ]
      },
      "Candles": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "r": {
            "type": "string",
            "example": "1m",
            "description": "Resolution"
          },
          "c": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Candle"
            },
            "description": "Array of candles (max 500 per call)"
          },
          "message": {
            "type": "string"
          }
        },
        "title": "Candles",
        "required": [
          "code",
          "r",
          "c"
        ]
      },
      "ContractAddress": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "1"
          },
          "address": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          }
        },
        "title": "ContractAddress",
        "required": [
          "name",
          "address"
        ]
      },
      "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"
        ]
      },
      "DepositHistory": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "deposits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepositHistoryItem"
            }
          },
          "cursor": {
            "type": "string"
          }
        },
        "title": "DepositHistory",
        "required": [
          "code",
          "deposits",
          "cursor"
        ]
      },
      "DepositHistoryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "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"
          },
          "asset_id": {
            "type": "integer",
            "format": "int16"
          }
        },
        "title": "DepositHistoryItem",
        "required": [
          "id",
          "amount",
          "timestamp",
          "status",
          "l1_tx_hash",
          "asset_id"
        ]
      },
      "DetailedAccount": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200,
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "message": {
            "type": "string",
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "account_type": {
            "type": "integer",
            "format": "uint8",
            "example": 1
          },
          "account_trading_mode": {
            "type": "integer",
            "format": "uint8",
            "example": 1,
            "description": "Classic=0 and Unified=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"
          },
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "can_invite": {
            "type": "boolean"
          },
          "referral_points_percentage": {
            "type": "string"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPosition"
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAsset"
            }
          },
          "total_asset_value": {
            "type": "string",
            "example": "19995"
          },
          "cross_asset_value": {
            "type": "string",
            "example": "19995"
          },
          "pool_info": {
            "$ref": "#/components/schemas/PublicPoolInfo"
          },
          "shares": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPoolShare"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "transaction_time": {
            "type": "integer",
            "format": "int64",
            "description": "Transaction execution time in Unix microseconds."
          },
          "pending_unlocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendingUnlock"
            }
          },
          "approved_integrators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovedIntegrator"
            }
          },
          "can_rfq": {
            "type": "boolean"
          },
          "cross_initial_margin_requirement": {
            "type": "string",
            "example": "5998.500000"
          },
          "cross_maintenance_margin_requirement": {
            "type": "string",
            "example": "2999.250000"
          },
          "can_rfq_market_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/SubAccountMetadata"
          },
          "agent_enabled": {
            "type": "boolean"
          },
          "bo_positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountBinaryOptionsPosition"
            }
          },
          "instance": {
            "type": "string"
          }
        },
        "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",
          "can_rfq_market_ids",
          "agent_enabled",
          "created_at",
          "metadata",
          "positions",
          "assets",
          "total_asset_value",
          "cross_asset_value",
          "cross_initial_margin_requirement",
          "cross_maintenance_margin_requirement",
          "shares",
          "bo_positions"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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": "#/components/schemas/DetailedAccount"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "DetailedAccounts",
        "required": [
          "code",
          "total",
          "accounts"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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",
            "description": "Tx info as a JSON string. The top-level `Sig` and `L1Sig` fields are returned as empty strings.",
            "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,
            "description": "Transaction execution time in Unix microseconds."
          },
          "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"
        ]
      },
      "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": "#/components/schemas/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"
        ]
      },
      "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,
            "description": "Unix timestamp in seconds."
          },
          "value": {
            "type": "string",
            "example": "0.0001"
          },
          "rate": {
            "type": "string",
            "example": "0.0001"
          },
          "direction": {
            "type": "string",
            "example": "long",
            "enum": [
              "long",
              "short"
            ]
          }
        },
        "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": "#/components/schemas/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": "#/components/schemas/Funding"
            }
          }
        },
        "title": "Fundings",
        "required": [
          "code",
          "resolution",
          "fundings"
        ]
      },
      "L1Metadata": {
        "type": "object",
        "properties": {
          "l1_address": {
            "type": "string"
          },
          "can_invite": {
            "type": "boolean"
          },
          "referral_points_percentage": {
            "type": "string"
          },
          "referral_program_kickback": {
            "type": "string",
            "example": "10.0"
          },
          "referral_program_kickback_history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralProgramKickback"
            }
          },
          "can_create_guild": {
            "type": "boolean"
          }
        },
        "title": "L1Metadata",
        "required": [
          "l1_address",
          "can_invite",
          "referral_points_percentage",
          "referral_program_kickback",
          "referral_program_kickback_history",
          "can_create_guild"
        ]
      },
      "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"
        ]
      },
      "LiqTrade": {
        "type": "object",
        "properties": {
          "price": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "taker_fee": {
            "type": "string"
          },
          "maker_fee": {
            "type": "string"
          },
          "transaction_time": {
            "type": "integer",
            "format": "int64",
            "description": "Transaction execution time in Unix microseconds."
          },
          "bid_account_id": {
            "type": "integer",
            "format": "int64",
            "example": 3
          },
          "ask_account_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          }
        },
        "title": "LiqTrade",
        "required": [
          "price",
          "size",
          "taker_fee",
          "maker_fee",
          "transaction_time",
          "ask_account_id",
          "bid_account_id"
        ]
      },
      "Liquidation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "market_id": {
            "type": "integer",
            "format": "int16"
          },
          "type": {
            "type": "string",
            "enum": [
              "partial",
              "deleverage"
            ]
          },
          "trade": {
            "$ref": "#/components/schemas/LiqTrade"
          },
          "info": {
            "$ref": "#/components/schemas/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": "#/components/schemas/AccountPosition"
            }
          },
          "risk_info_before": {
            "$ref": "#/components/schemas/RiskInfo"
          },
          "risk_info_after": {
            "$ref": "#/components/schemas/RiskInfo"
          },
          "mark_prices": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAsset"
            }
          },
          "asset_index_prices": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "title": "LiquidationInfo",
        "required": [
          "positions",
          "risk_info_before",
          "risk_info_after",
          "mark_prices",
          "assets",
          "asset_index_prices"
        ]
      },
      "LiquidationInfos": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "liquidations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Liquidation"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "LiquidationInfos",
        "required": [
          "code",
          "liquidations"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "MarketConfig": {
        "type": "object",
        "properties": {
          "market_margin_mode": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "insurance_fund_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 281474976710655
          },
          "liquidation_mode": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "force_reduce_only": {
            "type": "boolean",
            "example": false
          },
          "funding_fee_discounts_enabled": {
            "type": "boolean"
          },
          "trading_hours": {
            "type": "string",
            "example": ""
          },
          "hidden": {
            "type": "boolean"
          },
          "rfq_enabled": {
            "type": "boolean"
          }
        },
        "title": "MarketConfig",
        "required": [
          "market_margin_mode",
          "insurance_fund_account_index",
          "liquidation_mode",
          "force_reduce_only",
          "trading_hours",
          "hidden",
          "rfq_enabled"
        ]
      },
      "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,
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "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",
            "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"
          },
          "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",
            "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"
          },
          "block_height": {
            "type": "integer",
            "format": "int64",
            "example": 45434
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200,
            "description": "Unix timestamp in seconds."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200
          },
          "transaction_time": {
            "type": "integer",
            "format": "int64",
            "description": "Transaction execution time in Unix microseconds."
          },
          "integrator_fee_collector_index": {
            "type": "string"
          },
          "integrator_maker_fee": {
            "type": "string",
            "description": "Fee rate in millionths (100 = 1 bp). Encoded as a string on Order; Trade uses an integer."
          },
          "integrator_taker_fee": {
            "type": "string",
            "description": "Fee rate in millionths (100 = 1 bp). Encoded as a string on Order; Trade uses an integer."
          },
          "order_flags": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "order_version": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "market_symbol": {
            "type": "string",
            "example": "ETH",
            "description": "Human-readable market symbol."
          },
          "market_kind": {
            "type": "string",
            "enum": [
              "perps",
              "spot",
              "bo"
            ],
            "description": "Market kind. These wire values differ from OrderBook.market_type."
          }
        },
        "title": "Order",
        "required": [
          "order_index",
          "client_order_index",
          "order_id",
          "client_order_id",
          "market_index",
          "market_symbol",
          "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",
          "order_flags",
          "block_height",
          "timestamp",
          "created_at",
          "updated_at",
          "transaction_time",
          "order_version",
          "market_kind"
        ]
      },
      "OrderBook": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "ETH"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 0
          },
          "market_type": {
            "type": "string",
            "example": "perp",
            "enum": [
              "perp",
              "spot",
              "binary_options"
            ]
          },
          "base_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 0
          },
          "quote_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 0
          },
          "status": {
            "type": "string",
            "example": "active",
            "enum": [
              "inactive",
              "active",
              "in-settlement",
              "waiting-for-settlement",
              "settled"
            ]
          },
          "taker_fee": {
            "type": "string",
            "example": "0.0001"
          },
          "maker_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "liquidation_fee": {
            "type": "string",
            "example": "0.01"
          },
          "min_base_amount": {
            "type": "string",
            "example": "0.01"
          },
          "min_quote_amount": {
            "type": "string",
            "example": "0.1"
          },
          "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
          },
          "order_quote_limit": {
            "type": "string",
            "example": "281474976.710655"
          },
          "is_maker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "is_taker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "created_at": {
            "type": "string",
            "example": "1640995200000",
            "description": "Unix timestamp in milliseconds, encoded as a decimal string."
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          },
          "start_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "open_interest": {
            "type": "string",
            "example": "93.0"
          },
          "open_interest_limit": {
            "type": "string"
          },
          "open_interest_usd": {
            "type": "string"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          },
          "operator_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "settlement_cap": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "settlement_type": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1
            ],
            "x-enum-varnames": [
              "Discrete",
              "Continuous"
            ]
          },
          "settlement_price": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "default_price": {
            "type": "integer",
            "format": "int32",
            "example": 5000
          },
          "is_frozen": {
            "type": "boolean",
            "example": false
          },
          "market_deployer": {
            "type": "string",
            "description": "Market deployer identifier, for example lighter."
          }
        },
        "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",
          "created_at",
          "multiplier",
          "start_timestamp",
          "end_timestamp",
          "open_interest",
          "outcome",
          "operator_account_index",
          "settlement_cap",
          "settlement_type",
          "settlement_price",
          "default_price",
          "is_frozen",
          "market_deployer"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "PerpsOrderBookDetail": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "ETH"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 0
          },
          "market_type": {
            "type": "string",
            "example": "perp",
            "enum": [
              "perp",
              "spot",
              "binary_options"
            ]
          },
          "base_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 0
          },
          "quote_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 0
          },
          "status": {
            "type": "string",
            "example": "active",
            "enum": [
              "inactive",
              "active",
              "in-settlement",
              "waiting-for-settlement",
              "settled"
            ]
          },
          "taker_fee": {
            "type": "string",
            "example": "0.0001"
          },
          "maker_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "liquidation_fee": {
            "type": "string",
            "example": "0.01"
          },
          "min_base_amount": {
            "type": "string",
            "example": "0.01"
          },
          "min_quote_amount": {
            "type": "string",
            "example": "0.1"
          },
          "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
          },
          "order_quote_limit": {
            "type": "string",
            "example": "281474976.710655"
          },
          "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": "uint16",
            "example": 100
          },
          "min_initial_margin_fraction": {
            "type": "integer",
            "format": "uint16",
            "example": 100
          },
          "maintenance_margin_fraction": {
            "type": "integer",
            "format": "uint16",
            "example": 50
          },
          "closeout_margin_fraction": {
            "type": "integer",
            "format": "uint16",
            "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": "#/components/schemas/MarketConfig"
          },
          "strategy_index": {
            "type": "integer",
            "format": "uint8"
          },
          "is_maker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "is_taker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "funding_clamp_small": {
            "type": "string",
            "example": "0.005"
          },
          "funding_clamp_big": {
            "type": "string",
            "example": "0.4"
          },
          "base_interest_rate": {
            "type": "string",
            "example": "0.0001"
          },
          "created_at": {
            "type": "string",
            "example": "1640995200000",
            "description": "Unix timestamp in milliseconds, encoded as a decimal string."
          },
          "mark_price": {
            "type": "string",
            "example": "3024.66"
          },
          "index_price": {
            "type": "string",
            "example": "3024.66"
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          },
          "market_flags": {
            "type": "integer",
            "format": "int64"
          },
          "funding_premium_multiplier": {
            "type": "integer",
            "format": "uint16",
            "example": 100
          },
          "start_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "open_interest_limit": {
            "type": "string"
          },
          "open_interest_usd": {
            "type": "string"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          },
          "operator_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "settlement_cap": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "settlement_type": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1
            ],
            "x-enum-varnames": [
              "Discrete",
              "Continuous"
            ]
          },
          "settlement_price": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "default_price": {
            "type": "integer",
            "format": "int32",
            "example": 5000
          },
          "is_frozen": {
            "type": "boolean",
            "example": false
          },
          "market_deployer": {
            "type": "string",
            "description": "Market deployer identifier, for example lighter."
          }
        },
        "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",
          "created_at",
          "multiplier",
          "size_decimals",
          "price_decimals",
          "quote_multiplier",
          "default_initial_margin_fraction",
          "min_initial_margin_fraction",
          "maintenance_margin_fraction",
          "closeout_margin_fraction",
          "mark_price",
          "index_price",
          "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",
          "market_flags",
          "funding_premium_multiplier",
          "funding_clamp_small",
          "funding_clamp_big",
          "base_interest_rate",
          "start_timestamp",
          "end_timestamp",
          "outcome",
          "operator_account_index",
          "settlement_cap",
          "settlement_type",
          "settlement_price",
          "default_price",
          "is_frozen",
          "market_deployer"
        ]
      },
      "OrderBookDetails": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "order_book_details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerpsOrderBookDetail"
            }
          },
          "spot_order_book_details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpotOrderBookDetail"
            }
          }
        },
        "title": "OrderBookDetails",
        "required": [
          "code",
          "order_book_details",
          "spot_order_book_details"
        ]
      },
      "SpotOrderBookDetail": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "ETH/USDC"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 2048
          },
          "market_type": {
            "type": "string",
            "example": "spot",
            "enum": [
              "perp",
              "spot",
              "binary_options"
            ]
          },
          "base_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 1
          },
          "quote_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 3
          },
          "status": {
            "type": "string",
            "example": "active",
            "enum": [
              "inactive",
              "active",
              "in-settlement",
              "waiting-for-settlement",
              "settled"
            ]
          },
          "taker_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "maker_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "liquidation_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "min_base_amount": {
            "type": "string",
            "example": "0.0001"
          },
          "min_quote_amount": {
            "type": "string",
            "example": "0.000001"
          },
          "order_quote_limit": {
            "type": "string",
            "example": "2500000.000000"
          },
          "supported_size_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 4
          },
          "supported_price_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 2
          },
          "supported_quote_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 6
          },
          "size_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 4
          },
          "price_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 2
          },
          "last_trade_price": {
            "type": "number",
            "format": "double",
            "example": 2731.79
          },
          "daily_trades_count": {
            "type": "integer",
            "format": "int64",
            "example": 126993
          },
          "daily_base_token_volume": {
            "type": "number",
            "format": "double",
            "example": 1203.0962
          },
          "daily_quote_token_volume": {
            "type": "number",
            "format": "double",
            "example": 3516374.947553
          },
          "daily_price_low": {
            "type": "number",
            "format": "double",
            "example": 2717.47
          },
          "daily_price_high": {
            "type": "number",
            "format": "double",
            "example": 3044.21
          },
          "daily_price_change": {
            "type": "number",
            "format": "double",
            "example": -10.2389493724579
          },
          "daily_chart": {
            "type": "object",
            "example": "{1640995200:3024.66}",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "is_maker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "is_taker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "created_at": {
            "type": "string",
            "example": "1640995200000",
            "description": "Unix timestamp in milliseconds, encoded as a decimal string."
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          },
          "start_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "open_interest": {
            "type": "string",
            "example": "93.0"
          },
          "open_interest_limit": {
            "type": "string"
          },
          "open_interest_usd": {
            "type": "string"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          },
          "operator_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "settlement_cap": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "settlement_type": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1
            ],
            "x-enum-varnames": [
              "Discrete",
              "Continuous"
            ]
          },
          "settlement_price": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "default_price": {
            "type": "integer",
            "format": "int32",
            "example": 5000
          },
          "is_frozen": {
            "type": "boolean",
            "example": false
          },
          "market_deployer": {
            "type": "string",
            "description": "Market deployer identifier, for example lighter."
          }
        },
        "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",
          "created_at",
          "multiplier",
          "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",
          "start_timestamp",
          "end_timestamp",
          "open_interest",
          "outcome",
          "operator_account_index",
          "settlement_cap",
          "settlement_type",
          "settlement_price",
          "default_price",
          "is_frozen",
          "market_deployer"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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": "#/components/schemas/SimpleOrder"
            }
          },
          "total_bids": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "bids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleOrder"
            }
          },
          "group_size": {
            "type": "string",
            "example": "10.0",
            "description": "Price width of each level. Only returned when `n_sig_figs` is set; empty if the order book is empty."
          },
          "ask_levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBookLevel"
            },
            "description": "Up to 20 aggregated ask levels, lowest price first. Only returned when `n_sig_figs` is set."
          },
          "bid_levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBookLevel"
            },
            "description": "Up to 20 aggregated bid levels, highest price first. Only returned when `n_sig_figs` is set."
          }
        },
        "title": "OrderBookOrders",
        "required": [
          "code",
          "total_asks",
          "asks",
          "total_bids",
          "bids"
        ]
      },
      "OrderBookLevel": {
        "type": "object",
        "properties": {
          "price": {
            "type": "string",
            "example": "63920.0",
            "description": "Level price: a multiple of `group_size`. Asks are rounded up to it, bids down."
          },
          "size": {
            "type": "string",
            "example": "5.16656",
            "description": "Total remaining base amount of all resting orders in the level."
          },
          "orders": {
            "type": "integer",
            "format": "int64",
            "example": 42,
            "description": "Number of resting orders in the level."
          }
        },
        "title": "OrderBookLevel",
        "required": [
          "price",
          "size",
          "orders"
        ]
      },
      "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": "#/components/schemas/OrderBook"
            }
          }
        },
        "title": "OrderBooks",
        "required": [
          "code",
          "order_books"
        ]
      },
      "OrderFill": {
        "type": "object",
        "properties": {
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "is_ask": {
            "type": "boolean",
            "example": true
          },
          "base_amount": {
            "type": "string",
            "example": "0.1"
          },
          "quote_amount": {
            "type": "string",
            "example": "302.46"
          },
          "type": {
            "type": "string",
            "enum": [
              "order",
              "deleverage",
              "market-settlement"
            ]
          },
          "order_id": {
            "type": "string",
            "example": "1",
            "description": "Order index of the filled order; \"0\" for deleverage and market-settlement fills."
          },
          "trade_id": {
            "type": "string",
            "example": "145",
            "description": "Trade ID of the deleverage or market-settlement trade; \"0\" for order fills."
          }
        },
        "title": "OrderFill",
        "required": [
          "market_id",
          "timestamp",
          "is_ask",
          "base_amount",
          "quote_amount",
          "type",
          "order_id",
          "trade_id"
        ]
      },
      "OrderFills": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "next_cursor": {
            "type": "string"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderFill"
            }
          }
        },
        "title": "OrderFills",
        "required": [
          "code",
          "market_id",
          "fills"
        ]
      },
      "Orders": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "next_cursor": {
            "type": "string"
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          }
        },
        "title": "Orders",
        "required": [
          "code",
          "orders"
        ]
      },
      "PnLEntry": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200
          },
          "trade_pnl": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "inflow": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "outflow": {
            "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
          },
          "pool_total_shares": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "spot_inflow": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "spot_outflow": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "staked_lit": {
            "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
          },
          "staking_pnl": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "trade_spot_pnl": {
            "type": "number",
            "format": "double",
            "example": 12.0
          },
          "volume": {
            "type": "number",
            "format": "double",
            "example": 12.0
          }
        },
        "title": "PnLEntry",
        "required": [
          "timestamp",
          "trade_pnl",
          "inflow",
          "outflow",
          "pool_pnl",
          "pool_inflow",
          "pool_outflow",
          "pool_total_shares",
          "spot_inflow",
          "spot_outflow",
          "staking_inflow",
          "staking_outflow",
          "staking_pnl",
          "trade_spot_pnl",
          "volume"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "PositionFunding": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200,
            "description": "Unix timestamp in seconds."
          },
          "market_id": {
            "type": "integer",
            "format": "int16",
            "example": 1
          },
          "funding_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "change": {
            "type": "string",
            "example": "1"
          },
          "discount": {
            "type": "string",
            "example": "1"
          },
          "rate": {
            "type": "string",
            "example": "1"
          },
          "position_size": {
            "type": "string",
            "example": "1"
          },
          "position_side": {
            "type": "string",
            "example": "long",
            "enum": [
              "long",
              "short"
            ]
          }
        },
        "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": "#/components/schemas/PositionFunding"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "PositionFundings",
        "required": [
          "code",
          "position_fundings"
        ]
      },
      "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.5
          },
          "daily_returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyReturn"
            }
          },
          "share_prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SharePrice"
            }
          },
          "sharpe_ratio": {
            "type": "number",
            "format": "double"
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Strategy"
            }
          }
        },
        "title": "PublicPoolInfo",
        "required": [
          "status",
          "operator_fee",
          "min_operator_share_rate",
          "total_shares",
          "operator_shares",
          "annual_percentage_yield",
          "daily_returns",
          "share_prices",
          "sharpe_ratio",
          "strategies"
        ]
      },
      "PublicPoolMetadata": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200,
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "message": {
            "type": "string",
            "description": "Legacy nested result field; nested account items normally return code 0, unlike the top-level response."
          },
          "account_index": {
            "type": "integer",
            "format": "int64",
            "example": 3
          },
          "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.5
          },
          "status": {
            "type": "integer",
            "format": "uint8",
            "example": 0
          },
          "operator_fee": {
            "type": "string",
            "example": "100"
          },
          "total_asset_value": {
            "type": "string",
            "example": "19995"
          },
          "total_shares": {
            "type": "integer",
            "format": "int64",
            "example": 100000
          },
          "account_share": {
            "$ref": "#/components/schemas/PublicPoolShare"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAsset"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "master_account_index": {
            "type": "integer",
            "format": "int64"
          },
          "sharpe_ratio": {
            "type": "number",
            "format": "double"
          },
          "total_perps_value": {
            "type": "string"
          },
          "total_spot_value": {
            "type": "string"
          }
        },
        "title": "PublicPoolMetadata",
        "required": [
          "code",
          "account_index",
          "account_type",
          "name",
          "l1_address",
          "annual_percentage_yield",
          "status",
          "operator_fee",
          "total_asset_value",
          "total_shares",
          "assets",
          "created_at",
          "master_account_index",
          "sharpe_ratio",
          "total_perps_value",
          "total_spot_value"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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"
          },
          "entry_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "principal_amount": {
            "type": "string"
          }
        },
        "title": "PublicPoolShare",
        "required": [
          "public_pool_index",
          "shares_amount",
          "entry_usdc",
          "entry_timestamp",
          "principal_amount"
        ]
      },
      "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.0
          },
          "week_reward_points": {
            "type": "number",
            "format": "float",
            "example": 200.0
          },
          "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": "#/components/schemas/ReferralPointEntry"
            }
          },
          "user_total_points": {
            "type": "number",
            "format": "float",
            "example": 1000.0
          },
          "user_last_week_points": {
            "type": "number",
            "format": "float",
            "example": 1000.0
          },
          "user_total_referral_reward_points": {
            "type": "number",
            "format": "float",
            "example": 1000.0
          },
          "user_last_week_referral_reward_points": {
            "type": "number",
            "format": "float",
            "example": 1000.0
          },
          "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"
        ],
        "description": "This response does not use the usual code/message envelope."
      },
      "ReqAckNotif": {
        "type": "object",
        "properties": {
          "notif_id": {
            "type": "string",
            "example": "liq:17:5898"
          },
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "ack_all": {
            "type": "boolean",
            "default": false
          }
        },
        "title": "ReqAckNotif",
        "required": [
          "account_index"
        ]
      },
      "ReqChangeAccountTier": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "new_tier": {
            "type": "string",
            "description": "Requested tier: standard, plus or premium. Volume/staking sub-tiers are assigned by the exchange."
          }
        },
        "title": "ReqChangeAccountTier",
        "required": [
          "account_index",
          "new_tier"
        ]
      },
      "RespGetMakerOnlyApiKeys": {
        "type": "object",
        "title": "RespGetMakerOnlyApiKeys",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "api_key_indexes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint8",
              "minimum": 0,
              "maximum": 254
            }
          }
        },
        "required": [
          "code",
          "api_key_indexes"
        ]
      },
      "ReqSetMakerOnlyApiKeys": {
        "type": "object",
        "title": "ReqSetMakerOnlyApiKeys",
        "description": "Send as form data, not JSON. The value replaces the full maker-only API key list; use [] to clear all restrictions.",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "api_key_indexes": {
            "type": "string",
            "description": "JSON array string of API key indexes, e.g. \"[4,5]\". Use [] to clear all maker-only restrictions."
          }
        },
        "required": [
          "account_index",
          "api_key_indexes"
        ]
      },
      "RespSetMakerOnlyApiKeys": {
        "type": "object",
        "title": "RespSetMakerOnlyApiKeys",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ]
      },
      "ReqSendTx": {
        "type": "object",
        "properties": {
          "tx_type": {
            "type": "integer",
            "format": "uint8",
            "description": "Numeric transaction type returned by the signer."
          },
          "tx_info": {
            "type": "string",
            "description": "Signed transaction object serialized as a JSON string. Pass the tx_info string returned by the signer unchanged; its fields depend on tx_type.",
            "example": "{\"AccountIndex\":123,\"ApiKeyIndex\":4,\"Nonce\":1,\"ExpiredAt\":1792713600000,\"Sig\":\"<signature>\"}"
          },
          "price_protection": {
            "type": "boolean",
            "default": true
          }
        },
        "title": "ReqSendTx",
        "required": [
          "tx_type",
          "tx_info"
        ]
      },
      "ReqSendTxBatch": {
        "type": "object",
        "properties": {
          "tx_types": {
            "type": "string",
            "description": "JSON-encoded array of numeric transaction types, in the same order as tx_infos.",
            "example": "[14,15]"
          },
          "tx_infos": {
            "type": "string",
            "description": "JSON-encoded array of signed transaction JSON strings. Use the signer output for each item; the array length and order must match tx_types.",
            "example": "[\"{\"AccountIndex\":123,\"Sig\":\"<signature>\"}\",\"{\"AccountIndex\":123,\"Sig\":\"<signature>\"}\"]"
          }
        },
        "title": "ReqSendTxBatch",
        "required": [
          "tx_types",
          "tx_infos"
        ]
      },
      "RespChangeAccountTier": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          }
        },
        "title": "RespChangeAccountTier",
        "required": [
          "code"
        ]
      },
      "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"
        ]
      },
      "RespPublicPoolsMetadata": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "public_pools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPoolMetadata"
            }
          }
        },
        "title": "RespPublicPoolsMetadata",
        "required": [
          "code",
          "public_pools"
        ]
      },
      "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"
          },
          "remaining_send_tx": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining sendTx requests in the current per-minute bucket. Only returned for Premium accounts; omitted otherwise."
          }
        },
        "title": "RespSendTx",
        "required": [
          "code",
          "tx_hash",
          "predicted_execution_time_ms"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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"
          },
          "remaining_send_tx": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining sendTx requests in the current per-minute bucket. Only returned for Premium accounts; omitted otherwise."
          }
        },
        "title": "RespSendTxBatch",
        "required": [
          "code",
          "tx_hash",
          "predicted_execution_time_ms"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RespWithdrawalDelay": {
        "type": "object",
        "properties": {
          "seconds": {
            "type": "integer",
            "format": "int64",
            "example": 86400
          }
        },
        "title": "RespWithdrawalDelay",
        "required": [
          "seconds"
        ],
        "description": "This response does not use the usual code/message envelope."
      },
      "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": "#/components/schemas/RiskParameters"
          },
          "isolated_risk_parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/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"
          },
          "total_account_liquidation_threshold": {
            "type": "string"
          },
          "usdc_collateral_with_funding": {
            "type": "string"
          },
          "usdc_portfolio_value": {
            "type": "string"
          },
          "total_portfolio_value": {
            "type": "string"
          }
        },
        "title": "RiskParameters",
        "required": [
          "market_id",
          "total_account_value",
          "initial_margin_req",
          "maintenance_margin_req",
          "close_out_margin_req",
          "total_account_liquidation_threshold",
          "collateral",
          "usdc_collateral_with_funding",
          "usdc_portfolio_value",
          "total_portfolio_value"
        ]
      },
      "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",
            "description": "Transaction execution time in Unix microseconds."
          }
        },
        "title": "SimpleOrder",
        "required": [
          "order_index",
          "order_id",
          "owner_account_index",
          "initial_base_amount",
          "remaining_base_amount",
          "price",
          "order_expiry",
          "transaction_time"
        ]
      },
      "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"
        ]
      },
      "SubAccountMetadata": {
        "type": "object",
        "properties": {
          "color": {
            "type": "string"
          }
        },
        "title": "SubAccountMetadata",
        "required": [
          "color"
        ]
      },
      "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": "#/components/schemas/Account"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "SubAccounts",
        "required": [
          "code",
          "l1_address",
          "sub_accounts"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "Trade": {
        "type": "object",
        "properties": {
          "trade_id": {
            "type": "integer",
            "format": "int64",
            "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
          },
          "bid_id": {
            "type": "integer",
            "format": "int64",
            "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",
            "example": true
          },
          "block_height": {
            "type": "integer",
            "format": "int64",
            "example": 45434
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200,
            "description": "Unix timestamp in milliseconds."
          },
          "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": "uint16",
            "example": 0
          },
          "taker_position_sign_changed": {
            "type": "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": "uint16",
            "example": 0
          },
          "maker_position_sign_changed": {
            "type": "boolean",
            "example": true
          },
          "transaction_time": {
            "type": "integer",
            "format": "int64",
            "example": 1771943742851429,
            "description": "Transaction execution time in Unix microseconds."
          },
          "bid_account_pnl": {
            "type": "string",
            "description": "Realized PnL for the queried account index, triggered by reducing a short position",
            "example": "-0.022890"
          },
          "ask_account_pnl": {
            "type": "string",
            "description": "Realized PnL for the queried account index, triggered by reducing a long position, or a spot position",
            "example": "1.989696"
          },
          "ask_client_id": {
            "type": "integer",
            "format": "int64",
            "example": 145
          },
          "bid_client_id": {
            "type": "integer",
            "format": "int64",
            "example": 245
          },
          "ask_client_id_str": {
            "type": "string",
            "example": "145"
          },
          "bid_client_id_str": {
            "type": "string",
            "example": "245"
          },
          "ask_id_str": {
            "type": "string",
            "example": "145"
          },
          "bid_id_str": {
            "type": "string",
            "example": "245"
          },
          "trade_id_str": {
            "type": "string",
            "example": "145"
          },
          "integrator_maker_fee": {
            "type": "integer",
            "format": "int32",
            "example": 50,
            "description": "Fee rate in millionths (100 = 1 bp). Encoded as an integer on Trade; Order uses a string."
          },
          "integrator_maker_fee_collector_index": {
            "type": "integer",
            "format": "int64",
            "example": 156
          },
          "integrator_taker_fee": {
            "type": "integer",
            "format": "int32",
            "example": 50,
            "description": "Fee rate in millionths (100 = 1 bp). Encoded as an integer on Trade; Order uses a string."
          },
          "integrator_taker_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
          },
          "bid_order_version": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "ask_order_version": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "market_symbol": {
            "type": "string",
            "example": "ETH",
            "description": "Human-readable market symbol."
          },
          "market_kind": {
            "type": "string",
            "enum": [
              "perps",
              "spot",
              "bo"
            ],
            "description": "Market kind. These wire values differ from OrderBook.market_type."
          }
        },
        "title": "Trade",
        "required": [
          "trade_id",
          "trade_id_str",
          "tx_hash",
          "type",
          "market_id",
          "market_symbol",
          "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",
          "transaction_time",
          "ask_order_version",
          "bid_order_version",
          "market_kind"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "Trades": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "next_cursor": {
            "type": "string"
          },
          "trades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/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": "#/components/schemas/TransferHistoryItem"
            }
          },
          "cursor": {
            "type": "string"
          }
        },
        "title": "TransferHistory",
        "required": [
          "code",
          "transfers",
          "cursor"
        ]
      },
      "TransferHistoryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "example": "0.1"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200
          },
          "type": {
            "type": "string",
            "enum": [
              "L2TransferInflow",
              "L2TransferOutflow",
              "L2BurnSharesInflow",
              "L2BurnSharesOutflow",
              "L2MintSharesInflow",
              "L2MintSharesOutflow",
              "L2SelfTransfer",
              "L2StakeAssetInflow",
              "L2StakeAssetOutflow",
              "L2UnstakeAssetInflow",
              "L2UnstakeAssetOutflow",
              "L2ForceBurnSharesInflow",
              "L2ForceBurnSharesOutflow",
              "L1BurnSharesInflow",
              "L1BurnSharesOutflow",
              "L1UnstakeAssetInflow",
              "L1UnstakeAssetOutflow",
              "L2CreatePublicPoolInflow",
              "L2CreatePublicPoolOutflow",
              "L2CreateStakingPoolInflow",
              "L2CreateStakingPoolOutflow"
            ]
          },
          "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
          },
          "tx_hash": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          },
          "asset_id": {
            "type": "integer",
            "format": "int16"
          },
          "fee": {
            "type": "string"
          },
          "from_route": {
            "type": "string",
            "enum": [
              "spot",
              "perps"
            ]
          },
          "to_route": {
            "type": "string",
            "enum": [
              "spot",
              "perps"
            ]
          }
        },
        "title": "TransferHistoryItem",
        "required": [
          "id",
          "amount",
          "timestamp",
          "type",
          "from_l1_address",
          "to_l1_address",
          "from_account_index",
          "to_account_index",
          "tx_hash",
          "asset_id",
          "fee",
          "from_route",
          "to_route"
        ]
      },
      "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"
        ]
      },
      "ValidatorInfo": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          },
          "is_active": {
            "type": "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": "#/components/schemas/WithdrawHistoryItem"
            }
          },
          "cursor": {
            "type": "string"
          }
        },
        "title": "WithdrawHistory",
        "required": [
          "code",
          "withdraws",
          "cursor"
        ]
      },
      "WithdrawHistoryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "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"
          },
          "l2_tx_hash": {
            "type": "string",
            "example": "088c93e15f85d101f7191c25582f8a5857af80629470a5153a7578756b7dd22d61d42c58dcca2b3c",
            "description": "Hash of the L2 transaction that requested the withdrawal."
          },
          "l1_claim_tx_hash": {
            "type": "string",
            "example": "0x65eef86cccb1b1a15fd53930744bd630c92741d044afdf9d6d708c5e91096224",
            "description": "L1 transaction that transferred the withdrawn funds to the wallet (the WithdrawPending event), whether sent by auto-claim or by the user. Empty until the withdrawal is claimed, and for withdrawals executed before claim indexing started."
          },
          "l1_claim_amount": {
            "type": "string",
            "example": "0.1",
            "description": "Total amount paid out by l1_claim_tx_hash. One claim can pay several withdrawals of the same asset, so this can be larger than amount. Empty until claimed."
          },
          "asset_id": {
            "type": "integer",
            "format": "int16"
          }
        },
        "title": "WithdrawHistoryItem",
        "required": [
          "id",
          "amount",
          "timestamp",
          "status",
          "type",
          "l1_tx_hash",
          "l2_tx_hash",
          "l1_claim_tx_hash",
          "l1_claim_amount",
          "asset_id"
        ]
      },
      "ZkLighterInfo": {
        "type": "object",
        "properties": {
          "contract_address": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          }
        },
        "title": "ZkLighterInfo",
        "required": [
          "contract_address"
        ]
      },
      "ReqFastwithdraw": {
        "type": "object",
        "properties": {
          "tx_info": {
            "type": "string"
          },
          "to_address": {
            "type": "string"
          }
        },
        "title": "ReqFastwithdraw",
        "required": [
          "tx_info",
          "to_address"
        ]
      },
      "ReqPostApiToken": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "expiry": {
            "type": "integer",
            "format": "int64",
            "description": "Token expiry as a Unix timestamp in seconds, at least 5 minutes and at most 10 years after creation."
          },
          "sub_account_access": {
            "type": "boolean"
          },
          "scopes": {
            "type": "string",
            "example": "read.*",
            "default": "read.*",
            "description": "Read-only token scope; currently only read.* is supported."
          }
        },
        "title": "ReqPostApiToken",
        "required": [
          "name",
          "account_index",
          "expiry",
          "sub_account_access"
        ]
      },
      "ReqRevokeApiToken": {
        "type": "object",
        "properties": {
          "token_id": {
            "type": "integer",
            "format": "int64"
          },
          "account_index": {
            "type": "integer",
            "format": "int64"
          }
        },
        "title": "ReqRevokeApiToken",
        "required": [
          "token_id",
          "account_index"
        ]
      },
      "RespGetApiTokens": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "api_tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiToken"
            }
          }
        },
        "title": "RespGetApiTokens",
        "required": [
          "code",
          "api_tokens"
        ]
      },
      "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"
        ]
      },
      "RespPostApiToken": {
        "title": "RespPostApiToken",
        "description": "Created read-only API token, with the standard result envelope.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultCode"
          },
          {
            "$ref": "#/components/schemas/ApiToken"
          }
        ]
      },
      "RespRevokeApiToken": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "token_id": {
            "type": "integer",
            "format": "int64"
          },
          "revoked": {
            "type": "boolean"
          }
        },
        "title": "RespRevokeApiToken",
        "required": [
          "code",
          "token_id",
          "revoked"
        ]
      },
      "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",
            "description": "Unix timestamp in seconds."
          },
          "sub_account_access": {
            "type": "boolean"
          },
          "revoked": {
            "type": "boolean"
          },
          "scopes": {
            "type": "string",
            "description": "Granted read-only scopes. Currently read.* is the supported scope."
          }
        },
        "title": "ApiToken",
        "required": [
          "token_id",
          "name",
          "account_index",
          "expiry",
          "sub_account_access",
          "revoked",
          "scopes"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "ReqUpdateReferralCode": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "new_referral_code": {
            "type": "string"
          }
        },
        "title": "ReqUpdateReferralCode",
        "required": [
          "account_index",
          "new_referral_code"
        ]
      },
      "RespUpdateReferralCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "title": "RespUpdateReferralCode",
        "required": [
          "code",
          "success"
        ]
      },
      "CreateIntentAddressResp": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "intent_address": {
            "type": "string"
          }
        },
        "title": "CreateIntentAddressResp",
        "required": [
          "code",
          "intent_address"
        ]
      },
      "ReqUseReferralCode": {
        "type": "object",
        "properties": {
          "l1_address": {
            "type": "string"
          },
          "referral_code": {
            "type": "string"
          },
          "discord": {
            "type": "string"
          },
          "telegram": {
            "type": "string"
          },
          "x": {
            "type": "string",
            "description": "X (Twitter) username associated with the referral; maximum length 40 characters."
          },
          "signature": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "title": "ReqUseReferralCode",
        "required": [
          "l1_address",
          "referral_code"
        ]
      },
      "ReqCreateIntentAddress": {
        "type": "object",
        "properties": {
          "chain_id": {
            "type": "string"
          },
          "from_addr": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "is_external_deposit": {
            "type": "boolean"
          }
        },
        "title": "ReqCreateIntentAddress",
        "required": [
          "chain_id",
          "from_addr",
          "amount"
        ]
      },
      "BridgeSupportedNetworks": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "networks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BridgeSupportedNetwork"
            }
          }
        },
        "title": "BridgeSupportedNetworks",
        "required": [
          "code",
          "networks"
        ]
      },
      "ReferralCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "referral_code": {
            "type": "string",
            "example": "5V24K3MJ"
          }
        },
        "title": "ReferralCode",
        "required": [
          "code",
          "referral_code"
        ]
      },
      "ReqCreateReferralCode": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          }
        },
        "title": "ReqCreateReferralCode",
        "required": [
          "account_index"
        ]
      },
      "ReqUpdateKickback": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "kickback_percentage": {
            "type": "number",
            "format": "double",
            "maximum": 100
          }
        },
        "title": "ReqUpdateKickback",
        "required": [
          "account_index",
          "kickback_percentage"
        ]
      },
      "Deposit": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "example": "Arbitrum",
            "description": "Source-chain display name, as returned by deposit/networks. The set of supported networks can change.",
            "x-extensible-enum": [
              "Arbitrum One",
              "Avalanche C-Chain",
              "Arc",
              "Base",
              "HyperEVM"
            ]
          },
          "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",
              "completed"
            ],
            "description": "Bridge progress status. This is separate from deposit/history status and the UDA bridge status."
          },
          "step": {
            "type": "string",
            "enum": [
              "0",
              "1",
              "2",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9"
            ],
            "description": "Bridge stage: 0 waiting for deposit; 1 deposited; 2 CCTP burn initiated; 4 fast bridge initiated; 5 fast bridge completed; 6 attestation ready; 7 claim initiated; 8 claim completed; 9 bridge completed."
          },
          "description": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds."
          },
          "is_external_deposit": {
            "type": "boolean"
          },
          "is_next_bridge_fast": {
            "type": "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"
        ]
      },
      "RespUpdateKickback": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "title": "RespUpdateKickback",
        "required": [
          "code",
          "success"
        ]
      },
      "Layer1BasicInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "l1_providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/L1ProviderInfo"
            }
          },
          "l1_providers_health": {
            "type": "boolean",
            "example": true
          },
          "validator_info": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidatorInfo"
            }
          },
          "contract_addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/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"
        ]
      },
      "RespGetExchangeMetrics": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExchangeMetric"
            }
          }
        },
        "title": "RespGetExchangeMetrics",
        "required": [
          "code",
          "metrics"
        ]
      },
      "ExchangeMetric": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200,
            "description": "Unix timestamp in seconds."
          },
          "data": {
            "type": "number",
            "format": "double",
            "example": 93566.25
          }
        },
        "title": "ExchangeMetric",
        "required": [
          "timestamp",
          "data"
        ]
      },
      "ExecuteStat": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "slippage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlippageResult"
            }
          }
        },
        "required": [
          "timestamp",
          "slippage"
        ],
        "title": "ExecuteStat"
      },
      "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"
        ]
      },
      "RespGetExecuteStats": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "enum": [
              "d",
              "w",
              "m",
              "q",
              "y",
              "all"
            ]
          },
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExecuteStat"
            }
          }
        },
        "required": [
          "period",
          "result"
        ],
        "title": "RespGetExecuteStats",
        "description": "This response does not use the usual code/message envelope."
      },
      "LeaseOptionEntry": {
        "type": "object",
        "properties": {
          "duration_days": {
            "type": "integer",
            "description": "Lease duration in days",
            "format": "int32"
          },
          "annual_rate": {
            "type": "number",
            "format": "double",
            "description": "Annual rate as a percentage (e.g. 25.0 means 25%)"
          }
        },
        "required": [
          "duration_days",
          "annual_rate"
        ],
        "title": "LeaseOptionEntry"
      },
      "RespGetLeaseOptions": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaseOptionEntry"
            }
          },
          "lit_incentives_account_index": {
            "type": "integer",
            "format": "int64",
            "description": "Account index that receives the leasing fee"
          }
        },
        "required": [
          "code",
          "options",
          "lit_incentives_account_index"
        ],
        "title": "RespGetLeaseOptions"
      },
      "LeaseEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Lease ID"
          },
          "master_account_index": {
            "type": "integer",
            "format": "int64",
            "description": "Master account index"
          },
          "lease_amount": {
            "type": "integer",
            "format": "int64",
            "description": "Leased LIT amount in raw units (1 LIT = 1e8)"
          },
          "fee_amount": {
            "type": "integer",
            "format": "int64",
            "description": "Fee paid in raw units"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Lease start time (Unix milliseconds)"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Lease end time (Unix milliseconds)"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting_fee",
              "leased",
              "expired",
              "canceled"
            ],
            "description": "Lease status"
          },
          "error": {
            "type": "string",
            "description": "Error message if lease was canceled"
          }
        },
        "required": [
          "end",
          "fee_amount",
          "id",
          "lease_amount",
          "master_account_index",
          "start",
          "status"
        ],
        "title": "LeaseEntry",
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RespGetLeases": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "leases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaseEntry"
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "Cursor to pass as the cursor param to fetch the next page. Absent if no more pages."
          }
        },
        "required": [
          "code",
          "leases"
        ],
        "title": "RespGetLeases",
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "ReqLITLease": {
        "type": "object",
        "properties": {
          "tx_info": {
            "type": "string",
            "description": "Signed transaction info (JSON with L2 signature, L1 signature, etc.)"
          },
          "lease_amount": {
            "type": "string",
            "description": "Amount of LIT to lease in raw units (1 LIT = 100000000)"
          },
          "duration_days": {
            "type": "integer",
            "description": "Lease duration in days. Must match one of the available lease options.",
            "format": "int32"
          }
        },
        "required": [
          "tx_info",
          "lease_amount",
          "duration_days"
        ],
        "title": "ReqLITLease"
      },
      "Referral": {
        "type": "object",
        "properties": {
          "l1_address": {
            "type": "string"
          },
          "referral_code": {
            "type": "string"
          },
          "used_at": {
            "type": "integer",
            "format": "int64"
          },
          "trade_stats": {
            "$ref": "#/components/schemas/TradeStats"
          },
          "tier": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "live_points": {
            "type": "number",
            "format": "double"
          },
          "weekly_points": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "l1_address",
          "referral_code",
          "used_at",
          "tier",
          "source",
          "trade_stats"
        ],
        "title": "Referral",
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "UserReferrals": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "referrals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Referral"
            }
          },
          "used_code": {
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/ReferralTotals"
          },
          "used_code_eligible": {
            "type": "boolean"
          },
          "l1_eligible": {
            "type": "boolean",
            "description": "Whether the caller's L1 address is not excluded from the referee rebate, whether or not a referral code is bound yet. It does not check whether a code binding would be accepted."
          }
        },
        "required": [
          "code",
          "cursor",
          "used_code",
          "totals",
          "referrals",
          "used_code_eligible",
          "l1_eligible"
        ],
        "title": "UserReferrals"
      },
      "SystemConfig": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "liquidity_pool_index": {
            "type": "integer",
            "format": "int64"
          },
          "staking_pool_index": {
            "type": "integer",
            "format": "int64"
          },
          "funding_fee_rebate_account_index": {
            "type": "integer",
            "format": "int64"
          },
          "liquidity_pool_cooldown_period": {
            "type": "integer",
            "format": "int64"
          },
          "staking_pool_lockup_period": {
            "type": "integer",
            "format": "int64"
          },
          "max_integrator_perps_maker_fee": {
            "type": "integer",
            "format": "int32"
          },
          "max_integrator_perps_taker_fee": {
            "type": "integer",
            "format": "int32"
          },
          "max_integrator_spot_maker_fee": {
            "type": "integer",
            "format": "int32"
          },
          "max_integrator_spot_taker_fee": {
            "type": "integer",
            "format": "int32"
          },
          "market_maker_incentive_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 3
          },
          "fee_collector_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 4
          }
        },
        "required": [
          "code",
          "liquidity_pool_index",
          "staking_pool_index",
          "funding_fee_rebate_account_index",
          "fee_collector_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"
        ],
        "title": "SystemConfig"
      },
      "PendingUnlock": {
        "type": "object",
        "properties": {
          "unlock_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "asset_index": {
            "type": "integer",
            "format": "int16"
          },
          "amount": {
            "type": "string"
          }
        },
        "required": [
          "unlock_timestamp",
          "asset_index",
          "amount"
        ],
        "title": "PendingUnlock"
      },
      "Strategy": {
        "type": "object",
        "properties": {
          "collateral": {
            "type": "string"
          }
        },
        "required": [
          "collateral"
        ],
        "title": "Strategy"
      },
      "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"
          },
          "maker_fees_paid": {
            "type": "string"
          },
          "non_free_taker_volume": {
            "type": "string"
          },
          "non_free_maker_volume": {
            "type": "string"
          },
          "free_taker_volume": {
            "type": "string"
          },
          "taker_fees_paid": {
            "type": "string"
          },
          "free_maker_volume": {
            "type": "string"
          }
        },
        "title": "TradeStats",
        "required": [
          "count",
          "volume",
          "web_count",
          "web_volume",
          "mobile_app_count",
          "mobile_app_volume",
          "mobile_browser_count",
          "mobile_browser_volume",
          "free_maker_volume",
          "free_taker_volume",
          "non_free_maker_volume",
          "non_free_taker_volume",
          "maker_fees_paid",
          "taker_fees_paid"
        ]
      },
      "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"
        ]
      },
      "Token": {
        "type": "object",
        "title": "Token",
        "required": [
          "symbol",
          "name",
          "logo",
          "description_key",
          "gecko_id",
          "paprika_id",
          "market",
          "asset_type",
          "categories",
          "is_allowed_mainnet",
          "is_asset_allowed_mainnet",
          "default_order_book_group_by"
        ],
        "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"
          },
          "is_asset_allowed_mainnet": {
            "type": "boolean"
          },
          "default_order_book_group_by": {
            "type": "integer",
            "format": "int64",
            "example": 10
          },
          "backend_symbol": {
            "type": "string",
            "example": "ETH"
          }
        },
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "TokenList": {
        "type": "object",
        "title": "TokenList",
        "required": [
          "code",
          "tokens"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Token"
            }
          }
        }
      },
      "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"
          },
          "daily_stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyPartnerStat"
            }
          }
        },
        "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"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RespSyntheticSpotInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "bps_per_day": {
            "type": "number",
            "format": "double"
          },
          "expiry_time_ms": {
            "type": "integer",
            "format": "int64"
          },
          "spot_close_ms": {
            "type": "integer",
            "format": "int64"
          },
          "source": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        },
        "title": "RespSyntheticSpotInfo",
        "required": [
          "code",
          "bps_per_day",
          "expiry_time_ms",
          "spot_close_ms",
          "source",
          "symbol"
        ]
      },
      "ReqRespondToRFQ": {
        "type": "object",
        "properties": {
          "rfq_id": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "enum": [
              "acknowledged",
              "liquidity_provided",
              "not_interested"
            ]
          }
        },
        "title": "ReqRespondToRFQ",
        "required": [
          "rfq_id",
          "status"
        ]
      },
      "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",
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "description": "-1 = hidden; 0 = sell; 1 = buy."
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/RFQMetadata"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQResponseEntry"
            }
          },
          "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"
        ]
      },
      "RFQMetadata": {
        "type": "object",
        "properties": {
          "requested_est_price": {
            "type": "string"
          },
          "requested_max_slippage": {
            "type": "string"
          },
          "requested_slippage": {
            "type": "string"
          },
          "worst_price": {
            "type": "string"
          },
          "mark_price": {
            "type": "string"
          },
          "requested_est_fill_fraction": {
            "type": "string"
          }
        },
        "title": "RFQMetadata",
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "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"
        ]
      },
      "RespListRFQs": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "rfqs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQEntry"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "title": "RespListRFQs",
        "required": [
          "code",
          "rfqs"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RFQEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "account_index": {
            "type": "integer",
            "format": "int64"
          },
          "market_index": {
            "type": "integer",
            "format": "int16",
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "description": "-1 = hidden; 0 = sell; 1 = buy."
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/RFQMetadata"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQResponseEntry"
            }
          },
          "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"
        ]
      },
      "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",
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "description": "-1 = hidden; 0 = sell; 1 = buy."
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/RFQMetadata"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQResponseEntry"
            }
          },
          "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"
        ]
      },
      "ReqCreateRFQ": {
        "type": "object",
        "properties": {
          "market_index": {
            "type": "integer",
            "format": "int16"
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "enum": [
              0,
              1
            ],
            "description": "0 = sell; 1 = buy."
          },
          "metadata": {
            "type": "string",
            "description": "JSON-encoded RFQ metadata object. See RFQMetadata for fields.",
            "example": "{}"
          }
        },
        "title": "ReqCreateRFQ",
        "required": [
          "market_index",
          "direction"
        ],
        "description": "Provide exactly one of base_amount or quote_amount, as a decimal string.",
        "oneOf": [
          {
            "required": [
              "base_amount"
            ],
            "not": {
              "required": [
                "quote_amount"
              ]
            }
          },
          {
            "required": [
              "quote_amount"
            ],
            "not": {
              "required": [
                "base_amount"
              ]
            }
          }
        ]
      },
      "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",
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "description": "-1 = hidden; 0 = sell; 1 = buy."
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/RFQMetadata"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQResponseEntry"
            }
          },
          "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"
        ]
      },
      "ReqUpdateRFQ": {
        "type": "object",
        "properties": {
          "rfq_id": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "enum": [
              "order_created",
              "closed"
            ]
          }
        },
        "title": "ReqUpdateRFQ",
        "required": [
          "rfq_id",
          "status"
        ]
      },
      "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",
            "description": "Market identifier; corresponds to market_id in market metadata."
          },
          "direction": {
            "type": "integer",
            "format": "int16",
            "description": "-1 = hidden; 0 = sell; 1 = buy."
          },
          "base_amount": {
            "type": "string"
          },
          "quote_amount": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "opened",
              "order_created",
              "closed"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/RFQMetadata"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RFQResponseEntry"
            }
          },
          "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"
        ]
      },
      "MarkPriceCandles": {
        "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": "#/components/schemas/MarkPriceCandle"
            },
            "description": "candles"
          }
        },
        "title": "MarkPriceCandles",
        "required": [
          "code",
          "r",
          "c"
        ]
      },
      "MarkPriceCandle": {
        "type": "object",
        "properties": {
          "t": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200,
            "description": "timestamp Unix timestamp in milliseconds."
          },
          "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"
          },
          "sc": {
            "type": "integer",
            "format": "int64",
            "example": 42,
            "description": "sample_count"
          }
        },
        "title": "MarkPriceCandle",
        "required": [
          "t",
          "o",
          "h",
          "l",
          "c",
          "sc"
        ]
      },
      "MarketPriceCharts": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "example": "1h"
          },
          "price_charts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketPriceChart"
            }
          }
        },
        "title": "MarketPriceCharts",
        "required": [
          "code",
          "resolution",
          "price_charts"
        ]
      },
      "MarketPriceChart": {
        "type": "object",
        "properties": {
          "market_id": {
            "type": "integer",
            "format": "int16"
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "title": "MarketPriceChart",
        "required": [
          "market_id",
          "prices"
        ]
      },
      "LivePointsTotal": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "total_live_points": {
            "type": "number",
            "format": "double"
          }
        },
        "title": "LivePointsTotal",
        "required": [
          "code",
          "total_live_points"
        ]
      },
      "ReferralProgramKickback": {
        "type": "object",
        "properties": {
          "date": {
            "type": "integer",
            "format": "int64",
            "example": 1785110400000
          },
          "percentage": {
            "type": "string",
            "example": "10.0"
          }
        },
        "title": "ReferralProgramKickback",
        "required": [
          "date",
          "percentage"
        ]
      },
      "ReferralTotals": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "volume": {
            "type": "string"
          },
          "free_maker_volume": {
            "type": "string"
          },
          "free_taker_volume": {
            "type": "string"
          },
          "non_free_maker_volume": {
            "type": "string"
          },
          "non_free_taker_volume": {
            "type": "string"
          },
          "maker_fees_paid": {
            "type": "string"
          },
          "taker_fees_paid": {
            "type": "string"
          },
          "total_referrals": {
            "type": "integer",
            "format": "int64"
          },
          "total_premium_referrals": {
            "type": "integer",
            "format": "int64"
          },
          "live_points": {
            "type": "number",
            "format": "double"
          },
          "weekly_points": {
            "type": "number",
            "format": "double"
          }
        },
        "title": "ReferralTotals",
        "required": [
          "count",
          "volume",
          "free_maker_volume",
          "free_taker_volume",
          "non_free_maker_volume",
          "non_free_taker_volume",
          "maker_fees_paid",
          "taker_fees_paid",
          "total_referrals",
          "total_premium_referrals"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "Leaderboard": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            }
          }
        },
        "title": "Leaderboard",
        "required": [
          "entries"
        ],
        "description": "This response does not use the usual code/message envelope."
      },
      "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",
            "description": "Entry identifier. The API uses this camelCase spelling; preserve it when decoding."
          },
          "metadata": {
            "type": "string",
            "example": "{}"
          }
        },
        "title": "LeaderboardEntry",
        "required": [
          "l1_address",
          "points",
          "entry",
          "entryId"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "ReferralStats": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralStat"
            }
          }
        },
        "title": "ReferralStats",
        "required": [
          "code",
          "stats"
        ]
      },
      "ReferralStat": {
        "type": "object",
        "properties": {
          "start_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "trade_stats": {
            "$ref": "#/components/schemas/TradeStats"
          }
        },
        "title": "ReferralStat",
        "required": [
          "start_timestamp",
          "end_timestamp",
          "trade_stats"
        ]
      },
      "HistoricalTradesExportData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "data_url": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "example": "2025-01-02T00:00:00Z",
            "format": "date-time",
            "description": "Presigned URL expiry as an RFC 3339 UTC date-time string (not a numeric Unix timestamp)."
          }
        },
        "title": "HistoricalTradesExportData",
        "required": [
          "code",
          "data_url",
          "expires_at"
        ]
      },
      "PnlLeaderboard": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PnlLeaderboardEntry"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "example": 41543
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "example": 1754992800
          }
        },
        "title": "PnlLeaderboard",
        "required": [
          "code",
          "entries",
          "total",
          "updated_at"
        ]
      },
      "PnlLeaderboardEntry": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "l1_address": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          },
          "account_value": {
            "type": "number",
            "format": "double",
            "example": 225006123.46
          },
          "pnl": {
            "type": "number",
            "format": "double",
            "example": 445047878.27
          },
          "roi": {
            "type": "number",
            "format": "double",
            "example": 26412.5721
          },
          "volume": {
            "type": "number",
            "format": "double",
            "example": 15999.34
          },
          "streak": {
            "type": "integer",
            "format": "int64"
          },
          "longest_streak": {
            "type": "integer",
            "format": "int64"
          },
          "net_position": {
            "type": "number",
            "format": "double"
          },
          "biggest_position_value": {
            "type": "number",
            "format": "double"
          },
          "biggest_position_asset": {
            "type": "string"
          },
          "long_percentage": {
            "type": "number",
            "format": "double"
          },
          "short_percentage": {
            "type": "number",
            "format": "double"
          },
          "global_rank": {
            "type": "integer",
            "format": "int64"
          },
          "guild_id": {
            "type": "integer",
            "format": "int64"
          },
          "guild_name": {
            "type": "string"
          }
        },
        "title": "PnlLeaderboardEntry",
        "required": [
          "rank",
          "l1_address",
          "account_value",
          "pnl",
          "roi",
          "volume",
          "streak",
          "longest_streak",
          "net_position",
          "biggest_position_value"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RespPriceOracleInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "computed_at_ms": {
            "type": "integer",
            "format": "int64"
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceOracleMarket"
            }
          }
        },
        "title": "RespPriceOracleInfo",
        "required": [
          "code",
          "computed_at_ms",
          "markets"
        ]
      },
      "PriceOracleMarket": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "index": {
            "$ref": "#/components/schemas/PriceOraclePrice"
          },
          "mark": {
            "$ref": "#/components/schemas/PriceOraclePrice"
          },
          "pre_market": {
            "type": "boolean",
            "example": false,
            "description": "Required in Lighter responses; not part of the Robinhood Chain response schema. True while the market is in pre-market (price source is a pre-market feed)."
          }
        },
        "title": "PriceOracleMarket",
        "required": [
          "symbol",
          "index",
          "mark"
        ]
      },
      "PriceOraclePrice": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "using_median": {
            "type": "boolean"
          },
          "using_internal_price": {
            "type": "boolean"
          },
          "median_sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price_cap_bps": {
            "type": "number",
            "format": "double"
          },
          "price_cap_reference_price": {
            "type": "number",
            "format": "double",
            "description": "cap bounds: ref * (1 -/+ bps / 10000)"
          },
          "underlying": {
            "type": "string",
            "example": "pythlazer BRENTF7",
            "description": "Oracle provider and underlying feed identifier."
          }
        },
        "title": "PriceOraclePrice",
        "required": [
          "source",
          "using_median",
          "using_internal_price",
          "median_sources",
          "price_cap_bps",
          "price_cap_reference_price"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "RespGetUpDownCandles": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "candles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpDownCandle"
            },
            "description": "ascending by timestamp"
          },
          "next_cursor": {
            "type": "integer",
            "format": "int64",
            "example": 0,
            "description": "start_timestamp of the next page; 0 when the range is exhausted"
          }
        },
        "title": "RespGetUpDownCandles",
        "required": [
          "code",
          "candles"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "UpDownCandle": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "btc"
          },
          "duration": {
            "type": "string",
            "example": "5m"
          },
          "resolution": {
            "type": "string",
            "example": "30s"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1789551600,
            "description": "bucket start, unix seconds"
          },
          "open": {
            "type": "string",
            "example": "115342.123456789012345678",
            "description": "exact provider prices, decimal strings"
          },
          "high": {
            "type": "string",
            "example": "115350.5"
          },
          "low": {
            "type": "string",
            "example": "115300.25"
          },
          "close": {
            "type": "string",
            "example": "115340.123456789012345678"
          },
          "provider": {
            "type": "string",
            "example": "chainlink",
            "description": "provider feed of the last observation of the candle"
          },
          "feed_id": {
            "type": "string",
            "example": "0x0002ee6757e8822c00d273bc340fc24c9cafe123a4ff2ea1dbdb31944bc7d95f"
          }
        },
        "title": "UpDownCandle",
        "required": [
          "symbol",
          "duration",
          "resolution",
          "timestamp",
          "open",
          "high",
          "low",
          "close",
          "provider",
          "feed_id"
        ]
      },
      "RespGetBoPnL": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoEventPnL"
            }
          },
          "next_cursor": {
            "type": "integer",
            "format": "int64",
            "example": 1
          }
        },
        "title": "RespGetBoPnL",
        "required": [
          "code",
          "events"
        ]
      },
      "BoEventPnL": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64"
          },
          "event_title": {
            "type": "string"
          },
          "event_description": {
            "type": "string"
          },
          "total_pnl": {
            "type": "string"
          },
          "outcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoOutcomePnL"
            }
          }
        },
        "title": "BoEventPnL",
        "required": [
          "event_id",
          "event_title",
          "event_description",
          "total_pnl",
          "outcomes"
        ]
      },
      "BoOutcomePnL": {
        "type": "object",
        "properties": {
          "market_id": {
            "type": "integer",
            "format": "int64"
          },
          "symbol": {
            "type": "string"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "settlement_pnl": {
            "type": "string",
            "nullable": true
          },
          "last_trade_id": {
            "type": "integer",
            "format": "int64"
          },
          "total_pnl": {
            "type": "string"
          }
        },
        "title": "BoOutcomePnL",
        "required": [
          "market_id",
          "symbol",
          "outcome",
          "end_timestamp",
          "settlement_pnl",
          "last_trade_id",
          "total_pnl"
        ]
      },
      "FeeTiers": {
        "type": "object",
        "properties": {
          "user_tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserFeeTier"
            }
          },
          "bo_tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoFeeTier"
            }
          },
          "staking_tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StakingFeeTier"
            }
          }
        },
        "title": "FeeTiers",
        "required": [
          "user_tiers",
          "bo_tiers",
          "staking_tiers"
        ],
        "description": "This response does not use the usual code/message envelope."
      },
      "StakingFeeTier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "level1"
          },
          "required_lit_stakes": {
            "type": "integer",
            "format": "int64",
            "example": 10
          },
          "fee_rate": {
            "type": "number",
            "format": "double",
            "example": 0.95
          }
        },
        "title": "StakingFeeTier",
        "required": [
          "name",
          "required_lit_stakes",
          "fee_rate"
        ]
      },
      "BoFeeTier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "level1"
          },
          "required_volume": {
            "type": "integer",
            "format": "int64",
            "example": 5000000
          },
          "fee_rate": {
            "type": "number",
            "format": "double",
            "example": 0.9
          }
        },
        "title": "BoFeeTier",
        "required": [
          "name",
          "required_volume",
          "fee_rate"
        ]
      },
      "UserFeeTier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "premium_1"
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "example": 2
          },
          "maker_fee_ticks": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "taker_fee_ticks": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "required_lit_stakes": {
            "type": "integer",
            "format": "int64",
            "example": 1000
          },
          "required_volume": {
            "type": "integer",
            "format": "int64",
            "example": 0
          }
        },
        "title": "UserFeeTier",
        "required": [
          "name",
          "level",
          "maker_fee_ticks",
          "taker_fee_ticks",
          "required_lit_stakes",
          "required_volume"
        ]
      },
      "RespGetEvents": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "next_cursor": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventDetail"
            }
          }
        },
        "title": "RespGetEvents",
        "required": [
          "code",
          "events"
        ]
      },
      "EventDetail": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "creator_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000
          },
          "tag": {
            "type": "string"
          },
          "event_kind": {
            "type": "string",
            "enum": [
              "one_off",
              "recurrent"
            ]
          },
          "recurrence_period_seconds": {
            "type": "integer",
            "format": "int32"
          },
          "start_at": {
            "type": "integer",
            "format": "int64"
          },
          "end_at": {
            "type": "integer",
            "format": "int64"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "order_books": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventOrderBookEntry"
            }
          },
          "lifetime_quote_token_volume": {
            "type": "number",
            "format": "double",
            "example": 8400000.0
          }
        },
        "title": "EventDetail",
        "required": [
          "event_id",
          "title",
          "description",
          "creator_account_index",
          "created_at",
          "tag",
          "event_kind",
          "recurrence_period_seconds",
          "start_at",
          "end_at",
          "metadata",
          "order_books",
          "lifetime_quote_token_volume"
        ]
      },
      "EventOrderBookEntry": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "ETH"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "market_type": {
            "type": "string",
            "enum": [
              "perp",
              "spot",
              "binary_options"
            ]
          },
          "base_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 1
          },
          "quote_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 2
          },
          "status": {
            "type": "string",
            "enum": [
              "inactive",
              "active",
              "in-settlement",
              "waiting-for-settlement",
              "settled"
            ],
            "description": "waiting-for-settlement and settled are binary options only"
          },
          "taker_fee": {
            "type": "string",
            "example": "0.0001"
          },
          "is_taker_fee_enabled": {
            "type": "boolean",
            "example": true
          },
          "maker_fee": {
            "type": "string",
            "example": "0.0000"
          },
          "is_maker_fee_enabled": {
            "type": "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
          },
          "created_at": {
            "type": "string",
            "example": "1640995200000",
            "description": "Unix timestamp in milliseconds, encoded as a decimal string."
          },
          "multiplier": {
            "type": "string",
            "example": "1.000000000000000000"
          },
          "start_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "end_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1640995200000,
            "description": "Unix timestamp in milliseconds."
          },
          "open_interest": {
            "type": "string",
            "example": "93.0"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          },
          "operator_account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "settlement_cap": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "settlement_type": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1
            ],
            "x-enum-varnames": [
              "Discrete",
              "Continuous"
            ]
          },
          "settlement_price": {
            "type": "integer",
            "format": "int32",
            "example": 10000
          },
          "default_price": {
            "type": "integer",
            "format": "int32",
            "example": 5000
          },
          "is_frozen": {
            "type": "boolean",
            "example": false
          },
          "size_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 4
          },
          "price_decimals": {
            "type": "integer",
            "format": "uint8",
            "example": 4
          },
          "stats": {
            "$ref": "#/components/schemas/BinaryOptionMarketStats"
          },
          "open_interest_limit": {
            "type": "string"
          },
          "open_interest_usd": {
            "type": "string"
          },
          "market_deployer": {
            "type": "string",
            "description": "Market deployer identifier, for example lighter."
          }
        },
        "title": "EventOrderBookEntry",
        "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",
          "created_at",
          "multiplier",
          "start_timestamp",
          "end_timestamp",
          "open_interest",
          "outcome",
          "operator_account_index",
          "settlement_cap",
          "settlement_type",
          "settlement_price",
          "default_price",
          "is_frozen",
          "size_decimals",
          "price_decimals",
          "stats",
          "market_deployer"
        ],
        "description": "Fields with zero or empty values may be omitted; handle optional properties when decoding responses."
      },
      "BinaryOptionMarketStats": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "BINOPT1000"
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 1000
          },
          "mid_price": {
            "type": "string",
            "example": "0.52"
          },
          "best_ask_price": {
            "type": "string",
            "example": "0.53"
          },
          "best_bid_price": {
            "type": "string",
            "example": "0.51"
          },
          "last_trade_price": {
            "type": "string",
            "example": "0.52"
          },
          "daily_base_token_volume": {
            "type": "number",
            "format": "double",
            "example": 235.25
          },
          "daily_quote_token_volume": {
            "type": "number",
            "format": "double",
            "example": 115.27
          },
          "daily_price_low": {
            "type": "number",
            "format": "double",
            "example": 0.42
          },
          "daily_price_high": {
            "type": "number",
            "format": "double",
            "example": 0.55
          },
          "daily_price_change": {
            "type": "number",
            "format": "double",
            "example": 0.03
          },
          "lifetime_quote_token_volume": {
            "type": "number",
            "format": "double",
            "example": 8400000.0
          },
          "lifetime_base_token_volume": {
            "type": "number",
            "format": "double",
            "example": 16000000.0,
            "description": "outcome shares traded over the market's life"
          },
          "open_interest": {
            "type": "string",
            "example": "93.0"
          },
          "status": {
            "type": "string",
            "enum": [
              "inactive",
              "active",
              "in-settlement",
              "waiting-for-settlement",
              "settled"
            ],
            "description": "inactive before the trading window opens, waiting-for-settlement once it closes"
          },
          "outcome": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "None",
              "No",
              "Yes"
            ]
          }
        },
        "title": "BinaryOptionMarketStats",
        "required": [
          "symbol",
          "market_id",
          "mid_price",
          "best_ask_price",
          "best_bid_price",
          "last_trade_price",
          "daily_base_token_volume",
          "daily_quote_token_volume",
          "daily_price_low",
          "daily_price_high",
          "daily_price_change",
          "lifetime_quote_token_volume",
          "lifetime_base_token_volume",
          "open_interest",
          "status",
          "outcome"
        ]
      },
      "ReqSetAccountMetadata": {
        "type": "object",
        "required": [
          "master_account_index",
          "target_account_index",
          "api_key_index",
          "metadata"
        ],
        "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",
            "description": "JSON string with optional name and description (up to 256 characters each) and metadata.color in #RRGGBB or #RRGGBBAA format.",
            "example": "{\"name\":\"Trading account\",\"description\":\"Main account\",\"metadata\":{\"color\":\"#3366FF\"}}"
          }
        },
        "title": "ReqSetAccountMetadata"
      },
      "AccountBinaryOptionsPosition": {
        "title": "AccountBinaryOptionsPosition",
        "type": "object",
        "properties": {
          "market_id": {
            "type": "integer",
            "format": "int64"
          },
          "entry_quote": {
            "type": "string"
          },
          "avg_entry_price": {
            "type": "string",
            "description": "Average price paid for the held outcome (YES price for sign 1, NO price for sign -1)."
          },
          "sign": {
            "type": "integer",
            "format": "int32",
            "enum": [
              -1,
              1
            ],
            "description": "-1 holds NO/Down; 1 holds YES/Up. Size is the unsigned magnitude."
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "market_id",
          "entry_quote",
          "avg_entry_price",
          "sign",
          "size"
        ]
      },
      "handler.SearchResult": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "account_assets": {
            "$ref": "#/components/schemas/response.AccountAssetResponse"
          },
          "account_logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.Tx"
            }
          },
          "account_positions": {
            "$ref": "#/components/schemas/response.AccountPositionResponse"
          },
          "batch": {
            "$ref": "#/components/schemas/response.Batch"
          },
          "block": {
            "$ref": "#/components/schemas/response.Block"
          },
          "log": {
            "$ref": "#/components/schemas/response.TxDetailed"
          },
          "type": {
            "$ref": "#/components/schemas/handler.SearchResultType"
          }
        },
        "title": "handler.SearchResult"
      },
      "handler.SearchResultType": {
        "type": "string",
        "enum": [
          "account",
          "block",
          "batch",
          "log"
        ],
        "x-enum-varnames": [
          "Account",
          "Block",
          "Batch",
          "Log"
        ],
        "title": "handler.SearchResultType"
      },
      "pubdata.L1RegisterAsset": {
        "type": "object",
        "properties": {
          "asset_index": {
            "type": "integer"
          },
          "decimals": {
            "type": "integer"
          },
          "extension_multiplier": {
            "type": "integer"
          },
          "index_price_divider": {
            "type": "integer"
          },
          "l1_address": {
            "type": "string"
          },
          "l1_decimals": {
            "type": "integer"
          },
          "liquidation_factor": {
            "type": "integer"
          },
          "liquidation_fee": {
            "type": "integer"
          },
          "liquidation_threshold": {
            "type": "integer"
          },
          "loan_to_value": {
            "type": "integer"
          },
          "margin_index": {
            "type": "integer"
          },
          "margin_mode": {
            "type": "integer"
          },
          "min_transfer_amount": {
            "type": "integer"
          },
          "min_withdrawal_amount": {
            "type": "integer"
          },
          "price_decimals": {
            "type": "integer"
          },
          "symbol": {
            "type": "string"
          },
          "tick_size": {
            "type": "string"
          }
        },
        "required": [
          "asset_index",
          "decimals",
          "extension_multiplier",
          "index_price_divider",
          "l1_address",
          "l1_decimals",
          "liquidation_factor",
          "liquidation_fee",
          "liquidation_threshold",
          "loan_to_value",
          "margin_index",
          "margin_mode",
          "min_transfer_amount",
          "min_withdrawal_amount",
          "price_decimals",
          "symbol",
          "tick_size"
        ],
        "title": "pubdata.L1RegisterAsset"
      },
      "pubdata.L1SetSystemConfig": {
        "type": "object",
        "properties": {
          "liquidity_pool_cooldown_period": {
            "type": "integer"
          },
          "liquidity_pool_index": {
            "type": "integer"
          },
          "max_integrator_perps_maker_fee": {
            "type": "integer"
          },
          "max_integrator_perps_taker_fee": {
            "type": "integer"
          },
          "max_integrator_spot_maker_fee": {
            "type": "integer"
          },
          "max_integrator_spot_taker_fee": {
            "type": "integer"
          },
          "staking_pool_index": {
            "type": "integer"
          },
          "staking_pool_lockup_period": {
            "type": "integer"
          }
        },
        "required": [
          "liquidity_pool_cooldown_period",
          "liquidity_pool_index",
          "max_integrator_perps_maker_fee",
          "max_integrator_perps_taker_fee",
          "max_integrator_spot_maker_fee",
          "max_integrator_spot_taker_fee",
          "staking_pool_index",
          "staking_pool_lockup_period"
        ],
        "title": "pubdata.L1SetSystemConfig"
      },
      "pubdata.L1UpdateAsset": {
        "type": "object",
        "properties": {
          "asset_index": {
            "type": "integer"
          },
          "index_price_divider": {
            "type": "integer"
          },
          "liquidation_factor": {
            "type": "integer"
          },
          "liquidation_fee": {
            "type": "integer"
          },
          "liquidation_threshold": {
            "type": "integer"
          },
          "loan_to_value": {
            "type": "integer"
          },
          "margin_index": {
            "type": "integer"
          },
          "margin_mode": {
            "type": "integer"
          },
          "min_transfer_amount": {
            "type": "integer"
          },
          "min_withdrawal_amount": {
            "type": "integer"
          }
        },
        "required": [
          "asset_index",
          "index_price_divider",
          "liquidation_factor",
          "liquidation_fee",
          "liquidation_threshold",
          "loan_to_value",
          "margin_index",
          "margin_mode",
          "min_transfer_amount",
          "min_withdrawal_amount"
        ],
        "title": "pubdata.L1UpdateAsset"
      },
      "pubdata.L2CreatePublicPool": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer"
          },
          "initial_total_shares": {
            "type": "integer"
          },
          "min_operator_share_rate": {
            "type": "integer"
          },
          "operator_fee": {
            "type": "integer"
          },
          "public_pool_index": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "initial_total_shares",
          "min_operator_share_rate",
          "operator_fee",
          "public_pool_index"
        ],
        "title": "pubdata.L2CreatePublicPool"
      },
      "pubdata.L2CreateStakingPool": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer"
          },
          "initial_total_shares": {
            "type": "integer"
          },
          "min_operator_share_rate": {
            "type": "integer"
          },
          "staking_pool_index": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "initial_total_shares",
          "min_operator_share_rate",
          "staking_pool_index"
        ],
        "title": "pubdata.L2CreateStakingPool"
      },
      "pubdata.L2UpdatePublicPool": {
        "type": "object",
        "properties": {
          "min_operator_share_rate": {
            "type": "integer"
          },
          "operator_fee": {
            "type": "integer"
          },
          "public_pool_index": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          }
        },
        "required": [
          "min_operator_share_rate",
          "operator_fee",
          "public_pool_index",
          "status"
        ],
        "title": "pubdata.L2UpdatePublicPool"
      },
      "response.AccountAssetResponse": {
        "type": "object",
        "properties": {
          "assets": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/response.EnrichedAccountAsset"
            }
          }
        },
        "required": [
          "assets"
        ],
        "title": "response.AccountAssetResponse"
      },
      "response.AccountPositionResponse": {
        "type": "object",
        "properties": {
          "positions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/response.EnrichedAccountPosition"
            }
          }
        },
        "required": [
          "positions"
        ],
        "title": "response.AccountPositionResponse"
      },
      "response.Batch": {
        "type": "object",
        "properties": {
          "batch_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchDetails"
              }
            ],
            "nullable": true
          },
          "batch_number": {
            "type": "integer"
          },
          "blocks": {
            "description": "includes all blocks in the batch",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.BlockMeta"
            }
          },
          "status_changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.BatchStatusChange"
            }
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "batch_details",
          "batch_number",
          "blocks",
          "status_changes",
          "updated_at"
        ],
        "title": "response.Batch"
      },
      "response.BatchDetails": {
        "type": "object",
        "properties": {
          "commit_tx_hash": {
            "type": "string",
            "nullable": true
          },
          "execute_tx_hash": {
            "type": "string",
            "nullable": true
          },
          "verify_tx_hash": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "commit_tx_hash",
          "execute_tx_hash",
          "verify_tx_hash"
        ],
        "title": "response.BatchDetails"
      },
      "response.BatchStatus": {
        "type": "string",
        "enum": [
          "nothing_to_execute",
          "committed",
          "verified",
          "executed"
        ],
        "x-enum-varnames": [
          "BatchStatus_NothingToExecute",
          "BatchStatus_Committed",
          "BatchStatus_Verified",
          "BatchStatus_Executed"
        ],
        "title": "response.BatchStatus"
      },
      "response.BatchStatusChange": {
        "type": "object",
        "properties": {
          "batch_status": {
            "$ref": "#/components/schemas/response.BatchStatus"
          },
          "hash": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "batch_status",
          "hash",
          "updated_at"
        ],
        "title": "response.BatchStatusChange"
      },
      "response.Block": {
        "type": "object",
        "properties": {
          "batch_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchDetails"
              }
            ],
            "nullable": true
          },
          "batch_number": {
            "type": "integer"
          },
          "batch_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchStatus"
              }
            ],
            "nullable": true,
            "description": "Batch status, or null until the block is assigned to a batch."
          },
          "batch_status_time": {
            "type": "string"
          },
          "block_number": {
            "type": "integer"
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.Tx"
            }
          },
          "markets": {
            "description": "MarketState at Block rollup time",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.MarketStat"
            }
          },
          "total_transactions": {
            "type": "integer"
          }
        },
        "required": [
          "batch_details",
          "batch_number",
          "batch_status",
          "batch_status_time",
          "block_number",
          "logs",
          "markets",
          "total_transactions"
        ],
        "title": "response.Block"
      },
      "response.BlockMeta": {
        "type": "object",
        "properties": {
          "block_number": {
            "type": "integer"
          },
          "total_transactions": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "block_number",
          "total_transactions",
          "updated_at"
        ],
        "title": "response.BlockMeta"
      },
      "response.BurnedSharesPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "operator_fee_share_amount": {
            "type": "string"
          },
          "public_pool_index": {
            "type": "integer"
          },
          "shares_to_burn": {
            "type": "string"
          },
          "shares_to_burn_usdc": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "operator_fee_share_amount",
          "public_pool_index",
          "shares_to_burn",
          "shares_to_burn_usdc"
        ],
        "title": "response.BurnedSharesPubData"
      },
      "response.ChartData": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "data",
          "types"
        ],
        "title": "response.ChartData"
      },
      "response.DeleveragePubData": {
        "type": "object",
        "properties": {
          "bankrupt_account_index": {
            "type": "string"
          },
          "deleverager_account_index": {
            "type": "string"
          },
          "is_taker_ask": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "quote": {
            "type": "string"
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "bankrupt_account_index",
          "deleverager_account_index",
          "is_taker_ask",
          "market_index",
          "quote",
          "size"
        ],
        "title": "response.DeleveragePubData"
      },
      "response.DeleveragePubDataWithFunding": {
        "type": "object",
        "properties": {
          "bankrupt_account_index": {
            "type": "string"
          },
          "deleverager_account_index": {
            "type": "string"
          },
          "funding_rate_prefix_sum": {
            "description": "Cumulative funding rate prefix sum at execution.",
            "type": "integer"
          },
          "is_taker_ask": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "quote": {
            "type": "string"
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "bankrupt_account_index",
          "deleverager_account_index",
          "funding_rate_prefix_sum",
          "is_taker_ask",
          "market_index",
          "quote",
          "size"
        ],
        "title": "response.DeleveragePubDataWithFunding"
      },
      "response.EnrichedAccountAsset": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "integer"
          },
          "balance": {
            "type": "string"
          },
          "locked_balance": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        },
        "required": [
          "asset_id",
          "balance",
          "locked_balance",
          "symbol"
        ],
        "title": "response.EnrichedAccountAsset"
      },
      "response.EnrichedAccountPosition": {
        "type": "object",
        "properties": {
          "entry_price": {
            "type": "string"
          },
          "market_index": {
            "type": "integer"
          },
          "pnl": {
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/response.PositionSide"
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "entry_price",
          "market_index",
          "pnl",
          "side",
          "size"
        ],
        "title": "response.EnrichedAccountPosition"
      },
      "response.ExecutedPendingUnlockPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "asset_symbol": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "amount",
          "asset_symbol"
        ],
        "title": "response.ExecutedPendingUnlockPubData"
      },
      "response.ExitPositionPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "market_index": {
            "type": "integer"
          },
          "settlement_price": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "market_index",
          "settlement_price"
        ],
        "title": "response.ExitPositionPubData"
      },
      "response.ExitPositionPubDataWithFunding": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "funding_rate_prefix_sum": {
            "description": "Cumulative funding rate prefix sum at execution.",
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "settlement_price": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "funding_rate_prefix_sum",
          "market_index",
          "settlement_price"
        ],
        "title": "response.ExitPositionPubDataWithFunding"
      },
      "response.L1CreateMarketPubData": {
        "type": "object",
        "properties": {
          "close_out_margin_fraction": {
            "type": "integer"
          },
          "default_initial_margin_fraction": {
            "type": "integer"
          },
          "interest_rate": {
            "type": "integer"
          },
          "liquidation_fee": {
            "type": "integer"
          },
          "maintenance_margin_fraction": {
            "type": "integer"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "min_base_amount": {
            "type": "integer"
          },
          "min_initial_margin_fraction": {
            "type": "integer"
          },
          "min_quote_amount": {
            "type": "integer"
          },
          "quote_multiplier": {
            "type": "integer"
          },
          "taker_fee": {
            "type": "integer"
          }
        },
        "required": [
          "close_out_margin_fraction",
          "default_initial_margin_fraction",
          "interest_rate",
          "liquidation_fee",
          "maintenance_margin_fraction",
          "maker_fee",
          "market_index",
          "min_base_amount",
          "min_initial_margin_fraction",
          "min_quote_amount",
          "quote_multiplier",
          "taker_fee"
        ],
        "title": "response.L1CreateMarketPubData"
      },
      "response.L1CreateMarketPubDataV2": {
        "type": "object",
        "properties": {
          "close_out_margin_fraction": {
            "type": "integer"
          },
          "default_initial_margin_fraction": {
            "type": "integer"
          },
          "funding_clamp_big": {
            "type": "integer"
          },
          "funding_clamp_small": {
            "type": "integer"
          },
          "interest_rate": {
            "type": "integer"
          },
          "liquidation_fee": {
            "type": "integer"
          },
          "maintenance_margin_fraction": {
            "type": "integer"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "min_base_amount": {
            "type": "integer"
          },
          "min_initial_margin_fraction": {
            "type": "integer"
          },
          "min_quote_amount": {
            "type": "integer"
          },
          "open_interest_limit": {
            "type": "integer"
          },
          "order_quote_limit": {
            "type": "integer"
          },
          "quote_multiplier": {
            "type": "integer"
          },
          "taker_fee": {
            "type": "integer"
          }
        },
        "required": [
          "close_out_margin_fraction",
          "default_initial_margin_fraction",
          "funding_clamp_big",
          "funding_clamp_small",
          "interest_rate",
          "liquidation_fee",
          "maintenance_margin_fraction",
          "maker_fee",
          "market_index",
          "min_base_amount",
          "min_initial_margin_fraction",
          "min_quote_amount",
          "open_interest_limit",
          "order_quote_limit",
          "quote_multiplier",
          "taker_fee"
        ],
        "title": "response.L1CreateMarketPubDataV2"
      },
      "response.L1CreateSpotMarketPubData": {
        "type": "object",
        "properties": {
          "base_asset_id": {
            "type": "integer"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "min_base_amount": {
            "type": "integer"
          },
          "min_quote_amount": {
            "type": "integer"
          },
          "order_quote_limit": {
            "type": "integer"
          },
          "quote_asset_id": {
            "type": "integer"
          },
          "quote_extension_multiplier": {
            "type": "integer"
          },
          "size_extension_multiplier": {
            "type": "integer"
          },
          "taker_fee": {
            "type": "integer"
          }
        },
        "required": [
          "base_asset_id",
          "maker_fee",
          "market_index",
          "min_base_amount",
          "min_quote_amount",
          "order_quote_limit",
          "quote_asset_id",
          "quote_extension_multiplier",
          "size_extension_multiplier",
          "taker_fee"
        ],
        "title": "response.L1CreateSpotMarketPubData"
      },
      "response.L1DepositPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "l1_address": {
            "type": "string"
          },
          "usdc_amount": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "l1_address",
          "usdc_amount"
        ],
        "title": "response.L1DepositPubData"
      },
      "response.L1DepositPubDataV2": {
        "type": "object",
        "properties": {
          "accepted_amount": {
            "type": "string"
          },
          "account_index": {
            "type": "string"
          },
          "asset_index": {
            "type": "string"
          },
          "l1_address": {
            "type": "string"
          },
          "route_type": {
            "type": "string"
          }
        },
        "required": [
          "accepted_amount",
          "account_index",
          "asset_index",
          "l1_address",
          "route_type"
        ],
        "title": "response.L1DepositPubDataV2"
      },
      "response.L1UpdateMarketPubData": {
        "type": "object",
        "properties": {
          "close_out_margin_fraction": {
            "type": "integer"
          },
          "default_initial_margin_fraction": {
            "type": "integer"
          },
          "interest_rate": {
            "type": "integer"
          },
          "liquidation_fee": {
            "type": "integer"
          },
          "maintenance_margin_fraction": {
            "type": "integer"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "min_base_amount": {
            "type": "integer"
          },
          "min_initial_margin_fraction": {
            "type": "integer"
          },
          "min_quote_amount": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          },
          "taker_fee": {
            "type": "integer"
          }
        },
        "required": [
          "close_out_margin_fraction",
          "default_initial_margin_fraction",
          "interest_rate",
          "liquidation_fee",
          "maintenance_margin_fraction",
          "maker_fee",
          "market_index",
          "min_base_amount",
          "min_initial_margin_fraction",
          "min_quote_amount",
          "status",
          "taker_fee"
        ],
        "title": "response.L1UpdateMarketPubData"
      },
      "response.L1UpdateSpotMarketPubData": {
        "type": "object",
        "properties": {
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "min_base_amount": {
            "type": "integer"
          },
          "min_quote_amount": {
            "type": "integer"
          },
          "order_quote_limit": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          },
          "taker_fee": {
            "type": "integer"
          }
        },
        "required": [
          "maker_fee",
          "market_index",
          "min_base_amount",
          "min_quote_amount",
          "order_quote_limit",
          "status",
          "taker_fee"
        ],
        "title": "response.L1UpdateSpotMarketPubData"
      },
      "response.L2CreateSubAccountPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "subAccount_index": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "subAccount_index"
        ],
        "title": "response.L2CreateSubAccountPubData"
      },
      "response.L2MintSharesPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "public_pool_index": {
            "type": "integer"
          },
          "share_amount": {
            "type": "string"
          },
          "usdc_amount": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "public_pool_index",
          "share_amount",
          "usdc_amount"
        ],
        "title": "response.L2MintSharesPubData"
      },
      "response.L2StakeAssetsPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "lit_amount": {
            "type": "string"
          },
          "share_amount": {
            "type": "string"
          },
          "staking_pool_index": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "lit_amount",
          "share_amount",
          "staking_pool_index"
        ],
        "title": "response.L2StakeAssetsPubData"
      },
      "response.L2TransferPubData": {
        "type": "object",
        "properties": {
          "from_account_index": {
            "type": "string"
          },
          "to_account_index": {
            "type": "string"
          },
          "usdc_amount": {
            "type": "string"
          }
        },
        "required": [
          "from_account_index",
          "to_account_index",
          "usdc_amount"
        ],
        "title": "response.L2TransferPubData"
      },
      "response.L2TransferPubDataV2": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string"
          },
          "asset_index": {
            "type": "string"
          },
          "fee_account_index": {
            "type": "string"
          },
          "from_account_index": {
            "type": "string"
          },
          "from_route_type": {
            "type": "string"
          },
          "to_account_index": {
            "type": "string"
          },
          "to_route_type": {
            "type": "string"
          },
          "usdc_fee": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "asset_index",
          "fee_account_index",
          "from_account_index",
          "from_route_type",
          "to_account_index",
          "to_route_type",
          "usdc_fee"
        ],
        "title": "response.L2TransferPubDataV2"
      },
      "response.L2UpdateAccountAssetConfigPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "asset_index": {
            "type": "integer"
          },
          "asset_margin_mode": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "asset_index",
          "asset_margin_mode"
        ],
        "title": "response.L2UpdateAccountAssetConfigPubData"
      },
      "response.L2UpdateAccountConfigPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer"
          },
          "account_trading_mode": {
            "type": "integer"
          },
          "asset_amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response.UnifiedAsset"
            }
          }
        },
        "required": [
          "account_index",
          "account_trading_mode",
          "asset_amounts"
        ],
        "title": "response.L2UpdateAccountConfigPubData"
      },
      "response.L2UpdateAssetConfigPubData": {
        "type": "object",
        "properties": {
          "asset_index": {
            "type": "integer"
          },
          "global_supply_cap": {
            "type": "string"
          },
          "user_supply_cap": {
            "type": "string"
          }
        },
        "required": [
          "asset_index",
          "global_supply_cap",
          "user_supply_cap"
        ],
        "title": "response.L2UpdateAssetConfigPubData"
      },
      "response.L2UpdateLeveragePubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "initial_margin_fraction": {
            "type": "integer"
          },
          "margin_mode": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "initial_margin_fraction",
          "margin_mode",
          "market_index"
        ],
        "title": "response.L2UpdateLeveragePubData"
      },
      "response.L2UpdateMarginPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "direction": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "usdc_amount": {
            "type": "string"
          }
        },
        "required": [
          "account_index",
          "direction",
          "market_index",
          "usdc_amount"
        ],
        "title": "response.L2UpdateMarginPubData"
      },
      "response.Market": {
        "type": "object",
        "properties": {
          "market_index": {
            "type": "integer"
          },
          "symbol": {
            "type": "string"
          }
        },
        "required": [
          "market_index",
          "symbol"
        ],
        "title": "response.Market"
      },
      "response.MarketStat": {
        "type": "object",
        "properties": {
          "index_price": {
            "type": "string"
          },
          "last_funding_rate": {
            "type": "string"
          },
          "market_index": {
            "type": "integer"
          },
          "market_price": {
            "type": "string"
          },
          "open_interest": {
            "type": "string"
          }
        },
        "required": [
          "index_price",
          "last_funding_rate",
          "market_index",
          "market_price",
          "open_interest"
        ],
        "title": "response.MarketStat"
      },
      "response.MarketTx": {
        "type": "object",
        "properties": {
          "hash": {
            "type": "string"
          },
          "pubdata": {
            "$ref": "#/components/schemas/response.PubData"
          },
          "pubdata_type": {
            "$ref": "#/components/schemas/response.PubDataType"
          },
          "time": {
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/response.TxType"
          }
        },
        "required": [
          "hash",
          "pubdata",
          "pubdata_type",
          "time",
          "tx_type"
        ],
        "title": "response.MarketTx"
      },
      "response.PositionSide": {
        "type": "string",
        "enum": [
          "short",
          "long"
        ],
        "x-enum-varnames": [
          "SHORT",
          "LONG"
        ],
        "title": "response.PositionSide"
      },
      "response.PubData": {
        "type": "object",
        "properties": {
          "burned_shares_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BurnedSharesPubData"
              }
            ],
            "nullable": true
          },
          "deleverage_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.DeleveragePubData"
              }
            ],
            "nullable": true
          },
          "deleverage_pubdata_with_funding": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.DeleveragePubDataWithFunding"
              }
            ],
            "nullable": true
          },
          "executed_pending_unlock_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.ExecutedPendingUnlockPubData"
              }
            ],
            "nullable": true
          },
          "exit_position_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.ExitPositionPubData"
              }
            ],
            "nullable": true
          },
          "exit_position_pubdata_with_funding": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.ExitPositionPubDataWithFunding"
              }
            ],
            "nullable": true
          },
          "l1_create_market_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1CreateMarketPubData"
              }
            ],
            "nullable": true
          },
          "l1_create_market_pubdata_v2": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1CreateMarketPubDataV2"
              }
            ],
            "nullable": true
          },
          "l1_create_spot_market_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1CreateSpotMarketPubData"
              }
            ],
            "nullable": true
          },
          "l1_deposit_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1DepositPubData"
              }
            ],
            "nullable": true
          },
          "l1_deposit_pubdata_v2": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1DepositPubDataV2"
              }
            ],
            "nullable": true
          },
          "l1_register_asset_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L1RegisterAsset"
              }
            ],
            "nullable": true
          },
          "l1_set_system_config_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L1SetSystemConfig"
              }
            ],
            "nullable": true
          },
          "l1_update_asset_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L1UpdateAsset"
              }
            ],
            "nullable": true
          },
          "l1_update_market_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1UpdateMarketPubData"
              }
            ],
            "nullable": true
          },
          "l1_update_spot_market_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L1UpdateSpotMarketPubData"
              }
            ],
            "nullable": true
          },
          "l2_create_public_pool_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L2CreatePublicPool"
              }
            ],
            "nullable": true
          },
          "l2_create_staking_pool_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L2CreateStakingPool"
              }
            ],
            "nullable": true
          },
          "l2_create_sub_account_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2CreateSubAccountPubData"
              }
            ],
            "nullable": true
          },
          "l2_mint_shares_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2MintSharesPubData"
              }
            ],
            "nullable": true
          },
          "l2_stake_assets_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2StakeAssetsPubData"
              }
            ],
            "nullable": true
          },
          "l2_transfer_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2TransferPubData"
              }
            ],
            "nullable": true
          },
          "l2_transfer_pubdata_v2": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2TransferPubDataV2"
              }
            ],
            "nullable": true
          },
          "l2_update_account_asset_config_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2UpdateAccountAssetConfigPubData"
              }
            ],
            "nullable": true
          },
          "l2_update_account_config_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2UpdateAccountConfigPubData"
              }
            ],
            "nullable": true
          },
          "l2_update_asset_config_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2UpdateAssetConfigPubData"
              }
            ],
            "nullable": true
          },
          "l2_update_leverage_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2UpdateLeveragePubData"
              }
            ],
            "nullable": true
          },
          "l2_update_margin_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.L2UpdateMarginPubData"
              }
            ],
            "nullable": true
          },
          "l2_update_public_pool_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pubdata.L2UpdatePublicPool"
              }
            ],
            "nullable": true
          },
          "trade_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.TradePubData"
              }
            ],
            "nullable": true
          },
          "trade_pubdata_with_funding": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.TradePubDataWithFunding"
              }
            ],
            "nullable": true
          },
          "unstake_assets_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.UnstakeAssetsPubData"
              }
            ],
            "nullable": true
          },
          "withdraw_pubdata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.WithdrawPubData"
              }
            ],
            "nullable": true
          },
          "withdraw_pubdata_v2": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.WithdrawPubDataV2"
              }
            ],
            "nullable": true
          }
        },
        "title": "response.PubData",
        "description": "Payload members are alternatives selected by pub_data_type; only the matching member is present. Some PubDataType values (LiquidationTrade, LiquidationTradeWithFunding, L2UpdateStakingPool, L1UpdateMarketV2 and L2UpdateMarketConfig) do not expose a dedicated payload member."
      },
      "response.PubDataType": {
        "type": "string",
        "enum": [
          "Empty",
          "L1Deposit",
          "L1CreateMarket",
          "L1UpdateMarket",
          "L2CreateSubAccount",
          "L2CreatePublicPool",
          "L2UpdatePublicPool",
          "L2MintShares",
          "L2UpdateLeverage",
          "L2UpdateMargin",
          "L2Transfer",
          "Withdraw",
          "Trade",
          "TradeWithFunding",
          "LiquidationTrade",
          "LiquidationTradeWithFunding",
          "BurnedShares",
          "ExitPosition",
          "ExitPositionWithFunding",
          "Deleverage",
          "DeleverageWithFunding",
          "L1RegisterAsset",
          "L1UpdateAsset",
          "L1CreateSpotMarket",
          "L1UpdateSpotMarket",
          "WithdrawV2",
          "L1CreateMarketV2",
          "L1DepositV2",
          "L1UpdateMarketV2",
          "L2TransferV2",
          "L2CreateStakingPool",
          "L2UpdateStakingPool",
          "L2StakeAssets",
          "UnstakeAssets",
          "L1SetSystemConfig",
          "ExecutedPendingUnlock",
          "L2UpdateAccountConfig",
          "L2UpdateMarketConfig",
          "InternalLiquidateSpot",
          "L2UpdateAssetConfig",
          "L2UpdateAccountAssetConfig"
        ],
        "x-enum-varnames": [
          "PubDataType_Empty",
          "PubDataType_L1deposit",
          "PubDataType_L1createMarket",
          "PubDataType_L1updateMarket",
          "PubDataType_L2createSubAccount",
          "PubDataType_L2createPublicPool",
          "PubDataType_L2updatePublicPool",
          "PubDataType_L2mintShares",
          "PubDataType_L2updateLeverage",
          "PubDataType_L2updateMargin",
          "PubDataType_L2transfer",
          "PubDataType_Withdraw",
          "PubDataType_Trade",
          "PubDataType_TradeWithFunding",
          "PubDataType_LiquidationTrade",
          "PubDataType_LiquidationTradeWithFunding",
          "PubDataType_BurnedShares",
          "PubDataType_ExitPosition",
          "PubDataType_ExitPositionWithFunding",
          "PubDataType_Deleverage",
          "PubDataType_DeleverageWithFunding",
          "PubDataType_L1registerAsset",
          "PubDataType_L1updateAsset",
          "PubDataType_L1createSpotMarket",
          "PubDataType_L1updateSpotMarket",
          "PubDataType_WithdrawV2",
          "PubDataType_L1createMarketV2",
          "PubDataType_L1depositV2",
          "PubDataType_L1updateMarketV2",
          "PubDataType_L2transferV2",
          "PubDataType_L2createStakingPool",
          "PubDataType_L2updateStakingPool",
          "PubDataType_L2stakeAssets",
          "PubDataType_UnstakeAssets",
          "PubDataType_L1setSystemConfig",
          "PubDataType_ExecutedPendingUnlock",
          "PubDataType_L2updateAccountConfig",
          "PubDataType_L2updateMarketConfig",
          "PubDataType_InternalLiquidateSpot",
          "PubDataType_L2updateAssetConfig",
          "PubDataType_L2updateAccountAssetConfig"
        ],
        "title": "response.PubDataType"
      },
      "response.RecentBatch": {
        "type": "object",
        "properties": {
          "batch_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchDetails"
              }
            ],
            "nullable": true
          },
          "batch_number": {
            "type": "integer"
          },
          "batch_size": {
            "type": "integer"
          },
          "batch_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchStatus"
              }
            ],
            "nullable": true,
            "description": "Batch status, or null until the block is assigned to a batch."
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "batch_details",
          "batch_number",
          "batch_size",
          "batch_status",
          "updated_at"
        ],
        "title": "response.RecentBatch"
      },
      "response.RecentBlock": {
        "type": "object",
        "properties": {
          "batch_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchDetails"
              }
            ],
            "nullable": true
          },
          "batch_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchStatus"
              }
            ],
            "nullable": true,
            "description": "Batch status, or null until the block is assigned to a batch."
          },
          "block_height": {
            "type": "integer"
          },
          "block_size": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "batch_details",
          "batch_status",
          "block_height",
          "block_size",
          "updated_at"
        ],
        "title": "response.RecentBlock"
      },
      "response.StatsData": {
        "type": "object",
        "properties": {
          "chart": {
            "$ref": "#/components/schemas/response.ChartData"
          }
        },
        "required": [
          "chart"
        ],
        "title": "response.StatsData"
      },
      "response.StatsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/response.StatsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "response.StatsResponse"
      },
      "response.TotalValues": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "integer"
          },
          "batches": {
            "type": "integer"
          },
          "blocks": {
            "type": "integer"
          },
          "txs": {
            "type": "integer"
          }
        },
        "required": [
          "accounts",
          "batches",
          "blocks",
          "txs"
        ],
        "title": "response.TotalValues"
      },
      "response.TradePubData": {
        "type": "object",
        "properties": {
          "fee_account_index": {
            "type": "string"
          },
          "integrator_maker_fee": {
            "type": "integer"
          },
          "integrator_maker_fee_collector_index": {
            "type": "string"
          },
          "integrator_taker_fee": {
            "type": "integer"
          },
          "integrator_taker_fee_collector_index": {
            "type": "string"
          },
          "is_taker_ask": {
            "type": "integer"
          },
          "maker_account_index": {
            "type": "string"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "price": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "taker_account_index": {
            "type": "string"
          },
          "taker_fee": {
            "type": "integer"
          },
          "trade_type": {
            "type": "integer"
          }
        },
        "required": [
          "fee_account_index",
          "integrator_maker_fee",
          "integrator_maker_fee_collector_index",
          "integrator_taker_fee",
          "integrator_taker_fee_collector_index",
          "is_taker_ask",
          "maker_account_index",
          "maker_fee",
          "market_index",
          "price",
          "size",
          "taker_account_index",
          "taker_fee",
          "trade_type"
        ],
        "title": "response.TradePubData"
      },
      "response.TradePubDataWithFunding": {
        "type": "object",
        "properties": {
          "fee_account_index": {
            "type": "string"
          },
          "funding_rate_prefix_sum": {
            "type": "integer"
          },
          "integrator_maker_fee": {
            "type": "integer"
          },
          "integrator_maker_fee_collector_index": {
            "type": "string"
          },
          "integrator_taker_fee": {
            "type": "integer"
          },
          "integrator_taker_fee_collector_index": {
            "type": "string"
          },
          "is_taker_ask": {
            "type": "integer"
          },
          "maker_account_index": {
            "type": "string"
          },
          "maker_fee": {
            "type": "integer"
          },
          "market_index": {
            "type": "integer"
          },
          "price": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "taker_account_index": {
            "type": "string"
          },
          "taker_fee": {
            "type": "integer"
          },
          "trade_type": {
            "type": "integer"
          }
        },
        "required": [
          "fee_account_index",
          "funding_rate_prefix_sum",
          "integrator_maker_fee",
          "integrator_maker_fee_collector_index",
          "integrator_taker_fee",
          "integrator_taker_fee_collector_index",
          "is_taker_ask",
          "maker_account_index",
          "maker_fee",
          "market_index",
          "price",
          "size",
          "taker_account_index",
          "taker_fee",
          "trade_type"
        ],
        "title": "response.TradePubDataWithFunding"
      },
      "response.Tx": {
        "type": "object",
        "properties": {
          "hash": {
            "type": "string"
          },
          "pubdata": {
            "$ref": "#/components/schemas/response.PubData"
          },
          "pubdata_type": {
            "$ref": "#/components/schemas/response.PubDataType"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchStatus"
              }
            ],
            "nullable": true
          },
          "time": {
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/response.TxType"
          }
        },
        "required": [
          "hash",
          "pubdata",
          "pubdata_type",
          "status",
          "time",
          "tx_type"
        ],
        "title": "response.Tx"
      },
      "response.TxDetailed": {
        "type": "object",
        "properties": {
          "batch_number": {
            "type": "integer",
            "nullable": true
          },
          "block_number": {
            "type": "integer"
          },
          "hash": {
            "type": "string"
          },
          "pubdata": {
            "$ref": "#/components/schemas/response.PubData"
          },
          "pubdata_type": {
            "$ref": "#/components/schemas/response.PubDataType"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/response.BatchStatus"
              }
            ],
            "nullable": true
          },
          "time": {
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/response.TxType"
          }
        },
        "required": [
          "batch_number",
          "block_number",
          "hash",
          "pubdata",
          "pubdata_type",
          "status",
          "time",
          "tx_type"
        ],
        "title": "response.TxDetailed"
      },
      "response.TxType": {
        "type": "string",
        "enum": [
          "Empty",
          "L1Deposit",
          "L1ChangePubKey",
          "L1CreateMarket",
          "L1UpdateMarket",
          "L1CancelAllOrders",
          "L1Withdraw",
          "L1CreateOrder",
          "L2ChangePubKey",
          "L2CreateSubAccount",
          "L2CreatePublicPool",
          "L2UpdatePublicPool",
          "L2Transfer",
          "L2Withdraw",
          "L2CreateOrder",
          "L2CancelOrder",
          "L2CancelAllOrders",
          "L2ModifyOrder",
          "L2MintShares",
          "L2BurnShares",
          "L2UpdateLeverage",
          "InternalClaimOrder",
          "InternalCancelOrder",
          "InternalDeleverage",
          "InternalExitPosition",
          "InternalCancelAllOrders",
          "InternalLiquidatePosition",
          "InternalCreateOrder",
          "L2CreateGroupedOrders",
          "L2UpdateMargin",
          "L1BurnShares",
          "L1RegisterAsset",
          "L1UpdateAsset",
          "L2CreateStakingPool",
          "L2StakeAssets",
          "L2UnstakeAssets",
          "L1UnstakeAssets",
          "L1SetSystemConfig",
          "InternalPendingUnlock",
          "L2ForceBurnShares",
          "L2UpdateAccountConfig",
          "L2StrategyTransfer",
          "L2UpdateMarketConfig",
          "InternalTransfer",
          "L2ApproveIntegrator",
          "L2UpdateAccountAssetConfig",
          "InternalLiquidateSpot",
          "L2UpdateAssetConfig"
        ],
        "x-enum-varnames": [
          "TxType_Empty",
          "TxType_L1deposit",
          "TxType_L1changePubKey",
          "TxType_L1createMarket",
          "TxType_L1updateMarket",
          "TxType_L1cancelAllOrders",
          "TxType_L1withdraw",
          "TxType_L1createOrder",
          "TxType_L2changePubKey",
          "TxType_L2createSubAccount",
          "TxType_L2createPublicPool",
          "TxType_L2updatePublicPool",
          "TxType_L2transfer",
          "TxType_L2withdraw",
          "TxType_L2createOrder",
          "TxType_L2cancelOrder",
          "TxType_L2cancelAllOrders",
          "TxType_L2modifyOrder",
          "TxType_L2mintShares",
          "TxType_L2burnShares",
          "TxType_L2updateLeverage",
          "TxType_InternalClaimOrder",
          "TxType_InternalCancelOrder",
          "TxType_InternalDeleverage",
          "TxType_InternalExitPosition",
          "TxType_InternalCancelAllOrders",
          "TxType_InternalLiquidatePosition",
          "TxType_InternalCreateOrder",
          "TxType_L2createGroupedOrders",
          "TxType_L2updateMargin",
          "TxType_L1burnShares",
          "TxType_L1registerAsset",
          "TxType_L1updateAsset",
          "TxType_L2createStakingPool",
          "TxType_L2stakeAssets",
          "TxType_L2unstakeAssets",
          "TxType_L1unstakeAssets",
          "TxType_L1setSystemConfig",
          "TxType_InternalPendingUnlock",
          "TxType_L2forceBurnShares",
          "TxType_L2updateAccountConfig",
          "TxType_L2strategyTransfer",
          "TxType_L2updateMarketConfig",
          "TxType_InternalTransfer",
          "TxType_L2approveIntegrator",
          "TxType_L2updateAccountAssetConfig",
          "TxType_InternalLiquidateSpot",
          "TxType_L2updateAssetConfig"
        ],
        "title": "response.TxType"
      },
      "response.UnifiedAsset": {
        "type": "object",
        "properties": {
          "asset_index": {
            "type": "integer"
          },
          "moved_asset_amount": {
            "type": "string"
          }
        },
        "required": [
          "asset_index",
          "moved_asset_amount"
        ],
        "title": "response.UnifiedAsset"
      },
      "response.UnstakeAssetsPubData": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "string"
          },
          "lit_amount": {
            "type": "string"
          },
          "share_amount": {
            "type": "string"
          },
          "staking_pool_index": {
            "type": "integer"
          }
        },
        "required": [
          "account_index",
          "lit_amount",
          "share_amount",
          "staking_pool_index"
        ],
        "title": "response.UnstakeAssetsPubData"
      },
      "response.WithdrawPubData": {
        "type": "object",
        "properties": {
          "from_account_index": {
            "type": "string"
          },
          "usdc_amount": {
            "type": "string"
          }
        },
        "required": [
          "from_account_index",
          "usdc_amount"
        ],
        "title": "response.WithdrawPubData"
      },
      "response.WithdrawPubDataV2": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string"
          },
          "asset_index": {
            "type": "string"
          },
          "from_account_index": {
            "type": "string"
          },
          "route_type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "asset_index",
          "from_account_index",
          "route_type"
        ],
        "title": "response.WithdrawPubDataV2"
      },
      "DailyPartnerStat": {
        "title": "DailyPartnerStat",
        "type": "object",
        "properties": {
          "date": {
            "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"
          }
        },
        "required": [
          "date",
          "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"
        ]
      },
      "ReqBuyVolumeQuota": {
        "type": "object",
        "properties": {
          "quota": {
            "type": "integer",
            "format": "int64",
            "description": "Volume quota to buy, in transactions. Price is quota × 500 USDC base units (1,000,000 quota = 500 USDC); at most 15,000,000 per request."
          },
          "tx_info": {
            "type": "string",
            "description": "Required for a new purchase (omit when claiming with tx_hash). Signed L2Transfer (tx type 12) of USDC (asset index 3), exactly quota × 500 USDC base units from the paying account to the volume quota payment account (index 765210 on Lighter, 51687 on Lighter on Robinhood Chain), as sent to sendTx. Omit when claiming a pending purchase with tx_hash."
          },
          "tx_hash": {
            "type": "string",
            "description": "Optional; claim only, not needed for a normal purchase. Pass instead of tx_info to finish a purchase whose earlier call answered status=pending: the tx_hash from that response. No new payment is made. Credits that purchase once its transfer has executed; the payer must authenticate."
          },
          "destination_l1_address": {
            "type": "string",
            "description": "Credit this L1 address instead of the payer's own. Must be a Plus or Premium/Advanced account's L1 address."
          },
          "auth": {
            "type": "string",
            "description": "Auth token of the paying account (alternatively the Authorization header)."
          }
        },
        "required": [
          "quota"
        ],
        "title": "ReqBuyVolumeQuota"
      },
      "RespBuyVolumeQuota": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "tx_hash": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
            "description": "Hash of the USDC payment transfer; use it with tx_hash to claim a pending purchase."
          },
          "l1_address": {
            "type": "string",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
            "description": "L1 address the quota is (or will be) credited to."
          },
          "quota": {
            "type": "integer",
            "format": "int64",
            "example": 1000000,
            "description": "Quota credited (status=credited) or to be credited (status=pending)."
          },
          "volume_quota_remaining": {
            "type": "integer",
            "format": "int64",
            "example": 1010780,
            "description": "Balance of the credited L1 address after the purchase. Omitted while pending."
          },
          "status": {
            "type": "string",
            "enum": [
              "credited",
              "pending"
            ],
            "example": "credited",
            "description": "credited: quota added. pending: the transfer has not executed within the wait; call again with tx_hash."
          }
        },
        "required": [
          "code",
          "tx_hash",
          "l1_address",
          "quota",
          "status"
        ],
        "title": "RespBuyVolumeQuota"
      },
      "AggregatedTrade": {
        "type": "object",
        "properties": {
          "account_index": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "description": "Queried account."
          },
          "order_id": {
            "type": "string",
            "example": "145",
            "description": "Order index as a string; `\"0\"` can represent a synthetic entry without a normal order ID."
          },
          "grouping_id": {
            "type": "string",
            "description": "Stored grouping identifier returned by the indexer, or `null`. Treat it as opaque; use `order_id` to identify the order.",
            "nullable": true
          },
          "master_twap_id": {
            "type": "string",
            "description": "Parent TWAP order id if the order is a TWAP child, else `null`.",
            "nullable": true
          },
          "market_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "description": "Market."
          },
          "market_symbol": {
            "type": "string",
            "example": "ETH",
            "description": "Market."
          },
          "market_kind": {
            "type": "string",
            "enum": [
              "spot",
              "bo",
              "perps"
            ],
            "description": "`perps`, `spot` or `bo`."
          },
          "is_ask": {
            "type": "boolean",
            "example": true,
            "description": "`true` = sell, `false` = buy."
          },
          "type": {
            "type": "string",
            "enum": [
              "trade",
              "liquidation",
              "deleverage",
              "market-settlement"
            ],
            "description": "`trade`, `liquidation`, `deleverage`, `market-settlement`."
          },
          "role": {
            "type": "string",
            "enum": [
              "maker",
              "taker"
            ],
            "description": "`maker` or `taker`."
          },
          "first_trade_id": {
            "type": "string",
            "example": "145",
            "description": "First / last fill in this trade-type and role subgroup (strings)."
          },
          "last_trade_id": {
            "type": "string",
            "example": "150",
            "description": "First / last fill in this trade-type and role subgroup (strings)."
          },
          "first_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1793807287488,
            "description": "First / last fill time in this subgroup, in Unix milliseconds."
          },
          "last_timestamp": {
            "type": "integer",
            "format": "int64",
            "example": 1793808698879,
            "description": "First / last fill time in this subgroup, in Unix milliseconds."
          },
          "first_block_height": {
            "type": "integer",
            "format": "int64",
            "example": 45434,
            "description": "First / last fill block in this subgroup."
          },
          "last_block_height": {
            "type": "integer",
            "format": "int64",
            "example": 45435,
            "description": "First / last fill block in this subgroup."
          },
          "fill_count": {
            "type": "integer",
            "format": "int64",
            "example": 2,
            "description": "Number of fills aggregated in this subgroup."
          },
          "size": {
            "type": "string",
            "example": "0.1",
            "description": "Total filled base size."
          },
          "usd_amount": {
            "type": "string",
            "example": "302.466",
            "description": "Total filled notional, USDC."
          },
          "pnl": {
            "type": "string",
            "description": "Realized PnL from these fills, USDC; `null` if the fills didn't reduce a position.",
            "nullable": true
          },
          "average_price": {
            "type": "string",
            "example": "3024.66",
            "description": "Size-weighted average fill price."
          },
          "fee": {
            "type": "string",
            "example": "0.001000000000",
            "description": "Total fee paid, in `fee_asset_id` units (USDC, or the base asset for spot buys)."
          },
          "integrator_fee": {
            "type": "string",
            "example": "0.000100000000",
            "description": "Total integrator fee, same units as `fee`."
          },
          "fee_asset_id": {
            "type": "integer",
            "format": "int16",
            "example": 3,
            "description": "Asset the fee is charged in (`3` = USDC)."
          },
          "position_size_before": {
            "type": "string",
            "description": "Position size and entry quote before the first fill in this subgroup; `null` when unavailable.",
            "nullable": true
          },
          "entry_quote_before": {
            "type": "string",
            "description": "Position size and entry quote before the first fill in this subgroup; `null` when unavailable.",
            "nullable": true
          },
          "position_sign_changed": {
            "type": "boolean",
            "description": "Whether the position sign before the first fill differs from the sign after the last fill in this subgroup, including opening from or closing to zero; `null` when position data is unavailable.",
            "nullable": true
          },
          "initial_margin_fraction_before": {
            "type": "integer",
            "format": "int32",
            "example": 500,
            "description": "Initial margin fraction before the first fill (`500` = 5%)."
          },
          "allocated_margin_usdc_before": {
            "type": "integer",
            "format": "int64",
            "description": "Isolated-margin allocation before the first / after the last fill (raw integer, same format as `*_allocated_margin_usdc_*` in `trades`)."
          },
          "allocated_margin_usdc_after": {
            "type": "integer",
            "format": "int64",
            "description": "Isolated-margin allocation before the first / after the last fill (raw integer, same format as `*_allocated_margin_usdc_*` in `trades`)."
          }
        },
        "title": "AggregatedTrade",
        "required": [
          "account_index",
          "order_id",
          "grouping_id",
          "master_twap_id",
          "market_id",
          "market_symbol",
          "market_kind",
          "is_ask",
          "type",
          "role",
          "first_trade_id",
          "last_trade_id",
          "first_timestamp",
          "last_timestamp",
          "first_block_height",
          "last_block_height",
          "fill_count",
          "size",
          "usd_amount",
          "pnl",
          "average_price",
          "fee",
          "integrator_fee",
          "fee_asset_id",
          "position_size_before",
          "entry_quote_before",
          "position_sign_changed",
          "initial_margin_fraction_before",
          "allocated_margin_usdc_before",
          "allocated_margin_usdc_after"
        ]
      },
      "AggregatedTrades": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": 200
          },
          "message": {
            "type": "string"
          },
          "next_cursor": {
            "type": "string",
            "description": "Opaque cursor for the next page; absent at the end. Keep all filters unchanged and URL-encode it."
          },
          "trades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AggregatedTrade"
            }
          }
        },
        "title": "AggregatedTrades",
        "required": [
          "code",
          "trades"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "system",
      "x-page-title": "System",
      "x-page-icon": "server",
      "x-page-description": "Exchange status, system configuration and L1 contract info."
    },
    {
      "name": "account",
      "x-page-title": "Account",
      "x-page-icon": "user",
      "x-page-description": "Query accounts, limits, metadata, PnL and its leaderboard, liquidations, funding payments, public pools and L1 metadata; update account tiers and metadata."
    },
    {
      "name": "orders",
      "x-page-title": "Orders",
      "x-page-icon": "book",
      "x-page-description": "Discover order books and market configuration, query orders and trades, and export account or market history."
    },
    {
      "name": "binary-options",
      "x-page-title": "Binary Options",
      "x-page-icon": "scale-balanced",
      "x-page-description": "Discover events and market lifecycles, retrieve Up/Down candles and fee tiers, and query realized binary options PnL. These endpoints are available on Lighter only."
    },
    {
      "name": "transactions",
      "x-page-title": "Transactions",
      "x-page-icon": "paper-plane",
      "x-page-description": "Send signed transactions and query transaction, deposit, transfer and withdrawal history."
    },
    {
      "name": "api-keys",
      "x-page-title": "API Keys",
      "x-page-icon": "key",
      "x-page-description": "Inspect API keys and nonces, create/list/revoke read-only tokens, and configure maker-only keys. See the API key integration guide before signing requests."
    },
    {
      "name": "candlesticks",
      "x-page-title": "Candlesticks",
      "x-page-icon": "chart-candlestick",
      "x-page-description": "Retrieve historical trade or mark-price candles and market price charts. Use the endpoint-specific timestamp units and resolution values."
    },
    {
      "name": "funding",
      "x-page-title": "Funding",
      "x-page-icon": "percent",
      "x-page-description": "Retrieve market funding history and current funding rates across trading venues."
    },
    {
      "name": "bridge",
      "x-page-title": "Bridge",
      "x-page-icon": "bridge",
      "x-page-description": "Create deposit intent addresses, list supported networks and inspect the latest deposit; query fast-bridge information and submit fast withdrawals."
    },
    {
      "name": "info",
      "x-page-title": "Info",
      "x-page-icon": "circle-info",
      "x-page-description": "Inspect asset metadata, exchange statistics and metrics, transfer fees, token metadata, synthetic spot prices and oracle sources."
    },
    {
      "name": "referral",
      "x-page-title": "Referral",
      "x-page-icon": "user-plus",
      "x-page-description": "Referral codes, kickbacks and stats."
    },
    {
      "name": "fee-credits",
      "x-page-title": "Fee Credits",
      "x-page-icon": "ticket",
      "x-page-description": "List LIT fee-credit lease options, inspect account leases and submit lease requests."
    },
    {
      "name": "rfq",
      "x-page-title": "RFQ",
      "x-page-icon": "handshake",
      "x-page-description": "RFQ: create, respond to and query requests for quote."
    },
    {
      "name": "points",
      "x-page-title": "Points",
      "x-page-icon": "star",
      "x-page-description": "Points leaderboard and live points. Lighter on Robinhood Chain only."
    },
    {
      "name": "announcements",
      "x-page-title": "Announcements",
      "x-page-icon": "bullhorn",
      "x-page-description": "Read exchange announcements, including their publication time and optional expiry."
    },
    {
      "name": "notifications",
      "x-page-title": "Notifications",
      "x-page-icon": "bell",
      "x-page-description": "Acknowledge notifications."
    },
    {
      "name": "explorer",
      "x-page-title": "Explorer API",
      "x-page-icon": "magnifying-glass",
      "x-page-description": "Query blocks, batches, search, transaction statistics, logs by hash, account logs/assets/positions and market logs. Base URLs: https://explorer.elliot.ai/api (Lighter mainnet), https://explorerapi.testnet.lighter.xyz/api (Lighter testnet), https://explorerapi.rh.lighter.xyz/api (Robinhood Chain mainnet), https://explorerapi.rh-testnet.lighter.xyz/api (Robinhood Chain testnet)."
    },
    {
      "name": "explorer-account",
      "x-page-title": "Account",
      "x-page-icon": "user",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-batches",
      "x-page-title": "Batches",
      "x-page-icon": "boxes-stacked",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-blocks",
      "x-page-title": "Blocks",
      "x-page-icon": "cube",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-logs",
      "x-page-title": "Logs",
      "x-page-icon": "list",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-markets",
      "x-page-title": "Markets",
      "x-page-icon": "store",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-search",
      "x-page-title": "Search",
      "x-page-icon": "magnifying-glass",
      "x-parent": "explorer"
    },
    {
      "name": "explorer-stats",
      "x-page-title": "Stats",
      "x-page-icon": "chart-simple",
      "x-parent": "explorer"
    }
  ]
}