{ "openapi": "3.0.0", "info": { "title": "", "version": "" }, "paths": { "/": { "get": { "summary": "status", "operationId": "status", "tags": [ "root" ], "description": "Get status of zklighter", "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" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } }, { "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" } } ], "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": [ "order" ], "description": "Get account active orders. `auth` can be generated using the SDK.", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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" } } ], "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": [ "order" ], "description": "Get account inactive orders. `auth` can be generated using the SDK.", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "ask_filter", "in": "query", "required": false, "schema": { "type": "integer", "format": "int8", "default": "-1" } }, { "name": "between_timestamps", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "market_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "spot", "perp" ], "default": "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 this page: https://apidocs.lighter.xyz/docs/account-types", "parameters": [ { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "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/accountMetadata": { "get": { "summary": "accountMetadata", "operationId": "accountMetadata", "tags": [ "account" ], "description": "Get account metadatas", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "index", "l1_address" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } } ], "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/accountTxs": { "get": { "summary": "accountTxs", "operationId": "accountTxs", "tags": [ "transaction" ], "description": "Get transactions of a specific account", "parameters": [ { "name": "index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "account_index" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "authorization", "in": "header", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } }, { "name": "auth", "in": "query", "required": false, "description": " made optional to support header auth clients", "schema": { "type": "string" } }, { "name": "types", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "uint8" } } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Txs" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/assetDetails": { "get": { "summary": "assetDetails", "operationId": "assetDetails", "tags": [ "order" ], "description": "Get asset details for a specific asset or all assets", "parameters": [ { "name": "asset_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16" } } ], "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" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } } ], "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": [ "announcement" ], "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": [ "account" ], "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" } }, { "name": "api_key_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "uint8", "default": "255" } } ], "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/block": { "get": { "summary": "block", "operationId": "block", "tags": [ "block" ], "description": "Get block by its height or commitment", "parameters": [ { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "commitment", "height" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Blocks" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/blockTxs": { "get": { "summary": "blockTxs", "operationId": "blockTxs", "tags": [ "transaction" ], "description": "Get transactions in a block", "parameters": [ { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "block_height", "block_commitment" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Txs" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/blocks": { "get": { "summary": "blocks", "operationId": "blocks", "tags": [ "block" ], "description": "Get blocks", "parameters": [ { "name": "index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Blocks" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/candles": { "get": { "summary": "candles", "operationId": "candles", "tags": [ "candlestick" ], "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" } }, { "name": "resolution", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w" ] } }, { "name": "start_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "end_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "count_back", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "set_timestamp_to_end", "in": "query", "required": false, "schema": { "type": "boolean", "format": "boolean", "default": "false" } } ], "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": "Change account tier. You can only perform this action once every 24 hours, and with no orders or positions open.", "parameters": [ { "name": "authorization", "in": "header", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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/currentHeight": { "get": { "summary": "currentHeight", "operationId": "currentHeight", "tags": [ "block" ], "description": "Get current height", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentHeight" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/deposit/history": { "get": { "summary": "deposit_history", "operationId": "deposit_history", "tags": [ "transaction" ], "description": "Get deposit history", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "l1_address", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "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": [ "order" ], "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": [ "order" ], "description": "Export trades and funding payments, limited to 12 months or 1M trades. END_TS_IN_MS - START_TS_IN_MS should not be larger than 12 months in milliseconds, both timestamps should be greater than or equal to 17 January 2025 00:00:00 UTC (lighter's mainnet genesis)", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "-1" } }, { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "funding", "trade" ] } }, { "name": "start_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 1735689600000, "maximum": 1830297600000 } }, { "name": "end_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 1735689600000, "maximum": 1830297600000 } }, { "name": "side", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "long", "short" ], "default": "all" } }, { "name": "role", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "maker", "taker" ], "default": "all" } }, { "name": "trade_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "trade", "liquidation", "deleverage", "market-settlement" ], "default": "all" } } ], "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", "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": [ "candlestick" ], "description": "Get fundings", "parameters": [ { "name": "market_id", "in": "query", "required": true, "schema": { "type": "integer", "format": "int16" } }, { "name": "resolution", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "1h", "1d" ] } }, { "name": "start_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "end_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "count_back", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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" } }, { "name": "l1_address", "in": "query", "required": true, "schema": { "type": "string" } } ], "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" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } } ], "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": [ "transaction" ], "description": "Get next nonce for a specific account and api key", "parameters": [ { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "api_key_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "uint8" } } ], "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": [ "notification" ], "description": "Ack notification", "parameters": [ { "name": "authorization", "in": "header", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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": [ "order" ], "description": "Get order books metadata", "parameters": [ { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "spot", "perp" ], "default": "all" }, "description": "Filter order books by type" } ], "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": [ "order" ], "description": "Get order book orders", "parameters": [ { "name": "market_id", "in": "query", "required": true, "schema": { "type": "integer", "format": "int16" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 250 } } ], "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": [ "order" ], "description": "Get order books metadata.
**Response Description:**

1) **Taker and maker fees** are in percentage.
2) **Min base amount:** The amount of base token that can be traded in a single order.
3) **Min quote amount:** The amount of quote token that can be traded in a single order.
4) **Supported size decimals:** The number of decimal places that can be used for the size of the order.
5) **Supported price decimals:** The number of decimal places that can be used for the price of the order.
6) **Supported quote decimals:** Size Decimals + Quote Decimals.", "parameters": [ { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "spot", "perp" ], "default": "all" } } ], "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" } }, { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "index" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "1m", "5m", "15m", "1h", "4h", "1d" ] } }, { "name": "start_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "end_timestamp", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5000000000000 } }, { "name": "count_back", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "ignore_transfers", "in": "query", "required": false, "schema": { "type": "boolean", "format": "boolean", "default": "false" } } ], "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": false, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "side", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "long", "short", "all" ], "default": "all" } }, { "name": "start_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "end_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "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": "Get public pools metadata. `auth` is required in case you specify an account_index. You will see public pools with an index that starts an n-1 of the one you specify. To see staking pools, use `filter=stake`", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "user", "protocol", "account_index", "stake" ] } }, { "name": "index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "account_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "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": [ "order" ], "description": "Get recent trades", "parameters": [ { "name": "market_id", "in": "query", "required": true, "schema": { "type": "integer", "format": "int16" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } } ], "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": "Get referral points", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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" } } } } } } }, "/api/v1/sendTx": { "post": { "summary": "sendTx", "operationId": "sendTx", "tags": [ "transaction" ], "description": "You need to sign the transaction body before sending it to the server. More details can be found here: https://apidocs.lighter.xyz/docs/get-started", "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": [ "transaction" ], "description": "You need to sign the transaction body before sending it to the server. More details can be found here: https://apidocs.lighter.xyz/docs/get-started", "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": [ "order" ], "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" } }, { "name": "market_id", "in": "query", "required": false, "schema": { "type": "integer", "format": "int16", "default": "255" } }, { "name": "market_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "spot", "perp" ], "default": "all" } }, { "name": "account_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "-1" } }, { "name": "order_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "sort_by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "block_height", "timestamp", "trade_id" ] } }, { "name": "sort_dir", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "desc" ], "default": "desc" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "from", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "-1" } }, { "name": "ask_filter", "in": "query", "required": false, "schema": { "type": "integer", "format": "int8", "default": "-1" } }, { "name": "role", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "maker", "taker" ], "default": "all" } }, { "name": "type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "trade", "liquidation", "deleverage", "market-settlement" ], "default": "all" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "aggregate", "in": "query", "required": false, "schema": { "type": "boolean", "format": "boolean", "default": "false" } }, { "name": "skip_ask_order_id", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "skip_bid_order_id", "in": "query", "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/transfer/history": { "get": { "summary": "transfer_history", "operationId": "transfer_history", "tags": [ "transaction" ], "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": false, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "all", "L2Transfer", "L2MintShares", "L2BurnShares", "L2StakeAssets", "L2UnstakeAssets" ] } } } ], "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": "Transfer fee info", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "to_account_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "-1" } } ], "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": [ "transaction" ], "description": "Get transaction by hash or sequence index", "parameters": [ { "name": "by", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "hash", "sequence_index" ] } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string" } } ], "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": [ "transaction" ], "description": "Get L1 transaction by L1 transaction hash", "parameters": [ { "name": "hash", "in": "query", "required": true, "schema": { "type": "string" } } ], "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/txs": { "get": { "summary": "txs", "operationId": "txs", "tags": [ "transaction" ], "description": "Get transactions which are already packed into blocks", "parameters": [ { "name": "index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Txs" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultCode" } } } } } } }, "/api/v1/withdraw/history": { "get": { "summary": "withdraw_history", "operationId": "withdraw_history", "tags": [ "transaction" ], "description": "Get withdraw history. Secure withdrawals are only set to `claimable` when ready. You should only expect the `completed` status on fast withdrawals via Arbitrum.", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "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": [ "root" ], "description": "Get info of zklighter", "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": "Fast withdraw", "parameters": [ { "name": "authorization", "in": "header", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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": [ "account" ], "description": "Get read only auth tokens for an account", "parameters": [ { "name": "authorization", "in": "header", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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": [ "account" ], "description": "Create an API token for read-only access", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "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": [ "account" ], "description": "Revoke read only auth token for an account", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "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": [ "order" ], "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" ] } }, { "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" ] } }, { "name": "filter", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "byMarket" ] } }, { "name": "value", "in": "query", "required": false, "schema": { "type": "string" } } ], "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": [ "info" ], "description": "Get zklighter l1 general info, including contract address and rpc info", "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": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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": "query", "required": false, "description": " make required after integ is done", "schema": { "type": "string" } }, { "name": "auth", "in": "query", "required": false, "description": " made optional to support header auth clients", "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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": false, "description": " make required after integ is done", "schema": { "type": "string" } } ], "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": [ "order" ], "description": "Get execute stats", "parameters": [ { "name": "period", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "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": [ "account" ], "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": [ "account" ], "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": false, "schema": { "type": "string" }, "description": "API token authorization" }, { "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)" }, { "name": "auth", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Read-only auth (alternative to header authorization)" } ], "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": [ "account" ], "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": false, "schema": { "type": "string" }, "description": "API token authorization" } ], "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": [ "account" ], "description": "Get user referrals", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "l1_address", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "auth", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "stats_start_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "stats_end_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 300 } } ], "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/setAccountMetadata": { "post": { "summary": "setAccountMetadata", "operationId": "setAccountMetadata", "tags": [ "transaction" ], "description": "Set account metadata", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "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" } } } } } } }, "/api/v1/systemConfig": { "get": { "summary": "systemConfig", "operationId": "systemConfig", "tags": [ "info" ], "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": [ "tokenlist" ], "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": [ "account" ], "description": "Get maker-only API key indexes", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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": [ "account" ], "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" } } ], "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": [ "account" ], "parameters": [ { "name": "account_index", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "start_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "end_timestamp", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "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": "Get most recent deposit for given l1 address", "parameters": [ { "name": "l1_address", "in": "query", "required": true, "schema": { "type": "string" } } ], "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 info for a symbol. For complete details see: https://docs.lighter.xyz/trading/real-world-assets-rwas/us-equity-indices", "parameters": [ { "name": "symbol", "in": "query", "required": true, "schema": { "type": "string" } } ], "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": [ "account" ], "description": "Respond to RFQ", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "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": [ "account" ], "description": "List RFQs", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "account_index", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "281474976710655" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "opened", "order_created", "closed" ] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": "20" } } ], "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": [ "account" ], "description": "Get RFQ by ID", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "rfq_id", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "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": [ "account" ], "description": "Create RFQ", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "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": [ "account" ], "description": "Update RFQ status", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "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" } } } } } } } }, "servers": [ { "url": "https://mainnet.zklighter.elliot.ai" } ], "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "description": "Enter JWT Bearer token **_only_**", "name": "Authorization", "in": "header" } }, "schemas": { "Account": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "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" } }, "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" ] } }, "title": "AccountAsset", "required": [ "symbol", "asset_id", "balance", "locked_balance", "margin_balance", "margin_mode" ] }, "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", "format": "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" } }, "title": "AccountLimits", "required": [ "code", "max_llp_percentage", "user_tier", "can_create_public_pool", "max_llp_amount", "current_maker_fee_tick", "current_taker_fee_tick", "effective_lit_stakes", "leased_lit", "user_tier_name" ] }, "AccountMetadata": { "type": "object", "properties": { "account_index": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "description": { "type": "string" }, "can_invite": { "type": "boolean", "format": "boolean", "description": " Remove After FE uses L1 meta endpoint" }, "referral_points_percentage": { "type": "string", "description": " Remove After FE uses L1 meta endpoint" }, "created_at": { "type": "integer", "format": "int64" }, "can_rfq": { "type": "boolean", "format": "boolean" }, "can_rfq_market_ids": { "type": "array", "items": { "type": "string" } } }, "title": "AccountMetadata", "required": [ "account_index", "name", "description", "can_invite", "referral_points_percentage", "can_rfq", "can_rfq_market_ids", "created_at" ] }, "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" ] }, "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" } }, "title": "AccountPosition", "required": [ "market_id", "symbol", "initial_margin_fraction", "open_order_count", "pending_order_count", "position_tied_order_count", "sign", "position", "avg_entry_price", "position_value", "unrealized_pnl", "realized_pnl", "liquidation_price", "margin_mode", "allocated_margin", "total_discount" ] }, "Announcement": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" }, "created_at": { "type": "integer", "format": "int64" }, "expired_at": { "type": "integer", "format": "int64" } }, "title": "Announcement", "required": [ "title", "content", "created_at", "expired_at" ] }, "Announcements": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "announcements": { "type": "array", "items": { "$ref": "#/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" ] }, "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" } }, "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" ] }, "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" } }, "title": "ApiKey", "required": [ "account_index", "api_key_index", "nonce", "public_key", "transaction_time" ] }, "Block": { "type": "object", "properties": { "commitment": { "type": "string" }, "height": { "type": "integer", "format": "int64" }, "state_root": { "type": "string" }, "priority_operations": { "type": "integer", "format": "int32" }, "on_chain_l2_operations": { "type": "integer", "format": "int32" }, "pending_on_chain_operations_pub_data": { "type": "string" }, "committed_tx_hash": { "type": "string" }, "committed_at": { "type": "integer", "format": "int64" }, "verified_tx_hash": { "type": "string" }, "verified_at": { "type": "integer", "format": "int64" }, "txs": { "type": "array", "items": { "$ref": "#/components/schemas/Tx" } }, "status": { "type": "integer", "format": "int64" }, "size": { "type": "integer", "format": "uin16" } }, "title": "Block", "required": [ "commitment", "height", "state_root", "priority_operations", "on_chain_l2_operations", "pending_on_chain_operations_pub_data", "committed_tx_hash", "committed_at", "verified_tx_hash", "verified_at", "txs", "status", "size" ] }, "Blocks": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "total": { "type": "integer", "format": "int64" }, "blocks": { "type": "array", "items": { "$ref": "#/components/schemas/Block" } } }, "title": "Blocks", "required": [ "code", "total", "blocks" ] }, "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" }, "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": " close_raw" }, "H": { "type": "number", "format": "double", "example": "3034.66", "description": " high_raw" }, "L": { "type": "number", "format": "double", "example": "3014.66", "description": " low_raw" }, "O": { "type": "number", "format": "double", "example": "3024.66", "description": " open_raw" } }, "title": "Candle", "description": "Abbreviated candle format. Zero values are omitted.", "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" ] }, "CurrentHeight": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "height": { "type": "integer", "format": "int64" } }, "title": "CurrentHeight", "required": [ "code", "height" ] }, "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" }, "message": { "type": "string" }, "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", "format": "boolean", "description": " Remove After FE uses L1 meta endpoint" }, "referral_points_percentage": { "type": "string", "description": " Remove After FE uses L1 meta endpoint" }, "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" }, "pending_unlocks": { "type": "array", "items": { "$ref": "#/components/schemas/PendingUnlock" } }, "approved_integrators": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovedIntegrator" } }, "can_rfq": { "type": "boolean", "format": "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" } } }, "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", "created_at", "positions", "assets", "total_asset_value", "cross_asset_value", "cross_initial_margin_requirement", "cross_maintenance_margin_requirement", "pool_info", "shares" ] }, "DetailedAccounts": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "total": { "type": "integer", "format": "int64", "example": "1" }, "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/DetailedAccount" } }, "next_cursor": { "type": "string" } }, "title": "DetailedAccounts", "required": [ "code", "total", "accounts", "next_cursor" ] }, "EnrichedTx": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "type": { "type": "integer", "format": "uint8", "example": "1", "maximum": 64, "minimum": 1 }, "info": { "type": "string", "example": "{}" }, "event_info": { "type": "string", "example": "{}" }, "status": { "type": "integer", "format": "int64", "example": "1" }, "transaction_index": { "type": "integer", "format": "int64", "example": "8761" }, "l1_address": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "account_index": { "type": "integer", "format": "int64", "example": "1" }, "nonce": { "type": "integer", "format": "int64", "example": "722" }, "expire_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "block_height": { "type": "integer", "format": "int64", "example": "45434" }, "queued_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "executed_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "sequence_index": { "type": "integer", "format": "int64", "example": "8761" }, "parent_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "api_key_index": { "type": "integer", "format": "uint8", "example": "0" }, "transaction_time": { "type": "integer", "format": "int64", "example": "1257894000000000" }, "committed_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "verified_at": { "type": "integer", "format": "int64", "example": "1640995200" } }, "title": "EnrichedTx", "required": [ "code", "hash", "type", "info", "event_info", "status", "transaction_index", "l1_address", "account_index", "nonce", "expire_at", "block_height", "queued_at", "executed_at", "sequence_index", "parent_hash", "api_key_index", "transaction_time", "committed_at", "verified_at" ] }, "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" }, "value": { "type": "string", "example": "0.0001" }, "rate": { "type": "string", "example": "0.0001" }, "direction": { "type": "string", "example": "long" } }, "title": "Funding", "required": [ "timestamp", "value", "rate", "direction" ] }, "FundingRate": { "type": "object", "properties": { "market_id": { "type": "integer", "format": "int16" }, "exchange": { "type": "string", "enum": [ "binance", "bybit", "hyperliquid", "lighter" ] }, "symbol": { "type": "string" }, "rate": { "type": "number", "format": "double" } }, "title": "FundingRate", "required": [ "market_id", "exchange", "symbol", "rate" ] }, "FundingRates": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "funding_rates": { "type": "array", "items": { "$ref": "#/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", "format": "boolean" }, "referral_points_percentage": { "type": "string" } }, "title": "L1Metadata", "required": [ "l1_address", "can_invite", "referral_points_percentage" ] }, "L1ProviderInfo": { "type": "object", "properties": { "chainId": { "type": "integer", "format": "int64", "example": "1" }, "networkId": { "type": "integer", "format": "int64", "example": "1" }, "latestBlockNumber": { "type": "integer", "format": "int64", "example": "45434" } }, "title": "L1ProviderInfo", "required": [ "chainId", "networkId", "latestBlockNumber" ] }, "LiqTrade": { "type": "object", "properties": { "price": { "type": "string" }, "size": { "type": "string" }, "taker_fee": { "type": "string" }, "maker_fee": { "type": "string" }, "transaction_time": { "type": "integer", "format": "int64" } }, "title": "LiqTrade", "required": [ "price", "size", "taker_fee", "maker_fee", "transaction_time" ] }, "Liquidation": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "market_id": { "type": "integer", "format": "int16" }, "type": { "type": "string", "enum": [ "partial", "deleverage" ] }, "trade": { "$ref": "#/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" ] }, "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", "format": "boolean", "example": false }, "funding_fee_discounts_enabled": { "type": "boolean", "format": "boolean" }, "trading_hours": { "type": "string", "example": "" }, "hidden": { "type": "boolean" }, "rfq_enabled": { "type": "boolean", "format": "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" }, "owner_account_index": { "type": "integer", "format": "int64", "example": "1" }, "initial_base_amount": { "type": "string", "example": "0.1" }, "price": { "type": "string", "example": "3024.66" }, "nonce": { "type": "integer", "format": "int64", "example": "722" }, "remaining_base_amount": { "type": "string", "example": "0.1" }, "is_ask": { "type": "boolean", "format": "boolean", "example": "true" }, "base_size": { "type": "integer", "format": "int64", "example": "12354" }, "base_price": { "type": "integer", "format": "int32", "example": "3024" }, "filled_base_amount": { "type": "string", "example": "0.1" }, "filled_quote_amount": { "type": "string", "example": "0.1" }, "side": { "type": "string", "example": "buy", "default": "buy", "description": " TODO: remove this" }, "type": { "type": "string", "example": "limit", "enum": [ "limit", "market", "stop-loss", "stop-loss-limit", "take-profit", "take-profit-limit", "twap", "twap-sub", "liquidation" ] }, "time_in_force": { "type": "string", "enum": [ "good-till-time", "immediate-or-cancel", "post-only", "Unknown" ], "default": "good-till-time" }, "reduce_only": { "type": "boolean", "format": "boolean", "example": "true" }, "trigger_price": { "type": "string", "example": "3024.66" }, "order_expiry": { "type": "integer", "format": "int64", "example": "1640995200" }, "status": { "type": "string", "example": "open", "enum": [ "in-progress", "pending", "open", "filled", "canceled", "canceled-post-only", "canceled-reduce-only", "canceled-position-not-allowed", "canceled-margin-not-allowed", "canceled-too-much-slippage", "canceled-not-enough-liquidity", "canceled-self-trade", "canceled-expired", "canceled-oco", "canceled-child", "canceled-liquidation", "canceled-invalid-balance" ] }, "trigger_status": { "type": "string", "example": "twap", "enum": [ "na", "ready", "mark-price", "twap", "parent-order" ] }, "trigger_time": { "type": "integer", "format": "int64", "example": "1640995200" }, "parent_order_index": { "type": "integer", "format": "int64", "example": "1" }, "parent_order_id": { "type": "string", "example": "1" }, "to_trigger_order_id_0": { "type": "string", "example": "1" }, "to_trigger_order_id_1": { "type": "string", "example": "1" }, "to_cancel_order_id_0": { "type": "string", "example": "1" }, "block_height": { "type": "integer", "format": "int64", "example": "45434" }, "timestamp": { "type": "integer", "format": "int64", "example": "1640995200" }, "created_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "updated_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "transaction_time": { "type": "integer", "format": "int64" }, "integrator_fee_collector_index": { "type": "string" }, "integrator_maker_fee": { "type": "string" }, "integrator_taker_fee": { "type": "string" } }, "title": "Order", "required": [ "order_index", "client_order_index", "order_id", "client_order_id", "market_index", "owner_account_index", "initial_base_amount", "price", "nonce", "remaining_base_amount", "is_ask", "base_size", "base_price", "filled_base_amount", "filled_quote_amount", "side", "type", "time_in_force", "reduce_only", "trigger_price", "order_expiry", "status", "trigger_status", "trigger_time", "parent_order_index", "parent_order_id", "to_trigger_order_id_0", "to_trigger_order_id_1", "to_cancel_order_id_0", "block_height", "timestamp", "created_at", "updated_at", "integrator_fee_collector_index", "integrator_maker_fee", "integrator_taker_fee", "transaction_time" ] }, "OrderBook": { "type": "object", "properties": { "symbol": { "type": "string", "example": "ETH" }, "market_id": { "type": "integer", "format": "int16", "example": 0 }, "market_type": { "type": "string", "example": "perp", "enum": [ "perp", "spot" ] }, "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" ] }, "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 } }, "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" ] }, "PerpsOrderBookDetail": { "type": "object", "properties": { "symbol": { "type": "string", "example": "ETH" }, "market_id": { "type": "integer", "format": "int16", "example": 0 }, "market_type": { "type": "string", "example": "perp", "enum": [ "perp", "spot" ] }, "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" ] }, "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": "uin16", "example": "100" }, "min_initial_margin_fraction": { "type": "integer", "format": "uin16", "example": "100" }, "maintenance_margin_fraction": { "type": "integer", "format": "uin16", "example": "50" }, "closeout_margin_fraction": { "type": "integer", "format": "uin16", "example": "100" }, "last_trade_price": { "type": "number", "format": "double", "example": "3024.66" }, "daily_trades_count": { "type": "integer", "format": "int64", "example": "68" }, "daily_base_token_volume": { "type": "number", "format": "double", "example": "235.25" }, "daily_quote_token_volume": { "type": "number", "format": "double", "example": "93566.25" }, "daily_price_low": { "type": "number", "format": "double", "example": "3014.66" }, "daily_price_high": { "type": "number", "format": "double", "example": "3024.66" }, "daily_price_change": { "type": "number", "format": "double", "example": "3.66" }, "open_interest": { "type": "number", "format": "double", "example": "93.0" }, "daily_chart": { "type": "object", "example": "{1640995200:3024.66}", "additionalProperties": { "type": "number", "format": "double" } }, "market_config": { "$ref": "#/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" } }, "title": "PerpsOrderBookDetail", "required": [ "symbol", "market_id", "market_type", "base_asset_id", "quote_asset_id", "status", "taker_fee", "is_taker_fee_enabled", "maker_fee", "is_maker_fee_enabled", "liquidation_fee", "min_base_amount", "min_quote_amount", "order_quote_limit", "supported_size_decimals", "supported_price_decimals", "supported_quote_decimals", "size_decimals", "price_decimals", "quote_multiplier", "default_initial_margin_fraction", "min_initial_margin_fraction", "maintenance_margin_fraction", "closeout_margin_fraction", "last_trade_price", "daily_trades_count", "daily_base_token_volume", "daily_quote_token_volume", "daily_price_low", "daily_price_high", "daily_price_change", "open_interest", "daily_chart", "market_config", "strategy_index", "funding_clamp_small", "funding_clamp_big", "base_interest_rate" ] }, "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": "int16", "example": 2048 }, "market_type": { "type": "string", "example": "spot", "enum": [ "perp", "spot" ] }, "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" ] }, "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 } }, "title": "SpotOrderBookDetail", "required": [ "symbol", "market_id", "market_type", "base_asset_id", "quote_asset_id", "status", "taker_fee", "is_taker_fee_enabled", "maker_fee", "is_maker_fee_enabled", "liquidation_fee", "min_base_amount", "min_quote_amount", "order_quote_limit", "supported_size_decimals", "supported_price_decimals", "supported_quote_decimals", "size_decimals", "price_decimals", "last_trade_price", "daily_trades_count", "daily_base_token_volume", "daily_quote_token_volume", "daily_price_low", "daily_price_high", "daily_price_change", "daily_chart" ] }, "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" } } }, "title": "OrderBookOrders", "required": [ "code", "total_asks", "asks", "total_bids", "bids" ] }, "OrderBookStats": { "type": "object", "properties": { "symbol": { "type": "string", "example": "ETH" }, "last_trade_price": { "type": "number", "format": "double", "example": "3024.66" }, "daily_trades_count": { "type": "integer", "format": "int64", "example": "68" }, "daily_base_token_volume": { "type": "number", "format": "double", "example": "235.25" }, "daily_quote_token_volume": { "type": "number", "format": "double", "example": "93566.25" }, "daily_price_change": { "type": "number", "format": "double", "example": "3.66" } }, "title": "OrderBookStats", "required": [ "symbol", "last_trade_price", "daily_trades_count", "daily_base_token_volume", "daily_quote_token_volume", "daily_price_change" ] }, "OrderBooks": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "order_books": { "type": "array", "items": { "$ref": "#/components/schemas/OrderBook" } } }, "title": "OrderBooks", "required": [ "code", "order_books" ] }, "Orders": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "next_cursor": { "type": "string" }, "orders": { "type": "array", "items": { "$ref": "#/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", "staked_lit", "staking_inflow", "staking_outflow", "staking_pnl", "trade_spot_pnl", "volume" ] }, "PositionFunding": { "type": "object", "properties": { "timestamp": { "type": "integer", "format": "int64", "example": "1640995200" }, "market_id": { "type": "integer", "format": "int16", "example": "1" }, "funding_id": { "type": "integer", "format": "int64", "example": "1" }, "change": { "type": "string", "example": "1" }, "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.5000" }, "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" }, "message": { "type": "string" }, "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.5000" }, "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" ] }, "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" }, "week_reward_points": { "type": "number", "format": "float", "example": "200" }, "reward_point_multiplier": { "type": "string", "example": "0.1" } }, "title": "ReferralPointEntry", "required": [ "l1_address", "total_points", "week_points", "total_reward_points", "week_reward_points", "reward_point_multiplier" ] }, "ReferralPoints": { "type": "object", "properties": { "referrals": { "type": "array", "items": { "$ref": "#/components/schemas/ReferralPointEntry" } }, "user_total_points": { "type": "number", "format": "float", "example": "1000" }, "user_last_week_points": { "type": "number", "format": "float", "example": "1000" }, "user_total_referral_reward_points": { "type": "number", "format": "float", "example": "1000" }, "user_last_week_referral_reward_points": { "type": "number", "format": "float", "example": "1000" }, "reward_point_multiplier": { "type": "string", "example": "0.1" } }, "title": "ReferralPoints", "required": [ "referrals", "user_total_points", "user_last_week_points", "user_total_referral_reward_points", "user_last_week_referral_reward_points", "reward_point_multiplier" ] }, "ReqAckNotif": { "type": "object", "properties": { "notif_id": { "type": "string", "example": "'liq:17:5898'" }, "auth": { "type": "string", "description": " made optional to support header auth clients" }, "account_index": { "type": "integer", "format": "int64" } }, "title": "ReqAckNotif", "required": [ "notif_id", "account_index" ] }, "ReqChangeAccountTier": { "type": "object", "properties": { "auth": { "type": "string", "description": " made optional to support header auth clients" }, "account_index": { "type": "integer", "format": "int64" }, "new_tier": { "type": "string" } }, "title": "ReqChangeAccountTier", "required": [ "account_index", "new_tier" ] }, "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": "int64" } } }, "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." }, "auth": { "type": "string" } }, "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" }, "tx_info": { "type": "string" }, "price_protection": { "type": "boolean", "format": "boolean", "default": "true" } }, "title": "ReqSendTx", "required": [ "tx_type", "tx_info" ] }, "ReqSendTxBatch": { "type": "object", "properties": { "tx_types": { "type": "string" }, "tx_infos": { "type": "string" } }, "title": "ReqSendTxBatch", "required": [ "tx_types", "tx_infos" ] }, "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" } }, "title": "RespSendTx", "required": [ "code", "tx_hash", "predicted_execution_time_ms", "volume_quota_remaining" ] }, "RespSendTxBatch": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "tx_hash": { "type": "array", "items": { "type": "string" } }, "predicted_execution_time_ms": { "type": "integer", "format": "int64", "example": "1751465474" }, "volume_quota_remaining": { "type": "integer", "format": "int64" } }, "title": "RespSendTxBatch", "required": [ "code", "tx_hash", "predicted_execution_time_ms", "volume_quota_remaining" ] }, "RespWithdrawalDelay": { "type": "object", "properties": { "seconds": { "type": "integer", "format": "int64", "example": "86400" } }, "title": "RespWithdrawalDelay", "required": [ "seconds" ] }, "ResultCode": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" } }, "title": "ResultCode", "required": [ "code" ] }, "RiskInfo": { "type": "object", "properties": { "cross_risk_parameters": { "$ref": "#/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" } }, "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" ] }, "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" } }, "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" ] }, "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" ] }, "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", "format": "boolean", "example": "true" }, "block_height": { "type": "integer", "format": "int64", "example": "45434" }, "timestamp": { "type": "integer", "format": "int64", "example": "1640995200" }, "taker_fee": { "type": "integer", "format": "int32", "example": "0" }, "taker_position_size_before": { "type": "string", "example": "0" }, "taker_entry_quote_before": { "type": "string", "example": "0" }, "taker_initial_margin_fraction_before": { "type": "integer", "format": "uin16", "example": "0" }, "taker_position_sign_changed": { "type": "boolean", "format": "boolean", "example": "true" }, "maker_fee": { "type": "integer", "format": "int32", "example": "0" }, "maker_position_size_before": { "type": "string", "example": "0" }, "maker_entry_quote_before": { "type": "string", "example": "0" }, "maker_initial_margin_fraction_before": { "type": "integer", "format": "uin16", "example": "0" }, "maker_position_sign_changed": { "type": "boolean", "format": "boolean", "example": "true" }, "transaction_time": { "type": "integer", "format": "int64", "example": "1771943742851429" }, "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" }, "integrator_maker_fee_collector_index": { "type": "integer", "format": "int64", "example": "156" }, "integrator_taker_fee": { "type": "integer", "format": "int32", "example": "50" }, "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" } }, "title": "Trade", "required": [ "trade_id", "trade_id_str", "tx_hash", "type", "market_id", "size", "price", "usd_amount", "ask_id", "bid_id", "ask_client_id", "ask_client_id_str", "bid_client_id", "bid_client_id_str", "ask_account_id", "bid_account_id", "is_maker_ask", "block_height", "timestamp", "taker_position_size_before", "taker_entry_quote_before", "taker_initial_margin_fraction_before", "taker_position_sign_changed", "maker_position_size_before", "maker_entry_quote_before", "maker_initial_margin_fraction_before", "maker_position_sign_changed", "transaction_time", "ask_account_pnl", "bid_account_pnl", "integrator_taker_fee", "integrator_taker_fee_collector_index", "integrator_maker_fee", "integrator_maker_fee_collector_index", "taker_allocated_margin_usdc_before", "taker_allocated_margin_usdc_after", "maker_allocated_margin_usdc_before", "maker_allocated_margin_usdc_after" ] }, "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" ] }, "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" ] }, "Tx": { "type": "object", "properties": { "hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "type": { "type": "integer", "format": "uint8", "example": "1", "maximum": 64, "minimum": 1 }, "info": { "type": "string", "example": "{}" }, "event_info": { "type": "string", "example": "{}" }, "status": { "type": "integer", "format": "int64", "example": "1" }, "transaction_index": { "type": "integer", "format": "int64", "example": "8761" }, "l1_address": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "account_index": { "type": "integer", "format": "int64", "example": "1" }, "nonce": { "type": "integer", "format": "int64", "example": "722" }, "expire_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "block_height": { "type": "integer", "format": "int64", "example": "45434" }, "queued_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "executed_at": { "type": "integer", "format": "int64", "example": "1640995200" }, "sequence_index": { "type": "integer", "format": "int64", "example": "8761" }, "parent_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "api_key_index": { "type": "integer", "format": "uint8" }, "transaction_time": { "type": "integer", "format": "int64" } }, "title": "Tx", "required": [ "hash", "type", "info", "event_info", "status", "transaction_index", "l1_address", "account_index", "nonce", "expire_at", "block_height", "queued_at", "executed_at", "sequence_index", "parent_hash", "api_key_index", "transaction_time" ] }, "TxHash": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "tx_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" } }, "title": "TxHash", "required": [ "code", "tx_hash" ] }, "Txs": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "txs": { "type": "array", "items": { "$ref": "#/components/schemas/Tx" } } }, "title": "Txs", "required": [ "code", "txs" ] }, "ValidatorInfo": { "type": "object", "properties": { "address": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "is_active": { "type": "boolean", "format": "boolean", "example": "true" } }, "title": "ValidatorInfo", "required": [ "address", "is_active" ] }, "WithdrawHistory": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "withdraws": { "type": "array", "items": { "$ref": "#/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" }, "asset_id": { "type": "integer", "format": "int16" } }, "title": "WithdrawHistoryItem", "required": [ "id", "amount", "timestamp", "status", "type", "l1_tx_hash", "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" }, "auth": { "type": "string", "description": " made optional to support header auth clients" } }, "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" }, "sub_account_access": { "type": "boolean", "format": "boolean" }, "scopes": { "type": "string", "example": "read.*", "default": "read.*" } }, "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": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "token_id": { "type": "integer", "format": "int64" }, "api_token": { "type": "string" }, "name": { "type": "string" }, "account_index": { "type": "integer", "format": "int64" }, "expiry": { "type": "integer", "format": "int64" }, "sub_account_access": { "type": "boolean", "format": "boolean" }, "revoked": { "type": "boolean", "format": "boolean" }, "scopes": { "type": "string" } }, "title": "RespPostApiToken", "required": [ "code", "token_id", "api_token", "name", "account_index", "expiry", "sub_account_access", "revoked", "scopes" ] }, "RespRevokeApiToken": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "token_id": { "type": "integer", "format": "int64" }, "revoked": { "type": "boolean", "format": "boolean" } }, "title": "RespRevokeApiToken", "required": [ "code", "token_id", "revoked" ] }, "ApiToken": { "type": "object", "properties": { "token_id": { "type": "integer", "format": "int64" }, "api_token": { "type": "string" }, "name": { "type": "string" }, "account_index": { "type": "integer", "format": "int64" }, "expiry": { "type": "integer", "format": "int64" }, "sub_account_access": { "type": "boolean", "format": "boolean" }, "revoked": { "type": "boolean", "format": "boolean" }, "scopes": { "type": "string" } }, "title": "ApiToken", "required": [ "token_id", "api_token", "name", "account_index", "expiry", "sub_account_access", "revoked", "scopes" ] }, "ReqUpdateReferralCode": { "type": "object", "properties": { "auth": { "type": "string", "description": " made optional to support header auth clients" }, "account_index": { "type": "integer", "format": "int64" }, "new_referral_code": { "type": "string" } }, "title": "ReqUpdateReferralCode", "required": [ "account_index", "new_referral_code" ] }, "RespUpdateReferralCode": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "success": { "type": "boolean", "format": "boolean", "example": "true" } }, "title": "RespUpdateReferralCode", "required": [ "code", "success" ] }, "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": { "auth": { "type": "string", "description": " made optional to support header auth clients" }, "l1_address": { "type": "string" }, "referral_code": { "type": "string" }, "discord": { "type": "string" }, "telegram": { "type": "string" }, "x": { "type": "string" }, "signature": { "type": "string" } }, "title": "ReqUseReferralCode", "required": [ "l1_address", "referral_code", "x" ] }, "ReqCreateIntentAddress": { "type": "object", "properties": { "chain_id": { "type": "string" }, "from_addr": { "type": "string" }, "amount": { "type": "string" }, "is_external_deposit": { "type": "boolean", "format": "boolean" } }, "title": "ReqCreateIntentAddress", "required": [ "chain_id", "from_addr", "amount" ] }, "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" }, "remaining_usage": { "type": "integer", "format": "int32", "example": "3" } }, "title": "ReferralCode", "required": [ "code", "referral_code", "remaining_usage" ] }, "ReqCreateReferralCode": { "type": "object", "properties": { "auth": { "type": "string", "description": " made optional to support header auth clients" }, "account_index": { "type": "integer", "format": "int64" } }, "title": "ReqCreateReferralCode", "required": [ "account_index" ] }, "ReqUpdateKickback": { "type": "object", "properties": { "auth": { "type": "string", "description": " made optional to support header auth clients" }, "account_index": { "type": "integer", "format": "int64" }, "kickback_percentage": { "type": "number", "format": "double", "maximum": 100 } }, "title": "ReqUpdateKickback", "required": [ "account_index", "kickback_percentage" ] }, "Deposit": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "source": { "type": "string", "example": "Arbitrum" }, "source_chain_id": { "type": "string", "example": "42161" }, "fast_bridge_tx_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "batch_claim_tx_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "cctp_burn_tx_hash": { "type": "string", "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "amount": { "type": "string" }, "intent_address": { "type": "string" }, "status": { "type": "string" }, "step": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "integer", "format": "int64" }, "updated_at": { "type": "integer", "format": "int64" }, "is_external_deposit": { "type": "boolean", "format": "boolean" }, "is_next_bridge_fast": { "type": "boolean", "format": "boolean" } }, "title": "Deposit", "required": [ "code", "source", "source_chain_id", "fast_bridge_tx_hash", "batch_claim_tx_hash", "cctp_burn_tx_hash", "amount", "intent_address", "status", "step", "description", "created_at", "updated_at", "is_external_deposit", "is_next_bridge_fast" ] }, "RespUpdateKickback": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "success": { "type": "boolean", "format": "boolean", "example": "true" } }, "title": "RespUpdateKickback", "required": [ "code", "success" ] }, "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", "format": "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" }, "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" ] }, "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" ] }, "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" ] }, "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" ] }, "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", "error", "fee_amount", "id", "lease_amount", "master_account_index", "start", "status" ] }, "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" ] }, "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" ] }, "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" } }, "required": [ "trade_stats", "l1_address", "referral_code", "tier", "used_at" ] }, "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" } }, "required": [ "code", "cursor", "referrals", "used_code" ] }, "ReqSetAccountMetadata": { "type": "object", "properties": { "master_account_index": { "type": "integer", "format": "int64" }, "target_account_index": { "type": "integer", "format": "int64" }, "api_key_index": { "type": "integer", "format": "uint8" }, "metadata": { "type": "string" }, "auth": { "type": "string" } }, "required": [ "master_account_index", "target_account_index", "api_key_index", "metadata" ] }, "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" } }, "required": [ "max_integrator_perps_maker_fee", "max_integrator_perps_taker_fee", "max_integrator_spot_maker_fee", "max_integrator_spot_taker_fee", "code", "funding_fee_rebate_account_index", "liquidity_pool_cooldown_period", "liquidity_pool_index", "staking_pool_index", "staking_pool_lockup_period", "market_maker_incentive_account_index" ] }, "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" ] }, "Strategy": { "type": "object", "properties": { "collateral": { "type": "string" } }, "required": [ "collateral" ] }, "TradeStats": { "type": "object", "properties": { "count": { "type": "integer", "format": "int64" }, "volume": { "type": "string" }, "web_count": { "type": "integer", "format": "int64" }, "web_volume": { "type": "string" }, "mobile_app_count": { "type": "integer", "format": "int64" }, "mobile_app_volume": { "type": "string" }, "mobile_browser_count": { "type": "integer", "format": "int64" }, "mobile_browser_volume": { "type": "string" } }, "title": "TradeStats", "required": [ "count", "volume", "web_count", "web_volume", "mobile_app_count", "mobile_app_volume", "mobile_browser_count", "mobile_browser_volume" ] }, "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", "logo_extension", "description_key", "gecko_id", "paprika_id", "market", "asset_type", "categories", "is_allowed_mainnet", "is_asset_allowed_mainnet" ], "properties": { "symbol": { "type": "string", "example": "ETH" }, "name": { "type": "string", "example": "Ethereum" }, "logo": { "type": "string", "example": "eth" }, "logo_extension": { "type": "string", "example": "svg", "enum": [ "svg", "png" ] }, "description_key": { "type": "string", "example": "token_description_eth" }, "gecko_id": { "type": "string", "example": "ethereum" }, "paprika_id": { "type": "string", "example": "eth-ethereum" }, "market": { "type": "string", "enum": [ "SPOT", "PERPS" ] }, "asset_type": { "type": "string", "enum": [ "CRYPTO", "RWA" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "is_allowed_mainnet": { "type": "boolean", "format": "boolean" }, "is_asset_allowed_mainnet": { "type": "boolean", "format": "boolean" } } }, "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" } }, "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" ] }, "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" }, "direction": { "type": "integer", "format": "int16" }, "base_amount": { "type": "string" }, "quote_amount": { "type": "string" }, "status": { "type": "string" }, "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" } }, "title": "RFQMetadata", "required": [ "requested_est_price", "requested_max_slippage", "requested_slippage", "worst_price" ] }, "RFQResponseEntry": { "type": "object", "properties": { "account_index": { "type": "integer", "format": "int64" }, "status": { "type": "string", "enum": [ "acknowledged", "liquidity_provided", "not_interested" ] }, "responded_at": { "type": "integer", "format": "int64" }, "updated_at": { "type": "integer", "format": "int64" } }, "title": "RFQResponseEntry", "required": [ "account_index", "status", "responded_at", "updated_at" ] }, "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" ] }, "RFQEntry": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "account_index": { "type": "integer", "format": "int64" }, "market_index": { "type": "integer", "format": "int16" }, "direction": { "type": "integer", "format": "int16" }, "base_amount": { "type": "string" }, "quote_amount": { "type": "string" }, "status": { "type": "string" }, "metadata": { "$ref": "#/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" }, "direction": { "type": "integer", "format": "int16" }, "base_amount": { "type": "string" }, "quote_amount": { "type": "string" }, "status": { "type": "string" }, "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" ] }, "metadata": { "type": "string" } }, "title": "ReqCreateRFQ", "required": [ "market_index", "direction" ] }, "RespCreateRFQ": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "example": "200" }, "message": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "account_index": { "type": "integer", "format": "int64" }, "market_index": { "type": "integer", "format": "int16" }, "direction": { "type": "integer", "format": "int16" }, "base_amount": { "type": "string" }, "quote_amount": { "type": "string" }, "status": { "type": "string" }, "metadata": { "$ref": "#/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" }, "direction": { "type": "integer", "format": "int16" }, "base_amount": { "type": "string" }, "quote_amount": { "type": "string" }, "status": { "type": "string" }, "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" ] } } } }