{ "openapi": "3.0.1", "info": { "title": "Paradex REST API", "description": "The following describe Paradex API.\n", "contact": {}, "version": "1.106.3" }, "servers": [ { "url": "https://api.testnet.paradex.trade/v1" } ], "paths": { "/account": { "get": { "tags": [ "Account" ], "summary": "Get account information", "description": "Respond with requester's account information\n", "operationId": "get-account", "parameters": [ { "name": "subaccount_address", "in": "query", "description": "Subaccount address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountSummaryResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/history": { "get": { "tags": [ "Account" ], "summary": "Get account history", "description": "Respond with requester's account information\n", "operationId": "get-account-history", "parameters": [ { "name": "type", "in": "query", "description": "Type of data", "required": true, "schema": { "type": "string", "enum": [ "pnl", "value", "volume", "fee_savings" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountHistoricalDataResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/info": { "get": { "tags": [ "Account" ], "summary": "Return account info of current account", "operationId": "get-accounts-info", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetAccountsInfoResponse" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/margin": { "get": { "tags": [ "Account" ], "summary": "Get account margin configuration", "description": "Get margin configuration for an account and market", "operationId": "get-account-margin", "parameters": [ { "name": "market", "in": "query", "description": "Market Name - example: BTC-USD-PERP", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetAccountMarginConfigsResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/margin/{market}": { "post": { "tags": [ "Account" ], "summary": "Set margin configuration", "description": "Set margin configuration for an account and market", "operationId": "upsert-account-margin", "parameters": [ { "name": "market", "in": "path", "description": "Market Name - example: BTC-USD-PERP", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Margin Configuration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.AccountMarginRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.UpdateAccountMarginConfigResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "config" } }, "/account/profile": { "get": { "tags": [ "Account" ], "summary": "Get account profile information", "description": "Respond with requester's account information\n", "operationId": "get-account-profile", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "put": { "tags": [ "Account" ], "summary": "Updates account profile", "description": "Updates account profile information", "operationId": "update-account-profile", "requestBody": { "description": "Update account profile request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateAccountProfileRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/profile/market_max_slippage/{market}": { "post": { "tags": [ "Account" ], "summary": "Updates account max slippage for a specific market", "description": "Respond with requester's account max_slippage\n", "operationId": "update-account-market-max-slippage", "parameters": [ { "name": "market", "in": "path", "description": "{base_currency}-{quote_currency}-{kind}", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Update market max slippage request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateAccountMaxSlippageRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/profile/notifications": { "post": { "tags": [ "Account" ], "summary": "Updates account notification preferences", "description": "Updates user notification preferences for orders, fills, announcements, and transfers. All fields are optional - only provided fields will be updated.", "operationId": "update-account-notification-preferences", "requestBody": { "description": "Update notification preferences request (all fields optional)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateNotificationPreferencesRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/profile/referral_code": { "post": { "tags": [ "Account" ], "summary": "Updates account profile fields", "description": "Respond with requester's account information\n", "operationId": "update-account-profile-referral-code", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/profile/size_currency_display": { "post": { "tags": [ "Account" ], "summary": "Updates account size currency display preference", "description": "To set user preferences for the size currency display on the UI, BASE will use base currency, and QUOTE will use quote currency.", "operationId": "update-account-size-currency-display", "requestBody": { "description": "Update account size currency display request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateSizeCurrencyDisplayRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/profile/username": { "post": { "tags": [ "Account" ], "summary": "Updates account profile username fields", "description": "Respond with requester's account information\n", "operationId": "update-account-profile-username", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/referrer": { "post": { "tags": [ "Account" ], "summary": "Updates account referred_by field", "description": "Add missing account referrer within a certain time window after account creation.\n", "operationId": "update-account-referrer", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/settings": { "get": { "tags": [ "Account" ], "summary": "Get account settings", "description": "Get account settings", "operationId": "get-account-settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountSettingsResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/settings/trading_value_display": { "post": { "tags": [ "Account" ], "summary": "Updates account trading value display", "description": "To set user preferences for the trading value display on the UI, Spot Notional will use spot price, and Market Value will use the market price.", "operationId": "update-account-trading-value-display", "requestBody": { "description": "Update account trading value display request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateTradingValueDisplayRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/subaccounts": { "get": { "tags": [ "Account" ], "summary": "List sub-accounts of current account", "description": "Respond with requester's list of sub-accounts\n", "operationId": "get-sub-accounts", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetSubAccountsResponse" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/subkeys": { "get": { "tags": [ "Subkey" ], "summary": "List Subkeys", "description": "Get all subkeys for the authenticated account with optional filtering by status.\n", "operationId": "list-subkeys", "parameters": [ { "name": "with_revoked", "in": "query", "description": "Include revoked subkeys", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "List of subkeys", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.Subkey" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Subkey" ], "summary": "Register Subkey", "description": "Register a new subkey for the authenticated account.\n", "operationId": "register-subkey", "requestBody": { "description": "Subkey registration request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateSubkey" } } }, "required": true }, "responses": { "201": { "description": "An empty response", "content": {} }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/subkeys/{public_key}": { "delete": { "tags": [ "Subkey" ], "summary": "Revoke Subkey", "description": "Revoke a subkey for the authenticated account.\n", "operationId": "revoke-subkey", "parameters": [ { "name": "public_key", "in": "path", "description": "Subkey public key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Subkey revoked successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.RevokeSubkeyResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/summary": { "get": { "tags": [ "Account" ], "summary": "Get account summaries (main account + authorized accounts)", "description": "Respond with account summaries for the account plus all authorized accounts.", "operationId": "get-accounts", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountSummaryResponse" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/account/tokens": { "get": { "tags": [ "Token" ], "summary": "List tokens", "description": "Get all tokens for the authenticated account with optional filtering by kind\nand status.\n", "operationId": "list-tokens", "parameters": [ { "name": "kind", "in": "query", "description": "Filter by token kind (e.g., 'jwt', 'api_key')", "schema": { "type": "string" } }, { "name": "with_invalid", "in": "query", "description": "Include revoked and expired tokens", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "List of tokens", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.ApiToken" } } } } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Token" ], "summary": "Create token", "description": "Create a new authentication token for the authenticated account with custom\nname and expiration duration.\n", "operationId": "create-token", "requestBody": { "description": "Token creation request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateToken" } } }, "required": true }, "responses": { "200": { "description": "Token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.CreateTokenResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/account/tokens/{lookup_id}": { "delete": { "tags": [ "Token" ], "summary": "Revoke token", "description": "Revoke an authentication token by its unique identifier.\n", "operationId": "revoke-token", "parameters": [ { "name": "lookup_id", "in": "path", "description": "Token lookup ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Token revoked successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.RevokeTokenResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/algo/orders": { "get": { "tags": [ "Algos" ], "summary": "Get open algo orders", "description": "Get current user all open algo orders\n", "operationId": "get-open-algo-orders", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AlgoOrderResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Algos" ], "summary": "Create algo order", "description": "Create a new algo order\n\n### TWAP\n\nTWAP orders break a large trade into smaller ones over time to reduce market impact:\n- Sub-orders are placed every 30 seconds.\n- Order duration is between 30 and 86,400 seconds, in multiples of 30.\n- Supported sub order type: MARKET\n", "operationId": "create-algo-order", "requestBody": { "description": "Algo order content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.AlgoOrderRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AlgoOrderResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/algo/orders-history": { "get": { "tags": [ "Algos" ], "summary": "Get algo orders history", "description": "Get current user algo orders filtered on attributes\n", "operationId": "get-algo-orders-history", "parameters": [ { "name": "client_id", "in": "query", "description": "Unique ID of client generating the order", "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market for the order", "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "side", "in": "query", "description": "Order side", "schema": { "type": "string", "enum": [ "BUY", "SELL" ] } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Order status", "schema": { "type": "string", "enum": [ "OPEN", "CLOSED", "NEW" ] } }, { "name": "type", "in": "query", "description": "Order type", "schema": { "type": "string", "enum": [ "LIMIT", "MARKET", "STOP_LIMIT", "STOP_MARKET", "STOP_LOSS_LIMIT", "STOP_LOSS_MARKET", "TAKE_PROFIT_LIMIT", "TAKE_PROFIT_MARKET" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AlgoOrderResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/algo/orders/{algo_id}": { "get": { "tags": [ "Algos" ], "summary": "Get algo order by id", "description": "Get an algo order by id. Only return algo order in `OPEN` or `NEW` status.\n", "operationId": "get-algo-order-by-id", "parameters": [ { "name": "algo_id", "in": "path", "description": "Algo ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AlgoOrderResp" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Algos" ], "summary": "Cancel algo order by id", "description": "Cancel an existing algo order by id\n", "operationId": "cancel-algo-order", "parameters": [ { "name": "algo_id", "in": "path", "description": "Algo ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": {} }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/auth": { "post": { "tags": [ "Authentication" ], "summary": "Get JWT", "description": "Authenticate using signed payload to get a JWT for usage in other endpoints\n\nThere are multiple valid headers required to be sent as part of this request.\n\nFor onboarding examples, refer to `go`, `java` and `python` code in [code-samples](https://github.com/tradeparadex/code-samples).\n\n#### StarkNet Message Hash and Signature\n\nInspired by [EIP-712](https://eips.ethereum.org/EIPS/eip-712),\n(a standard for hashing and signing typed structured data)\nthe encoding of an off-chain message is defined as:\n\n`signed_data = Enc[PREFIX_MESSAGE, domain_separator, account, hash_struct(message)]`\n\nwhere:\n\n- `PREFIX_MESSAGE = \"StarkNet Message\"`\n- `domain_separator` is defined as the `hash_struct` of the StarkNetDomain struct:\n * Struct contains: `name`, `chainId` and `version`\n * `chainId` is can be obtained calling `GET /system/config`\n- `account` is the StarkNet account address\n- The message to be hashed is represented as a struct\n * `hash_struct(message) = Enc[type_hash(MyStruct), Enc[param1], ..., Enc[paramN]]`\n * where `type_hash` is defined as in EIP-712 (but using `selector` instead of `keccak`)\n * More details on StarkNet - [Hash Functions](https://docs.starknet.io/architecture-and-concepts/cryptography/#hash_functions)\n\nIn case of more complex structure of object, you have to work in the spirit of EIP-712.\nThis json structure has 4 mandatory items: `types`, `primaryType`, `domain` and `message`.\nThese items are designed to be able to be an interface with a wallet.\nAt sign request, the wallet will display:\n\n- `message` will be displayed at the bottom of the wallet display,\nshowing clearly (not in hex) the message to sign.\nIts structure has to be in accordance with the type listed in primaryType,\ndefined in types.\n- `domain` will be shown above the message.\nIts structure has to be in accordance with `StarkNetDomain`.\n\nThe predefined types that you can use :\n\n- `felt` : for an integer on 251 bits.\n- `felt*` : for an array of felt.\n- `string` : for a shortString of 31 ASCII characters max.\n- `selector` : for a name of a smart contract function.\n- `merkletree` : for a Root of a Merkle tree, calculated with the provided data.\n\nSpecification details: [Signing transactions and off-chain messages](https://github.com/argentlabs/argent-x/discussions/14)\n\n#### Message Hash Sample Code\n\nFor a complete `message_hash` example, refer to `python` code in [code-samples](https://github.com/tradeparadex/code-samples).\n\n> Examples:\n\n```json\n{\n \"paradex-signature-expiration\": 1682364556,\n \"paradex-starknet-account\": \"0x129f3dc1b8962d8a87abc692424c78fda963ade0e1cd17bf3d1c26f8d41ee7a\",\n \"paradex-starknet-signature\": [\n \"1381323390094460587764867648394252677239485992175346764030313478865763678671\",\n \"396490140510115262427678549757564216013606350105112805717359873954984880589\"\n ],\n \"paradex-timestamp\": 1681759756\n}\n```\n", "operationId": "auth", "parameters": [ { "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "description": "Starknet account", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "description": "Starknet signature", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-TIMESTAMP", "in": "header", "description": "Timestamp when the signature was created", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-SIGNATURE-EXPIRATION", "in": "header", "description": "Timestamp when signature expires (default 30 min | Max 1 week)", "schema": { "type": "string" } }, { "name": "PARADEX-AUTHORIZE-ISOLATED-MARKETS", "in": "header", "description": "Optional flag to authorize all isolated market accounts linked to the main account. When set to true, the returned JWT will grant trading access to all isolated accounts. Defaults to false if not specified", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AuthResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/balance": { "get": { "tags": [ "Account" ], "summary": "List balances", "description": "Respond with requester's own balances\n", "operationId": "get-balance", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.BalanceResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/bbo/{market}": { "get": { "tags": [ "Markets" ], "summary": "Get market bbo", "description": "Get the best bid/ask for the given market\n", "operationId": "get-bbo", "parameters": [ { "name": "market", "in": "path", "description": "Market symbol - ex: BTC-USD-PERP", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BBOResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/bbo/{market}/interactive": { "get": { "tags": [ "Markets" ], "summary": "Get market bbo including all orders including RPI (as seen by the UI)", "description": "Returns best bid/offer including all orders including RPI (as seen by the UI)", "operationId": "get-bbo-interactive", "parameters": [ { "name": "market", "in": "path", "description": "Market symbol - ex: BTC-USD-PERP", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BBOResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/block-trades": { "get": { "tags": [ "BlockTrades" ], "summary": "List block trades", "description": "Get a paginated list of block trades with filtering.\n\nReturns block trades where user is initiator, required signer,\nor has submitted an offer.\n\n**Filters:**\n- Status: CREATED, OFFER_COLLECTION, READY_TO_EXECUTE, EXECUTING, COMPLETED, CANCELLED\n- Market: Specific market symbol (e.g., BTC-USD-PERP)\n\n**Returns:** Paginated list with block trade details and navigation metadata.\n", "operationId": "block-trades-list", "parameters": [ { "name": "status", "in": "query", "description": "Block trade status filter", "schema": { "type": "string", "enum": [ "CREATED", "OFFER_COLLECTION", "READY_TO_EXECUTE", "EXECUTING", "COMPLETED", "CANCELLED" ] } }, { "name": "market", "in": "query", "description": "Market symbol filter, ex: BTC-USD-PERP", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "BlockTrades" ], "summary": "Create block trade", "description": "Create a parent block trade for multi-party execution.\n\nBlock trades coordinate execution across multiple parties.\nThe initiator creates a parent block trade specifying trade details and\nrequired signers, who must submit offers before execution.\n\n**Requirements:**\n- Required signers must have active onboarding and block trade functionality\n- Valid StarkNet signature with expiration timestamp\n- Each trade specifies market, size, price, and order details\n\n**Workflow:**\n1. Initiator creates parent block trade\n2. Required signers submit offers\n3. Initiator executes with selected offers\n4. All trades processed together\n", "operationId": "block-trades-create", "requestBody": { "description": "Block trade content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockTradeRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/block-trades/{block_trade_id}": { "get": { "tags": [ "BlockTrades" ], "summary": "Get block trade", "description": "Retrieve a specific block trade by ID with full details.\n\nReturns complete block trade information including status, trade details,\nsignatures, and offers.\n\n**Access:** Available to initiator, required signers,\nor accounts with submitted offers.\n\n**Returns:**\n- Block ID and status\n(CREATED, OFFER_COLLECTION, READY_TO_EXECUTE, EXECUTING, COMPLETED, CANCELLED)\n- Market-specific trade details with orders and fill information\n- All collected signatures from required signers\n- Creation time, last update, expiration, and participant information\n", "operationId": "block-trades-get", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Block Trade ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "BlockTrades" ], "summary": "Cancel block trade", "description": "Cancel a pending block trade.\n\nOnly the initiator can cancel a block trade in cancellable state\n(CREATED, OFFER_COLLECTION, READY_TO_EXECUTE).\nOnce cancelled,all associated offers become invalid.\n\n**Returns:** Success message confirming cancellation. Status updated to CANCELLED.\n", "operationId": "block-trades-cancel", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Block Trade ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/block-trades/{block_trade_id}/execute": { "post": { "tags": [ "BlockTrades" ], "summary": "Execute block trade", "description": "Execute a block trade with selected offers.\n\nExecutes a parent block trade by selecting specific offers from required signers.\n\n**Requirements:**\n- Called by block trade initiator\n- All selected offers must have valid, unexpired signatures\n- Required signers must have submitted offers for all markets\n- Block trade must be in READY_TO_EXECUTE state\n\n**Execution Process:**\n- All trades processed together\n- Creates fills and updates balances upon success\n- Participants receive fill notifications\n\n**Returns:** Executed block trade with status (COMPLETED/FAILED), fill details,\ntimestamps, and settlement info.\n", "operationId": "block-trades-execute", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Block Trade ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Block execution parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockExecuteRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/block-trades/{block_trade_id}/offers": { "get": { "tags": [ "BlockTrades" ], "summary": "Get block trade offers", "description": "Get all offers for a specific block trade.\n\nReturns all offers submitted for a parent block trade by required signers.\n\n**Access:** Available to initiator, required signers,\nor accounts with submitted offers.\n\n**Returns:** Array of offers with:\n- Offer ID and parent block trade reference\n- Offering account and trade details per market\n- Execution signatures and timestamps\n- Current offer state and execution details\n", "operationId": "block-offers-list", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Parent Block Trade ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "BlockTrades" ], "summary": "Create block trade offer", "description": "Create a sub-block offer for an existing block trade.\n\nRequired signers submit their order details and pricing for\nmarkets defined in the parent block trade.\n\n**Requirements:**\n- Account must be listed as required signer with active onboarding\n- Valid order signatures for all markets\n- Orders must match parent block trade constraints\n\n**Includes:**\n- Individual order signatures per market\n- Block trade execution signature with expiration\n- Proper nonce and signature verification data\n\nReturns the created offer with unique ID, parent reference, and order details.\n", "operationId": "block-offers-create", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Parent Block Trade ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Block offer content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockOfferRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/block-trades/{block_trade_id}/offers/{offer_id}": { "get": { "tags": [ "BlockTrades" ], "summary": "Get specific block trade offer", "description": "Get a specific offer by ID for a block trade.\n\nRetrieves detailed information about an offer submitted for a parent block trade.\n\n**Access:** Available to initiator, required signers, or the offering account.\n\n**Returns:**\n- Offer ID and parent block trade reference\n- Market-specific order information with pricing/sizing\n- StarkNet signatures and verification data\n- Execution status and timestamps\n", "operationId": "block-offers-get", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Parent Block Trade ID", "required": true, "schema": { "type": "string" } }, { "name": "offer_id", "in": "path", "description": "Offer ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "BlockTrades" ], "summary": "Cancel block trade offer", "description": "Cancel a pending offer for a block trade.\n\nOnly the offering account can cancel their own offer if it's in\na cancellable state and the parent block trade is still active.\n\n**Returns:** Success message confirming offer cancellation.\nStatus updated to CANCELLED.\n", "operationId": "block-offers-cancel", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Parent Block Trade ID", "required": true, "schema": { "type": "string" } }, { "name": "offer_id", "in": "path", "description": "Offer ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/block-trades/{block_trade_id}/offers/{offer_id}/execute": { "post": { "tags": [ "BlockTrades" ], "summary": "Execute individual offer", "description": "Execute a specific offer independently of the parent block trade.\n\nExecutes an individual offer without waiting for full block trade execution.\n\n**Requirements:**\n- Called by authorized account (initiator, offering account, or required signer)\n- Valid signatures from all required parties\n- Unexpired signatures and executable offer state\n\n**Independent Execution:**\n- Processes only the specific offer's trades\n- Does not require other offers to be ready\n- Executes all trades in the offer together\n\n**Returns:** Executed offer with status, fill details, timestamps, and updated balances.\n", "operationId": "block-offers-execute", "parameters": [ { "name": "block_trade_id", "in": "path", "description": "Parent Block Trade ID", "required": true, "schema": { "type": "string" } }, { "name": "offer_id", "in": "path", "description": "Offer ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Offer execution parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockExecuteRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BlockTradeDetailFullResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/fills": { "get": { "tags": [ "Account" ], "summary": "List fills", "description": "This API returns a list of matched orders (i.e. fills) that have been sent to\r\nchain for settlement.\r\n", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market symbol", "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.FillResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/funding/data": { "get": { "tags": [ "Markets" ], "summary": "Funding data history", "description": "List historical funding data by market\n", "operationId": "get-funding-data", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market for which funding payments are queried", "required": true, "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.FundingDataResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/funding/payments": { "get": { "tags": [ "Account" ], "summary": "Funding payments history", "description": "List funding payments made by/to the requester's account\n\n*Funding payments are periodic payments between traders to make the perpetual\nfutures contract price is close to the index price.*\n", "operationId": "get-funding", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market for which funding payments are queried", "required": true, "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.FundingPayment" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/insurance": { "get": { "tags": [ "Insurance" ], "summary": "Get insurance fund account information", "description": "Get insurance fund account's information\n", "operationId": "get-insurance-fund", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.InsuranceAccountResp" } } } } } } }, "/liquidations": { "get": { "tags": [ "Liquidations" ], "summary": "List liquidations", "description": "Retrieves a list of liquidations associated to the requester's account\n", "operationId": "get-liquidations", "parameters": [ { "name": "from", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "to", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.LiquidationResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/markets": { "get": { "tags": [ "Markets" ], "summary": "List available markets", "description": "Get markets static data component\n", "operationId": "get-markets", "parameters": [ { "name": "market", "in": "query", "description": "Market Name - example: BTC-USD-PERP", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.MarketResp" } } } } ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/markets/klines": { "get": { "tags": [ "Markets" ], "summary": "OHLCV for a symbol", "description": "Klines for a symbol", "operationId": "markets-klines", "parameters": [ { "name": "end_at", "in": "query", "description": "end time for klines in milliseconds", "required": true, "schema": { "type": "integer" } }, { "name": "price_kind", "in": "query", "description": "Which price to use for the klines", "schema": { "type": "string", "enum": [ "last", "mark", "underlying" ], "x-enum-varnames": [ "PriceKindLast", "PriceKindMark", "PriceKindUnderlying" ] }, "x-enum-varnames": [ "PriceKindLast", "PriceKindMark", "PriceKindUnderlying" ] }, { "name": "resolution", "in": "query", "description": "resolution in minutes: 1, 3, 5, 15, 30, 60", "required": true, "schema": { "type": "string" } }, { "name": "start_at", "in": "query", "description": "start time for klines in milliseconds", "required": true, "schema": { "type": "integer" } }, { "name": "symbol", "in": "query", "description": "Symbol of the market pair", "required": true, "schema": { "type": "string" } } ], "responses": { "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/markets/summary": { "get": { "tags": [ "Markets" ], "summary": "List available markets summary", "description": "Get markets dynamic data component\n", "operationId": "get-markets-summary", "parameters": [ { "name": "end", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Name of the market for which summary is requested (for all available markets use ALL)", "required": true, "schema": { "type": "string" } }, { "name": "start", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.MarketSummaryResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/onboarding": { "post": { "tags": [ "Authentication" ], "summary": "Onboarding", "description": "Onboarding verifies that the caller owns the StarkNet address and enters them\ninto the database. This call is idempotent.\n", "operationId": "onboarding", "parameters": [ { "name": "PARADEX-ETHEREUM-ACCOUNT", "in": "header", "description": "Ethereum account used to onboard", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "description": "Starknet address", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "description": "Starknet signature", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Onboarding user public_key and optional referral_code or marketing_code", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.Onboarding" } } }, "required": true }, "responses": { "200": { "description": "An empty response", "content": {} }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "x-codegen-request-body-name": "request" } }, "/orderbook/{market}": { "get": { "tags": [ "Markets" ], "summary": "Get market orderbook", "description": "Get snapshot of the orderbook for the given market\n", "operationId": "get-orderbook", "parameters": [ { "name": "market", "in": "path", "description": "Market symbol - ex: BTC-USD-PERP", "required": true, "schema": { "type": "string" } }, { "name": "depth", "in": "query", "description": "Depth", "schema": { "type": "integer", "default": 20 } }, { "name": "price_tick", "in": "query", "description": "Price tick for aggregation", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AskBidArray" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/orderbook/{market}/impact-price": { "get": { "tags": [ "Markets" ], "summary": "Get market impact price", "operationId": "get-impact-price", "parameters": [ { "name": "market", "in": "path", "description": "Market symbol - ex: BTC-USD-PERP", "required": true, "schema": { "type": "string" } }, { "name": "size", "in": "query", "description": "Size", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ImpactPriceResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/orderbook/{market}/interactive": { "get": { "tags": [ "Markets" ], "summary": "Get market interactive orderbook", "description": "Returns orderbook including RPI", "operationId": "get-orderbook-interactive", "parameters": [ { "name": "market", "in": "path", "description": "Market symbol - ex: BTC-USD-PERP", "required": true, "schema": { "type": "string" } }, { "name": "depth", "in": "query", "description": "Depth", "schema": { "type": "integer", "default": 20 } }, { "name": "price_tick", "in": "query", "description": "Price tick for aggregation", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AskBidArray" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/orders": { "get": { "tags": [ "Orders" ], "summary": "Get open orders", "description": "Get current user all open orders\n", "operationId": "get-open-orders", "parameters": [ { "name": "market", "in": "query", "description": "Market symbol, ex: BTC-USD-PERP", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Orders" ], "summary": "Create order", "description": "Submits a new order to Paradex.\n\nReturns an order status object with a unique order `id` assigned by Paradex. This\norder `id` serves as the primary identifier for the order.\n\nThe REST API performs basic validation and queues the order for risk checks\n(order `status`=`NEW`).\n\nOnce validation and risk checks are successful, the order is sent to the matching\nengine. The matching engine processes the order and updates the status to `OPEN`\nif the order is resting. If the order is fully filled or cannot be processed, the\nstatus changes to `CLOSED` and a `cancel_reason` code is provided (e.g., fully\nfilled or no liquidity).\n", "operationId": "orders-new", "requestBody": { "description": "Order content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.OrderRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.OrderResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" }, "delete": { "tags": [ "Orders" ], "summary": "Cancel all open orders", "operationId": "orders-cancel-all", "parameters": [ { "name": "market", "in": "query", "description": "Market to cancel orders for", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": {} }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/orders-history": { "get": { "tags": [ "Orders" ], "summary": "Get orders", "description": "Get current user orders filtered on attributes\n", "operationId": "get-orders", "parameters": [ { "name": "client_id", "in": "query", "description": "Unique ID of client generating the order", "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market for the order", "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "side", "in": "query", "description": "Order side", "schema": { "type": "string", "enum": [ "BUY", "SELL" ] } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Order status", "schema": { "type": "string", "enum": [ "OPEN", "CLOSED", "NEW" ] } }, { "name": "type", "in": "query", "description": "Order type", "schema": { "type": "string", "enum": [ "LIMIT", "MARKET", "STOP_LIMIT", "STOP_MARKET", "STOP_LOSS_LIMIT", "STOP_LOSS_MARKET", "TAKE_PROFIT_LIMIT", "TAKE_PROFIT_MARKET" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/orders/batch": { "post": { "tags": [ "Orders" ], "summary": "Create batch of orders", "description": "Place a batch of orders\n\n+ Valid batch size is between 1-10 order(s)\n+ If basic validation(including signature) fails - all orders will be rejected.\n+ Orders are queued for risk checking independently and failure of one order\n doesn't affect processing of another order.\n", "operationId": "orders-new-batch", "requestBody": { "description": "Order content", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/requests.OrderRequest" } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.BatchResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" }, "delete": { "tags": [ "Orders" ], "summary": "Cancel batch of orders by order IDs", "description": "Queues cancellation for multiple orders by providing identifiers in a batch.\n\nThe request body can contain either or both of:\n- `order_ids`: Array of order IDs assigned by Paradex\n- `client_order_ids`: Array of client-assigned order IDs\n\n```json\n{\n \"order_ids\": [\"order-id-1\", \"order-id-2\"],\n \"client_order_ids\": [\"client-id-1\", \"client-id-2\"]\n}\n```\n\nReturns a 200 OK status code with detailed results for each order:\n\n```json\n{\n \"results\": [\n {\n \"id\": \"order-id-1\",\n \"client_id\": \"client-id-X\",\n \"account\": \"account-1\",\n \"market\": \"BTC-USD-PERP\",\n \"status\": \"QUEUED_FOR_CANCELLATION\"\n },\n {\n \"id\": \"order-id-2\",\n \"client_id\": \"client-id-Y\",\n \"account\": \"account-1\",\n \"market\": \"ETH-USD-PERP\",\n \"status\": \"ALREADY_CLOSED\"\n },\n {\n \"id\": \"order-id-3\",\n \"client_id\": \"client-id-1\",\n \"account\": \"account-1\",\n \"market\": \"BTC-USD-PERP\",\n \"status\": \"QUEUED_FOR_CANCELLATION\"\n },\n {\n \"client_id\": \"client-id-2\",\n \"status\": \"NOT_FOUND\"\n }\n ]\n}\n```\n\nEach result includes:\n- `id`: Order ID (if the order was found)\n- `client_id`: Client order ID (if available)\n- `account`: Account that owns the order\n- `market`: Market of the order\n- `status`: One of:\n + `QUEUED_FOR_CANCELLATION`: Order was successfully queued for cancellation\n + `ALREADY_CLOSED`: Order was already in a closed state\n + `NOT_FOUND`: The order with the provided ID/client ID was not found\n\nConfirmation of cancellation will be sent via websocket or can be verified from\nGET /orders/:id endpoint.\n\nOrders that are already in a CLOSED state will be included in the response with\nstatus \"ALREADY_CLOSED\".\n", "operationId": "orders-cancel-batch", "requestBody": { "description": "Order IDs to cancel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CancelOrderBatchRequest" } } }, "required": true }, "responses": { "200": { "description": "List of cancellation results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.CancelOrderBatchResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "params" } }, "/orders/by_client_id/{client_id}": { "get": { "tags": [ "Orders" ], "summary": "Get order by client id", "description": "Get an order by client id. Only returns orders in `OPEN` status.\n", "operationId": "orders-get-by-client-id", "parameters": [ { "name": "client_id", "in": "path", "description": "Client Order Id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.OrderResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Orders" ], "summary": "Cancel open order by client order id", "operationId": "orders-cancel-by-client-id", "parameters": [ { "name": "client_id", "in": "path", "description": "Client Order Id", "required": true, "schema": { "type": "string" } }, { "name": "market", "in": "query", "description": "Market to cancel orders for", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": {} }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/orders/{order_id}": { "get": { "tags": [ "Orders" ], "summary": "Get order", "description": "Get an order by id. Only return orders in `OPEN` or `NEW` status.\n", "operationId": "orders-get", "parameters": [ { "name": "order_id", "in": "path", "description": "Order Id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.OrderResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] }, "put": { "tags": [ "Orders" ], "summary": "Modify order", "description": "Modify an existing open limit order or TPSL order by changing its\n`price`, `size`, and/or `trigger_price`.\n\nFor untriggered TPSL orders, you can modify `trigger_price`,\n`price` (limit orders only), and `size`.\nOnce a TPSL limit order triggers you can modify its `price` and `size`\njust like a regular limit order,\nbut the `trigger_price` is no longer modifiable.\n\nTPSL market orders execute immediately when triggered and\ncannot be modified afterwards.\n\nThe modified order maintains its original order ID.\n", "operationId": "orders-modify", "parameters": [ { "name": "order_id", "in": "path", "description": "Order Id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Modify Order Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.ModifyOrderRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.OrderResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "order_request" }, "delete": { "tags": [ "Orders" ], "summary": "Cancel order", "description": "Queues a cancellation for a specific order identified by its order ID (assigned by\nParadex).\n\nReturns a 204 No Content status code with no response body which means the order\nhas been queued for cancellation.\n\nConfirmation of cancellation will be sent via websocket or can be retried from\nGET /orders/:id endpoint.\n\nOrders that are already in a CLOSED state cannot be canceled.\n", "operationId": "orders-cancel", "parameters": [ { "name": "order_id", "in": "path", "description": "Order Id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": {} }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/positions": { "get": { "tags": [ "Account" ], "summary": "List open positions", "description": "Get all positions owned by current user\n", "operationId": "get-positions", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.PositionResp" } } } } ] } } } } }, "security": [ { "BearerToken": [] } ] } }, "/referrals/qr-code": { "get": { "tags": [ "Referrals" ], "summary": "Get Referral QR Code", "description": "Returns a QR code image containing the user's referral link", "operationId": "get-referral-qr-code", "responses": { "200": { "description": "QR code image", "content": { "image/png": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "image/png": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "image/png": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/referrals/summary": { "get": { "tags": [ "Referrals" ], "summary": "Get account referral details", "description": "Get latest referee data for requester's account\n", "operationId": "get-referrals-summary", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.ReferralsResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/system/announcements": { "get": { "tags": [ "System" ], "summary": "Get all announcements", "description": "get announcements", "operationId": "get-announcements", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.Announcement" } } } } ] } } } }, "400": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/system/config": { "get": { "tags": [ "System" ], "summary": "Get system config", "description": "Get clearing and settlement layer config for Paradex\n", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemConfigResponse" } } } } } } }, "/system/state": { "get": { "tags": [ "System" ], "summary": "Get system state", "description": "Get the current state of the Paradex system\n\n## Response\n\n```json\n{\"status\": \"ok\"}\n```\n\n### Status Values\n\n- `ok`: Fully operational\n- `maintenance`: Trading unavailable\n- `cancel_only`: Only cancellations allowed\n\nCheck before trading operations.\n", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemStateResponse" } } } } } } }, "/system/time": { "get": { "tags": [ "System" ], "summary": "Get system time (unix milliseconds)", "description": "Get the current time in the Paradex\n", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemTimeResponse" } } } } } } }, "/tradebusts": { "get": { "tags": [ "Account" ], "summary": "List tradebusts", "description": "Returns paginated tradebusts for the account.\n\nA tradebust occurs when a fill fails to clear and settle on the Paradex Chain.\nThe results of busted fills are not reflected on-chain and are reverted in the\ncloud (off-chain position cache).\n", "operationId": "tradebusts", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.TradebustResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/trades": { "get": { "tags": [ "Trades" ], "summary": "Trade tape", "description": "Returns a paginated list of trades that have occurred on the exchange.\nDefault page size is 100, maximum is 5000.\n\nThe `side` field in the response indicates the taker side of the trade.\n\n### Example\n\n```http\nGET /trades?market=BTC-USD-PERP&page_size=100\n```\n\nThis endpoint supports cursor-based pagination for efficiently traversing large\nresult sets.\n", "operationId": "trades", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "market", "in": "query", "description": "Market name", "required": true, "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 1000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.TradeResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/transactions": { "get": { "tags": [ "Account" ], "summary": "List transactions", "description": "Retrieves a list of transactions initiated by the user\n", "operationId": "transactions", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.TransactionResponse" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/transfers": { "get": { "tags": [ "Transfers" ], "summary": "List account's transfers, i.e. deposits and withdrawals", "operationId": "get-transfers", "parameters": [ { "name": "cursor", "in": "query", "description": "Returns the ‘next’ paginated page.", "schema": { "type": "string" } }, { "name": "end_at", "in": "query", "description": "End Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "page_size", "in": "query", "description": "Limit the number of responses in the page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } }, { "name": "start_at", "in": "query", "description": "Start Time (unix time millisecond)", "schema": { "type": "integer" } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "PENDING", "AVAILABLE", "COMPLETED", "FAILED" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.TransferResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/vaults": { "get": { "tags": [ "Vaults" ], "summary": "Get vaults", "description": "Get list of available vaults.\n", "operationId": "vaults-get", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } }, "post": { "tags": [ "Vaults" ], "summary": "Create vault", "description": "Create a new vault by providing deployment parameters.Current user will\nbe set as owner of the account and a new sub-account will be deployed as\nvault operator.\n", "operationId": "vaults-create", "parameters": [ { "name": "PARADEX-PARENT-ACCOUNT", "in": "header", "description": "Onboarded by prdx:0xa123456789", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "description": "Starknet signature", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "description": "Starknet address", "required": true, "schema": { "type": "string" } }, { "name": "PARADEX-STARKNET-ACCOUNT-DERIVATION-PATH", "in": "header", "description": "Account derivation path - m/44'/9004'/0'/0/1", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Vault parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateVault" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.VaultResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "x-codegen-request-body-name": "params" } }, "/vaults/account-summary": { "get": { "tags": [ "Vaults" ], "summary": "Get vault account summary", "description": "Get current user summary metrics for all vaults or for the single vault\nspecified by address. User metrics are only returned if the current user\nis a depositor for the vault.\n", "operationId": "vaults-get-account-summary", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultAccountSummaryResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/vaults/balance": { "get": { "tags": [ "Vaults" ], "summary": "Get vault balances", "description": "Get spot balance of a vault\n", "operationId": "vaults-get-balance", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "required": true, "schema": { "type": "string" } }, { "name": "strategy", "in": "query", "description": "Vault Strategy Address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.BalanceResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/config": { "get": { "tags": [ "Vaults" ], "summary": "Get vaults config", "description": "Get vaults global configuration.\n", "operationId": "vaults-get-config", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.VaultsConfigResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/history": { "get": { "tags": [ "Vaults" ], "summary": "Get vault historical data", "description": "Get PnL and Account value historical timeseries for the given vault.\n", "operationId": "vaults-get-historical-data", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "required": true, "schema": { "type": "string" } }, { "name": "strategy", "in": "query", "description": "Vault Strategy Address", "schema": { "type": "string" } }, { "name": "type", "in": "query", "description": "Type of data", "required": true, "schema": { "type": "string", "enum": [ "pnl", "value", "price" ] } }, { "name": "resolution", "in": "query", "description": "Resolution of data", "required": true, "schema": { "type": "string", "enum": [ "alltime", "1h", "8h" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultHistoricalDataResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/positions": { "get": { "tags": [ "Vaults" ], "summary": "Get vault positions", "description": "Get positions opened by the given vault.\n", "operationId": "vaults-get-positions", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "required": true, "schema": { "type": "string" } }, { "name": "strategy", "in": "query", "description": "Vault Strategy Address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.PositionResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/summary": { "get": { "tags": [ "Vaults" ], "summary": "Get vault summary", "description": "Get vaults summary metrics for all vaults or for the single vault specified by address.\n", "operationId": "vaults-get-summary", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultSummaryResp" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/transfers": { "get": { "tags": [ "Vaults" ], "summary": "Get vault transfers", "description": "Get deposits and withdrawals related to the given vault.\n", "operationId": "vaults-get-transfers", "parameters": [ { "name": "address", "in": "query", "description": "Vault Address", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.APIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.TransferResult" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/xp/account-balance": { "get": { "tags": [ "XPTransfersV2" ], "summary": "Get XP Balance (V2)", "description": "Get detailed XP balance including earned XP, transfer delta, and transferrable\namount.\n", "operationId": "get-xp-balance-v2", "parameters": [ { "name": "season", "in": "query", "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2)", "schema": { "type": "string", "default": "season2" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetXPBalanceResponseV2" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } }, "/xp/fee-config": { "get": { "tags": [ "XPTransfersV2" ], "summary": "Get Transfer Fee Configuration", "description": "Get the current fee percentage charged on XP transfers", "operationId": "get-transfer-fee-config-v2", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/services.TransferFeeConfigResponse" } } } } } } }, "/xp/public-transfers": { "get": { "tags": [ "XPTransfersV2" ], "summary": "Get Public XP Transfer History", "description": "Retrieve a feed of public XP transfers. Supports filtering by time range or getting the latest transfers based on page_size. Private transfers are excluded from results.", "operationId": "get-public-xp-transfers-v2", "parameters": [ { "name": "start_at", "in": "query", "description": "Start timestamp in milliseconds", "schema": { "type": "integer" } }, { "name": "end_at", "in": "query", "description": "End timestamp in milliseconds", "schema": { "type": "integer" } }, { "name": "season", "in": "query", "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2)", "schema": { "type": "string", "default": "season2" } }, { "name": "cursor", "in": "query", "description": "Pagination cursor", "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Number of results per page", "schema": { "maximum": 50, "minimum": 1, "type": "integer", "default": 50 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.XPTransfer" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/xp/transfer": { "post": { "tags": [ "XPTransfersV2" ], "summary": "Create XP Transfer", "description": "Transfer XP instantly from your account to another user.\n", "operationId": "create-xp-transfer-v2", "requestBody": { "description": "Transfer details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateXPTransferRequest" } } }, "required": true }, "responses": { "201": { "description": "Transfer created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.CreateTransferResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "403": { "description": "Not whitelisted for XP transfers V2", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ], "x-codegen-request-body-name": "request" } }, "/xp/transfer/{transfer_id}": { "get": { "tags": [ "XPTransfersV2" ], "summary": "Get XP Transfer by ID", "description": "Retrieve details of a specific XP transfer by its ID. This is a public endpoint that does not require authentication. Note: Private transfers will return 404 (not found) to maintain privacy.", "operationId": "get-xp-transfer-by-id-v2", "parameters": [ { "name": "transfer_id", "in": "path", "description": "Transfer ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.XPTransfer" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/xp/transfers": { "get": { "tags": [ "XPTransfersV2" ], "summary": "Get XP Transfer History", "description": "Retrieve XP transfer history for the authenticated account with optional\nfiltering by role (sender/recipient).\n", "operationId": "get-xp-transfers-v2", "parameters": [ { "name": "role", "in": "query", "description": "Filter by role", "schema": { "type": "string", "enum": [ "sender", "recipient" ] } }, { "name": "season", "in": "query", "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2)", "schema": { "type": "string", "default": "season2" } }, { "name": "cursor", "in": "query", "description": "Pagination cursor", "schema": { "type": "string" } }, { "name": "page_size", "in": "query", "description": "Number of results per page", "schema": { "maximum": 5000, "minimum": 1, "type": "integer", "default": 100 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/responses.PaginatedAPIResults" }, { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.XPTransfer" } } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } }, "security": [ { "BearerToken": [] } ] } } }, "components": { "schemas": { "messagesv1.NftPrice": { "type": "object", "properties": { "currency": { "type": "string" }, "decimals": { "type": "integer" }, "value": { "type": "string" } } }, "requests.AccountMarginRequest": { "required": [ "leverage", "margin_type" ], "type": "object", "properties": { "leverage": { "type": "integer", "description": "Leverage value (1 up to market's maximum leverage)", "example": 10 }, "margin_type": { "type": "string", "description": "Margin type (CROSS or ISOLATED)", "example": "CROSS" }, "on_behalf_of_account": { "type": "string", "description": "Specify sub-account ID to set margin for, if not provided, it will be the main account itself", "example": "0x1234567890abcdef" } } }, "requests.AlgoOrderRequest": { "required": [ "algo_type", "duration_seconds", "market", "side", "signature", "signature_timestamp", "size", "type" ], "type": "object", "properties": { "algo_type": { "type": "string", "description": "Algo type, required for algo orders creation", "example": "TWAP" }, "duration_seconds": { "type": "integer", "description": "Duration in seconds for which the algo order will be running, required for algo orders creation", "example": 3600 }, "market": { "type": "string", "description": "Market for which order is created", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "type": "string", "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "example": "0x1234567890abcdef" }, "recv_window": { "type": "integer", "description": "Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds" }, "side": { "type": "object", "description": "Algo order side", "example": "MARKET", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "signature": { "type": "string", "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key" }, "signature_timestamp": { "type": "integer", "description": "Unix timestamp in milliseconds of order creation, used for signature verification" }, "size": { "type": "string", "description": "Size of the algo order", "example": "1.213" }, "type": { "type": "object", "description": "Algo order type, only MARKET is supported", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] } } }, "requests.BlockExecuteRequest": { "required": [ "execution_nonce", "signatures" ], "type": "object", "properties": { "execution_nonce": { "type": "string", "description": "Unique nonce for this execution request", "example": "execution_001" }, "selected_offers": { "type": "array", "description": "Array of offer IDs selected for execution (offers are atomic, not partial)", "items": { "type": "string" } }, "signatures": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" }, "description": "Map of offer IDs to initiator signatures accepting each offer. Block id if it is a direct block trade." } } }, "requests.BlockOfferInfo": { "required": [ "offerer_order", "price", "size" ], "type": "object", "properties": { "offerer_order": { "type": "object", "description": "Order details from the offering account", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "price": { "type": "string", "description": "Offered price for this market", "example": "30050.00" }, "size": { "type": "string", "description": "Offered size for this market", "example": "5.0" } } }, "requests.BlockOfferRequest": { "required": [ "nonce", "offering_account", "signature", "trades" ], "type": "object", "properties": { "nonce": { "type": "string", "description": "Unique nonce for this offer request", "example": "98765" }, "offering_account": { "type": "string", "description": "Starknet address of the account making this offer", "example": "0xabcdef1234567890" }, "signature": { "type": "object", "description": "Cryptographic signature authorizing this offer", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeSignature" } ] }, "trades": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/requests.BlockOfferInfo" }, "description": "Map of market symbol to offer details" } } }, "requests.BlockTradeInfo": { "type": "object", "properties": { "maker_order": { "type": "object", "description": "Maker order details (empty if requiring offers)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "price": { "type": "string", "description": "Agreed price for this trade (empty if requiring offers)", "example": "30000.00" }, "size": { "type": "string", "description": "Agreed size for this trade (empty if requiring offers)", "example": "10.5" }, "taker_order": { "type": "object", "description": "Taker order details (empty if requiring offers)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "trade_constraints": { "type": "object", "description": "Constraints for this trade when requiring offers", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeConstraints" } ] } } }, "requests.BlockTradeRequest": { "required": [ "block_expiration", "nonce", "required_signers", "signatures", "trades" ], "type": "object", "properties": { "block_expiration": { "type": "integer", "description": "Unix timestamp in milliseconds when block expires", "example": 1640995800000 }, "nonce": { "type": "string", "description": "Unique nonce for this block trade request", "example": "67890" }, "required_signers": { "type": "array", "description": "List of accounts that can participate in the block trade", "items": { "type": "string" } }, "signatures": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" }, "description": "Map of account addresses to their signatures. Can be empty or partial." }, "trades": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/requests.BlockTradeInfo" }, "description": "Map of market symbol to trade info (one per market)" } } }, "requests.CancelOrderBatchRequest": { "type": "object", "properties": { "client_order_ids": { "type": "array", "description": "List of client order IDs to cancel", "example": [ "[\"client-id-1\"", "\"client-id-2\"]" ], "items": { "type": "string" } }, "order_ids": { "type": "array", "description": "List of order IDs to cancel", "example": [ "[\"order-id-1\"", "\"order-id-2\"]" ], "items": { "type": "string" } } } }, "requests.CreateSubkey": { "type": "object", "properties": { "name": { "type": "string", "description": "User-friendly name for the subkey.", "example": "My Trading Subkey" }, "public_key": { "type": "string", "description": "Public key to be registered as a subkey.", "example": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9" } } }, "requests.CreateToken": { "type": "object", "properties": { "expiry_duration": { "type": "integer", "description": "Duration in seconds from now until expiration (1 min to 1 year).", "example": 86400 }, "name": { "type": "string", "description": "User-friendly name for the JWT token.", "example": "My Long-term Trading Token" }, "token_type": { "type": "string", "description": "Type of token to create." } } }, "requests.CreateVault": { "type": "object", "properties": { "deposit_tx_signature": { "type": "string", "description": "Initial deposit transfer by vault owner", "example": "[" }, "description": { "type": "string", "description": "Description for the vault", "example": "My vault description" }, "lockup_period": { "type": "integer", "description": "User's deposits lockup period in days", "example": 1 }, "max_tvl": { "type": "integer", "description": "Max TVL locked by the Vault, if any. 0 for unlimited", "example": 1000000 }, "name": { "type": "string", "description": "Unique name for the vault", "example": "MyVault" }, "profit_share": { "type": "integer", "description": "Vault owner profit share (percentage)", "example": 10 }, "public_key": { "type": "string", "description": "Public key of vault operator", "example": "0x1234567890abcdef" } } }, "requests.CreateXPTransferRequest": { "required": [ "amount", "recipient" ], "type": "object", "properties": { "amount": { "minimum": 1, "type": "integer", "description": "Amount of XP to transfer (must be >= 1)", "example": 100 }, "is_private": { "type": "boolean", "description": "Whether the transfer is private (not shown on public feeds). Defaults to false if not provided.", "example": false, "default": false }, "recipient": { "type": "string", "description": "Recipient's Starknet address (hex format)", "example": "0x1234567890abcdef0123456789abcdef" }, "season": { "type": "string", "description": "Season identifier. Defaults to season2 if not provided.", "example": "season2", "default": "season2" } } }, "requests.ModifyOrderRequest": { "required": [ "id", "market", "price", "side", "signature", "signature_timestamp", "size", "type" ], "type": "object", "properties": { "id": { "type": "string", "description": "Order ID to be modified" }, "market": { "type": "string", "description": "Market for which order is modified", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "type": "string", "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "example": "0x1234567890abcdef" }, "price": { "type": "string", "description": "Existing or modified price of the order", "example": "29500.12" }, "side": { "type": "string", "description": "Existing side of the order", "example": "BUY" }, "signature": { "type": "string", "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key" }, "signature_timestamp": { "type": "integer", "description": "Unix timestamp in milliseconds of order creation, used for signature verification" }, "size": { "type": "string", "description": "Existing or modified size of the order", "example": "1.213" }, "trigger_price": { "type": "string", "description": "Existing or modified trigger price of a TPSL order", "example": "29500.12" }, "type": { "type": "string", "description": "Existing type of the order", "example": "LIMIT" } } }, "requests.Onboarding": { "type": "object", "properties": { "marketing_code": { "type": "string", "description": "Marketing code of the campaign the user is being onboarded via.", "example": "abcd:code1" }, "public_key": { "type": "string", "description": "Public key of the user being onboarded.", "example": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9" }, "referral_code": { "type": "string", "description": "Referral code of the user who referred the user being onboarded.", "example": "cryptofox8" }, "utm": { "type": "object", "description": "UTM tracking parameters (optional).", "allOf": [ { "$ref": "#/components/schemas/requests.Utm" } ] } } }, "requests.OrderRequest": { "required": [ "instruction", "market", "price", "side", "signature", "signature_timestamp", "size", "type" ], "type": "object", "properties": { "client_id": { "maxLength": 64, "type": "string", "description": "Unique client assigned ID for the order", "example": "123454321" }, "flags": { "type": "array", "description": "Order flags, allow flag: REDUCE_ONLY", "items": { "$ref": "#/components/schemas/responses.OrderFlag" } }, "instruction": { "type": "object", "description": "Order Instruction, GTC, IOC, RPI or POST_ONLY if empty GTC", "allOf": [ { "$ref": "#/components/schemas/responses.OrderInstruction" } ] }, "market": { "type": "string", "description": "Market for which order is created", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "type": "string", "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "example": "0x1234567890abcdef" }, "price": { "type": "string", "description": "Order price", "example": "29500.12" }, "recv_window": { "type": "integer", "description": "Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds" }, "side": { "type": "object", "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "signature": { "type": "string", "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key" }, "signature_timestamp": { "type": "integer", "description": "Unix timestamp in milliseconds of order creation, used for signature verification" }, "size": { "type": "string", "description": "Size of the order", "example": "1.213" }, "stp": { "type": "string", "description": "Self Trade Prevention, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH, if empty EXPIRE_TAKER" }, "trigger_price": { "type": "string", "description": "Trigger price for stop order" }, "type": { "type": "object", "description": "Order type", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] }, "vwap_price": { "type": "string", "description": "Optional VWAP price for market orders used for VWAP instruction, bounded by price band" } } }, "requests.PriceKind": { "type": "string", "enum": [ "last", "mark", "underlying" ], "x-enum-varnames": [ "PriceKindLast", "PriceKindMark", "PriceKindUnderlying" ] }, "requests.UpdateAccountMaxSlippageRequest": { "required": [ "max_slippage" ], "type": "object", "properties": { "max_slippage": { "type": "string" } } }, "requests.UpdateAccountProfileRequest": { "type": "object", "properties": { "announcements": { "type": "boolean", "example": false }, "fill_sound": { "type": "boolean", "example": true }, "fills": { "type": "boolean", "example": true }, "is_username_private": { "type": "boolean", "example": true }, "max_slippage": { "type": "string" }, "orders": { "type": "boolean", "example": true }, "referral_code": { "type": "string", "example": "referral_code" }, "referred_by": { "type": "string", "example": "referral_code" }, "size_currency_display": { "type": "string" }, "tap_share_rate": { "type": "string", "example": "0.2" }, "trading_value_display": { "type": "string" }, "transfers": { "type": "boolean", "example": true }, "username": { "type": "string", "example": "username" }, "xp_share_rate": { "type": "string", "example": "0.2" } } }, "requests.UpdateNotificationPreferencesRequest": { "type": "object", "properties": { "announcements": { "type": "boolean", "example": false }, "fill_sound": { "type": "boolean", "example": true }, "fills": { "type": "boolean", "example": true }, "orders": { "type": "boolean", "example": true }, "transfers": { "type": "boolean", "example": true } } }, "requests.UpdateSizeCurrencyDisplayRequest": { "required": [ "size_currency_display" ], "type": "object", "properties": { "size_currency_display": { "type": "string" } } }, "requests.UpdateTradingValueDisplayRequest": { "required": [ "trading_value_display" ], "type": "object", "properties": { "trading_value_display": { "type": "string" } } }, "requests.Utm": { "type": "object", "properties": { "campaign": { "type": "string", "description": "UTM campaign parameter", "example": "summer2024" }, "source": { "type": "string", "description": "UTM source parameter", "example": "google" }, "type": { "type": "string", "description": "UTM type parameter", "example": "clickthrough" } } }, "responses.APIResults": { "type": "object", "properties": { "results": { "type": "array", "description": "Array of results", "items": { "type": "object", "properties": {} } } } }, "responses.AccountHistoricalDataResp": { "type": "object", "properties": { "data": { "type": "array", "description": "Ordered list of datapoints", "items": { "type": "number" } }, "timestamps": { "type": "array", "description": "Ordered list of timestamps", "items": { "type": "integer" } } } }, "responses.AccountInfoResponse": { "type": "object", "properties": { "account": { "type": "string", "description": "Starknet address of the account", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "created_at": { "type": "integer", "description": "Account creation time", "example": 1681471234972 }, "derivation_path": { "type": "string", "description": "Account derivation path used to derive the account, if a sub-account", "example": "m/44'/9004'/0'/0/1" }, "fees": { "$ref": "#/components/schemas/responses.Fees" }, "isolated_market": { "type": "string", "description": "Isolated market for the account", "example": "ETHUSD-PERP" }, "kind": { "type": "object", "description": "Account kind", "example": "main", "allOf": [ { "$ref": "#/components/schemas/responses.AccountKind" } ] }, "parent_account": { "type": "string", "description": "Starknet address of the parent account", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d" }, "public_key": { "type": "string", "description": "Starknet public key", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d" }, "username": { "type": "string", "description": "Username of the account", "example": "username" } } }, "responses.AccountKind": { "type": "string", "enum": [ "", "main", "subaccount", "vault_operator", "vault_sub_operator" ], "x-enum-varnames": [ "AccountKindUnspecified", "AccountKindMain", "AccountKindSubaccount", "AccountKindVaultOperator", "AccountKindVaultSubOperator" ] }, "responses.AccountMarginEntry": { "type": "object", "properties": { "isolated_margin_leverage": { "type": "integer", "description": "Isolated margin leverage" }, "leverage": { "type": "integer", "description": "Leverage value" }, "margin_type": { "type": "string", "description": "Margin type (CROSS/ISOLATED)" }, "market": { "type": "string", "description": "Market symbol" } } }, "responses.AccountProfileResp": { "type": "object", "properties": { "discord": { "$ref": "#/components/schemas/responses.DiscordProfile" }, "is_username_private": { "type": "boolean", "example": true }, "market_max_slippage": { "type": "object", "additionalProperties": { "type": "string" } }, "marketed_by": { "type": "string", "example": "maxDegen" }, "nfts": { "type": "array", "items": { "$ref": "#/components/schemas/responses.Nft" } }, "notifications": { "$ref": "#/components/schemas/responses.NotificationPreferencesResp" }, "referral": { "$ref": "#/components/schemas/responses.ReferralConfigResp" }, "referral_code": { "type": "string", "example": "cryptofox8" }, "referred_by": { "type": "string", "example": "maxDegen" }, "size_currency_display": { "type": "string", "example": "BASE" }, "tap_share_rate": { "$ref": "#/components/schemas/responses.ShareRateResp" }, "tap_status": { "type": "string", "description": "TAP affiliate status: \"NONE\", \"ACTIVE\", or \"INACTIVE\"" }, "twitter": { "$ref": "#/components/schemas/responses.TwitterProfile" }, "twitter_following": { "type": "object", "additionalProperties": { "type": "boolean" } }, "username": { "type": "string", "example": "username" }, "xp_share_rate": { "$ref": "#/components/schemas/responses.ShareRateResp" } } }, "responses.AccountSettingsResp": { "type": "object", "properties": { "trading_value_display": { "type": "string", "example": "SPOT_NOTIONAL" } } }, "responses.AccountSummaryResponse": { "type": "object", "properties": { "account": { "type": "string", "description": "User's starknet account", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "account_value": { "type": "string", "description": "Current account value [with unrealized P&Ls]", "example": "136285.06918911" }, "free_collateral": { "type": "string", "description": "Free collateral available (Account value in excess of Initial Margin required)", "example": "73276.47229774" }, "initial_margin_requirement": { "type": "string", "description": "Amount required to open trade for the existing positions", "example": "63008.59689218" }, "maintenance_margin_requirement": { "type": "string", "description": "Amount required to maintain exisiting positions", "example": "31597.25239676" }, "margin_cushion": { "type": "string", "description": "Acc value in excess of maintenance margin required", "example": "104687.8167956" }, "seq_no": { "type": "integer", "description": "Unique increasing number (non-sequential) that is assigned to this account update. Can be used to deduplicate multiple feeds", "example": 1681471234972000000 }, "settlement_asset": { "type": "string", "description": "Settlement asset for the account", "example": "USDC" }, "status": { "type": "string", "description": "Status of the acc - like ACTIVE, LIQUIDATION", "example": "ACTIVE" }, "total_collateral": { "type": "string", "description": "User's total collateral", "example": "123003.62047353" }, "updated_at": { "type": "integer", "description": "Account last updated time", "example": 1681471234972 } } }, "responses.AlgoOrderResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Account identifier (user's account address)", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512" }, "algo_type": { "type": "object", "description": "Algo type", "example": "TWAP", "allOf": [ { "$ref": "#/components/schemas/responses.AlgoType" } ] }, "avg_fill_price": { "type": "string", "description": "Average fill price of the order", "example": "26000" }, "cancel_reason": { "type": "string", "description": "Reason for algo cancellation if it was closed by cancel", "example": "NOT_ENOUGH_MARGIN" }, "created_at": { "type": "integer", "description": "Algo creation time", "example": 1681493746016 }, "end_at": { "type": "integer", "description": "Algo end time", "example": 1681493746016 }, "id": { "type": "string", "description": "Unique algo identifier", "example": "123456" }, "last_updated_at": { "type": "integer", "description": "Algo last update time. No changes once status=CLOSED", "example": 1681493746016 }, "market": { "type": "string", "description": "Market to which algo belongs", "example": "BTC-USD-PERP" }, "remaining_size": { "type": "string", "description": "Remaining size of the algo", "example": "0" }, "side": { "type": "object", "description": "Algo side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "type": "string", "description": "Algo size", "example": "0.05" }, "status": { "type": "object", "description": "Algo status", "allOf": [ { "$ref": "#/components/schemas/responses.OrderStatus" } ] } } }, "responses.AlgoType": { "type": "string", "enum": [ "", "TWAP" ], "x-enum-varnames": [ "AlgoTypeUnspecified", "AlgoTypeTWAP" ] }, "responses.Announcement": { "type": "object", "properties": { "content": { "type": "string", "description": "Full announcement content in Markdown format" }, "expiry_at": { "type": "integer", "description": "Announcement expiry timestamp at page" }, "kind": { "type": "object", "description": "Type of announcement (e.g., Listing)", "allOf": [ { "$ref": "#/components/schemas/responses.AnnouncementKind" } ] }, "notification_expiry_at": { "type": "integer", "description": "Announcement expiry timestamp at notification" }, "title": { "type": "string", "description": "Short, descriptive title of the announcement" }, "visible_at": { "type": "integer", "description": "Announcement visible timestamp" } } }, "responses.AnnouncementKind": { "type": "string", "enum": [ "UPDATE", "LISTING", "DELISTING" ], "x-enum-varnames": [ "AnnouncementKindUpdate", "AnnouncementKindListing", "AnnouncementKindDelisting" ] }, "responses.ApiError": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "description": "any additional data related to the error" }, "error": { "type": "object", "description": "unique immutable string identifier for specific error", "example": "NOT_ONBOARDED", "allOf": [ { "$ref": "#/components/schemas/responses.ErrorCode" } ] }, "message": { "type": "string", "description": "detailed description of error and how to address it", "example": "User has never called /onboarding endpoint" } } }, "responses.ApiToken": { "type": "object", "properties": { "created_at": { "type": "integer", "description": "Token creation timestamp (nanoseconds since epoch)", "example": 1640995200 }, "expiry_at": { "type": "integer", "description": "Expiration timestamp (nanoseconds since epoch)", "example": 1672531200 }, "kind": { "type": "string", "description": "Token type (jwt, api_key, etc.)" }, "last_updated_at": { "type": "integer", "description": "Last modification timestamp (nanoseconds since epoch)", "example": 1640995200 }, "lookup_id": { "type": "string", "description": "Identifier used for the token lookup", "example": "uuid-123" }, "name": { "type": "string", "description": "User-provided token name", "example": "My API Token" }, "revoked_at": { "type": "integer", "description": "Revocation timestamp (nanoseconds since epoch, 0 if not revoked)", "example": 0 }, "token_id": { "type": "string", "description": "Unique ID for the auth token", "example": "token_123" } } }, "responses.AskBidArray": { "type": "object", "properties": { "asks": { "type": "array", "description": "List of Ask sizes and prices", "items": { "type": "array", "items": { "type": "string" } } }, "best_ask_api": { "type": "array", "description": "Size on the best ask from API (excluding RPI)", "example": [ "10.5" ], "items": { "type": "string" } }, "best_ask_interactive": { "type": "array", "description": "Size on the best ask from UI", "example": [ "10.5" ], "items": { "type": "string" } }, "best_bid_api": { "type": "array", "description": "Size on the best bid from API (excluding RPI)", "example": [ "10.5" ], "items": { "type": "string" } }, "best_bid_interactive": { "type": "array", "description": "Size on the best bid from UI", "example": [ "10.5" ], "items": { "type": "string" } }, "bids": { "type": "array", "description": "List of Bid sizes and prices", "items": { "type": "array", "items": { "type": "string" } } }, "last_updated_at": { "type": "integer", "description": "Last update to the orderbook in milliseconds", "example": 1681462770114 }, "market": { "type": "string", "description": "Market name", "example": "ETH-USD-PERP" }, "seq_no": { "type": "integer", "description": "Sequence number of the orderbook", "example": 20784 } } }, "responses.AuthResp": { "type": "object", "properties": { "jwt_token": { "type": "string", "description": "Authentication token", "example": "eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJ0eXAiOiJhdCtKV1QiLCJleHAiOjE2ODE0NTI5MDcsImlhdCI6MTY4MTQ1MjYwNywiaXNzIjoiUGFyYWRleCBzdGFnaW5nIiwic3ViIjoiMHg0OTVkMmViNTIzNmExMmI4YjRhZDdkMzg0OWNlNmEyMDNjZTIxYzQzZjQ3M2MyNDhkZmQ1Y2U3MGQ5NDU0ZmEifQ.BPihIbGhnnsuPlReqC9x12JFXldpswg5EdA6tTiDQm-_UHaRz_8RfVBqWc2fPN6CzFsXTq7GowZu-2qMxPvZK_fGcxEhTp2k1r8MUxowlUIT4vPu2scCwrsyIujlCAwS" } } }, "responses.BBOResp": { "type": "object", "properties": { "ask": { "type": "string", "description": "Best ask price", "example": "30130.15" }, "ask_size": { "type": "string", "description": "Best ask size", "example": "0.05" }, "bid": { "type": "string", "description": "Best bid price", "example": "30112.22" }, "bid_size": { "type": "string", "description": "Best bid size", "example": "0.04" }, "last_updated_at": { "type": "integer", "description": "Last update to the orderbook in milliseconds", "example": 1681493939981 }, "market": { "type": "string", "description": "Symbol of the market", "example": "BTC-USD-PERP" }, "seq_no": { "type": "integer", "description": "Sequence number of the orderbook", "example": 20784 } } }, "responses.BalanceResp": { "type": "object", "properties": { "last_updated_at": { "type": "integer", "description": "Balance last updated time", "example": 1681462770114 }, "size": { "type": "string", "description": "Balance amount of settlement token (includes deposits, withdrawals, realized PnL, realized funding, and fees)", "example": "123003.620" }, "token": { "type": "string", "description": "Name of the token", "example": "USDC" } } }, "responses.BatchResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/responses.ErrorResponse" } }, "orders": { "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderResp" } } } }, "responses.BlockTradeConstraints": { "type": "object", "properties": { "max_price": { "type": "string", "description": "Maximum price allowed", "example": "31000.00" }, "max_size": { "type": "string", "description": "Maximum trade size allowed", "example": "100.0" }, "min_price": { "type": "string", "description": "Minimum price allowed", "example": "29000.00" }, "min_size": { "type": "string", "description": "Minimum trade size allowed", "example": "0.1" } } }, "responses.BlockTradeDetailFullResponse": { "type": "object", "properties": { "block_expiration": { "type": "integer", "description": "Unix timestamp in milliseconds when block expires", "example": 1640995800000 }, "block_id": { "type": "string", "description": "Backend-generated unique identifier", "example": "block_456" }, "block_type": { "type": "object", "description": "Block type", "example": "OFFER_BASED", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeType" } ] }, "created_at": { "type": "integer", "description": "When block was created", "example": 1640995200000 }, "initiator": { "type": "string", "description": "Account that initiated this block trade", "example": "0x123...abc" }, "last_updated_at": { "type": "integer", "description": "When block was last updated", "example": 1640995400000 }, "nonce": { "type": "string", "description": "Original block nonce", "example": "67890" }, "parent_block_id": { "type": "string", "description": "Parent block ID (if offer-based)", "example": "block_123" }, "required_signers": { "type": "array", "description": "List of accounts that can participate in the block trade", "items": { "type": "string" } }, "signatures": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" }, "description": "Current signatures on this block (for signature verification)" }, "status": { "type": "object", "description": "Current status of the block trade", "example": "COMPLETED", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeStatus" } ] }, "trades": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeDetailResponse" }, "description": "Map of market to trade details" } } }, "responses.BlockTradeDetailResponse": { "type": "object", "properties": { "executed_at": { "type": "integer", "description": "When this trade was executed", "example": 1640995500000 }, "failure_reason": { "type": "string", "description": "Reason for failure (if failed)" }, "maker_account": { "type": "string", "description": "Maker account (if fully executable)", "example": "0x123...abc" }, "maker_fill": { "type": "object", "description": "Execution details (if executed)", "allOf": [ { "$ref": "#/components/schemas/responses.FillResult" } ] }, "maker_order": { "type": "object", "description": "Original maker order (for signature generation)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "market": { "type": "string", "description": "Trading pair for this trade", "example": "BTC-USD-PERP" }, "price": { "type": "string", "description": "Agreed price (if fully executable)", "example": "30000.00" }, "size": { "type": "string", "description": "Agreed size (if fully executable)", "example": "10.5" }, "taker_account": { "type": "string", "description": "Taker account (if fully executable)", "example": "0x456...def" }, "taker_fill": { "type": "object", "description": "Execution details (if executed)", "allOf": [ { "$ref": "#/components/schemas/responses.FillResult" } ] }, "taker_order": { "type": "object", "description": "Original taker order (for signature generation)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "trade_constraints": { "type": "object", "description": "Constraints for offers (if offer-based)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeConstraints" } ] }, "trade_id": { "type": "string", "description": "Backend-generated unique identifier for this trade", "example": "trade_123" } } }, "responses.BlockTradeOrder": { "required": [ "side", "type" ], "type": "object", "properties": { "client_id": { "type": "string", "description": "Client-provided identifier", "example": "order_123" }, "market": { "type": "string", "description": "Trading pair for this order", "example": "BTC-USD-PERP" }, "price": { "type": "string", "description": "Order price (omitted for market orders)", "example": "30000.00" }, "side": { "type": "object", "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "signature": { "type": "string", "description": "Order signature", "example": "0xabc123..." }, "signature_timestamp": { "type": "integer", "description": "When order was signed", "example": 1640995200000 }, "size": { "type": "string", "description": "Order size", "example": "10.5" }, "type": { "type": "object", "description": "Order type", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] } } }, "responses.BlockTradeSignature": { "required": [ "nonce", "signature_data", "signature_expiration", "signature_timestamp", "signature_type", "signer_account" ], "type": "object", "properties": { "nonce": { "type": "string", "description": "Unique nonce to prevent replay attacks", "example": "12345" }, "signature_data": { "type": "string", "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key", "example": "0xabc123..." }, "signature_expiration": { "type": "integer", "description": "Unix timestamp in milliseconds when signature expires", "example": 1640995800000 }, "signature_timestamp": { "type": "integer", "description": "Unix timestamp in milliseconds when signature was created", "example": 1640995200000 }, "signature_type": { "type": "string", "description": "Type of cryptographic signature used", "example": "STARKNET", "enum": [ "STARKNET" ] }, "signer_account": { "type": "string", "description": "Starknet account address of the signer", "example": "0x1234567890abcdef" } } }, "responses.BlockTradeStatus": { "type": "string", "enum": [ "CREATED", "OFFER_COLLECTION", "READY_TO_EXECUTE", "EXECUTING", "COMPLETED", "FAILED", "CANCELLED" ], "x-enum-varnames": [ "BlockTradeStatusCreated", "BlockTradeStatusOfferCollection", "BlockTradeStatusReadyToExecute", "BlockTradeStatusExecuting", "BlockTradeStatusCompleted", "BlockTradeStatusFailed", "BlockTradeStatusCancelled" ] }, "responses.BlockTradeType": { "type": "string", "enum": [ "DIRECT", "OFFER_BASED" ], "x-enum-varnames": [ "BlockTradeTypeDirect", "BlockTradeTypeOffer" ] }, "responses.BridgedToken": { "type": "object", "properties": { "decimals": { "type": "integer" }, "l1_bridge_address": { "type": "string" }, "l1_token_address": { "type": "string" }, "l2_bridge_address": { "type": "string" }, "l2_token_address": { "type": "string" }, "name": { "type": "string" }, "symbol": { "type": "string" } } }, "responses.CancelOrderBatchResponse": { "type": "object", "properties": { "results": { "type": "array", "description": "List of cancellation results", "items": { "$ref": "#/components/schemas/responses.CancelOrderResult" } } } }, "responses.CancelOrderResult": { "type": "object", "properties": { "account": { "type": "string", "description": "Account that owns the order" }, "client_id": { "type": "string", "description": "Client order ID" }, "id": { "type": "string", "description": "Order ID" }, "market": { "type": "string", "description": "Market of the order" }, "status": { "type": "string", "description": "Status of the cancellation: QUEUED_FOR_CANCELLATION, ALREADY_CLOSED, NOT_FOUND" } } }, "responses.CreateTokenResponse": { "type": "object", "properties": { "api_token": { "type": "object", "description": "The token metadata", "allOf": [ { "$ref": "#/components/schemas/responses.ApiToken" } ] }, "token": { "type": "string", "description": "The generated JWT token", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } }, "responses.CreateTransferResponse": { "type": "object", "properties": { "transfer": { "type": "object", "description": "The created XP transfer", "allOf": [ { "$ref": "#/components/schemas/responses.XPTransfer" } ] } } }, "responses.Delta1CrossMarginParams": { "type": "object", "properties": { "imf_base": { "type": "string", "description": "Initial Margin Base", "example": "0.11" }, "imf_factor": { "type": "string", "description": "Initial Margin Factor, always 0.", "example": "0" }, "imf_shift": { "type": "string", "description": "Initial Margin Shift, unused, always 0.", "example": "0" }, "mmf_factor": { "type": "string", "description": "Maintenance Margin Factor", "example": "0.51" } } }, "responses.DiscordProfile": { "type": "object", "properties": { "id": { "type": "string" }, "image_url": { "type": "string" }, "username": { "type": "string" } } }, "responses.ErrorCode": { "type": "string", "enum": [ "VALIDATION_ERROR", "BINDING_ERROR", "INTERNAL_ERROR", "NOT_FOUND", "SERVICE_UNAVAILABLE", "INVALID_REQUEST_PARAMETER", "ORDER_ID_NOT_FOUND", "ORDER_IS_CLOSED", "ORDER_IS_NOT_OPEN", "INVALID_ORDER_SIZE", "CLIENT_ORDER_ID_NOT_FOUND", "DUPLICATED_CLIENT_ID", "INVALID_PRICE_PRECISION", "INVALID_SYMBOL", "INVALID_TOKEN", "INVALID_ETHEREUM_ADDRESS", "INVALID_ETHEREUM_SIGNATURE", "INVALID_STARKNET_ADDRESS", "INVALID_STARKNET_SIGNATURE", "STARKNET_SIGNATURE_VERIFICATION_FAILED", "BAD_STARKNET_REQUEST", "ETHEREUM_SIGNER_MISMATCH", "ETHEREUM_HASH_MISMATCH", "NOT_ONBOARDED", "INVALID_TIMESTAMP", "INVALID_BLOCK_EXPIRATION", "ACCOUNT_NOT_FOUND", "INVALID_ORDER_SIGNATURE", "PUBLIC_KEY_INVALID", "UNAUTHORIZED_ETHEREUM_ADDRESS", "UNAUTHORIZED_ERROR", "ETHEREUM_ADDRESS_ALREADY_ONBOARDED", "MARKET_NOT_FOUND", "ALLOWLIST_ENTRY_NOT_FOUND", "USERNAME_IN_USE", "GEO_IP_BLOCK", "ETHEREUM_ADDRESS_BLOCKED", "PROGRAM_NOT_FOUND", "PROGRAM_NOT_SUPPORTED", "INVALID_DASHBOARD", "MARKET_NOT_OPEN", "INVALID_REFERRAL_CODE", "REQUEST_NOT_ALLOWED", "PARENT_ADDRESS_ALREADY_ONBOARDED", "INVALID_PARENT_ACCOUNT", "INVALID_VAULT_OPERATOR_CHAIN", "VAULT_OPERATOR_ALREADY_ONBOARDED", "VAULT_NAME_IN_USE", "VAULT_NOT_FOUND", "VAULT_STRATEGY_NOT_FOUND", "VAULT_LIMIT_REACHED", "BATCH_SIZE_OUT_OF_RANGE", "ISOLATED_MARKET_ACCOUNT_MISMATCH", "NO_ACCESS_TO_MARKET", "POINTS_SUMMARY_NOT_FOUND", "ALGO_ID_NOT_FOUND", "INVALID_DERIVATION_PATH", "PROFILE_STATS_NOT_FOUND", "INVALID_CHAIN", "INVALID_LAYERSWAP_SWAP", "INVALID_RHINOFI_REQUEST", "INVALID_RHINOFI_QUOTE", "INVALID_RHINOFI_QUOTE_COMMIT", "SOCIAL_USERNAME_IN_USE", "INVALID_OAUTH_REQUEST", "RPI_ACCOUNT_NOT_WHITELISTED", "SYSTEM_STATUS_POST_ONLY", "SYSTEM_STATUS_CANCEL_ONLY", "INVALID_MARKETING_CODE", "INVALID_JOIN_WAITLIST_REQUEST", "TRANSACTION_NOT_FOUND", "OFFER_NOT_FOUND", "MARKET_MARGIN_RESTRICTED", "NOT_UNIQUE", "ACCOUNT_ALREADY_REFERRED", "ONBOARDING_PERIOD_EXPIRED", "ONBOARDING_RATE_LIMITED", "SUBACCOUNTS_LIMIT_EXCEEDED", "INSUFFICIENT_MIN_CHAIN_BALANCE", "INVALID_SUBKEY", "TOKEN_LIMIT_REACHED", "INVALID_TOKEN_SCOPE", "INSUFFICIENT_TRANSFERRABLE_XP", "TRANSFER_LIMIT_REACHED" ], "x-enum-comments": { "ErrorCodeString_SignerMismatch": "#nosec G101" }, "x-enum-varnames": [ "ErrorCode_Validation", "ErrorCode_Binding", "ErrorCode_InternalError", "ErrorCode_NotFound", "ErrorCode_ServiceUnavailable", "ErrorCodeString_InvalidParameter", "ErrorCodeString_OrderIdNotFound", "ErrorCodeString_OrderIsClosed", "ErrorCodeString_OrderIsNotOpen", "ErrorCodeString_InvalidSizeForModifyOrder", "ErrorCodeString_ClientOrderIdNotFound", "ErrorCodeString_DuplicatedClientOrderId", "ErrorCodeString_InvalidPricePrecision", "ErrorCodeString_InvalidSymbol", "ErrorCodeString_InvalidToken", "ErrorCodeString_BadEthAddress", "ErrorCodeString_BadEthSignature", "ErrorCodeString_BadStarkNetAddress", "ErrorCodeString_BadStarkNetSignature", "ErrorCodeString_StarknetSigVerificationFailed", "ErrorCodeString_BadFormatStarknetCall", "ErrorCodeString_SignerMismatch", "ErrorCodeString_HashMismatch", "ErrorCodeString_NotOnboarded", "ErrorCodeString_BadTimestamp", "ErrorCodeString_BadExpiration", "ErrorCodeString_AccountIdNotFound", "ErrorCodeString_InvalidOrderSignature", "ErrorCodeString_BadPublicKey", "ErrorCodeString_UnauthorizedEthAddress", "ErrorCodeString_UnauthorizedError", "ErrorCodeString_EthAddressAlreadyOnboarded", "ErrorCodeString_MarketNotFound", "ErrorCodeString_AllowlistNotFound", "ErrorCodeString_UsernameInUse", "ErrorCodeString_GeoIPBlock", "ErrorCodeString_EthAddressBlocked", "ErrorCodeString_ProgramNotFound", "ErrorCodeString_ProgramNotSupported", "ErrorCodeString_InvalidDashboard", "ErrorCodeString_MarketNotOpen", "ErrorCodeString_InvalidReferralCode", "ErrorCodeString_RequestNotAllowed", "ErrorCodeString_ParentAddressAlreadyOnboarded", "ErrorCodeString_InvalidParentAccount", "ErrorCodeString_InvalidVaultOperatorChain", "ErrorCodeString_VaultOperatorAlreadyOnboarded", "ErrorCodeString_VaultNameInUse", "ErrorCodeString_VaultNotFound", "ErrorCodeString_VaultStrategyNotFound", "ErrorCodeString_VaultLimitReached", "ErrorCodeString_BatchSizeOutOfRange", "ErrorCodeString_IsolatedMarketAccountMismatch", "ErrorCodeString_NoAccessToMarket", "ErrorCodeString_PointsSummaryNotFound", "ErrorCodeString_AlgoIdNotFound", "ErrorCodeString_InvalidDerivationPath", "ErrorCodeString_ProfileStatsNotFound", "ErrorCodeString_InvalidChain", "ErrorCodeString_InvalidLayerswapSwap", "ErrorCodeString_InvalidRhinofiRequest", "ErrorCodeString_InvalidRhinofiQuote", "ErrorCodeString_InvalidRhinofiQuoteCommit", "ErrorCodeString_SocialUsernameInUse", "ErrorCodeString_InvalidOAuthRequest", "ErrorCodeString_RPIAccountNotWhitelisted", "ErrorCodeString_SystemStatusPostOnly", "ErrorCodeString_SystemStatusCancelOnly", "ErrorCodeString_InvalidMarketingCode", "ErrorCodeString_InvalidJoinWaitlistRequest", "ErrorCodeString_TransactionNotFound", "ErrorCodeString_OfferNotFound", "ErrorCodeString_MarketMarginRestricted", "ErrorCodeString_NotUnique", "ErrorCodeString_AccountAlreadyReferred", "ErrorCodeString_OnboardingPeriodExpired", "ErrorCodeString_OnboardingRateLimited", "ErrorCodeString_SubaccountsLimitExceeded", "ErrorCodeString_InsufficientMinChainBalance", "ErrorCodeString_InvalidSubkey", "ErrorCodeString_TokenLimitReached", "ErrorCodeString_InvalidTokenScope", "ErrorCodeString_InsufficientTransferrableXP", "ErrorCodeString_TransferLimitReached" ] }, "responses.ErrorResponse": { "type": "object", "properties": { "error": { "$ref": "#/components/schemas/responses.ErrorCode" }, "message": { "type": "string" } } }, "responses.FeeWithCap": { "type": "object", "properties": { "fee": { "type": "string", "description": "fee rate", "example": "0.0003" }, "fee_cap": { "type": "string", "description": "fee cap (used for option)", "example": "0.5" }, "fee_floor": { "type": "string", "description": "fee floor (used for option)", "example": "-0.5" } } }, "responses.Fees": { "type": "object", "properties": { "commission_rate": { "type": "string", "description": "multiplier used to calculate the commission amount from fee", "example": "0.0001" }, "dated_option_maker_rate": { "type": "string", "example": "0.0001" }, "dated_option_taker_rate": { "type": "string", "example": "0.0001" }, "discount_rate": { "type": "string", "description": "multiplier used to calculate the fee rate after discount, if discount is 10%, then discount_rate is 0.9", "example": "0.9" }, "maker_rate": { "type": "string", "example": "0.0001" }, "perp_option_maker_rate": { "type": "string", "example": "0.0001" }, "perp_option_taker_rate": { "type": "string", "example": "0.0001" }, "spot_maker_rate": { "type": "string", "example": "0.0001" }, "spot_taker_rate": { "type": "string", "example": "0.0001" }, "taker_rate": { "type": "string", "example": "0.0001" } } }, "responses.FillFlag": { "type": "string", "enum": [ "interactive", "rpi", "fastfill" ], "x-enum-comments": { "FillFlagFast": "Retail order was fast filled", "FillFlagInteractive": "Fill was generated from an interactive order (user-initiated)", "FillFlagRPI": "Fill qualifies for Retail Price Improvement" }, "x-enum-varnames": [ "FillFlagInteractive", "FillFlagRPI", "FillFlagFast" ] }, "responses.FillResult": { "type": "object", "properties": { "account": { "type": "string", "description": "Account that made the fill", "example": "0x978532f46745d7fFBa1CDfa1D8C8202D09D89C9E" }, "client_id": { "type": "string", "description": "Unique client assigned ID for the order", "example": "x1234" }, "created_at": { "type": "integer", "description": "Fill time", "example": 1681375176910 }, "fee": { "type": "string", "description": "Fee paid by the user", "example": "7.56" }, "fee_currency": { "type": "string", "description": "Asset that fee is charged in", "example": "USDC" }, "fill_type": { "type": "object", "description": "Fill type, can be FILL, LIQUIDATION or TRANSFER", "example": "FILL", "allOf": [ { "$ref": "#/components/schemas/responses.FillType" } ] }, "flags": { "type": "array", "description": "Fill flags indicating special properties", "example": [ "[\"interactive\"", " \"rpi\"]" ], "items": { "$ref": "#/components/schemas/responses.FillFlag" } }, "id": { "type": "string", "description": "Unique string ID of fill per FillType", "example": "8615262148007718462" }, "liquidity": { "type": "object", "description": "Maker or Taker", "allOf": [ { "$ref": "#/components/schemas/responses.TraderRole" } ] }, "market": { "type": "string", "description": "Market name", "example": "BTC-USD-PERP" }, "order_id": { "type": "string", "description": "Order ID", "example": "1681462103821101699438490000" }, "orderbook_seq_no": { "type": "integer", "description": "Orderbook sequence number after trade execution (post-execution state). Use seqno-1 for pre-execution. 0 for position transfers (liquidations, settlements)", "example": 12345 }, "price": { "type": "string", "description": "Price at which order was filled", "example": "30000.12" }, "realized_funding": { "type": "string", "description": "Realized funding of the fill", "example": "7.56" }, "realized_pnl": { "type": "string", "description": "Realized PnL of the fill", "example": "7.56" }, "remaining_size": { "type": "string", "description": "Remaining size of the order", "example": "0.5" }, "side": { "type": "object", "description": "Taker side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "type": "string", "description": "Size of the fill", "example": "0.5" }, "underlying_price": { "type": "string", "description": "Underlying asset price of the fill (spot price)", "example": "7.56" } } }, "responses.FillType": { "type": "string", "enum": [ "LIQUIDATION", "TRANSFER", "FILL", "SETTLE_MARKET", "RPI", "BLOCK_TRADE" ], "x-enum-varnames": [ "FillTypeLiquidation", "FillTypeTransfer", "FillTypeFill", "FillTypeSettleMarket", "FillTypeRPI", "FillTypeBlockTrade" ] }, "responses.FundingDataResult": { "type": "object", "properties": { "created_at": { "type": "integer", "description": "Timestamp in milliseconds when the funding data was created" }, "funding_index": { "type": "string", "description": "Current funding index value as a decimal string" }, "funding_period_hours": { "type": "number", "description": "Actual funding period in hours for this market" }, "funding_premium": { "type": "string", "description": "Current funding premium as a decimal string" }, "funding_rate": { "type": "string", "description": "Raw funding rate for the actual funding period as a decimal string" }, "funding_rate_8h": { "type": "string", "description": "Normalized 8-hour funding rate as a decimal string" }, "market": { "type": "string", "description": "Market represents the market identifier" } } }, "responses.FundingPayment": { "type": "object", "properties": { "account": { "type": "string", "description": "Account that made the payment" }, "created_at": { "type": "integer", "description": "Funding payment time", "example": 1681375481000 }, "fill_id": { "type": "string", "description": "Fill id that triggered the payment (if any)", "example": "8615262148007718462" }, "id": { "type": "string", "description": "Unique string ID to identify the payment", "example": "1681375578221101699352320000" }, "index": { "type": "string", "description": "Value of the funding index at the time of payment", "example": "-2819.53434361" }, "market": { "type": "string", "description": "Market against which payment is made", "example": "BTC-USD-PERP" }, "payment": { "type": "string", "description": "Payment amount in settlement asset", "example": "34.4490622" } } }, "responses.GetAccountMarginConfigsResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Account ID" }, "configs": { "type": "array", "description": "List of margin configurations per market", "items": { "$ref": "#/components/schemas/responses.AccountMarginEntry" } }, "margin_methodology": { "type": "string", "description": "Margin methodology (cross_margin/portfolio_margin)" } } }, "responses.GetAccountsInfoResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountInfoResponse" } } } }, "responses.GetSubAccountsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountInfoResponse" } } } }, "responses.GetXPBalanceResponseV2": { "type": "object", "properties": { "earned_xp": { "type": "integer", "description": "XP earned through trading (from leaderboard, immutable)", "example": 1000 }, "transferrable_xp": { "type": "integer", "description": "Maximum XP that can be transferred", "example": 700 }, "xp_delta": { "type": "integer", "description": "Net XP from transfers", "example": 200 } } }, "responses.Greeks": { "type": "object", "properties": { "delta": { "type": "string", "description": "Market Delta", "example": "1" }, "gamma": { "type": "string", "description": "Market Gamma", "example": "0.2" }, "rho": { "type": "string", "description": "Market Rho", "example": "0.2" }, "vanna": { "type": "string", "description": "Market Vanna", "example": "0.2" }, "vega": { "type": "string", "description": "Market Vega", "example": "0.2" }, "volga": { "type": "string", "description": "Market Volga", "example": "0.2" } } }, "responses.ImpactPriceResp": { "type": "object", "properties": { "impact_price": { "type": "string", "description": "The calculated impact price", "example": "30130.15" }, "market": { "type": "string", "description": "Symbol of the market", "example": "BTC-USD-PERP" }, "side": { "type": "string", "description": "Trade side (BUY or SELL)", "example": "BUY" }, "size": { "type": "string", "description": "Size of the order", "example": "0.05" } } }, "responses.InsuranceAccountResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Starknet address of the Insurance fund", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "account_value": { "type": "string", "description": "Total account value of insurance fund", "example": "136285.069" }, "settlement_asset": { "type": "string", "description": "Settlement Asset for the account", "example": "USDC" }, "updated_at": { "type": "integer", "description": "Account last updated time", "example": 1681471234972 } } }, "responses.LiquidationResp": { "type": "object", "properties": { "created_at": { "type": "integer", "description": "Liquidation created at timestamp", "example": 1697213130097 }, "id": { "type": "string", "description": "Liquidation transaction hash", "example": "0x123456789" } } }, "responses.MakerTakerFee": { "type": "object", "properties": { "maker_fee": { "type": "object", "description": "fee for maker", "allOf": [ { "$ref": "#/components/schemas/responses.FeeWithCap" } ] }, "taker_fee": { "type": "object", "description": "fee for taker", "allOf": [ { "$ref": "#/components/schemas/responses.FeeWithCap" } ] } } }, "responses.MarketChainDetails": { "type": "object", "properties": { "collateral_address": { "type": "string", "description": "Collateral address", "example": "0x1234567890" }, "contract_address": { "type": "string", "description": "Contract address", "example": "0x1234567890" }, "fee_account_address": { "type": "string", "description": "Fee account address", "example": "0x1234567890" }, "fee_maker": { "type": "string", "description": "Maker fee", "example": "0.01" }, "fee_taker": { "type": "string", "description": "Taker fee", "example": "0.01" }, "insurance_fund_address": { "type": "string", "description": "Insurance fund address", "example": "0x1234567890" }, "liquidation_fee": { "type": "string", "description": "Liquidation fee", "example": "0.01" }, "oracle_address": { "type": "string", "description": "Oracle address", "example": "0x1234567890" }, "symbol": { "type": "string", "description": "Market symbol", "example": "ETH-USD-PERP" } } }, "responses.MarketFeeConfig": { "type": "object", "properties": { "api_fee": { "type": "object", "description": "fee for order coming from API", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] }, "interactive_fee": { "type": "object", "description": "fee for order coming from UI", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] }, "rpi_fee": { "type": "object", "description": "fee for order coming from API with RPI instruction", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] } } }, "responses.MarketKind": { "type": "string", "enum": [ "", "cross", "isolated", "isolated_margin" ], "x-enum-varnames": [ "MarketKindUnknown", "MarketKindCross", "MarketKindIsolated", "MarketKindIsolatedMargin" ] }, "responses.MarketResp": { "type": "object", "properties": { "asset_kind": { "type": "string", "description": "Type of asset", "example": "PERP", "enum": [ "PERP", "PERP_OPTION" ] }, "base_currency": { "type": "string", "description": "Base currency of the market", "example": "ETH" }, "chain_details": { "type": "object", "description": "Chain details", "allOf": [ { "$ref": "#/components/schemas/responses.MarketChainDetails" } ] }, "clamp_rate": { "type": "string", "description": "Clamp rate", "example": "0.05" }, "delta1_cross_margin_params": { "type": "object", "description": "Delta1 Cross margin parameters", "allOf": [ { "$ref": "#/components/schemas/responses.Delta1CrossMarginParams" } ] }, "expiry_at": { "type": "integer", "description": "Market expiry time", "example": 0 }, "fee_config": { "type": "object", "description": "Fee config indicates override fee for the market. If not set, it will use the global exchange fee config", "allOf": [ { "$ref": "#/components/schemas/responses.MarketFeeConfig" } ] }, "funding_multiplier": { "type": "number", "description": "Funding multiplier", "example": 1 }, "funding_period_hours": { "type": "number", "description": "Funding period in hours", "example": 8 }, "interest_rate": { "type": "string", "description": "Interest rate", "example": "0.01" }, "iv_bands_width": { "type": "string", "description": "IV Bands Width", "example": "0.05" }, "market_kind": { "type": "object", "description": "Market's margin mode", "example": "cross", "allOf": [ { "$ref": "#/components/schemas/responses.MarketKind" } ] }, "max_funding_rate": { "type": "string", "description": "Max funding rate", "example": "0.05" }, "max_funding_rate_change": { "type": "string", "description": "Max funding rate change", "example": "0.0005" }, "max_open_orders": { "type": "integer", "description": "Max open orders", "example": 100 }, "max_order_size": { "type": "string", "description": "Maximum order size in base currency", "example": "100" }, "max_slippage": { "type": "string", "description": "Default max slippage allowed for the market", "example": "0.05" }, "max_tob_spread": { "type": "string", "description": "The maximum TOB spread allowed to apply funding rate changes", "example": "0.2" }, "min_notional": { "type": "string", "description": "Minimum order notional in USD. For futures: size*mark_price, for options: size*spot_price", "example": "3" }, "open_at": { "type": "integer", "description": "Market open time in milliseconds", "example": 0 }, "option_cross_margin_params": { "type": "object", "description": "Option Cross margin parameters", "allOf": [ { "$ref": "#/components/schemas/responses.OptionCrossMarginParams" } ] }, "option_type": { "type": "string", "description": "Type of option", "example": "PUT", "enum": [ "PUT", "CALL" ] }, "oracle_ewma_factor": { "type": "string", "description": "Oracle EWMA factor", "example": "0.2" }, "order_size_increment": { "type": "string", "description": "Minimum size increment for base currency", "example": "0.001" }, "position_limit": { "type": "string", "description": "Position limit in base currency", "example": "500" }, "price_bands_width": { "type": "string", "description": "Price Bands Width, 0.05 means 5% price deviation allowed from mark price", "example": "0.05" }, "price_feed_id": { "type": "string", "description": "Price feed id. Pyth price account used to price underlying asset", "example": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU" }, "price_tick_size": { "type": "string", "description": "Minimum price increment of the market in USD", "example": "0.01" }, "quote_currency": { "type": "string", "description": "Quote currency of the market", "example": "USD" }, "settlement_currency": { "type": "string", "description": "Settlement currency of the market", "example": "USDC" }, "strike_price": { "type": "string", "description": "Strike price for option market", "example": "66500" }, "symbol": { "type": "string", "description": "Market symbol", "example": "ETH-USD-PERP" }, "tags": { "type": "array", "description": "Market tags", "example": [ "MEME", "DEFI" ], "items": { "type": "string" } } } }, "responses.MarketSummaryResp": { "type": "object", "properties": { "ask": { "type": "string", "description": "Best ask price", "example": "30130.15" }, "ask_iv": { "type": "string", "description": "Ask implied volatility, for options", "example": "0.2" }, "bid": { "type": "string", "description": "Best bid price", "example": "30112.22" }, "bid_iv": { "type": "string", "description": "Bid implied volatility, for options", "example": "0.2" }, "created_at": { "type": "integer", "description": "Market summary creation time" }, "delta": { "type": "string", "description": "Deprecated: Use greeks.delta instead", "example": "1" }, "funding_rate": { "type": "string", "description": "This raw funding rate corresponds to the actual funding period of the instrument itself. It is not a normalized 8h funding rate.", "example": "0.3" }, "future_funding_rate": { "type": "string", "description": "For options it's a smoothed version of future's funding rate", "example": "0.3" }, "greeks": { "type": "object", "description": "Greeks (delta, gamma, vega). Partial for perpetual futures.", "allOf": [ { "$ref": "#/components/schemas/responses.Greeks" } ] }, "last_iv": { "type": "string", "description": "Last traded price implied volatility, for options", "example": "0.2" }, "last_traded_price": { "type": "string", "description": "Last traded price", "example": "30109.53" }, "mark_iv": { "type": "string", "description": "Mark implied volatility, for options", "example": "0.2" }, "mark_price": { "type": "string", "description": "[Mark price](https://docs.paradex.trade/risk-system/mark-price-calculation)", "example": "29799.70877478" }, "open_interest": { "type": "string", "description": "Open interest in base currency", "example": "6100048.3" }, "price_change_rate_24h": { "type": "string", "description": "Price change rate in the last 24 hours", "example": "0.05" }, "symbol": { "type": "string", "description": "Market symbol", "example": "BTC-USD-PERP" }, "total_volume": { "type": "string", "description": "Lifetime total traded volume in USD", "example": "141341.0424" }, "underlying_price": { "type": "string", "description": "Underlying asset price (spot price)", "example": "29876.3" }, "volume_24h": { "type": "string", "description": "24 hour volume in USD", "example": "47041.0424" } } }, "responses.Nft": { "type": "object", "properties": { "collection_address": { "type": "string" }, "collection_name": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "image_url": { "type": "string" }, "name": { "type": "string" }, "price": { "$ref": "#/components/schemas/messagesv1.NftPrice" } } }, "responses.NotificationPreferencesResp": { "type": "object", "properties": { "announcements": { "type": "boolean", "example": false }, "fill_sound": { "type": "boolean", "example": true }, "fills": { "type": "boolean", "example": true }, "orders": { "type": "boolean", "example": true }, "transfers": { "type": "boolean", "example": true } } }, "responses.OptionCrossMarginParams": { "type": "object", "properties": { "imf": { "$ref": "#/components/schemas/responses.OptionMarginParams" }, "mmf": { "$ref": "#/components/schemas/responses.OptionMarginParams" } } }, "responses.OptionMarginParams": { "type": "object", "properties": { "long_itm": { "type": "string", "description": "Margin fraction for long ITM options", "example": "0.2" }, "premium_multiplier": { "type": "string", "description": "Multiplier for margin fraction for premium", "example": "1.2" }, "short_itm": { "type": "string", "description": "Margin fraction for short ITM options", "example": "0.4" }, "short_otm": { "type": "string", "description": "Margin fraction for short OTM options", "example": "0.25" }, "short_put_cap": { "type": "string", "description": "Cap for margin fraction for short put options", "example": "0.5" } } }, "responses.OrderFlag": { "type": "string", "enum": [ "REDUCE_ONLY", "STOP_CONDITION_BELOW_TRIGGER", "STOP_CONDITION_ABOVE_TRIGGER", "INTERACTIVE", "TARGET_STRATEGY_VWAP" ], "x-enum-varnames": [ "FlagsReduceOnly", "FlagsStopConditionBelowTrigger", "FlagsStopConditionAboveTrigger", "FlagsInteractive", "FlagsTargetStrategyVWAP" ] }, "responses.OrderInstruction": { "type": "string", "enum": [ "GTC", "POST_ONLY", "IOC", "RPI" ], "x-enum-varnames": [ "OrderInstructionGTC", "OrderInstructionPostOnly", "OrderInstructionIOC", "OrderInstructionRPI" ] }, "responses.OrderResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Paradex Account", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512x" }, "avg_fill_price": { "type": "string", "description": "Average fill price of the order", "example": "26000" }, "cancel_reason": { "type": "string", "description": "Reason for order cancellation if it was closed by cancel", "example": "NOT_ENOUGH_MARGIN" }, "client_id": { "type": "string", "description": "Client order id provided by the client at order creation", "example": "x1234" }, "created_at": { "type": "integer", "description": "Order creation time", "example": 1681493746016 }, "flags": { "type": "array", "description": "Order flags, allow flag: REDUCE_ONLY", "items": { "$ref": "#/components/schemas/responses.OrderFlag" } }, "id": { "type": "string", "description": "Unique order identifier generated by Paradex", "example": "123456" }, "instruction": { "type": "object", "description": "Execution instruction for order matching", "example": "GTC", "allOf": [ { "$ref": "#/components/schemas/responses.OrderInstruction" } ] }, "last_updated_at": { "type": "integer", "description": "Order last update time. No changes once status=CLOSED", "example": 1681493746016 }, "market": { "type": "string", "description": "Market", "example": "BTC-USD-PERP" }, "price": { "type": "string", "description": "Order price. 0 for MARKET orders", "example": "26000" }, "published_at": { "type": "integer", "description": "Timestamp in milliseconds when order was sent to the client", "example": 1681493746016 }, "received_at": { "type": "integer", "description": "Timestamp in milliseconds when order was received by API service", "example": 1681493746016 }, "remaining_size": { "type": "string", "description": "Remaining size of the order", "example": "0" }, "request_info": { "type": "object", "description": "Additional request information for orders", "allOf": [ { "$ref": "#/components/schemas/responses.RequestInfo" } ] }, "seq_no": { "type": "integer", "description": "Unique increasing number (non-sequential) that is assigned to this order update and changes on every order update. Can be used to deduplicate multiple feeds. WebSocket and REST responses use independently generated seq_no per event.", "example": 1681471234972000000 }, "side": { "type": "object", "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "type": "string", "description": "Order size", "example": "0.05" }, "status": { "type": "object", "description": "Order status", "allOf": [ { "$ref": "#/components/schemas/responses.OrderStatus" } ] }, "stp": { "type": "object", "description": "Self Trade Prevention mode", "example": "EXPIRE_MAKER", "allOf": [ { "$ref": "#/components/schemas/responses.STPMode" } ] }, "timestamp": { "type": "integer", "description": "Order signature timestamp", "example": 1681493746016 }, "trigger_price": { "type": "string", "description": "Trigger price for stop order", "example": "26000" }, "type": { "type": "object", "description": "Order type", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] } } }, "responses.OrderSide": { "type": "string", "enum": [ "BUY", "SELL" ], "x-enum-varnames": [ "OrderSideBuy", "OrderSideSell" ] }, "responses.OrderStatus": { "type": "string", "enum": [ "NEW", "UNTRIGGERED", "OPEN", "CLOSED" ], "x-enum-varnames": [ "OrderStatusNew", "OrderStatusUntriggered", "OrderStatusOpen", "OrderStatusClosed" ] }, "responses.OrderType": { "type": "string", "enum": [ "MARKET", "LIMIT", "STOP_LIMIT", "STOP_MARKET", "TAKE_PROFIT_LIMIT", "TAKE_PROFIT_MARKET", "STOP_LOSS_MARKET", "STOP_LOSS_LIMIT" ], "x-enum-varnames": [ "OrderTypeMarket", "OrderTypeLimit", "OrderTypeStopLimit", "OrderTypeStopMarket", "OrderTypeTakeProfitLimit", "OrderTypeTakeProfitMarket", "OrderTypeStopLossMarket", "OrderTypeStopLossLimit" ] }, "responses.PaginatedAPIResults": { "type": "object", "properties": { "next": { "type": "string", "description": "The pointer to fetch next set of records (null if there are no records left)", "example": "eyJmaWx0ZXIiMsIm1hcmtlciI6eyJtYXJrZXIiOiIxNjc1NjUwMDE3NDMxMTAxNjk5N=" }, "prev": { "type": "string", "description": "The pointer to fetch previous set of records (null if there are no records left)", "example": "eyJmaWx0ZXIiOnsiTGltaXQiOjkwfSwidGltZSI6MTY4MTY3OTgzNzk3MTMwOTk1MywibWFya2VyIjp7Im1zMjExMD==" }, "results": { "type": "array", "description": "Array of paginated results", "items": { "type": "object", "properties": {} } } } }, "responses.PositionResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Account ID of the position" }, "average_entry_price": { "type": "string", "description": "Average entry price", "example": "29001.34" }, "average_entry_price_usd": { "type": "string", "description": "Average entry price in USD", "example": "29001.34" }, "average_exit_price": { "type": "string", "description": "Average exit price", "example": "29001.34" }, "cached_funding_index": { "type": "string", "description": "Position cached funding index", "example": "1234.3" }, "closed_at": { "type": "integer", "description": "Position closed time", "example": 1681493939981 }, "cost": { "type": "string", "description": "Position cost", "example": "-10005.4623" }, "cost_usd": { "type": "string", "description": "Position cost in USD", "example": "-10005.4623" }, "created_at": { "type": "integer", "description": "Position creation time", "example": 1681493939981 }, "id": { "type": "string", "description": "Unique string ID for the position", "example": "1234234" }, "last_fill_id": { "type": "string", "description": "Last fill ID to which the position is referring", "example": "1234234" }, "last_updated_at": { "type": "integer", "description": "Position last update time", "example": 1681493939981 }, "leverage": { "type": "string", "description": "Leverage of the position" }, "liquidation_price": { "type": "string", "description": "Liquidation price of the position" }, "market": { "type": "string", "description": "Market for position", "example": "BTC-USD-PERP" }, "realized_positional_funding_pnl": { "type": "string", "description": "Realized Funding PnL for the position. Reset to 0 when position is closed or flipped.", "example": "12.234" }, "realized_positional_pnl": { "type": "string", "description": "Realized PnL including both positional PnL and funding payments. Reset to 0 when position is closed or flipped.", "example": "-123.23" }, "seq_no": { "type": "integer", "description": "Unique increasing number (non-sequential) that is assigned to this position update. Can be used to deduplicate multiple feeds", "example": 1681471234972000000 }, "side": { "type": "string", "description": "Position Side : Long or Short", "enum": [ "SHORT", "LONG" ] }, "size": { "type": "string", "description": "Size of the position with sign (positive if long or negative if short)", "example": "-0.345" }, "status": { "type": "string", "description": "Status of Position : Open or Closed", "enum": [ "OPEN", "CLOSED" ] }, "unrealized_funding_pnl": { "type": "string", "description": "Unrealized running funding P&L for the position", "example": "12.234" }, "unrealized_pnl": { "type": "string", "description": "Unrealized P&L of the position in the quote asset. Includes the unrealized running funding P&L.", "example": "-123.23" } } }, "responses.ReferralConfigResp": { "type": "object", "properties": { "commission_rate": { "type": "string", "description": "Commission rate for the referer", "example": "0.1" }, "commission_volume_cap": { "type": "string", "description": "Volume cap for commission", "example": "1000000000" }, "discount_rate": { "type": "string", "description": "Discount rate for the referee", "example": "0.1" }, "discount_volume_cap": { "type": "string", "description": "Volume cap for discount", "example": "30000000" }, "minimum_volume": { "type": "string", "description": "Minimum volume required to be eligible for Program", "example": "0.123" }, "name": { "type": "string", "description": "Referral name", "example": "Referral" }, "points_bonus_rate": { "type": "string", "description": "Points bonus rate for the referee", "example": "0.1" }, "points_bonus_volume_cap": { "type": "string", "description": "Volume cap for points bonus", "example": "1000000000" }, "referral_type": { "type": "string", "description": "Referral type", "example": "Referral" } } }, "responses.ReferralsResp": { "type": "object", "properties": { "address": { "type": "string", "description": "referee address" }, "created_at": { "type": "integer", "description": "Joined at timestamp in milliseconds", "example": 1715592690488 }, "referral_code": { "type": "string", "description": "Referral code used to onboard the referee", "example": "maxdegen01" }, "referral_rewards": { "type": "string", "description": "Total referral commission earned from the fee of referee", "example": "0.123" }, "volume_traded": { "type": "string", "description": "Total volume traded by referee", "example": "0.123" } } }, "responses.RequestInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Request id" }, "message": { "type": "string", "description": "Error message for failed requests" }, "request_type": { "type": "string", "description": "Type of request (MODIFY_ORDER)" }, "status": { "type": "string", "description": "Status of modify order request" } } }, "responses.RevokeSubkeyResponse": { "type": "object", "properties": { "public_key": { "type": "string", "description": "The public key of the revoked subkey", "example": "0xabcdef1234567890abcdef" } } }, "responses.RevokeTokenResponse": { "type": "object", "properties": { "lookup_id": { "type": "string", "description": "The lookup ID of the revoked token", "example": "uuid-123" } } }, "responses.STPMode": { "type": "string", "enum": [ "EXPIRE_MAKER", "EXPIRE_TAKER", "EXPIRE_BOTH" ], "x-enum-comments": { "STPModeExpireBoth": "Expire both maker and taker orders if self cross", "STPModeExpireMaker": "Expire maker orders if self cross", "STPModeExpireTaker": "Expire taker orders if self cross" }, "x-enum-varnames": [ "STPModeExpireMaker", "STPModeExpireTaker", "STPModeExpireBoth" ] }, "responses.ShareRateResp": { "type": "object", "properties": { "last_updated_at": { "type": "integer", "example": 1715592690488 }, "share_rate": { "type": "string", "example": "0.2" } } }, "responses.Strategy": { "type": "object", "properties": { "address": { "type": "string", "description": "Contract address of the sub-operator", "example": "0x29464b79b02543ed8746bba6e71c8a15401dd27b7279a5fa2f2fe8e8cdfabb" }, "name": { "type": "string", "description": "Strategy name", "example": "Alpha Strategy" } } }, "responses.Subkey": { "type": "object", "properties": { "account_id": { "type": "string", "description": "Account ID that owns this subkey", "example": "0x1234567890abcdef" }, "created_at": { "type": "integer", "description": "Subkey creation timestamp (nanoseconds since epoch)", "example": 1640995200 }, "id": { "type": "integer", "description": "Unique subkey identifier", "example": 1 }, "name": { "type": "string", "description": "User-provided subkey name", "example": "My Subkey" }, "public_key": { "type": "string", "description": "Subkey public key", "example": "0xabcdef1234567890abcdef" }, "revoked_at": { "type": "integer", "description": "Revocation timestamp (nanoseconds since epoch, 0 if not revoked)", "example": 0 }, "updated_at": { "type": "integer", "description": "Last modification timestamp (nanoseconds since epoch)", "example": 1640995200 } } }, "responses.SystemConfigResponse": { "type": "object", "properties": { "block_explorer_url": { "type": "string", "description": "Block explorer URL for the current SN Instance", "example": "https://voyager.testnet.paradex.trade/" }, "bridged_tokens": { "type": "array", "description": "bridged tokens config\nhttps://github.com/starknet-io/starknet-addresses/blob/master/bridged_tokens/goerli.json", "items": { "$ref": "#/components/schemas/responses.BridgedToken" } }, "environment": { "type": "string", "description": "Environment of the Paradex Instance", "example": "local" }, "l1_chain_id": { "type": "string", "description": "L1 chain ID value", "example": "5" }, "l1_core_contract_address": { "type": "string", "description": "Address of Starknet L1 core contract", "example": "0x182FE62c57461d4c5Ab1aE6F04f1D51aA1607daf" }, "l1_operator_address": { "type": "string", "description": "Address of Starknet L1 operator", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "l1_relayer_address": { "type": "string", "description": "Address of L1 Relayer", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "l2_relayer_address": { "type": "string", "description": "Address of L2 Relayer", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "liquidation_fee": { "type": "string", "description": "Liquidation fee", "example": "0.20" }, "oracle_address": { "type": "string", "description": "Oracle contract address", "example": "0x47c622ce5f7ff7fa17725df596f4f506364e49be0621eb142a75b44ee3689c6" }, "paraclear_account_hash": { "type": "string", "description": "Class hash of the account contract", "example": "0x033434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2" }, "paraclear_account_proxy_hash": { "type": "string", "description": "Proxy hash of the account contract", "example": "0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9" }, "paraclear_address": { "type": "string", "description": "Paraclear contract address", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7554d" }, "paraclear_decimals": { "type": "integer" }, "partial_liquidation_buffer": { "type": "string", "description": "Partial liquidation buffer. Account value is supposed to be at least this much above the MMR after partial liquidation", "example": "0.2" }, "partial_liquidation_share_increment": { "type": "string", "description": "Minimum granularity of partial liquidation share. The share is rounded up to the nearest multiple of this value", "example": "0.05" }, "starknet_chain_id": { "type": "string", "description": "Chain ID for the Starknet Instance", "example": "SN_CHAIN_ID" }, "starknet_fullnode_rpc_base_url": { "type": "string", "description": "Full node RPC Proxy base URL for Starknet", "example": "https://rpc.api.testnet.paradex.trade" }, "starknet_fullnode_rpc_url": { "type": "string", "description": "Full node RPC Proxy URL for Starknet", "example": "https://rpc.api.testnet.paradex.trade/rpc/v0_9" }, "starknet_gateway_url": { "type": "string", "description": "Feeder Gateway URL from Starknet", "example": "https://potc-testnet-02.starknet.io" }, "universal_deployer_address": { "type": "string", "description": "Universal deployer address", "example": "0x1f3f9d3f1f0b7f3f9f3f9f3f9f3f9f3f9f3f9f3f" } } }, "responses.SystemStateResponse": { "type": "object", "properties": { "status": { "type": "object", "description": "Status of the system", "example": "ok", "allOf": [ { "$ref": "#/components/schemas/responses.SystemStatus" } ] } } }, "responses.SystemStatus": { "type": "string", "enum": [ "ok", "maintenance", "cancel_only", "post_only" ], "x-enum-varnames": [ "SystemStatusOk", "SystemStatusMaintenance", "SystemStatusCancelOnly", "SystemStatusPostOnly" ] }, "responses.SystemTimeResponse": { "type": "object", "properties": { "server_time": { "type": "string", "description": "Paradex Server time", "example": "1681493415023" } } }, "responses.TradeResult": { "type": "object", "properties": { "created_at": { "type": "integer", "description": "Unix Millisecond timestamp at which trade was done", "example": 1681497002041 }, "id": { "type": "string", "description": "Unique Trade ID per TradeType", "example": "12345643" }, "market": { "type": "string", "description": "Market for which trade was done", "example": "BTC-USD-PERP" }, "price": { "type": "string", "description": "Trade price", "example": "30001.2" }, "side": { "type": "object", "description": "Taker side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "type": "string", "description": "Trade size", "example": "0.01" }, "trade_type": { "type": "object", "description": "Trade type, can be FILL, LIQUIDATION, or RPI", "example": "FILL", "allOf": [ { "$ref": "#/components/schemas/responses.FillType" } ] } } }, "responses.TradebustResult": { "type": "object", "properties": { "account": { "type": "string", "description": "Paradex Account", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "busted_fill_id": { "type": "string", "description": "Unique ID of the busted fill", "example": "12342345" }, "created_at": { "type": "integer", "description": "Unix timestamp in milliseconds when bust was created", "example": 1681497002041 } } }, "responses.TraderRole": { "type": "string", "enum": [ "TAKER", "MAKER" ], "x-enum-varnames": [ "TraderRoleTaker", "TraderRoleMaker" ] }, "responses.TransactionResponse": { "type": "object", "properties": { "completed_at": { "type": "integer", "description": "Timestamp from when the transaction was completed" }, "created_at": { "type": "integer", "description": "Timestamp from when the transaction was sent to blockchain gateway" }, "hash": { "type": "string", "description": "Tx Hash of the settled trade // Hash of the transaction", "example": "0x445c05d6bfb899e39338440d199971c4d7f4cde7878ed3888df3f716efb8df2" }, "id": { "type": "string", "description": "Unique string ID of the event that triggered the transaction. For example, fill ID or liquidation ID", "example": "12342423" }, "state": { "type": "string", "description": "Status of the transaction on Starknet", "enum": [ "ACCEPTED_ON_L1", "ACCEPTED_ON_L2", "NOT_RECEIVED", "RECEIVED", "REJECTED", "REVERTED" ] }, "type": { "type": "string", "description": "Event that triggered the transaction", "enum": [ "TRANSACTION_FILL", "TRANSACTION_LIQUIDATE", "TRANSACTION_SETTLE_MARKET" ] } } }, "responses.TransferBridge": { "type": "string", "enum": [ "", "STARKGATE", "LAYERSWAP", "RHINOFI", "HYPERLANE" ], "x-enum-varnames": [ "TransferBridgeUnspecified", "TransferBridgeStarkgate", "TransferBridgeLayerswap", "TransferBridgeRhinofi", "TransferBridgeHyperlane" ] }, "responses.TransferDirection": { "type": "string", "enum": [ "IN", "OUT" ], "x-enum-varnames": [ "TransferDirectionIn", "TransferDirectionOut" ] }, "responses.TransferKind": { "type": "string", "enum": [ "DEPOSIT", "WITHDRAWAL", "UNWINDING", "VAULT_DEPOSIT", "VAULT_WITHDRAWAL", "AUTO_WITHDRAWAL" ], "x-enum-varnames": [ "TransferKindDeposit", "TransferKindWithdrawal", "TransferKindUnwinding", "TransferKindVaultDeposit", "TransferKindVaultWithdrawal", "TransferKindAutoWithdrawal" ] }, "responses.TransferResult": { "type": "object", "properties": { "account": { "type": "string", "description": "Starknet Account address", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "amount": { "type": "string", "description": "Transferred amount", "example": "100" }, "auto_withdrawal_fee": { "type": "string", "description": "Fee for auto withdrawal in USDC", "example": "4.5" }, "bridge": { "type": "object", "description": "Bridge used for the transfer", "example": "STARKGATE", "allOf": [ { "$ref": "#/components/schemas/responses.TransferBridge" } ] }, "counterparty": { "type": "string", "description": "Counterparty address", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "created_at": { "type": "integer", "description": "Unix Millis timestamp transfer was created on L2", "example": 1681497002041 }, "direction": { "type": "object", "description": "Transfer direction (IN, OUT)", "example": "OUT", "allOf": [ { "$ref": "#/components/schemas/responses.TransferDirection" } ] }, "external_account": { "type": "string", "description": "External chain account address", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "external_chain": { "type": "string", "description": "External chain used for the transfer", "example": "ETHEREUM" }, "external_txn_hash": { "type": "string", "description": "Transaction hash on the external chain", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "failure_reason": { "type": "string", "description": "Reason for transfer failure", "example": "Gas fee too low" }, "id": { "type": "string", "description": "Transfer auto-generated ID", "example": "123456789" }, "kind": { "type": "object", "description": "Transfer Kind (DEPOSIT, WITHDRAWAL)", "example": "DEPOSIT", "allOf": [ { "$ref": "#/components/schemas/responses.TransferKind" } ] }, "last_updated_at": { "type": "integer", "description": "Unix Millis timestamp transfer was last updated on L2", "example": 1681497002041 }, "socialized_loss_factor": { "type": "string", "description": "Withdrawal's socialized loss factor", "example": "0" }, "status": { "type": "object", "description": "Transfer External State (PENDING, AVAILABLE, COMPLETED, FAILED)", "example": "PENDING", "allOf": [ { "$ref": "#/components/schemas/responses.TransferStatus" } ] }, "token": { "type": "string", "description": "Transferred token name", "example": "USDC" }, "txn_hash": { "type": "string", "description": "Transaction hash on Paradex chain", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "vault_address": { "type": "string", "description": "Vault address", "example": "0x7a3b1c8f9e2d4e6f8a0c2b4d6e8f0a2c4b6e8d0a" }, "vault_unwind_completion_percentage": { "type": "string", "description": "Vault unwind completion percentage", "example": "0.35" } }, "description": "TransferResult" }, "responses.TransferStatus": { "type": "string", "enum": [ "PENDING", "AVAILABLE", "COMPLETED", "FAILED" ], "x-enum-comments": { "TransferStatusAvailable": "Action is required from user: For Withdrawals refers to L2 txn status being `ACCEPTED_ON_L1` and funds available for collection on Ethereum bridge. For Deposits refers to funds being available in the L2 account, ready to be deposited to Paraclear contract.", "TransferStatusCompleted": "Transfer has completed (final state): For Withdrawals funds have been collected and have moved to the requested Ethereum account; refers to L1 bridge withdraw txn status `SUCCESS`. For Deposits funds have become available in Paradex; refers to the L2 txn status being `ACCEPTED_ON_L2`.", "TransferStatusFailed": "L2 txn calling Paraclear contract failed with `REJECTED` or `REVERTED` status. Deposits can be retried when they fail by repeating the L2 txn.", "TransferStatusPending": "L2 txn calling Paraclear contract is in flight: For Withdrawals it's the initial status; refers to the L2 txn status being `RECEIVED`, `PENDING`, `ACCEPTED_ON_L2`. For Deposits refers to L2 txn status being `RECEIVED`, `PENDING`." }, "x-enum-varnames": [ "TransferStatusPending", "TransferStatusAvailable", "TransferStatusCompleted", "TransferStatusFailed" ] }, "responses.TwitterProfile": { "type": "object", "properties": { "id": { "type": "string" }, "image_url": { "type": "string" }, "username": { "type": "string" } } }, "responses.UpdateAccountMarginConfigResp": { "type": "object", "properties": { "account": { "type": "string", "description": "Account ID" }, "leverage": { "type": "integer", "description": "Leverage value" }, "margin_type": { "type": "string", "description": "Margin type (CROSS/ISOLATED)" }, "market": { "type": "string", "description": "Market symbol" } } }, "responses.VaultAccountSummaryResp": { "type": "object", "properties": { "address": { "type": "string", "description": "Contract address of the vault", "example": "0x1234567890abcdef" }, "created_at": { "type": "integer", "description": "Unix timestamp in milliseconds of when the user joined the vault.", "example": 1717171717 }, "deposited_amount": { "type": "string", "description": "Amount deposited on the vault by the user in USDC", "example": "123.45" }, "total_pnl": { "type": "string", "description": "Total P&L realized by the user in USD.", "example": "149.12" }, "total_roi": { "type": "string", "description": "Total ROI realized by the user in percentage, i.e. 0.1 means 10%.", "example": "0.724" }, "vtoken_amount": { "type": "string", "description": "Amount of vault tokens owned by the user", "example": "123.45" } } }, "responses.VaultHistoricalDataResp": { "type": "object", "properties": { "address": { "type": "string", "description": "Contract address of the vault", "example": "0x1234567890abcdef" }, "data": { "type": "array", "description": "Ordered list of datapoints", "items": { "type": "number" } }, "timestamps": { "type": "array", "description": "Ordered list of timestamps", "items": { "type": "integer" } } } }, "responses.VaultKind": { "type": "string", "enum": [ "user", "protocol" ], "x-enum-varnames": [ "VaultKindUser", "VaultKindProtocol" ] }, "responses.VaultResp": { "type": "object", "properties": { "address": { "type": "string", "description": "Contract address of the vault", "example": "0x1234567890abcdef" }, "created_at": { "type": "integer", "description": "Unix timestamp in milliseconds of when the vault has been created", "example": 1517171717 }, "description": { "type": "string", "description": "Description of the vault", "example": "My description" }, "kind": { "type": "object", "description": "Kind of the vault: 'user' for user-defined vaults, 'protocol' for vaults controlled by Paradex", "example": "user", "allOf": [ { "$ref": "#/components/schemas/responses.VaultKind" } ] }, "last_updated_at": { "type": "integer", "description": "Unix timestamp in milliseconds of when the vault was last updated", "example": 1617171717 }, "lockup_period": { "type": "integer", "description": "Lockup period of the vault in days", "example": 1 }, "max_tvl": { "type": "integer", "description": "Maximum amount of assets the vault can hold in USDC", "example": 1000000 }, "name": { "type": "string", "description": "Name of the vault", "example": "MyVault" }, "operator_account": { "type": "string", "description": "Operator account of the vault", "example": "0x1234567890abcdef" }, "owner_account": { "type": "string", "description": "Owner account of the vault", "example": "0x0234567890abcdef" }, "profit_share": { "type": "integer", "description": "Profit share of the vault in percentage, i.e. 10 means 10%", "example": 10 }, "status": { "type": "object", "description": "Status of the vault", "example": "ACTIVE", "allOf": [ { "$ref": "#/components/schemas/responses.VaultStatus" } ] }, "strategies": { "type": "array", "description": "Strategies of the vault", "items": { "$ref": "#/components/schemas/responses.Strategy" } }, "token_address": { "type": "string", "description": "LP token address" } } }, "responses.VaultStatus": { "type": "string", "enum": [ "INITIALIZING", "ACTIVE", "CLOSED", "FAILED" ], "x-enum-varnames": [ "VaultStatusInitializing", "VaultStatusActive", "VaultStatusClosed", "VaultStatusFailed" ] }, "responses.VaultSummaryResp": { "type": "object", "properties": { "address": { "type": "string", "description": "Contract address of the vault", "example": "0x1234567890abcdef" }, "last_month_return": { "type": "string", "description": "APR return of the vault in the last trailing month in percentage, i.e. 0.1 means 10%", "example": "0.023" }, "max_drawdown": { "type": "string", "description": "Max all time drawdown realized by the vault in percentage, i.e. 0.1 means 10%", "example": "0.1916" }, "max_drawdown_24h": { "type": "string", "description": "Max drawdown realized by the vault in the last 24 hours in percentage, i.e. 0.1 means 10%", "example": "0.0138" }, "max_drawdown_30d": { "type": "string", "description": "Max drawdown realized by the vault in the last 30 days in percentage, i.e. 0.1 means 10%", "example": "0.1821" }, "max_drawdown_7d": { "type": "string", "description": "Max drawdown realized by the vault in the last 7 days in percentage, i.e. 0.1 means 10%", "example": "0.1124" }, "net_deposits": { "type": "string", "description": "Net deposits of the vault in USDC", "example": "1000000" }, "num_depositors": { "type": "integer", "description": "Number of depositors on the vault", "example": 100 }, "owner_equity": { "type": "string", "description": "Vault equity of the owner (% of ownership) in percentage, i.e. 0.1 means 10%", "example": "0.145" }, "pnl_24h": { "type": "string", "description": "P&L of the vault in the last 24 hours in USD", "example": "13.41" }, "pnl_30d": { "type": "string", "description": "P&L of the vault in the last 30 days in USD", "example": "114.19" }, "pnl_7d": { "type": "string", "description": "P&L of the vault in the last 7 days in USD", "example": "91.31" }, "roi_24h": { "type": "string", "description": "Return of the vault in the last 24 hours in percentage, i.e. 0.1 means 10%", "example": "0.034" }, "roi_30d": { "type": "string", "description": "Return of the vault in the last 30 days in percentage, i.e. 0.1 means 10%", "example": "0.003" }, "roi_7d": { "type": "string", "description": "Return of the vault in the last 7 days in percentage, i.e. 0.1 means 10%", "example": "0.123" }, "total_pnl": { "type": "string", "description": "Total P&L of the vault in USD", "example": "149.12" }, "total_roi": { "type": "string", "description": "Total ROI of the vault in percentage, i.e. 0.1 means 10%", "example": "0.724" }, "tvl": { "type": "string", "description": "Total Value Locked (deposits + unrealized PnL) in USDC", "example": "1000000" }, "volume": { "type": "string", "description": "All time volume traded by the vault in USD", "example": "12345678.16" }, "volume_24h": { "type": "string", "description": "Volume traded by the vault in the last 24 hours in USD", "example": "45678.16" }, "volume_30d": { "type": "string", "description": "Volume traded by the vault in the last 30 days in USD", "example": "2345678.16" }, "volume_7d": { "type": "string", "description": "Volume traded by the vault in the last 7 days in USD", "example": "345678.16" }, "vtoken_price": { "type": "string", "description": "Current value of vault token price in USD", "example": "1.23" }, "vtoken_supply": { "type": "string", "description": "Total amount of available vault tokens", "example": "1000000" } } }, "responses.VaultsConfigResponse": { "type": "object", "properties": { "max_lockup_period_days": { "type": "string", "description": "Maximum lockup period in days an owner can configure for a vault", "example": "4" }, "max_profit_share_percentage": { "type": "string", "description": "Maximum profit share percentage (0-100) an owner can configure for a vault", "example": "50" }, "min_initial_deposit": { "type": "string", "description": "Minimum initial collateral deposit (in currency units) at vault creation. Only applies to the owner", "example": "1000" }, "min_lockup_period_days": { "type": "string", "description": "Minimum lockup period in days an owner can configure for a vault", "example": "1" }, "min_owner_share_percentage": { "type": "string", "description": "Minimum share percentage (0-100) the vault owner must maintain on the vault", "example": "5" }, "vault_factory_address": { "type": "string", "description": "Address of the vault factory contract", "example": "0x1234567890abcdef" } } }, "responses.XPTransfer": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Amount of XP transferred", "example": 100 }, "created_at": { "type": "integer", "description": "Creation timestamp (milliseconds since epoch)", "example": 1640995200000 }, "fee": { "type": "integer", "description": "Fee charged for the transfer (deducted from sender's balance)", "example": 1 }, "id": { "type": "string", "description": "Unique transfer identifier", "example": "transfer_123" }, "is_private": { "type": "boolean", "description": "Whether the transfer is private (not shown on public feeds)", "example": false }, "recipient": { "type": "string", "description": "Address of the recipient (gaining XP)", "example": "0xfedcba0987654321" }, "season": { "type": "string", "description": "Season identifier ('season1' for Season 1, 'season2' for Season 2, etc.)", "example": "season2" }, "sender": { "type": "string", "description": "Address of the sender (losing XP)", "example": "0x1234567890abcdef" } } }, "services.TransferFeeConfigResponse": { "type": "object", "properties": { "fee_percentage": { "type": "number", "description": "Fee percentage charged on transfers (e.g., 0.01 = 1%)" } } } }, "securitySchemes": { "BearerToken": { "type": "apiKey", "name": "Authorization", "in": "header" } } }, "x-hideTryItPanel": true, "x-original-swagger-version": "2.0" }