{ "openapi": "3.0.0", "info": { "description": "The following describe Paradex API.\n", "title": "Paradex REST API", "contact": {}, "version": "1.129.0" }, "paths": { "/account": { "get": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account information\n", "tags": [ "Account" ], "summary": "Get account information", "operationId": "get-account", "parameters": [ { "description": "Subaccount address", "name": "subaccount_address", "in": "query", "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" } } } } } } }, "/account/compliance": { "get": { "security": [ { "BearerToken": [] } ], "description": "Returns all compliance actions for the authenticated account", "tags": [ "Account" ], "summary": "Get compliance actions", "operationId": "get-compliance-actions", "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.ComplianceActionResp" } } } } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "description": "Records a compliance action (e.g. TOS acceptance) for the authenticated account", "tags": [ "Account" ], "summary": "Record a compliance action", "operationId": "record-compliance-action", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.RecordComplianceActionRequest" } } }, "description": "Compliance action request", "required": true }, "responses": { "200": { "description": "OK" }, "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" } } } } } } }, "/account/history": { "get": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account information\n", "tags": [ "Account" ], "summary": "Get account history", "operationId": "get-account-history", "parameters": [ { "description": "Type of data", "name": "type", "in": "query", "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" } } } } } } }, "/account/info": { "get": { "security": [ { "BearerToken": [] } ], "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" } } } } } } }, "/account/keys/subkeys": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get all subkeys for the authenticated account with optional filtering by status.\n", "tags": [ "Subkey" ], "summary": "List Subkeys", "operationId": "list-subkeys", "parameters": [ { "description": "Include revoked subkeys", "name": "with_revoked", "in": "query", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "description": "Register a new subkey for the authenticated account.\n", "tags": [ "Subkey" ], "summary": "Register Subkey", "operationId": "register-subkey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateSubkey" } } }, "description": "Subkey registration request", "required": true }, "responses": { "201": { "description": "An empty response" }, "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": "IP restrictions not enabled for this account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/account/keys/subkeys/activate": { "post": { "description": "Activate a pending subkey by providing a Starknet signature\nover `pedersen(timestamp, eph_public_key)`.\n", "tags": [ "Subkey" ], "summary": "Activate pending subkey", "operationId": "activate-subkey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.ActivateSubkey" } } }, "description": "Subkey activation request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.ActivateSubkeyResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/account/keys/subkeys/{public_key}": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get a specific subkey for the authenticated account by its public key.\n", "tags": [ "Subkey" ], "summary": "Get Subkey", "operationId": "get-subkey", "parameters": [ { "description": "Subkey public key", "name": "public_key", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Subkey details", "content": { "application/json": { "schema": { "$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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } }, "put": { "security": [ { "BearerToken": [] } ], "description": "Update properties of an existing subkey for the authenticated account.\n", "tags": [ "Subkey" ], "summary": "Update Subkey", "operationId": "update-subkey", "parameters": [ { "description": "Subkey public key", "name": "public_key", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateSubkey" } } }, "description": "Update subkey request", "required": true }, "responses": { "200": { "description": "Updated subkey details", "content": { "application/json": { "schema": { "$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" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "description": "Revoke a subkey for the authenticated account.\n", "tags": [ "Subkey" ], "summary": "Revoke Subkey", "operationId": "revoke-subkey", "parameters": [ { "description": "Subkey public key", "name": "public_key", "in": "path", "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" } } } } } } }, "/account/keys/subkeys/{public_key}/allowed-cidrs": { "put": { "security": [ { "BearerToken": [] } ], "description": "Replace the IP CIDR allowlist for a subkey. Empty array clears the allowlist (unrestricted). Only callable with the main account; subkeys cannot widen their own allowlist.", "tags": [ "Subkey" ], "summary": "Update subkey IP allowlist", "operationId": "update-subkey-allowed-cidrs", "parameters": [ { "description": "Subkey public key", "name": "public_key", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/requests.UpdateAllowedCIDRs" }, "responses": { "200": { "description": "Updated subkey details", "content": { "application/json": { "schema": { "$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" } } } }, "403": { "description": "IP restrictions not enabled for this account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/account/margin": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get margin configuration for an account and market", "tags": [ "Account" ], "summary": "Get account margin configuration", "operationId": "get-account-margin", "parameters": [ { "description": "Market Name - example: BTC-USD-PERP", "name": "market", "in": "query", "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" } } } } } } }, "/account/margin/{market}": { "post": { "security": [ { "BearerToken": [] } ], "description": "Set margin configuration for an account and market", "tags": [ "Account" ], "summary": "Set margin configuration", "operationId": "upsert-account-margin", "parameters": [ { "description": "Market Name - example: BTC-USD-PERP", "name": "market", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.AccountMarginRequest" } } }, "description": "Margin Configuration", "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" } } } } } } }, "/account/profile": { "get": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account information\n", "tags": [ "Account" ], "summary": "Get account profile information", "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" } } } } } }, "put": { "security": [ { "BearerToken": [] } ], "description": "Updates account profile information", "tags": [ "Account" ], "summary": "Updates account profile", "operationId": "update-account-profile", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateAccountProfileRequest" } } }, "description": "Update account profile request", "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" } } } } } } }, "/account/profile/market_max_slippage/{market}": { "post": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account max_slippage\n", "tags": [ "Account" ], "summary": "Updates account max slippage for a specific market", "operationId": "update-account-market-max-slippage", "parameters": [ { "description": "{base_currency}-{quote_currency}-{kind}", "name": "market", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateAccountMaxSlippageRequest" } } }, "description": "Update market max slippage request", "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" } } } } } } }, "/account/profile/notifications": { "post": { "security": [ { "BearerToken": [] } ], "description": "Updates user notification preferences for orders, fills, announcements, and transfers. All fields are optional - only provided fields will be updated.", "tags": [ "Account" ], "summary": "Updates account notification preferences", "operationId": "update-account-notification-preferences", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateNotificationPreferencesRequest" } } }, "description": "Update notification preferences request (all fields optional)", "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" } } } } } } }, "/account/profile/notifications/last_seen": { "post": { "security": [ { "BearerToken": [] } ], "description": "Records current server time as the notification dedup watermark for cross-device dedup.", "tags": [ "Account" ], "summary": "Updates the last-seen notification timestamp", "operationId": "update-last-seen", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.AccountProfileResp" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/account/profile/referral_code": { "post": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account information\n", "tags": [ "Account" ], "summary": "Updates account profile fields", "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" } } } } } } }, "/account/profile/refresh_inventory": { "post": { "security": [ { "BearerToken": [] } ], "description": "Refreshes and returns the inventory for the authenticated account's Ethereum address", "tags": [ "Account" ], "summary": "Refresh inventory for authenticated account", "operationId": "refresh-account-inventory", "responses": { "200": { "description": "Inventory", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.RefreshInventoryResp" } } } }, "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" } } } } } } }, "/account/profile/size_currency_display": { "post": { "security": [ { "BearerToken": [] } ], "description": "To set user preferences for the size currency display on the UI, BASE will use base currency, and QUOTE will use quote currency.", "tags": [ "Account" ], "summary": "Updates account size currency display preference", "operationId": "update-account-size-currency-display", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateSizeCurrencyDisplayRequest" } } }, "description": "Update account size currency display request", "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" } } } } } } }, "/account/profile/username": { "post": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's account information\n", "tags": [ "Account" ], "summary": "Updates account profile username fields", "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" } } } } } } }, "/account/referrer": { "post": { "security": [ { "BearerToken": [] } ], "description": "Add missing account referrer within a certain time window after account creation.\n", "tags": [ "Account" ], "summary": "Updates account referred_by field", "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" } } } } } } }, "/account/settings": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get account settings", "tags": [ "Account" ], "summary": "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" } } } } } } }, "/account/settings/trading_value_display": { "post": { "security": [ { "BearerToken": [] } ], "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.", "tags": [ "Account" ], "summary": "Updates account trading value display", "operationId": "update-account-trading-value-display", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateTradingValueDisplayRequest" } } }, "description": "Update account trading value display request", "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" } } } } } } }, "/account/subaccounts": { "get": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's list of sub-accounts\n", "tags": [ "Account" ], "summary": "List sub-accounts of current account", "operationId": "get-sub-accounts", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetSubAccountsResponse" } } } } } } }, "/account/summary": { "get": { "security": [ { "BearerToken": [] } ], "description": "Respond with account summaries for the account plus all authorized accounts.", "tags": [ "Account" ], "summary": "Get account summaries (main account + 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" } } } } } } }, "/account/tokens": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get all tokens for the authenticated account with optional filtering by kind\nand status.\n", "tags": [ "Token" ], "summary": "List tokens", "operationId": "list-tokens", "parameters": [ { "description": "Filter by token kind (e.g., 'jwt', 'api_key')", "name": "kind", "in": "query", "schema": { "type": "string" } }, { "description": "Include revoked and expired tokens", "name": "with_invalid", "in": "query", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "description": "Create a new authentication token for the authenticated account with custom\nname and expiration duration.\n", "tags": [ "Token" ], "summary": "Create token", "operationId": "create-token", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateToken" } } }, "description": "Token creation request", "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" } } } }, "403": { "description": "IP restrictions not enabled for this account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/account/tokens/{lookup_id}": { "delete": { "security": [ { "BearerToken": [] } ], "description": "Revoke an authentication token by its unique identifier.\n", "tags": [ "Token" ], "summary": "Revoke token", "operationId": "revoke-token", "parameters": [ { "description": "Token lookup ID", "name": "lookup_id", "in": "path", "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" } } } } } } }, "/account/tokens/{lookup_id}/allowed-cidrs": { "put": { "security": [ { "BearerToken": [] } ], "description": "Replace the IP CIDR allowlist for an auth token. Empty array clears the allowlist (unrestricted). Only callable from the main account session; subkey sessions cannot modify token allowlists.", "tags": [ "Token" ], "summary": "Update token IP allowlist", "operationId": "update-token-allowed-cidrs", "parameters": [ { "description": "Token lookup ID", "name": "lookup_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/requests.UpdateAllowedCIDRs" }, "responses": { "200": { "description": "Updated token details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiToken" } } } }, "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": "IP restrictions not enabled for this account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/algo/orders": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get current user all open algo orders\n", "tags": [ "Algos" ], "summary": "Get open algo orders", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Algos" ], "summary": "Create algo order", "operationId": "create-algo-order", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.AlgoOrderRequest" } } }, "description": "Algo order content", "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" } } } } } } }, "/algo/orders-history": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get current user algo orders filtered on attributes\n", "tags": [ "Algos" ], "summary": "Get algo orders history", "operationId": "get-algo-orders-history", "parameters": [ { "example": "client-id", "description": "Unique ID of client generating the order", "name": "client_id", "in": "query", "schema": { "type": "string" } }, { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Market for the order", "name": "market", "in": "query", "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Order side", "name": "side", "in": "query", "schema": { "type": "string", "enum": [ "BUY", "SELL" ] } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Order status", "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "OPEN", "CLOSED", "NEW" ] } }, { "description": "Order type", "name": "type", "in": "query", "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" } } } } } } }, "/algo/orders/{algo_id}": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get an algo order by id. Only return algo order in `OPEN` or `NEW` status.\n", "tags": [ "Algos" ], "summary": "Get algo order by id", "operationId": "get-algo-order-by-id", "parameters": [ { "description": "Algo ID", "name": "algo_id", "in": "path", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "description": "Cancel an existing algo order by id\n", "tags": [ "Algos" ], "summary": "Cancel algo order by id", "operationId": "cancel-algo-order", "parameters": [ { "description": "Algo ID", "name": "algo_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/auth": { "post": { "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", "tags": [ "Authentication" ], "summary": "Get JWT", "operationId": "auth", "parameters": [ { "description": "Starknet account", "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Starknet signature", "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Timestamp when the signature was created", "name": "PARADEX-TIMESTAMP", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Timestamp when signature expires (default 30 min | Max 1 week)", "name": "PARADEX-SIGNATURE-EXPIRATION", "in": "header", "schema": { "type": "string" } }, { "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", "name": "PARADEX-AUTHORIZE-ISOLATED-MARKETS", "in": "header", "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": { "security": [ { "BearerToken": [] } ], "description": "Respond with requester's own balances\n", "tags": [ "Account" ], "summary": "List balances", "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" } } } } } } }, "/bbo/{market}": { "get": { "description": "Get the best bid/ask for the given market\n", "tags": [ "Markets" ], "summary": "Get market bbo", "operationId": "get-bbo", "parameters": [ { "description": "Market symbol - ex: BTC-USD-PERP", "name": "market", "in": "path", "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": { "description": "Returns best bid/offer including all orders including RPI (as seen by the UI)", "tags": [ "Markets" ], "summary": "Get market bbo including all orders including RPI (as seen by the UI)", "operationId": "get-bbo-interactive", "parameters": [ { "description": "Market symbol - ex: BTC-USD-PERP", "name": "market", "in": "path", "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": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "List block trades", "operationId": "block-trades-list", "parameters": [ { "description": "Block trade status filter", "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "CREATED", "OFFER_COLLECTION", "READY_TO_EXECUTE", "EXECUTING", "COMPLETED", "CANCELLED" ] } }, { "description": "Market symbol filter, ex: BTC-USD-PERP", "name": "market", "in": "query", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Create block trade", "operationId": "block-trades-create", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockTradeRequest" } } }, "description": "Block trade content", "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" } } } } } } }, "/block-trades/{block_trade_id}": { "get": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Get block trade", "operationId": "block-trades-get", "parameters": [ { "description": "Block Trade ID", "name": "block_trade_id", "in": "path", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Cancel block trade", "operationId": "block-trades-cancel", "parameters": [ { "description": "Block Trade ID", "name": "block_trade_id", "in": "path", "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/block-trades/{block_trade_id}/execute": { "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Execute block trade", "operationId": "block-trades-execute", "parameters": [ { "description": "Block Trade ID", "name": "block_trade_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockExecuteRequest" } } }, "description": "Block execution parameters", "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/block-trades/{block_trade_id}/offers": { "get": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Get block trade offers", "operationId": "block-offers-list", "parameters": [ { "description": "Parent Block Trade ID", "name": "block_trade_id", "in": "path", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Create block trade offer", "operationId": "block-offers-create", "parameters": [ { "description": "Parent Block Trade ID", "name": "block_trade_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockOfferRequest" } } }, "description": "Block offer content", "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/block-trades/{block_trade_id}/offers/{offer_id}": { "get": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Get specific block trade offer", "operationId": "block-offers-get", "parameters": [ { "description": "Parent Block Trade ID", "name": "block_trade_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Offer ID", "name": "offer_id", "in": "path", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Cancel block trade offer", "operationId": "block-offers-cancel", "parameters": [ { "description": "Parent Block Trade ID", "name": "block_trade_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Offer ID", "name": "offer_id", "in": "path", "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/block-trades/{block_trade_id}/offers/{offer_id}/execute": { "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "BlockTrades" ], "summary": "Execute individual offer", "operationId": "block-offers-execute", "parameters": [ { "description": "Parent Block Trade ID", "name": "block_trade_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Offer ID", "name": "offer_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.BlockExecuteRequest" } } }, "description": "Offer execution parameters", "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/fills": { "get": { "security": [ { "BearerToken": [] } ], "description": "This API returns a list of matched orders (i.e. fills) that have been sent to\r\nchain for settlement.\r\n", "tags": [ "Account" ], "summary": "List fills", "parameters": [ { "description": "Asset kind of the fill's market", "name": "asset_kind", "in": "query", "schema": { "type": "string", "enum": [ "PERP", "PERP_OPTION", "OPTION", "SPOT" ] } }, { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Market symbol", "name": "market", "in": "query", "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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" } } } } } } }, "/funding/data": { "get": { "description": "List historical funding data by market\n", "tags": [ "Markets" ], "summary": "Funding data history", "operationId": "get-funding-data", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Market for which funding payments are queried", "name": "market", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Account" ], "summary": "Funding payments history", "operationId": "get-funding", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Market for which funding payments are queried", "name": "market", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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" } } } } } } }, "/insurance": { "get": { "description": "Get insurance fund account's information\n", "tags": [ "Insurance" ], "summary": "Get insurance fund account information", "operationId": "get-insurance-fund", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.InsuranceAccountResp" } } } } } } }, "/jwks.json": { "get": { "description": "Returns the JSON Web Key Set used to validate JWT tokens issued by this service", "tags": [ "Authentication" ], "summary": "Get JWKS", "operationId": "jwks", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.JwksResponse" } } } } } } }, "/liquidations": { "get": { "security": [ { "BearerToken": [] } ], "description": "Retrieves a list of liquidations associated to the requester's account\n", "tags": [ "Liquidations" ], "summary": "List liquidations", "operationId": "get-liquidations", "parameters": [ { "description": "Start Time (unix time millisecond)", "name": "from", "in": "query", "schema": { "type": "integer" } }, { "description": "End Time (unix time millisecond)", "name": "to", "in": "query", "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" } } } } } } }, "/markets": { "get": { "description": "Get markets static data component\n", "tags": [ "Markets" ], "summary": "List available markets", "operationId": "get-markets", "parameters": [ { "description": "Market Name - example: BTC-USD-PERP", "name": "market", "in": "query", "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/history": { "get": { "description": "Returns audit-driven events for market spec changes (listing, settlement, parameter updates) over the last 7 days. Source: market audit table; includes Ops manual changes.", "tags": [ "Markets" ], "summary": "History of changes to market specifications", "operationId": "get-markets-history", "parameters": [ { "example": "BTC-USD-PERP", "description": "Market symbol to filter history. Omit or pass \"ALL\" for all markets.", "name": "market", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.MarketHistoryResponse" } } } } } } }, "/markets/klines": { "get": { "description": "Klines for a symbol", "tags": [ "Markets" ], "summary": "OHLCV for a symbol", "operationId": "markets-klines", "parameters": [ { "description": "end time for klines in milliseconds", "name": "end_at", "in": "query", "required": true, "schema": { "type": "integer" } }, { "x-enum-varnames": [ "PriceKindLast", "PriceKindMark", "PriceKindUnderlying" ], "description": "Which price to use for the klines", "name": "price_kind", "in": "query", "schema": { "type": "string", "enum": [ "last", "mark", "underlying" ] } }, { "description": "resolution in minutes: 1, 3, 5, 15, 30, 60", "name": "resolution", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "start time for klines in milliseconds", "name": "start_at", "in": "query", "required": true, "schema": { "type": "integer" } }, { "description": "Symbol of the market pair", "name": "symbol", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/markets/settlement-price": { "get": { "description": "Returns the settlement price and the underlying spot TWAP used to compute it. The market must have already settled; otherwise returns 404.", "tags": [ "Markets" ], "summary": "Settlement price for a single market", "operationId": "get-market-settlement-price", "parameters": [ { "description": "Market symbol, e.g. BTC-USD-15SEP25-55000-C", "name": "market", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.MarketSettlementResp" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/markets/summary": { "get": { "description": "Get markets dynamic data component\n", "tags": [ "Markets" ], "summary": "List available markets summary", "operationId": "get-markets-summary", "parameters": [ { "description": "End Time (unix time millisecond)", "name": "end", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Name of the market for which summary is requested (for all available markets use ALL)", "name": "market", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Start Time (unix time millisecond)", "name": "start", "in": "query", "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": { "get": { "description": "Returns the Paradex address and derivation info for a given identity", "tags": [ "Authentication" ], "summary": "Check onboarding status", "operationId": "getOnboarding", "parameters": [ { "description": "Starknet public key (required when account_signer_type=starknet)", "name": "public_key", "in": "query", "schema": { "type": "string" } }, { "description": "Ethereum address (required when account_signer_type=eip191)", "name": "eth_address", "in": "query", "schema": { "type": "string" } }, { "description": "Signer variant: starknet or eip191", "name": "account_signer_type", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "EVM vault operator index (eip191 only; requires EnableEvmVaultOperators)", "name": "vault_operator_index", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.GetOnboardingResp" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } }, "post": { "description": "Onboarding verifies that the caller owns the StarkNet address and enters them\ninto the database. This call is idempotent.\n", "tags": [ "Authentication" ], "summary": "Onboarding", "operationId": "onboarding", "parameters": [ { "description": "Ethereum account used to onboard", "name": "PARADEX-ETHEREUM-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Starknet address", "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Starknet signature", "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/requests.Onboarding" }, "responses": { "200": { "description": "An empty response" }, "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" } } } } } } }, "/orderbook/{market}": { "get": { "description": "Get snapshot of the orderbook for the given market\n", "tags": [ "Markets" ], "summary": "Get market orderbook", "operationId": "get-orderbook", "parameters": [ { "description": "Market symbol - ex: BTC-USD-PERP", "name": "market", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Depth", "name": "depth", "in": "query", "schema": { "type": "integer", "default": 20 } }, { "description": "Price tick for aggregation", "name": "price_tick", "in": "query", "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": [ { "description": "Market symbol - ex: BTC-USD-PERP", "name": "market", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Size", "name": "size", "in": "query", "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": { "description": "Returns orderbook including RPI", "tags": [ "Markets" ], "summary": "Get market interactive orderbook", "operationId": "get-orderbook-interactive", "parameters": [ { "description": "Market symbol - ex: BTC-USD-PERP", "name": "market", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Depth", "name": "depth", "in": "query", "schema": { "type": "integer", "default": 20 } }, { "description": "Price tick for aggregation", "name": "price_tick", "in": "query", "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": { "security": [ { "BearerToken": [] } ], "description": "Get current user all open orders\n", "tags": [ "Orders" ], "summary": "Get open orders", "operationId": "get-open-orders", "parameters": [ { "description": "Market symbol, ex: BTC-USD-PERP", "name": "market", "in": "query", "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" } } } } } }, "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Orders" ], "summary": "Create order", "operationId": "orders-new", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.OrderRequest" } } }, "description": "Order content", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "tags": [ "Orders" ], "summary": "Cancel all open orders", "operationId": "orders-cancel-all", "parameters": [ { "description": "Market to cancel orders for", "name": "market", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/orders-history": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get current user orders filtered on attributes\n", "tags": [ "Orders" ], "summary": "Get orders", "operationId": "get-orders", "parameters": [ { "example": "client-id", "description": "Unique ID of client generating the order", "name": "client_id", "in": "query", "schema": { "type": "string" } }, { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Market for the order", "name": "market", "in": "query", "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Order side", "name": "side", "in": "query", "schema": { "type": "string", "enum": [ "BUY", "SELL" ] } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Order status", "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "OPEN", "CLOSED", "NEW" ] } }, { "description": "Order type", "name": "type", "in": "query", "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" } } } } } } }, "/orders/batch": { "post": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Orders" ], "summary": "Create batch of orders", "operationId": "orders-new-batch", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/requests.OrderRequest" } } } }, "description": "Order content", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Orders" ], "summary": "Cancel batch of orders by order IDs", "operationId": "orders-cancel-batch", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CancelOrderBatchRequest" } } }, "description": "Order IDs to cancel", "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" } } } } } } }, "/orders/by_client_id/{client_id}": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get an order by client id. Only returns orders in `OPEN` status.\n", "tags": [ "Orders" ], "summary": "Get order by client id", "operationId": "orders-get-by-client-id", "parameters": [ { "description": "Client Order Id", "name": "client_id", "in": "path", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "tags": [ "Orders" ], "summary": "Cancel open order by client order id", "operationId": "orders-cancel-by-client-id", "parameters": [ { "description": "Client Order Id", "name": "client_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Market to cancel orders for", "name": "market", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/orders/{order_id}": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get an order by id. Only return orders in `OPEN` or `NEW` status.\n", "tags": [ "Orders" ], "summary": "Get order", "operationId": "orders-get", "parameters": [ { "description": "Order Id", "name": "order_id", "in": "path", "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" } } } } } }, "put": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Orders" ], "summary": "Modify order", "operationId": "orders-modify", "parameters": [ { "description": "Order Id", "name": "order_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.ModifyOrderRequest" } } }, "description": "Modify Order Request", "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" } } } } } }, "delete": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Orders" ], "summary": "Cancel order", "operationId": "orders-cancel", "parameters": [ { "description": "Order Id", "name": "order_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/positions": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get all positions owned by current user\n", "tags": [ "Account" ], "summary": "List open positions", "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" } } } } ] } } } } } } }, "/referrals/qr-code": { "get": { "security": [ { "BearerToken": [] } ], "description": "Returns a QR code image containing the user's referral link", "tags": [ "Referrals" ], "summary": "Get Referral QR Code", "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" } } } } } } }, "/referrals/summary": { "get": { "security": [ { "BearerToken": [] } ], "description": "Get latest referee data for requester's account\n", "tags": [ "Referrals" ], "summary": "Get account referral details", "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" } } } } } } }, "/staking/config": { "get": { "description": "Returns staking tiers with minimum stake amounts, fee rates, and XP multipliers", "tags": [ "Staking" ], "summary": "Get staking configuration", "operationId": "get-staking-config", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.StakingConfigResponse" } } } } } } }, "/staking/history": { "get": { "security": [ { "BearerToken": [] } ], "description": "Returns all staking entries for the authenticated account including active, unstaking, and unstaked", "tags": [ "Staking" ], "summary": "List account staking history", "operationId": "get-staking-history", "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.StakingStakeResp" } } } } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/staking/summary": { "get": { "security": [ { "BearerToken": [] } ], "description": "Returns the authenticated account's total staked amount, tier, and active stake count", "tags": [ "Staking" ], "summary": "Get account staking summary", "operationId": "get-staking-summary", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.StakingSummaryResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/system/announcements": { "get": { "description": "get announcements", "tags": [ "System" ], "summary": "Get all announcements", "operationId": "get-announcements", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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": { "description": "Get clearing and settlement layer config for Paradex\n", "tags": [ "System" ], "summary": "Get system config", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemConfigResponse" } } } } } } }, "/system/portfolio-margin-config": { "get": { "description": "Returns portfolio margin risk parameters per base asset", "tags": [ "System" ], "summary": "Get portfolio margin configuration", "operationId": "get-portfolio-margin-config", "parameters": [ { "description": "Base asset filter (e.g. BTC, ETH). Omit to return all.", "name": "base_asset", "in": "query", "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.PortfolioMarginParamsResp" } } } } ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/system/state": { "get": { "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", "tags": [ "System" ], "summary": "Get system state", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemStateResponse" } } } } } } }, "/system/time": { "get": { "description": "Get the current time in the Paradex\n", "tags": [ "System" ], "summary": "Get system time (unix milliseconds)", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.SystemTimeResponse" } } } } } } }, "/system/volume-tiers": { "get": { "description": "Returns all volume tier configurations for retail and pro profiles", "tags": [ "System" ], "summary": "Get volume-based fee tiers", "operationId": "get-volume-tiers", "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.VolumeTierResp" } } } } ] } } } } } } }, "/tradebusts": { "get": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Account" ], "summary": "List tradebusts", "operationId": "tradebusts", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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" } } } } } } }, "/trades": { "get": { "description": "Returns a paginated list of trades that have occurred on the exchange.\nDefault page size is 100, maximum is 1000.\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", "tags": [ "Trades" ], "summary": "Trade tape", "operationId": "trades", "parameters": [ { "example": "BTC", "description": "Base asset symbol; returns trades across all active options (OPTION and PERP_OPTION) for this base asset. Mutually exclusive with market.", "name": "baseAsset", "in": "query", "schema": { "type": "string" } }, { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "example": "BTC-USD-PERP", "description": "Market name. Mutually exclusive with base_asset.", "name": "market", "in": "query", "schema": { "type": "string" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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": { "security": [ { "BearerToken": [] } ], "description": "Retrieves a list of transactions initiated by the user\n", "tags": [ "Account" ], "summary": "List transactions", "operationId": "transactions", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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" } } } } } } }, "/transfers": { "get": { "security": [ { "BearerToken": [] } ], "tags": [ "Transfers" ], "summary": "List account's transfers, i.e. deposits and withdrawals", "operationId": "get-transfers", "parameters": [ { "description": "Returns the ‘next’ paginated page.", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "End Time (unix time millisecond)", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Limit the number of responses in the page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 100 } }, { "description": "Start Time (unix time millisecond)", "name": "start_at", "in": "query", "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" } } } } } } }, "/v2/auth": { "post": { "description": "Authenticate an EVM account using SIWE signature and return a JWT", "tags": [ "Authentication" ], "summary": "EVM Get JWT", "operationId": "evmAuth", "parameters": [ { "description": "Starknet account", "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "EVM personal_sign signature", "name": "PARADEX-EVM-SIGNATURE", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Base64-encoded SIWE message", "name": "PARADEX-SIWE-MESSAGE", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Optional flag to authorize all isolated market accounts", "name": "PARADEX-AUTHORIZE-ISOLATED-MARKETS", "in": "header", "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" } } } } } } }, "/v2/onboarding": { "post": { "description": "Onboard a new EVM account using SIWE signature", "tags": [ "Authentication" ], "summary": "EVM Onboarding", "operationId": "evmOnboarding", "parameters": [ { "description": "Starknet account", "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "EVM personal_sign signature", "name": "PARADEX-EVM-SIGNATURE", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Base64-encoded SIWE message", "name": "PARADEX-SIWE-MESSAGE", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/requests.Onboarding" }, "responses": { "200": { "description": "An empty response" }, "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" } } } } } } }, "/vaults": { "get": { "description": "Get list of available vaults.\n", "tags": [ "Vaults" ], "summary": "Get vaults", "operationId": "vaults-get", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "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": { "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", "tags": [ "Vaults" ], "summary": "Create vault", "operationId": "vaults-create", "parameters": [ { "description": "Onboarded by prdx:0xa123456789", "name": "PARADEX-PARENT-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Starknet signature", "name": "PARADEX-STARKNET-SIGNATURE", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Starknet address", "name": "PARADEX-STARKNET-ACCOUNT", "in": "header", "required": true, "schema": { "type": "string" } }, { "description": "Account derivation path - m/44'/9004'/0'/0/1", "name": "PARADEX-STARKNET-ACCOUNT-DERIVATION-PATH", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateVault" } } }, "description": "Vault parameters", "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" } } } } } } }, "/vaults/account-summary": { "get": { "security": [ { "BearerToken": [] } ], "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", "tags": [ "Vaults" ], "summary": "Get vault account summary", "operationId": "vaults-get-account-summary", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "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" } } } } } } }, "/vaults/analytics": { "get": { "description": "Returns the vault-level analytics row plus per-substrategy analytics rows for a single vault. vault_level is null when the vault has no analytics blob yet; substrategies only contains entries whose Redis blob is present. 404 only when the vault itself does not exist — missing analytics data returns 200 with empty fields.", "tags": [ "Vaults" ], "summary": "Get combined vault-level and substrategy analytics for a vault", "operationId": "vaults-get-analytics", "parameters": [ { "description": "Vault address", "name": "address", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.VaultAnalyticsResp" } } } }, "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" } } } } } } }, "/vaults/balance": { "get": { "description": "Get spot balance of a vault\n", "tags": [ "Vaults" ], "summary": "Get vault balances", "operationId": "vaults-get-balance", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Vault Strategy Address", "name": "strategy", "in": "query", "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" } } } }, "403": { "description": "VAULT_DATA_PRIVATE when the owner has hidden the vault's or the requested strategy's balances", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/config": { "get": { "description": "Get vaults global configuration.\n", "tags": [ "Vaults" ], "summary": "Get vaults config", "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": { "description": "Get PnL and Account value historical timeseries for the given vault.\n", "tags": [ "Vaults" ], "summary": "Get vault historical data", "operationId": "vaults-get-historical-data", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Vault Strategy Address", "name": "strategy", "in": "query", "schema": { "type": "string" } }, { "description": "Type of data", "name": "type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "pnl", "value", "price" ] } }, { "description": "Resolution of data", "name": "resolution", "in": "query", "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/mine": { "get": { "security": [ { "BearerToken": [] } ], "description": "Returns all vaults (any status) where the caller is the operator or owner,\nplus the vault the caller is a sub-operator (strategy) of, if any.\nIt includes vaults not active yet, like initializing or pending initial deposit.\nEach vault includes its strategies (sub-operators), so the UI can resolve\nvalid operator <-> sub-operator transfer counterparties.", "tags": [ "Vaults" ], "summary": "Get vaults owned, operated, or sub-operated by the authenticated account", "operationId": "vaults-get-mine", "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" } } } } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/positions": { "get": { "description": "Get positions opened by the given vault.\n", "tags": [ "Vaults" ], "summary": "Get vault positions", "operationId": "vaults-get-positions", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Vault Strategy Address", "name": "strategy", "in": "query", "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" } } } }, "403": { "description": "VAULT_DATA_PRIVATE when the owner has hidden the vault's or the requested strategy's positions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/responses.ApiError" } } } } } } }, "/vaults/summary": { "get": { "description": "Get vaults summary metrics for all vaults or for the single vault specified by address.\n", "tags": [ "Vaults" ], "summary": "Get vault summary", "operationId": "vaults-get-summary", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "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": { "description": "Get deposits and withdrawals related to the given vault.\n", "tags": [ "Vaults" ], "summary": "Get vault transfers", "operationId": "vaults-get-transfers", "parameters": [ { "description": "Vault Address", "name": "address", "in": "query", "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": { "security": [ { "BearerToken": [] } ], "description": "Get detailed XP balance including earned XP, transfer delta, and transferrable\namount.\n", "tags": [ "XPTransfersV2" ], "summary": "Get XP Balance (V2)", "operationId": "get-xp-balance-v2", "parameters": [ { "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2, 'season3' for Season 3)", "name": "season", "in": "query", "schema": { "type": "string", "default": "season3" } } ], "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" } } } } } } }, "/xp/fee-config": { "get": { "description": "Get the current fee percentage charged on XP transfers", "tags": [ "XPTransfersV2" ], "summary": "Get Transfer Fee Configuration", "operationId": "get-transfer-fee-config-v2", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/services.TransferFeeConfigResponse" } } } } } } }, "/xp/public-transfers": { "get": { "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.", "tags": [ "XPTransfersV2" ], "summary": "Get Public XP Transfer History", "operationId": "get-public-xp-transfers-v2", "parameters": [ { "description": "Start timestamp in milliseconds", "name": "start_at", "in": "query", "schema": { "type": "integer" } }, { "description": "End timestamp in milliseconds", "name": "end_at", "in": "query", "schema": { "type": "integer" } }, { "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2, 'season3' for Season 3)", "name": "season", "in": "query", "schema": { "type": "string", "default": "season3" } }, { "description": "Pagination cursor", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "Number of results per page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "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": { "security": [ { "BearerToken": [] } ], "description": "Transfer XP instantly from your account to another user.\n", "tags": [ "XPTransfersV2" ], "summary": "Create XP Transfer", "operationId": "create-xp-transfer-v2", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.CreateXPTransferRequest" } } }, "description": "Transfer details", "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" } } } } } } }, "/xp/transfer/{transfer_id}": { "get": { "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.", "tags": [ "XPTransfersV2" ], "summary": "Get XP Transfer by ID", "operationId": "get-xp-transfer-by-id-v2", "parameters": [ { "description": "Transfer ID", "name": "transfer_id", "in": "path", "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": { "security": [ { "BearerToken": [] } ], "description": "Retrieve XP transfer history for the authenticated account with optional\nfiltering by role (sender/recipient).\n", "tags": [ "XPTransfersV2" ], "summary": "Get XP Transfer History", "operationId": "get-xp-transfers-v2", "parameters": [ { "description": "Filter by role", "name": "role", "in": "query", "schema": { "type": "string", "enum": [ "sender", "recipient" ] } }, { "description": "Season filter ('preseason' for Preseason, 'season1' for Season 1, 'season2' for Season 2, 'season3' for Season 3)", "name": "season", "in": "query", "schema": { "type": "string", "default": "season3" } }, { "description": "Pagination cursor", "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "description": "Number of results per page", "name": "page_size", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "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" } } } } } } } }, "x-hideTryItPanel": true, "servers": [ { "url": "https://api.prod.paradex.trade/v1" } ], "components": { "requestBodies": { "requests.UpdateAllowedCIDRs": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.UpdateAllowedCIDRs" } } }, "description": "Replacement CIDR list", "required": true }, "requests.Onboarding": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/requests.Onboarding" } } }, "description": "Onboarding user public_key and optional referral_code or marketing_code", "required": true } }, "securitySchemes": { "BearerToken": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "schemas": { "messagesv1.NftPrice": { "type": "object", "properties": { "currency": { "type": "string" }, "decimals": { "type": "integer" }, "value": { "type": "string" } } }, "requests.AccountMarginRequest": { "type": "object", "required": [ "leverage", "margin_type" ], "properties": { "leverage": { "description": "Leverage value (1 up to market's maximum leverage)", "type": "integer", "example": 10 }, "margin_type": { "description": "Margin type (CROSS or ISOLATED)", "type": "string", "example": "CROSS" }, "on_behalf_of_account": { "description": "Specify sub-account ID to set margin for, if not provided, it will be the main account itself", "type": "string", "example": "0x1234567890abcdef" } } }, "requests.ActivateSubkey": { "type": "object", "required": [ "account_id", "public_key", "signature", "timestamp" ], "properties": { "account_id": { "description": "Account ID that the pending subkey belongs to.", "type": "string", "example": "0x1234567890abcdef" }, "name": { "description": "Optional: New name for the subkey upon activation.", "type": "string", "example": "My Mobile Device" }, "public_key": { "description": "Public key of the pending subkey to activate.", "type": "string", "example": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9" }, "signature": { "description": "Starknet signature [r, s] over pedersen(timestamp, eph_public_key).", "type": "array", "items": { "type": "string" }, "example": [ "[\"0xr...\"", "\"0xs...\"]" ] }, "timestamp": { "description": "Unix timestamp (seconds) included in signed message.", "type": "integer", "example": 1706400000 } } }, "requests.ActivateSubkeyResponse": { "type": "object", "properties": { "encrypted_key": { "description": "Encrypted private key returned to client.", "type": "string", "example": "0xabc..." } } }, "requests.AlgoOrderRequest": { "type": "object", "required": [ "algo_type", "duration_seconds", "market", "side", "signature", "signature_timestamp", "size", "type" ], "properties": { "algo_type": { "description": "Algo type, required for algo orders creation", "type": "string", "example": "TWAP" }, "dime_discount": { "description": "If true, child-order fees are charged in DIME with the DIME discount applied; falls back to USDC if balance is insufficient", "type": "boolean" }, "duration_seconds": { "description": "Duration in seconds for which the algo order will be running, required for algo orders creation", "type": "integer", "example": 3600 }, "frequency": { "description": "Interval in seconds between child orders (default: 30)", "type": "integer", "example": 30 }, "market": { "description": "Market for which order is created", "type": "string", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "type": "string", "example": "0x1234567890abcdef" }, "recv_window": { "description": "Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds", "type": "integer" }, "side": { "description": "Algo order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ], "example": "MARKET" }, "signature": { "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key", "type": "string" }, "signature_timestamp": { "description": "Unix timestamp in milliseconds of order creation, used for signature verification", "type": "integer" }, "size": { "description": "Size of the algo order", "type": "string", "example": "1.213" }, "type": { "description": "Algo order type, only MARKET is supported", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] } } }, "requests.BlockExecuteRequest": { "type": "object", "required": [ "execution_nonce", "signatures" ], "properties": { "execution_nonce": { "description": "Unique nonce for this execution request", "type": "string", "example": "execution_001" }, "selected_offers": { "description": "Array of offer IDs selected for execution (offers are atomic, not partial)", "type": "array", "items": { "type": "string" } }, "signatures": { "description": "Map of offer IDs to initiator signatures accepting each offer. Block id if it is a direct block trade.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" } } } }, "requests.BlockOfferInfo": { "type": "object", "required": [ "offerer_order", "price", "size" ], "properties": { "offerer_order": { "description": "Order details from the offering account", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "price": { "description": "Offered price for this market", "type": "string", "example": "30050.00" }, "size": { "description": "Offered size for this market", "type": "string", "example": "5.0" } } }, "requests.BlockOfferRequest": { "type": "object", "required": [ "nonce", "offering_account", "signature", "trades" ], "properties": { "nonce": { "description": "Unique nonce for this offer request", "type": "string", "example": "98765" }, "offering_account": { "description": "Starknet address of the account making this offer", "type": "string", "example": "0xabcdef1234567890" }, "signature": { "description": "Cryptographic signature authorizing this offer", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeSignature" } ] }, "trades": { "description": "Map of market symbol to offer details", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/requests.BlockOfferInfo" } } } }, "requests.BlockTradeInfo": { "type": "object", "properties": { "maker_order": { "description": "Maker order details (empty if requiring offers)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "price": { "description": "Agreed price for this trade (empty if requiring offers)", "type": "string", "example": "30000.00" }, "size": { "description": "Agreed size for this trade (empty if requiring offers)", "type": "string", "example": "10.5" }, "taker_order": { "description": "Taker order details (empty if requiring offers)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "trade_constraints": { "description": "Constraints for this trade when requiring offers", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeConstraints" } ] } } }, "requests.BlockTradeRequest": { "type": "object", "required": [ "block_expiration", "nonce", "required_signers", "signatures", "trades" ], "properties": { "block_expiration": { "description": "Unix timestamp in milliseconds when block expires", "type": "integer", "example": 1640995800000 }, "nonce": { "description": "Unique nonce for this block trade request", "type": "string", "example": "67890" }, "required_signers": { "description": "List of accounts that can participate in the block trade", "type": "array", "items": { "type": "string" } }, "signatures": { "description": "Map of account addresses to their signatures. Can be empty or partial.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" } }, "trades": { "description": "Map of market symbol to trade info (one per market)", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/requests.BlockTradeInfo" } } } }, "requests.CancelOrderBatchRequest": { "type": "object", "properties": { "client_order_ids": { "description": "List of client order IDs to cancel", "type": "array", "items": { "type": "string" }, "example": [ "[\"client-id-1\"", "\"client-id-2\"]" ] }, "order_ids": { "description": "List of order IDs to cancel", "type": "array", "items": { "type": "string" }, "example": [ "[\"order-id-1\"", "\"order-id-2\"]" ] } } }, "requests.CreateSubkey": { "type": "object", "required": [ "name", "public_key" ], "properties": { "allowed_cidrs": { "description": "Optional IP CIDR allowlist applied atomically at creation, so the subkey\nis never live unrestricted. Empty/omitted = unrestricted. Max 50 entries;\nsame format as PUT .../allowed-cidrs (e.g. \"203.0.113.0/24\"). Not covered\nby the registration signature: the list is mutable post-creation via the\nJWT-only allowed-cidrs endpoint, so signing it would add no protection.", "type": "array", "items": { "type": "string" }, "example": [ "[\"203.0.113.0/24\"", "\"198.51.100.42/32\"]" ] }, "encrypted_key": { "description": "Encrypted private key (required if state=pending).", "type": "string", "example": "0xabc..." }, "eph_public_key": { "description": "Ephemeral public key for signature verification (required if state=pending).", "type": "string", "example": "0x123..." }, "evm_signature": { "description": "EVM (EIP-191) registration signature, used in place of `signature` /\n`signature_timestamp` / `signature_expiry` when the account's main\nkey is a secp256k1 key (AccountSignerType == EIP191). The server\nreconstructs nothing — the raw SIWE message presented to the user is\nsupplied verbatim in `siwe_message` and the personal_sign signature\nin `evm_signature`. The SIWE message's Statement must equal\n\"Paradex Subkey Registration: 0x\" (lowercased\npubkey); that line is what binds the authorisation to the specific\nsubkey being registered.", "type": "string", "example": "0x..." }, "name": { "description": "User-friendly name for the subkey.", "type": "string", "example": "My Trading Subkey" }, "public_key": { "description": "Public key to be registered as a subkey.", "type": "string", "example": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9" }, "signature": { "description": "Signature from the account's main StarkNet private key over\npedersen_array(account, public_key, signature_timestamp, signature_expiry).\nRequired when the server enforces main-key authorization on subkey\nregistration (feature flag EnableSubkeyRegistrationSignature). Format: [r, s].", "type": "array", "items": { "type": "string" }, "example": [ "[\"0xr...\"", "\"0xs...\"]" ] }, "signature_expiry": { "description": "Unix seconds; included in signed message and bounds replay window.", "type": "integer", "example": 1706400600 }, "signature_timestamp": { "description": "Unix seconds; included in signed message.", "type": "integer", "example": 1706400000 }, "siwe_message": { "type": "string", "example": "app.paradex.trade wants you to sign in..." }, "state": { "description": "State of the subkey: 'active' or 'pending'. Defaults to 'active'.", "type": "string", "default": "active", "example": "active" } } }, "requests.CreateToken": { "type": "object", "required": [ "expiry_duration", "name", "token_type" ], "properties": { "allowed_cidrs": { "description": "Optional IP CIDR allowlist applied atomically at creation, so the token\nis never live unrestricted. Empty/omitted = unrestricted. Max 50 entries;\nsame format as PUT /account/tokens/:lookup_id/allowed-cidrs.", "type": "array", "items": { "type": "string" }, "example": [ "[\"203.0.113.0/24\"", "\"198.51.100.42/32\"]" ] }, "expiry_duration": { "description": "Duration in seconds from now until expiration (1 min to 1 year).", "type": "integer", "example": 86400 }, "name": { "description": "User-friendly name for the JWT token.", "type": "string", "example": "My Long-term Trading Token" }, "token_type": { "description": "Type of token to create.", "type": "string" } } }, "requests.CreateVault": { "type": "object", "properties": { "curator_name": { "description": "Curator name for the vault (optional)", "type": "string", "example": "Some Curator" }, "deposit_tx_signature": { "description": "Initial deposit transfer by vault owner", "type": "string", "example": "[" }, "description": { "description": "Description for the vault", "type": "string", "example": "My vault description" }, "lockup_period": { "description": "User's deposits lockup period in days", "type": "integer", "example": 1 }, "max_tvl": { "description": "Max TVL locked by the Vault, if any. 0 for unlimited", "type": "integer", "example": 1000000 }, "name": { "description": "Unique name for the vault", "type": "string", "example": "MyVault" }, "operator_eth_address": { "description": "EVM address of the vault operator (empty for legacy Starknet operator)", "type": "string", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "operator_index": { "description": "Index of the operator sub-account (0 for legacy Starknet operator)", "type": "integer", "example": 1 }, "operator_signer_type": { "description": "Signer type for the operator: \"starknet\" (default when empty) or \"eip191\"", "type": "string", "example": "eip191" }, "profit_share": { "description": "Vault owner profit share (percentage)", "type": "integer", "example": 10 }, "public_key": { "description": "Public key of vault operator", "type": "string", "example": "0x1234567890abcdef" }, "show_balances": { "description": "Whether the vault's balances are publicly visible. Defaults to true when omitted.", "type": "boolean", "example": true }, "show_positions": { "description": "Whether the vault's positions are publicly visible. Defaults to true when omitted.", "type": "boolean", "example": true }, "strategy_description": { "description": "Strategy description for the vault (optional)", "type": "string", "example": "Delta Neutral" } } }, "requests.CreateXPTransferRequest": { "type": "object", "required": [ "amount", "recipient" ], "properties": { "amount": { "description": "Amount of XP to transfer (must be >= 1 and <= 1e12)", "type": "integer", "maximum": 1000000000000, "minimum": 1, "example": 100 }, "is_private": { "description": "Whether the transfer is private (not shown on public feeds). Defaults to false if not provided.", "type": "boolean", "default": false, "example": false }, "recipient": { "description": "Recipient's Starknet address (hex format)", "type": "string", "example": "0x1234567890abcdef0123456789abcdef" }, "season": { "description": "Season identifier. Defaults to season3 if not provided.", "type": "string", "default": "season3", "example": "season3" } } }, "requests.ModifyOrderRequest": { "type": "object", "required": [ "id", "market", "price", "side", "signature", "signature_timestamp", "size", "type" ], "properties": { "id": { "description": "Order ID to be modified", "type": "string" }, "market": { "description": "Market for which order is modified", "type": "string", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "type": "string", "example": "0x1234567890abcdef" }, "price": { "description": "Existing or modified price of the order", "type": "string", "example": "29500.12" }, "side": { "description": "Existing side of the order", "type": "string", "example": "BUY" }, "signature": { "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key", "type": "string" }, "signature_timestamp": { "description": "Unix timestamp in milliseconds of order creation, used for signature verification", "type": "integer" }, "size": { "description": "Existing or modified size of the order", "type": "string", "example": "1.213" }, "trigger_price": { "description": "Existing or modified trigger price of a TPSL order", "type": "string", "example": "29500.12" }, "type": { "description": "Existing type of the order", "type": "string", "example": "LIMIT" } } }, "requests.Onboarding": { "type": "object", "properties": { "marketing_code": { "description": "Marketing code of the campaign the user is being onboarded via.", "type": "string", "example": "abcd:code1" }, "portfolio_margin": { "description": "When true, the new account is onboarded directly into Portfolio Margin mode. Only valid for main accounts and subaccounts.", "type": "boolean" }, "public_key": { "description": "Public key of the user being onboarded.", "type": "string", "example": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9" }, "referral_code": { "description": "Referral code of the user who referred the user being onboarded.", "type": "string", "example": "cryptofox8" }, "utm": { "description": "UTM tracking parameters (optional).", "allOf": [ { "$ref": "#/components/schemas/requests.Utm" } ] } } }, "requests.OrderRequest": { "type": "object", "required": [ "instruction", "market", "price", "side", "signature", "signature_timestamp", "size", "type" ], "properties": { "client_id": { "description": "Unique client assigned ID for the order", "type": "string", "maxLength": 64, "example": "123454321" }, "dime_discount": { "description": "If true, fees are charged in DIME with the DIME discount applied; falls back to USDC if balance is insufficient", "type": "boolean" }, "flags": { "description": "Order flags, allow flag: REDUCE_ONLY", "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderFlag" } }, "instruction": { "description": "Order Instruction, GTC, IOC, RPI or POST_ONLY if empty GTC", "allOf": [ { "$ref": "#/components/schemas/responses.OrderInstruction" } ] }, "market": { "description": "Market for which order is created", "type": "string", "example": "BTC-USD-PERP" }, "on_behalf_of_account": { "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders", "type": "string", "example": "0x1234567890abcdef" }, "price": { "description": "Order price", "type": "string", "example": "29500.12" }, "recv_window": { "description": "Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds", "type": "integer" }, "side": { "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "signature": { "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key", "type": "string" }, "signature_timestamp": { "description": "Unix timestamp in milliseconds of order creation, used for signature verification", "type": "integer" }, "size": { "description": "Size of the order", "type": "string", "example": "1.213" }, "stp": { "description": "Self Trade Prevention, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH, if empty EXPIRE_TAKER", "type": "string" }, "trigger_price": { "description": "Trigger price for stop order", "type": "string" }, "type": { "description": "Order type", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] }, "vwap_price": { "description": "Optional VWAP price for market orders used for VWAP instruction, bounded by price band", "type": "string" } } }, "requests.PriceKind": { "type": "string", "enum": [ "last", "mark", "underlying" ], "x-enum-varnames": [ "PriceKindLast", "PriceKindMark", "PriceKindUnderlying" ] }, "requests.RecordComplianceActionRequest": { "type": "object", "required": [ "action_type", "action_version" ], "properties": { "action_type": { "type": "string" }, "action_version": { "type": "string" } } }, "requests.UpdateAccountMaxSlippageRequest": { "type": "object", "required": [ "max_slippage" ], "properties": { "max_slippage": { "type": "string" } } }, "requests.UpdateAccountProfileRequest": { "type": "object", "properties": { "ai_agent_url": { "type": "string", "example": "wss://agent.example.com:18789" }, "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.UpdateAllowedCIDRs": { "type": "object", "properties": { "allowed_cidrs": { "description": "Full replacement list. Empty = unrestricted.", "type": "array", "items": { "type": "string" }, "example": [ "[\"203.0.113.0/24\"", "\"198.51.100.42/32\"]" ] } } }, "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": { "type": "object", "required": [ "size_currency_display" ], "properties": { "size_currency_display": { "type": "string" } } }, "requests.UpdateSubkey": { "type": "object", "required": [ "name" ], "properties": { "name": { "description": "New name for the subkey.", "type": "string", "example": "My Updated Device Name" } } }, "requests.UpdateTradingValueDisplayRequest": { "type": "object", "required": [ "trading_value_display" ], "properties": { "trading_value_display": { "type": "string" } } }, "requests.Utm": { "type": "object", "properties": { "campaign": { "description": "UTM campaign parameter", "type": "string", "example": "summer2024" }, "source": { "description": "UTM source parameter", "type": "string", "example": "google" }, "type": { "description": "UTM type parameter", "type": "string", "example": "clickthrough" } } }, "responses.APIResults": { "type": "object", "properties": { "results": { "description": "Array of results", "type": "array", "items": { "type": "object" } } } }, "responses.AccountAnalytics": { "type": "object", "properties": { "account_address": { "type": "string", "example": "0x1234567890abcdef" }, "annualized_volatility": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "apr": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "apr_simple_itd": { "type": "string" }, "cum_return": { "type": "string" }, "cumulative_pnl_series": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountDailyPnlPoint" } }, "cumulative_pnl_usd": { "type": "string" }, "end_value": { "type": "string" }, "hourly_cumulative_pnl_series": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountHourlyPnlPoint" } }, "max_dd": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "max_drawdown_to_date": { "type": "string" }, "monthly_pnl_last_12m": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountMonthlyPnlEntry" } }, "pnl": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "return": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "sharpe": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "sharpe_annualized_itd": { "type": "string" }, "strategy_name": { "type": "string", "example": "Spot LP" }, "vol_annualized_itd": { "type": "string" } } }, "responses.AccountDailyPnlPoint": { "type": "object", "properties": { "day": { "type": "string", "example": "2026-05-05" }, "value": { "type": "string", "example": "1234.56" } } }, "responses.AccountHistoricalDataResp": { "type": "object", "properties": { "data": { "description": "Ordered list of datapoints", "type": "array", "items": { "type": "number" } }, "timestamps": { "description": "Ordered list of timestamps", "type": "array", "items": { "type": "integer" } } } }, "responses.AccountHourlyPnlPoint": { "type": "object", "properties": { "at": { "type": "string", "example": "2026-05-05 09:00:00.000" }, "value": { "type": "string", "example": "1234.56" } } }, "responses.AccountInfoResponse": { "type": "object", "properties": { "account": { "description": "Starknet address of the account", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "created_at": { "description": "Account creation time", "type": "integer", "example": 1681471234972 }, "derivation_path": { "description": "Account derivation path used to derive the account, if a sub-account", "type": "string", "example": "m/44'/9004'/0'/0/1" }, "fees": { "$ref": "#/components/schemas/responses.Fees" }, "has_ecosystem_nft": { "description": "True if account owns an ecosystem NFT (Money Badgers / ShizoPunk) — qualifies for the lower retail tier thresholds", "type": "boolean", "example": false }, "isolated_market": { "description": "Isolated market for the account", "type": "string", "example": "ETHUSD-PERP" }, "kind": { "description": "Account kind", "allOf": [ { "$ref": "#/components/schemas/responses.AccountKind" } ], "example": "main" }, "parent_account": { "description": "Starknet address of the parent account", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d" }, "public_key": { "description": "Starknet public key", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d" }, "username": { "description": "Username of the account", "type": "string", "example": "username" }, "volume_tiers": { "description": "Volume tier info by kind", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.VolumeTierKindInfo" } } } }, "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": { "description": "Isolated margin leverage", "type": "integer" }, "leverage": { "description": "Leverage value", "type": "integer" }, "margin_type": { "description": "Margin type (CROSS/ISOLATED)", "type": "string" }, "market": { "description": "Market symbol", "type": "string" } } }, "responses.AccountMonthlyPnlEntry": { "type": "object", "properties": { "month": { "type": "string", "example": "2026-05-01" }, "month_return_canonical": { "type": "string", "example": "0.0123" } } }, "responses.AccountProfileResp": { "type": "object", "properties": { "ai_agent_url": { "type": "string", "example": "wss://agent.example.com:18789" }, "discord": { "$ref": "#/components/schemas/responses.DiscordProfile" }, "is_username_private": { "type": "boolean", "example": true }, "last_seen_notification": { "type": "integer", "example": 1713400000000 }, "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": { "description": "TAP affiliate status: \"NONE\", \"ACTIVE\", or \"INACTIVE\"", "type": "string" }, "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": { "description": "User's starknet account", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "account_value": { "description": "Current account value [with unrealized P&Ls]", "type": "string", "example": "136285.06918911" }, "free_collateral": { "description": "Free collateral available (Account value in excess of Initial Margin required)", "type": "string", "example": "73276.47229774" }, "initial_margin_requirement": { "description": "Amount required to open trade for the existing positions", "type": "string", "example": "63008.59689218" }, "last_seen_notification": { "description": "Latest notification event timestamp (ms) the user has seen — used for cross-device dedup", "type": "integer", "example": 1713400000000 }, "maintenance_margin_requirement": { "description": "Amount required to maintain exisiting positions", "type": "string", "example": "31597.25239676" }, "margin_cushion": { "description": "Acc value in excess of maintenance margin required", "type": "string", "example": "104687.8167956" }, "seq_no": { "description": "Unique increasing number (non-sequential) that is assigned to this account update. Can be used to deduplicate multiple feeds", "type": "integer", "example": 1681471234972000000 }, "settlement_asset": { "description": "Settlement asset for the account", "type": "string", "example": "USDC" }, "status": { "description": "Status of the acc - like ACTIVE, LIQUIDATION", "type": "string", "example": "ACTIVE" }, "total_collateral": { "description": "User's total collateral", "type": "string", "example": "123003.62047353" }, "updated_at": { "description": "Account last updated time", "type": "integer", "example": 1681471234972 } } }, "responses.AlgoOrderResp": { "type": "object", "properties": { "account": { "description": "Account identifier (user's account address)", "type": "string", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512" }, "algo_params": { "description": "Type-specific algo parameters", "type": "object", "additionalProperties": { "type": "string" } }, "algo_type": { "description": "Algo type", "allOf": [ { "$ref": "#/components/schemas/responses.AlgoType" } ], "example": "TWAP" }, "avg_fill_price": { "description": "Average fill price of the order", "type": "string", "example": "26000" }, "cancel_reason": { "description": "Reason for algo cancellation if it was closed by cancel", "type": "string", "example": "NOT_ENOUGH_MARGIN" }, "created_at": { "description": "Algo creation time", "type": "integer", "example": 1681493746016 }, "end_at": { "description": "Algo end time", "type": "integer", "example": 1681493746016 }, "id": { "description": "Unique algo identifier", "type": "string", "example": "123456" }, "last_updated_at": { "description": "Algo last update time. No changes once status=CLOSED", "type": "integer", "example": 1681493746016 }, "market": { "description": "Market to which algo belongs", "type": "string", "example": "BTC-USD-PERP" }, "remaining_size": { "description": "Remaining size of the algo", "type": "string", "example": "0" }, "side": { "description": "Algo side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "description": "Algo size", "type": "string", "example": "0.05" }, "status": { "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": { "description": "Full announcement content in Markdown format", "type": "string" }, "expiry_at": { "description": "Announcement expiry timestamp at page", "type": "integer" }, "kind": { "description": "Type of announcement (e.g., Listing)", "allOf": [ { "$ref": "#/components/schemas/responses.AnnouncementKind" } ] }, "notification_expiry_at": { "description": "Announcement expiry timestamp at notification", "type": "integer" }, "title": { "description": "Short, descriptive title of the announcement", "type": "string" }, "visible_at": { "description": "Announcement visible timestamp", "type": "integer" } } }, "responses.AnnouncementKind": { "type": "string", "enum": [ "UPDATE", "LISTING", "DELISTING" ], "x-enum-varnames": [ "AnnouncementKindUpdate", "AnnouncementKindListing", "AnnouncementKindDelisting" ] }, "responses.ApiError": { "type": "object", "properties": { "data": { "description": "any additional data related to the error", "type": "object" }, "error": { "description": "unique immutable string identifier for specific error", "allOf": [ { "$ref": "#/components/schemas/responses.ErrorCode" } ], "example": "NOT_ONBOARDED" }, "message": { "description": "detailed description of error and how to address it", "type": "string", "example": "User has never called /onboarding endpoint" } } }, "responses.ApiToken": { "type": "object", "properties": { "allowed_cidrs": { "description": "IP CIDR allowlist; empty means unrestricted", "type": "array", "items": { "type": "string" }, "example": [ "[\"203.0.113.0/24\"]" ] }, "created_at": { "description": "Token creation timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200 }, "expiry_at": { "description": "Expiration timestamp (nanoseconds since epoch)", "type": "integer", "example": 1672531200 }, "kind": { "description": "Token type (jwt, api_key, etc.)", "type": "string" }, "last_updated_at": { "description": "Last modification timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200 }, "lookup_id": { "description": "Identifier used for the token lookup", "type": "string", "example": "uuid-123" }, "name": { "description": "User-provided token name", "type": "string", "example": "My API Token" }, "revoked_at": { "description": "Revocation timestamp (nanoseconds since epoch, 0 if not revoked)", "type": "integer", "example": 0 }, "token_id": { "description": "Unique ID for the auth token", "type": "string", "example": "token_123" } } }, "responses.AskBidArray": { "type": "object", "properties": { "asks": { "description": "List of Ask sizes and prices", "type": "array", "items": { "type": "array", "items": { "type": "string" } } }, "best_ask_api": { "description": "Size on the best ask from API (excluding RPI)", "type": "array", "items": { "type": "string" }, "example": [ "10.5" ] }, "best_ask_interactive": { "description": "Size on the best ask from UI", "type": "array", "items": { "type": "string" }, "example": [ "10.5" ] }, "best_bid_api": { "description": "Size on the best bid from API (excluding RPI)", "type": "array", "items": { "type": "string" }, "example": [ "10.5" ] }, "best_bid_interactive": { "description": "Size on the best bid from UI", "type": "array", "items": { "type": "string" }, "example": [ "10.5" ] }, "bids": { "description": "List of Bid sizes and prices", "type": "array", "items": { "type": "array", "items": { "type": "string" } } }, "last_updated_at": { "description": "Last update to the orderbook in milliseconds", "type": "integer", "example": 1681462770114 }, "market": { "description": "Market name", "type": "string", "example": "ETH-USD-PERP" }, "seq_no": { "description": "Sequence number of the orderbook", "type": "integer", "example": 20784 } } }, "responses.AssetKind": { "type": "string", "enum": [ "PERP", "PERP_OPTION", "SPOT", "OPTION", "FUTURE" ], "x-enum-varnames": [ "AssetKindPerp", "AssetKindPerpOption", "AssetKindSpot", "AssetKindOption", "AssetKindFuture" ] }, "responses.AuthResp": { "type": "object", "properties": { "jwt_token": { "description": "Authentication token", "type": "string", "example": "eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJ0eXAiOiJhdCtKV1QiLCJleHAiOjE2ODE0NTI5MDcsImlhdCI6MTY4MTQ1MjYwNywiaXNzIjoiUGFyYWRleCBzdGFnaW5nIiwic3ViIjoiMHg0OTVkMmViNTIzNmExMmI4YjRhZDdkMzg0OWNlNmEyMDNjZTIxYzQzZjQ3M2MyNDhkZmQ1Y2U3MGQ5NDU0ZmEifQ.BPihIbGhnnsuPlReqC9x12JFXldpswg5EdA6tTiDQm-_UHaRz_8RfVBqWc2fPN6CzFsXTq7GowZu-2qMxPvZK_fGcxEhTp2k1r8MUxowlUIT4vPu2scCwrsyIujlCAwS" } } }, "responses.BBOResp": { "type": "object", "properties": { "ask": { "description": "Best ask price", "type": "string", "example": "30130.15" }, "ask_size": { "description": "Best ask size", "type": "string", "example": "0.05" }, "bid": { "description": "Best bid price", "type": "string", "example": "30112.22" }, "bid_size": { "description": "Best bid size", "type": "string", "example": "0.04" }, "last_updated_at": { "description": "Last update to the orderbook in milliseconds", "type": "integer", "example": 1681493939981 }, "market": { "description": "Symbol of the market", "type": "string", "example": "BTC-USD-PERP" }, "seq_no": { "description": "Sequence number of the orderbook", "type": "integer", "example": 20784 } } }, "responses.BalanceResp": { "type": "object", "properties": { "average_entry_price": { "description": "Average entry price", "type": "string", "example": "2901.34" }, "average_entry_price_usd": { "description": "Average entry price in USD", "type": "string", "example": "2902.18" }, "cost": { "description": "Balance cost", "type": "string", "example": "105.4623" }, "cost_usd": { "description": "Balance cost in USD", "type": "string", "example": "105.8311" }, "last_updated_at": { "description": "Balance last updated time", "type": "integer", "example": 1681462770114 }, "size": { "description": "Balance amount of settlement token (includes deposits, withdrawals, realized PnL, realized funding, and fees)", "type": "string", "example": "123003.620" }, "token": { "description": "Name of the token", "type": "string", "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": { "description": "Maximum price allowed", "type": "string", "example": "31000.00" }, "max_size": { "description": "Maximum trade size allowed", "type": "string", "example": "100.0" }, "min_price": { "description": "Minimum price allowed", "type": "string", "example": "29000.00" }, "min_size": { "description": "Minimum trade size allowed", "type": "string", "example": "0.1" } } }, "responses.BlockTradeDetailFullResponse": { "type": "object", "properties": { "block_expiration": { "description": "Unix timestamp in milliseconds when block expires", "type": "integer", "example": 1640995800000 }, "block_id": { "description": "Backend-generated unique identifier", "type": "string", "example": "block_456" }, "block_type": { "description": "Block type", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeType" } ], "example": "OFFER_BASED" }, "created_at": { "description": "When block was created", "type": "integer", "example": 1640995200000 }, "failure_reason": { "description": "Reason for failure (if status is FAILED)", "type": "string" }, "initiator": { "description": "Account that initiated this block trade", "type": "string", "example": "0x123...abc" }, "last_updated_at": { "description": "When block was last updated", "type": "integer", "example": 1640995400000 }, "nonce": { "description": "Original block nonce", "type": "string", "example": "67890" }, "parent_block_id": { "description": "Parent block ID (if offer-based)", "type": "string", "example": "block_123" }, "required_signers": { "description": "List of accounts that can participate in the block trade", "type": "array", "items": { "type": "string" } }, "signatures": { "description": "Current signatures on this block (for signature verification)", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeSignature" } }, "status": { "description": "Current status of the block trade", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeStatus" } ], "example": "COMPLETED" }, "trades": { "description": "Map of market to trade details", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/responses.BlockTradeDetailResponse" } } } }, "responses.BlockTradeDetailResponse": { "type": "object", "properties": { "executed_at": { "description": "When this trade was executed", "type": "integer", "example": 1640995500000 }, "failure_reason": { "description": "Reason for failure (if failed)", "type": "string" }, "maker_account": { "description": "Maker account (if fully executable)", "type": "string", "example": "0x123...abc" }, "maker_fill": { "description": "Execution details (if executed)", "allOf": [ { "$ref": "#/components/schemas/responses.FillResult" } ] }, "maker_order": { "description": "Original maker order (for signature generation)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "market": { "description": "Trading pair for this trade", "type": "string", "example": "BTC-USD-PERP" }, "price": { "description": "Agreed price (if fully executable)", "type": "string", "example": "30000.00" }, "size": { "description": "Agreed size (if fully executable)", "type": "string", "example": "10.5" }, "taker_account": { "description": "Taker account (if fully executable)", "type": "string", "example": "0x456...def" }, "taker_fill": { "description": "Execution details (if executed)", "allOf": [ { "$ref": "#/components/schemas/responses.FillResult" } ] }, "taker_order": { "description": "Original taker order (for signature generation)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeOrder" } ] }, "trade_constraints": { "description": "Constraints for offers (if offer-based)", "allOf": [ { "$ref": "#/components/schemas/responses.BlockTradeConstraints" } ] }, "trade_id": { "description": "Backend-generated unique identifier for this trade", "type": "string", "example": "trade_123" } } }, "responses.BlockTradeOrder": { "type": "object", "required": [ "side", "type" ], "properties": { "account": { "description": "Paradex account address of the order owner", "type": "string", "example": "0x1234567890abcdef" }, "client_id": { "description": "Client-provided identifier", "type": "string", "example": "order_123" }, "flags": { "description": "Order flags, allow flag: REDUCE_ONLY", "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderFlag" } }, "market": { "description": "Trading pair for this order", "type": "string", "example": "BTC-USD-PERP" }, "price": { "description": "Order price (omitted for market orders)", "type": "string", "example": "30000.00" }, "side": { "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "signature": { "description": "Order signature", "type": "string", "example": "0xabc123..." }, "signature_timestamp": { "description": "When order was signed", "type": "integer", "example": 1640995200000 }, "size": { "description": "Order size", "type": "string", "example": "10.5" }, "type": { "description": "Order type", "allOf": [ { "$ref": "#/components/schemas/responses.OrderType" } ] } } }, "responses.BlockTradeSignature": { "type": "object", "required": [ "nonce", "signature_data", "signature_expiration", "signature_timestamp", "signature_type", "signer_account" ], "properties": { "nonce": { "description": "Unique nonce to prevent replay attacks", "type": "string", "example": "12345" }, "signature_data": { "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key", "type": "string", "example": "0xabc123..." }, "signature_expiration": { "description": "Unix timestamp in milliseconds when signature expires", "type": "integer", "example": 1640995800000 }, "signature_timestamp": { "description": "Unix timestamp in milliseconds when signature was created", "type": "integer", "example": 1640995200000 }, "signature_type": { "description": "Type of cryptographic signature used", "type": "string", "enum": [ "STARKNET" ], "example": "STARKNET" }, "signer_account": { "description": "Paradex account address of the signer", "type": "string", "example": "0x1234567890abcdef" }, "signer_public_key": { "description": "Hex pubkey used to sign (main account key or active subkey). Empty defaults to account main key.", "type": "string", "example": "0xabc..." } } }, "responses.BlockTradeStatus": { "type": "string", "enum": [ "CREATED", "OFFER_COLLECTION", "READY_TO_EXECUTE", "EXECUTING", "PENDING_SETTLEMENT", "COMPLETED", "FAILED", "CANCELLED" ], "x-enum-varnames": [ "BlockTradeStatusCreated", "BlockTradeStatusOfferCollection", "BlockTradeStatusReadyToExecute", "BlockTradeStatusExecuting", "BlockTradeStatusPendingSettlement", "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": { "description": "List of cancellation results", "type": "array", "items": { "$ref": "#/components/schemas/responses.CancelOrderResult" } } } }, "responses.CancelOrderResult": { "type": "object", "properties": { "account": { "description": "Account that owns the order", "type": "string" }, "client_id": { "description": "Client order ID", "type": "string" }, "id": { "description": "Order ID", "type": "string" }, "market": { "description": "Market of the order", "type": "string" }, "status": { "description": "Status of the cancellation: QUEUED_FOR_CANCELLATION, ALREADY_CLOSED, NOT_FOUND", "type": "string" } } }, "responses.ComplianceActionResp": { "type": "object", "properties": { "action_type": { "type": "string", "example": "ACCEPT_TOS" }, "action_version": { "type": "string", "example": "2026-02-15" }, "created_at": { "type": "integer", "example": 1771156475000 } } }, "responses.CreateTokenResponse": { "type": "object", "properties": { "api_token": { "description": "The token metadata", "allOf": [ { "$ref": "#/components/schemas/responses.ApiToken" } ] }, "token": { "description": "The generated JWT token", "type": "string", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } }, "responses.CreateTransferResponse": { "type": "object", "properties": { "transfer": { "description": "The created XP transfer", "allOf": [ { "$ref": "#/components/schemas/responses.XPTransfer" } ] } } }, "responses.Delta1CrossMarginParams": { "type": "object", "properties": { "imf_base": { "description": "Initial Margin Base", "type": "string", "example": "0.11" }, "imf_factor": { "description": "Initial Margin Factor, always 0.", "type": "string", "example": "0" }, "imf_shift": { "description": "Initial Margin Shift, unused, always 0.", "type": "string", "example": "0" }, "mmf_factor": { "description": "Maintenance Margin Factor", "type": "string", "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_SYMBOL", "INVALID_TOKEN", "INVALID_ETHEREUM_ADDRESS", "INVALID_ETHEREUM_SIGNATURE", "INVALID_STARKNET_ADDRESS", "INVALID_STARKNET_SIGNATURE", "STARKNET_SIGNATURE_VERIFICATION_FAILED", "ETHEREUM_SIGNER_MISMATCH", "ETHEREUM_HASH_MISMATCH", "NOT_ONBOARDED", "INVALID_TIMESTAMP", "INVALID_BLOCK_EXPIRATION", "ACCOUNT_NOT_FOUND", "MEDIA_NOT_FOUND", "INVALID_ORDER_SIGNATURE", "PUBLIC_KEY_INVALID", "UNAUTHORIZED_ETHEREUM_ADDRESS", "UNAUTHORIZED_ERROR", "ETHEREUM_ADDRESS_ALREADY_ONBOARDED", "EVM_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", "MARKET_NOT_SETTLED", "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", "VAULT_DATA_PRIVATE", "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", "SOCIAL_USERNAME_IN_USE", "INVALID_OAUTH_REQUEST", "RPI_ACCOUNT_NOT_WHITELISTED", "SYSTEM_STATUS_POST_ONLY", "SYSTEM_STATUS_CANCEL_ONLY", "INVALID_MARKETING_CODE", "OFFER_NOT_FOUND", "MARKET_MARGIN_RESTRICTED", "NOT_UNIQUE", "ACCOUNT_ALREADY_REFERRED", "ONBOARDING_PERIOD_EXPIRED", "ONBOARDING_RATE_LIMITED", "SUBACCOUNTS_LIMIT_EXCEEDED", "INSUFFICIENT_MIN_CHAIN_BALANCE", "INSUFFICIENT_EVM_BALANCE", "PORTFOLIO_MARGIN_ONBOARDING_DISABLED", "PORTFOLIO_MARGIN_INVALID_ACCOUNT_KIND", "EVM_VAULT_OPERATORS_DISABLED", "INVALID_EVM_SIGNATURE", "EVM_SIGNATURE_VERIFICATION_FAILED", "INVALID_SUBKEY", "SUBKEY_NOT_ACTIVATABLE", "TOKEN_LIMIT_REACHED", "INVALID_TOKEN_SCOPE", "IP_NOT_ALLOWED", "INSUFFICIENT_TRANSFERRABLE_XP", "TRANSFER_LIMIT_REACHED", "XP_TRANSFERS_DISABLED", "BLOCK_TRADE_NOT_FOUND", "BLOCK_TRADE_NOT_ENABLED", "BLOCK_TRADE_EXPIRED", "BLOCK_TRADE_ALREADY_CANCELLED", "BLOCK_TRADE_INVALID_STATUS", "BLOCK_TRADE_UNAUTHORIZED", "BLOCK_TRADE_MISSING_TRADES", "BLOCK_TRADE_MISSING_SIGNERS", "BLOCK_TRADE_MISSING_SIGNATURE", "BLOCK_TRADE_ACCOUNT_MISMATCH", "BLOCK_TRADE_INVALID_SIGNATURE", "BLOCK_TRADE_SIGNER_KEY_UNAUTHORIZED", "BLOCK_TRADE_REPLAYED_SIGNATURE", "OFFER_ALREADY_CANCELLED", "OFFER_INVALID_STATUS", "OFFER_UNAUTHORIZED", "OFFER_PARENT_MISMATCH", "OFFER_PARENT_NOT_ACCEPTING", "PORTFOLIO_MARGIN_CONFIG_NOT_FOUND" ], "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_InvalidSymbol", "ErrorCodeString_InvalidToken", "ErrorCodeString_BadEthAddress", "ErrorCodeString_BadEthSignature", "ErrorCodeString_BadStarkNetAddress", "ErrorCodeString_BadStarkNetSignature", "ErrorCodeString_StarknetSigVerificationFailed", "ErrorCodeString_SignerMismatch", "ErrorCodeString_HashMismatch", "ErrorCodeString_NotOnboarded", "ErrorCodeString_BadTimestamp", "ErrorCodeString_BadExpiration", "ErrorCodeString_AccountIdNotFound", "ErrorCodeString_MediaNotFound", "ErrorCodeString_InvalidOrderSignature", "ErrorCodeString_BadPublicKey", "ErrorCodeString_UnauthorizedEthAddress", "ErrorCodeString_UnauthorizedError", "ErrorCodeString_EthAddressAlreadyOnboarded", "ErrorCodeString_EvmAddressAlreadyOnboarded", "ErrorCodeString_MarketNotFound", "ErrorCodeString_AllowlistNotFound", "ErrorCodeString_UsernameInUse", "ErrorCodeString_GeoIPBlock", "ErrorCodeString_EthAddressBlocked", "ErrorCodeString_ProgramNotFound", "ErrorCodeString_ProgramNotSupported", "ErrorCodeString_InvalidDashboard", "ErrorCodeString_MarketNotOpen", "ErrorCodeString_MarketNotSettled", "ErrorCodeString_InvalidReferralCode", "ErrorCodeString_RequestNotAllowed", "ErrorCodeString_ParentAddressAlreadyOnboarded", "ErrorCodeString_InvalidParentAccount", "ErrorCodeString_InvalidVaultOperatorChain", "ErrorCodeString_VaultOperatorAlreadyOnboarded", "ErrorCodeString_VaultNameInUse", "ErrorCodeString_VaultNotFound", "ErrorCodeString_VaultStrategyNotFound", "ErrorCodeString_VaultLimitReached", "ErrorCodeString_VaultDataPrivate", "ErrorCodeString_BatchSizeOutOfRange", "ErrorCodeString_IsolatedMarketAccountMismatch", "ErrorCodeString_NoAccessToMarket", "ErrorCodeString_PointsSummaryNotFound", "ErrorCodeString_AlgoIdNotFound", "ErrorCodeString_InvalidDerivationPath", "ErrorCodeString_ProfileStatsNotFound", "ErrorCodeString_InvalidChain", "ErrorCodeString_InvalidLayerswapSwap", "ErrorCodeString_SocialUsernameInUse", "ErrorCodeString_InvalidOAuthRequest", "ErrorCodeString_RPIAccountNotWhitelisted", "ErrorCodeString_SystemStatusPostOnly", "ErrorCodeString_SystemStatusCancelOnly", "ErrorCodeString_InvalidMarketingCode", "ErrorCodeString_OfferNotFound", "ErrorCodeString_MarketMarginRestricted", "ErrorCodeString_NotUnique", "ErrorCodeString_AccountAlreadyReferred", "ErrorCodeString_OnboardingPeriodExpired", "ErrorCodeString_OnboardingRateLimited", "ErrorCodeString_SubaccountsLimitExceeded", "ErrorCodeString_InsufficientMinChainBalance", "ErrorCodeString_InsufficientEvmBalance", "ErrorCodeString_PortfolioMarginOnboardingDisabled", "ErrorCodeString_PortfolioMarginInvalidAccountKind", "ErrorCodeString_EvmVaultOperatorsDisabled", "ErrorCodeString_BadEvmSignature", "ErrorCodeString_EvmSigVerificationFailed", "ErrorCodeString_InvalidSubkey", "ErrorCodeString_SubkeyNotActivatable", "ErrorCodeString_TokenLimitReached", "ErrorCodeString_InvalidTokenScope", "ErrorCodeString_IPNotAllowed", "ErrorCodeString_InsufficientTransferrableXP", "ErrorCodeString_TransferLimitReached", "ErrorCodeString_XPTransfersDisabled", "ErrorCodeString_BlockTradeNotFound", "ErrorCodeString_BlockTradeNotEnabled", "ErrorCodeString_BlockTradeExpired", "ErrorCodeString_BlockTradeAlreadyCancelled", "ErrorCodeString_BlockTradeInvalidStatus", "ErrorCodeString_BlockTradeUnauthorized", "ErrorCodeString_BlockTradeMissingTrades", "ErrorCodeString_BlockTradeMissingSigners", "ErrorCodeString_BlockTradeMissingSignature", "ErrorCodeString_BlockTradeAccountMismatch", "ErrorCodeString_BlockTradeInvalidSignature", "ErrorCodeString_BlockTradeSignerKeyUnauthorized", "ErrorCodeString_BlockTradeReplayedSignature", "ErrorCodeString_OfferAlreadyCancelled", "ErrorCodeString_OfferInvalidStatus", "ErrorCodeString_OfferUnauthorized", "ErrorCodeString_OfferParentMismatch", "ErrorCodeString_OfferParentNotAccepting", "ErrorCodeString_PortfolioMarginConfigNotFound" ] }, "responses.ErrorResponse": { "type": "object", "properties": { "error": { "$ref": "#/components/schemas/responses.ErrorCode" }, "message": { "type": "string" } } }, "responses.FeeWithCap": { "type": "object", "properties": { "fee": { "description": "fee rate", "type": "string", "example": "0.0003" }, "fee_cap": { "description": "fee cap (used for option)", "type": "string", "example": "0.5" }, "fee_floor": { "description": "fee floor (used for option)", "type": "string", "example": "-0.5" } } }, "responses.Fees": { "type": "object", "properties": { "commission_rate": { "description": "deprecated, always zero", "type": "string", "example": "0.0001" }, "dated_option_maker_rate": { "type": "string", "example": "0.0001" }, "dated_option_taker_rate": { "type": "string", "example": "0.0001" }, "discount_rate": { "description": "deprecated, always zero", "type": "string", "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": { "description": "Account that made the fill", "type": "string", "example": "0x978532f46745d7fFBa1CDfa1D8C8202D09D89C9E" }, "client_id": { "description": "Unique client assigned ID for the order", "type": "string", "example": "x1234" }, "created_at": { "description": "Fill time", "type": "integer", "example": 1681375176910 }, "fee": { "description": "Fee paid by the user", "type": "string", "example": "7.56" }, "fee_currency": { "description": "Asset that fee is charged in", "type": "string", "example": "USDC" }, "fill_type": { "description": "Fill type, can be FILL, LIQUIDATION or UNWIND_TRANSFER", "allOf": [ { "$ref": "#/components/schemas/responses.FillType" } ], "example": "FILL" }, "flags": { "description": "Fill flags indicating special properties", "type": "array", "items": { "$ref": "#/components/schemas/responses.FillFlag" }, "example": [ "[\"interactive\"", " \"rpi\"]" ] }, "id": { "description": "Unique string ID of fill per FillType", "type": "string", "example": "8615262148007718462" }, "liquidity": { "description": "Maker or Taker", "allOf": [ { "$ref": "#/components/schemas/responses.TraderRole" } ] }, "market": { "description": "Market name", "type": "string", "example": "BTC-USD-PERP" }, "order_id": { "description": "Order ID", "type": "string", "example": "1681462103821101699438490000" }, "orderbook_seq_no": { "description": "Orderbook sequence number after trade execution (post-execution state). Use seqno-1 for pre-execution. 0 for position transfers (liquidations, settlements)", "type": "integer", "example": 12345 }, "price": { "description": "Price at which order was filled", "type": "string", "example": "30000.12" }, "realized_funding": { "description": "Realized funding of the fill", "type": "string", "example": "7.56" }, "realized_pnl": { "description": "Realized PnL of the fill", "type": "string", "example": "7.56" }, "remaining_size": { "description": "Remaining size of the order", "type": "string", "example": "0.5" }, "side": { "description": "Taker side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "description": "Size of the fill", "type": "string", "example": "0.5" }, "underlying_price": { "description": "Underlying asset price of the fill (spot price)", "type": "string", "example": "7.56" } } }, "responses.FillType": { "type": "string", "enum": [ "LIQUIDATION", "UNWIND_TRANSFER", "FILL", "SETTLE_MARKET", "RPI", "BLOCK_TRADE" ], "x-enum-varnames": [ "FillTypeLiquidation", "FillTypeUnwindTransfer", "FillTypeFill", "FillTypeSettleMarket", "FillTypeRPI", "FillTypeBlockTrade" ] }, "responses.FundingDataResult": { "type": "object", "properties": { "created_at": { "description": "Timestamp in milliseconds when the funding data was created", "type": "integer" }, "funding_index": { "description": "Current funding index value as a decimal string", "type": "string" }, "funding_period_hours": { "description": "Actual funding period in hours for this market", "type": "number" }, "funding_premium": { "description": "Current funding premium as a decimal string", "type": "string" }, "funding_rate": { "description": "Raw funding rate for the actual funding period as a decimal string", "type": "string" }, "funding_rate_8h": { "description": "Normalized 8-hour funding rate as a decimal string", "type": "string" }, "impact_premium_rate": { "description": "Raw cross-venue impact premium rate (weighted-median impact premium / spot,\npre-clamp) as a decimal string. Omitted when impact aggregation did not\nproduce the rate.", "type": "string" }, "market": { "description": "Market represents the market identifier", "type": "string" } } }, "responses.FundingPayment": { "type": "object", "properties": { "account": { "description": "Account that made the payment", "type": "string" }, "created_at": { "description": "Funding payment time", "type": "integer", "example": 1681375481000 }, "fill_id": { "description": "Fill id that triggered the payment (if any)", "type": "string", "example": "8615262148007718462" }, "id": { "description": "Unique string ID to identify the payment", "type": "string", "example": "1681375578221101699352320000" }, "index": { "description": "Value of the funding index at the time of payment", "type": "string", "example": "-2819.53434361" }, "market": { "description": "Market against which payment is made", "type": "string", "example": "BTC-USD-PERP" }, "payment": { "description": "Payment amount in settlement asset", "type": "string", "example": "34.4490622" } } }, "responses.GetAccountMarginConfigsResp": { "type": "object", "properties": { "account": { "description": "Account ID", "type": "string" }, "configs": { "description": "List of margin configurations per market", "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountMarginEntry" } }, "margin_methodology": { "description": "Margin methodology (cross_margin/portfolio_margin)", "type": "string" } } }, "responses.GetAccountsInfoResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountInfoResponse" } } } }, "responses.GetOnboardingResp": { "type": "object", "properties": { "account_signer_type": { "description": "Signer variant: \"starknet\" or \"eip191\"", "type": "string" }, "address": { "description": "Paradex Starknet address", "type": "string" }, "derivation_info": { "description": "Class hash(es) used for address derivation", "allOf": [ { "$ref": "#/components/schemas/responses.OnboardingDerivationInfo" } ] }, "exists": { "description": "Whether the account is already onboarded", "type": "boolean" } } }, "responses.GetSubAccountsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountInfoResponse" } } } }, "responses.GetXPBalanceResponseV2": { "type": "object", "properties": { "earned_xp": { "description": "XP earned through trading (from leaderboard, immutable)", "type": "integer", "example": 1000 }, "transferrable_xp": { "description": "Maximum XP that can be transferred", "type": "integer", "example": 700 }, "xp_delta": { "description": "Net XP from transfers", "type": "integer", "example": 200 } } }, "responses.Greeks": { "type": "object", "properties": { "delta": { "description": "Market Delta", "type": "string", "example": "1" }, "gamma": { "description": "Market Gamma", "type": "string", "example": "0.2" }, "rho": { "description": "Market Rho", "type": "string", "example": "0.2" }, "theta": { "description": "Market Theta", "type": "string", "example": "-0.2" }, "vanna": { "description": "Market Vanna", "type": "string", "example": "0.2" }, "vega": { "description": "Market Vega", "type": "string", "example": "0.2" }, "volga": { "description": "Market Volga", "type": "string", "example": "0.2" } } }, "responses.ImpactPriceResp": { "type": "object", "properties": { "impact_price": { "description": "The calculated impact price", "type": "string", "example": "30130.15" }, "market": { "description": "Symbol of the market", "type": "string", "example": "BTC-USD-PERP" }, "side": { "description": "Trade side (BUY or SELL)", "type": "string", "example": "BUY" }, "size": { "description": "Size of the order", "type": "string", "example": "0.05" } } }, "responses.InsuranceAccountResp": { "type": "object", "properties": { "account": { "description": "Starknet address of the Insurance fund", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "account_value": { "description": "Total account value of insurance fund", "type": "string", "example": "136285.069" }, "settlement_asset": { "description": "Settlement Asset for the account", "type": "string", "example": "USDC" }, "updated_at": { "description": "Account last updated time", "type": "integer", "example": 1681471234972 } } }, "responses.JwkKey": { "type": "object", "properties": { "alg": { "type": "string", "example": "ES256" }, "crv": { "type": "string", "example": "P-256" }, "kid": { "type": "string", "example": "" }, "kty": { "type": "string", "example": "EC" }, "use": { "type": "string", "example": "sig" }, "x": { "type": "string", "example": "" }, "y": { "type": "string", "example": "" } } }, "responses.JwksResponse": { "type": "object", "properties": { "keys": { "type": "array", "items": { "$ref": "#/components/schemas/responses.JwkKey" } } } }, "responses.LiquidationResp": { "type": "object", "properties": { "created_at": { "description": "Liquidation created at timestamp", "type": "integer", "example": 1697213130097 }, "id": { "description": "Liquidation transaction hash", "type": "string", "example": "0x123456789" } } }, "responses.MakerTakerFee": { "type": "object", "properties": { "maker_fee": { "description": "fee for maker", "allOf": [ { "$ref": "#/components/schemas/responses.FeeWithCap" } ] }, "taker_fee": { "description": "fee for taker", "allOf": [ { "$ref": "#/components/schemas/responses.FeeWithCap" } ] } } }, "responses.MarketEvent": { "type": "object", "properties": { "changed_fields": { "$ref": "#/components/schemas/responses.MarketHistoryFields" }, "event_type": { "description": "Type of change", "enum": [ "CREATED", "DELETED", "SETTLED", "UPDATED" ], "allOf": [ { "$ref": "#/components/schemas/responses.MarketEventType" } ], "example": "UPDATED" }, "symbol": { "description": "Market symbol", "type": "string", "example": "BTC-USD-PERP" }, "updated_at": { "description": "Time of change (unix time millisecond)", "type": "integer", "example": 1762809600000 } } }, "responses.MarketEventType": { "type": "string", "enum": [ "CREATED", "DELETED", "SETTLED", "UPDATED" ], "x-enum-varnames": [ "MarketEventCreated", "MarketEventDeleted", "MarketEventSettled", "MarketEventUpdated" ] }, "responses.MarketFeeConfig": { "type": "object", "properties": { "api_fee": { "description": "fee for order coming from API", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] }, "interactive_fee": { "description": "fee for order coming from UI", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] }, "rpi_fee": { "description": "fee for order coming from API with RPI instruction", "allOf": [ { "$ref": "#/components/schemas/responses.MakerTakerFee" } ] } } }, "responses.MarketHistoryFields": { "type": "object", "properties": { "asset_kind": { "type": "string", "example": "PERP" }, "base_currency": { "type": "string", "example": "BTC" }, "clamp_rate": { "type": "number", "example": 0.05 }, "delta1_cross_margin_params": {}, "expiry_at": { "type": "integer", "example": 0 }, "fee_config": {}, "funding_multiplier": { "type": "number", "example": 1 }, "funding_period_hours": { "type": "number", "example": 8 }, "interest_rate": { "type": "number", "example": 0.01 }, "market_kind": { "type": "string", "example": "cross" }, "max_funding_rate": { "type": "number", "example": 0.05 }, "max_funding_rate_change": { "type": "number", "example": 0.0005 }, "max_open_orders": { "type": "integer", "example": 100 }, "max_order_size": { "type": "string", "example": "100" }, "max_slippage": { "type": "number", "example": 0.05 }, "max_tob_spread": { "type": "number", "example": 0.2 }, "min_notional": { "type": "string", "example": "3" }, "open_at": { "type": "integer", "example": 1762809600000 }, "option_cross_margin_params": {}, "option_type": { "type": "string", "example": "CALL" }, "oracle_ewma_factor": { "type": "number", "example": 0.2 }, "order_size_increment": { "type": "string", "example": "0.001" }, "position_limit": { "type": "string", "example": "500" }, "price_bands_width": { "type": "number", "example": 0.05 }, "price_tick_size": { "type": "string", "example": "0.01" }, "quote_currency": { "type": "string", "example": "USD" }, "settlement_currency": { "type": "string", "example": "USDC" }, "settlement_price": { "type": "number", "example": 50000 }, "strike_price": { "type": "string", "example": "66500" }, "underlying_twap_price": { "type": "number", "example": 50000 } } }, "responses.MarketHistoryResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/responses.MarketEvent" } } } }, "responses.MarketKind": { "type": "string", "enum": [ "", "cross", "isolated", "isolated_margin" ], "x-enum-varnames": [ "MarketKindUnknown", "MarketKindCross", "MarketKindIsolated", "MarketKindIsolatedMargin" ] }, "responses.MarketResp": { "type": "object", "properties": { "asset_kind": { "description": "Type of asset", "enum": [ "PERP", "PERP_OPTION", "SPOT" ], "allOf": [ { "$ref": "#/components/schemas/responses.AssetKind" } ], "example": "PERP" }, "base_currency": { "description": "Base currency of the market", "type": "string", "example": "ETH" }, "clamp_rate": { "description": "Clamp rate", "type": "string", "example": "0.05" }, "delta1_cross_margin_params": { "description": "Delta1 Cross margin parameters", "allOf": [ { "$ref": "#/components/schemas/responses.Delta1CrossMarginParams" } ] }, "expiry_at": { "description": "Market expiry time", "type": "integer", "example": 0 }, "fee_config": { "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": { "description": "Funding multiplier", "type": "number", "example": 1 }, "funding_period_hours": { "description": "Funding period in hours", "type": "number", "example": 8 }, "interest_rate": { "description": "Interest rate", "type": "string", "example": "0.01" }, "iv_bands_width": { "description": "IV Bands Width", "type": "string", "example": "0.05" }, "market_kind": { "description": "Market's margin mode", "enum": [ "cross", "isolated", "isolated_margin" ], "allOf": [ { "$ref": "#/components/schemas/responses.MarketKind" } ], "example": "cross" }, "max_funding_rate": { "description": "Max funding rate", "type": "string", "example": "0.05" }, "max_funding_rate_change": { "description": "Max funding rate change", "type": "string", "example": "0.0005" }, "max_open_orders": { "description": "Max open orders", "type": "integer", "example": 100 }, "max_order_size": { "description": "Maximum order size in base currency", "type": "string", "example": "100" }, "max_slippage": { "description": "Default max slippage allowed for the market", "type": "string", "example": "0.05" }, "max_tob_spread": { "description": "The maximum TOB spread allowed to apply funding rate changes", "type": "string", "example": "0.2" }, "min_notional": { "description": "Minimum order notional in USD. For futures: size*mark_price, for options: size*spot_price", "type": "string", "example": "3" }, "open_at": { "description": "Market open time in milliseconds", "type": "integer", "example": 0 }, "option_cross_margin_params": { "description": "Option Cross margin parameters", "allOf": [ { "$ref": "#/components/schemas/responses.OptionCrossMarginParams" } ] }, "option_type": { "description": "Type of option", "type": "string", "enum": [ "PUT", "CALL" ], "example": "PUT" }, "oracle_ewma_factor": { "description": "Oracle EWMA factor", "type": "string", "example": "0.2" }, "order_size_increment": { "description": "Minimum size increment for base currency", "type": "string", "example": "0.001" }, "position_limit": { "description": "Position limit in base currency", "type": "string", "example": "500" }, "price_bands_width": { "description": "Price Bands Width, 0.05 means 5% price deviation allowed from mark price", "type": "string", "example": "0.05" }, "price_feed_id": { "description": "Price feed id. Pyth price account used to price underlying asset", "type": "string", "example": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU" }, "price_tick_size": { "description": "Minimum price increment of the market in USD", "type": "string", "example": "0.01" }, "quote_currency": { "description": "Quote currency of the market", "type": "string", "example": "USD" }, "settlement_currency": { "description": "Settlement currency of the market", "type": "string", "example": "USDC" }, "strike_price": { "description": "Strike price for option market", "type": "string", "example": "66500" }, "symbol": { "description": "Market symbol", "type": "string", "example": "ETH-USD-PERP" }, "tags": { "description": "Market tags", "type": "array", "items": { "type": "string" }, "example": [ "MEME", "DEFI" ] }, "trading_mode": { "description": "Order-entry mode. STANDARD accepts on-book orders; RFQ_ONLY rejects them and accepts only block-trade legs from RFQ settlement.", "enum": [ "STANDARD", "RFQ_ONLY" ], "allOf": [ { "$ref": "#/components/schemas/responses.TradingMode" } ], "example": "STANDARD" } } }, "responses.MarketSettlementResp": { "type": "object", "properties": { "expiry_at": { "description": "Scheduled expiry (unix ms); settlement is computed at or shortly after this time", "type": "integer", "example": 1758326400000 }, "settlement_price": { "description": "Option payoff for option markets; spot TWAP for perp/future", "type": "string", "example": "5000" }, "symbol": { "type": "string", "example": "BTC-USD-15SEP25-55000-C" }, "underlying_twap_price": { "description": "30-min spot TWAP at expiry", "type": "string", "example": "60000" } } }, "responses.MarketSummaryResp": { "type": "object", "properties": { "ask": { "description": "Best ask price", "type": "string", "example": "30130.15" }, "ask_iv": { "description": "Ask implied volatility, for options", "type": "string", "example": "0.2" }, "ask_size": { "description": "Size at best ask price", "type": "string", "example": "0.05" }, "bid": { "description": "Best bid price", "type": "string", "example": "30112.22" }, "bid_iv": { "description": "Bid implied volatility, for options", "type": "string", "example": "0.2" }, "bid_size": { "description": "Size at best bid price", "type": "string", "example": "0.04" }, "created_at": { "description": "Market summary creation time", "type": "integer" }, "delta": { "description": "Deprecated: Use greeks.delta instead", "type": "string", "example": "1" }, "external_fair_price": { "description": "External fair price, calculated from spot price and an external basis: spot_price * (1 + external_basis). where external basis is the median basis rate on different external exchanges", "type": "string", "example": "29876.3" }, "forward_rate": { "description": "EWMA-smoothed annualized forward rate for dated options", "type": "string", "example": "0.05" }, "funding_rate": { "description": "This raw funding rate corresponds to the actual funding period of the instrument itself. It is not a normalized 8h funding rate.", "type": "string", "example": "0.3" }, "future_funding_rate": { "description": "For options it's a smoothed version of future's funding rate", "type": "string", "example": "0.3" }, "greeks": { "description": "Greeks (delta, gamma, vega). Partial for perpetual futures.", "allOf": [ { "$ref": "#/components/schemas/responses.Greeks" } ] }, "last_iv": { "description": "Last traded price implied volatility, for options", "type": "string", "example": "0.2" }, "last_traded_price": { "description": "Last traded price", "type": "string", "example": "30109.53" }, "mark_iv": { "description": "Mark implied volatility, for options", "type": "string", "example": "0.2" }, "mark_price": { "description": "[Mark price](https://docs.paradex.trade/risk-system/mark-price-calculation)", "type": "string", "example": "29799.70877478" }, "open_interest": { "description": "Open interest in base currency", "type": "string", "example": "6100048.3" }, "price_change_rate_24h": { "description": "Price change rate in the last 24 hours", "type": "string", "example": "0.05" }, "risk_free_rate": { "description": "Risk-free discounting rate used for option pricing", "type": "string", "example": "0.05" }, "rolling_details": { "description": "Rolling futures details — only populated for rolling futures markets", "allOf": [ { "$ref": "#/components/schemas/responses.RollingDetailsResp" } ] }, "symbol": { "description": "Market symbol", "type": "string", "example": "BTC-USD-PERP" }, "total_volume": { "description": "Lifetime total traded volume in USD", "type": "string", "example": "141341.0424" }, "underlying_price": { "description": "Underlying asset price (spot price)", "type": "string", "example": "29876.3" }, "volume_24h": { "description": "24 hour volume in USD", "type": "string", "example": "47041.0424" } } }, "responses.Nft": { "type": "object", "properties": { "collection_address": { "type": "string" }, "collection_name": { "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.OnboardingDerivationInfo": { "type": "object", "properties": { "class_hash": { "type": "string" }, "proxy_class_hash": { "type": "string" } } }, "responses.OptionCrossMarginParams": { "type": "object", "properties": { "imf": { "$ref": "#/components/schemas/responses.OptionMarginParams" }, "mmf": { "$ref": "#/components/schemas/responses.OptionMarginParams" } } }, "responses.OptionMarginParams": { "type": "object", "properties": { "long_itm": { "description": "Margin fraction for long ITM options", "type": "string", "example": "0.2" }, "premium_multiplier": { "description": "Multiplier for margin fraction for premium", "type": "string", "example": "1.2" }, "short_itm": { "description": "Margin fraction for short ITM options", "type": "string", "example": "0.4" }, "short_otm": { "description": "Margin fraction for short OTM options", "type": "string", "example": "0.25" }, "short_put_cap": { "description": "Cap for margin fraction for short put options", "type": "string", "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": { "description": "Paradex Account", "type": "string", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512x" }, "avg_fill_price": { "description": "Average fill price of the order", "type": "string", "example": "26000" }, "cancel_reason": { "description": "Reason for order cancellation if it was closed by cancel", "type": "string", "example": "NOT_ENOUGH_MARGIN" }, "client_id": { "description": "Client order id provided by the client at order creation", "type": "string", "example": "x1234" }, "created_at": { "description": "Order creation time", "type": "integer", "example": 1681493746016 }, "flags": { "description": "Order flags, allow flag: REDUCE_ONLY", "type": "array", "items": { "$ref": "#/components/schemas/responses.OrderFlag" } }, "id": { "description": "Unique order identifier generated by Paradex", "type": "string", "example": "123456" }, "instruction": { "description": "Execution instruction for order matching", "allOf": [ { "$ref": "#/components/schemas/responses.OrderInstruction" } ], "example": "GTC" }, "last_updated_at": { "description": "Order last update time. No changes once status=CLOSED", "type": "integer", "example": 1681493746016 }, "market": { "description": "Market", "type": "string", "example": "BTC-USD-PERP" }, "price": { "description": "Order price. 0 for MARKET orders", "type": "string", "example": "26000" }, "published_at": { "description": "Timestamp in milliseconds when order was sent to the client", "type": "integer", "example": 1681493746016 }, "received_at": { "description": "Timestamp in milliseconds when order was received by API service", "type": "integer", "example": 1681493746016 }, "remaining_size": { "description": "Remaining size of the order", "type": "string", "example": "0" }, "request_info": { "description": "Additional request information for orders", "allOf": [ { "$ref": "#/components/schemas/responses.RequestInfo" } ] }, "seq_no": { "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.", "type": "integer", "example": 1681471234972000000 }, "side": { "description": "Order side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "description": "Order size", "type": "string", "example": "0.05" }, "status": { "description": "Order status", "allOf": [ { "$ref": "#/components/schemas/responses.OrderStatus" } ] }, "stp": { "description": "Self Trade Prevention mode", "allOf": [ { "$ref": "#/components/schemas/responses.STPMode" } ], "example": "EXPIRE_MAKER" }, "timestamp": { "description": "Order signature timestamp", "type": "integer", "example": 1681493746016 }, "trigger_price": { "description": "Trigger price for stop order", "type": "string", "example": "26000" }, "type": { "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": { "description": "The pointer to fetch next set of records (null if there are no records left)", "type": "string", "example": "eyJmaWx0ZXIiMsIm1hcmtlciI6eyJtYXJrZXIiOiIxNjc1NjUwMDE3NDMxMTAxNjk5N=" }, "prev": { "description": "The pointer to fetch previous set of records (null if there are no records left)", "type": "string", "example": "eyJmaWx0ZXIiOnsiTGltaXQiOjkwfSwidGltZSI6MTY4MTY3OTgzNzk3MTMwOTk1MywibWFya2VyIjp7Im1zMjExMD==" }, "results": { "description": "Array of paginated results", "type": "array", "items": { "type": "object" } } } }, "responses.PortfolioMarginParamsResp": { "type": "object", "properties": { "base_asset": { "type": "string", "example": "BTC" }, "funding_provision_hour": { "type": "number", "example": 8 }, "hedged_margin_factor": { "type": "number", "example": 0.01 }, "mmf_factor": { "type": "number", "example": 0.5 }, "scenarios": { "type": "array", "items": { "$ref": "#/components/schemas/responses.PortfolioMarginScenarioResp" } }, "unhedged_margin_factor": { "type": "number", "example": 0.02 }, "vol_shock_params": { "$ref": "#/components/schemas/responses.VolShockParamsResp" } } }, "responses.PortfolioMarginScenarioResp": { "type": "object", "properties": { "spot_shock": { "type": "number", "example": 0.16 }, "vol_shock": { "type": "number", "example": 0.4 }, "weight": { "type": "number", "example": 1 } } }, "responses.PositionResp": { "type": "object", "properties": { "account": { "description": "Account ID of the position", "type": "string" }, "average_entry_price": { "description": "Average entry price", "type": "string", "example": "29001.34" }, "average_entry_price_usd": { "description": "Average entry price in USD", "type": "string", "example": "29001.34" }, "average_exit_price": { "description": "Average exit price", "type": "string", "example": "29001.34" }, "cached_funding_index": { "description": "Position cached funding index", "type": "string", "example": "1234.3" }, "closed_at": { "description": "Position closed time", "type": "integer", "example": 1681493939981 }, "cost": { "description": "Position cost", "type": "string", "example": "-10005.4623" }, "cost_usd": { "description": "Position cost in USD", "type": "string", "example": "-10005.4623" }, "created_at": { "description": "Position creation time", "type": "integer", "example": 1681493939981 }, "id": { "description": "Unique string ID for the position", "type": "string", "example": "1234234" }, "last_fill_id": { "description": "Last fill ID to which the position is referring", "type": "string", "example": "1234234" }, "last_updated_at": { "description": "Position last update time", "type": "integer", "example": 1681493939981 }, "leverage": { "description": "Leverage of the position", "type": "string" }, "liquidation_price": { "description": "Liquidation price of the position", "type": "string" }, "market": { "description": "Market for position", "type": "string", "example": "BTC-USD-PERP" }, "realized_positional_funding_pnl": { "description": "Realized Funding PnL for the position. Reset to 0 when position is closed or flipped.", "type": "string", "example": "12.234" }, "realized_positional_pnl": { "description": "Realized PnL including both positional PnL and funding payments. Reset to 0 when position is closed or flipped.", "type": "string", "example": "-123.23" }, "seq_no": { "description": "Unique increasing number (non-sequential) that is assigned to this position update. Can be used to deduplicate multiple feeds", "type": "integer", "example": 1681471234972000000 }, "side": { "description": "Position Side : Long or Short", "type": "string", "enum": [ "SHORT", "LONG" ] }, "size": { "description": "Size of the position with sign (positive if long or negative if short)", "type": "string", "example": "-0.345" }, "status": { "description": "Status of Position : Open or Closed", "type": "string", "enum": [ "OPEN", "CLOSED" ] }, "unrealized_funding_pnl": { "description": "Unrealized running funding P&L for the position", "type": "string", "example": "12.234" }, "unrealized_pnl": { "description": "Unrealized P&L of the position in the quote asset. Includes the unrealized running funding P&L.", "type": "string", "example": "-123.23" } } }, "responses.ReferralConfigResp": { "type": "object", "properties": { "commission_rate": { "description": "Commission rate for the referer", "type": "string", "example": "0.1" }, "commission_volume_cap": { "description": "Volume cap for commission", "type": "string", "example": "1000000000" }, "discount_rate": { "description": "Discount rate for the referee", "type": "string", "example": "0.1" }, "discount_volume_cap": { "description": "Volume cap for discount", "type": "string", "example": "30000000" }, "minimum_volume": { "description": "Minimum volume required to be eligible for Program", "type": "string", "example": "0.123" }, "name": { "description": "Referral name", "type": "string", "example": "Referral" }, "points_bonus_rate": { "description": "Points bonus rate for the referee", "type": "string", "example": "0.1" }, "points_bonus_volume_cap": { "description": "Volume cap for points bonus", "type": "string", "example": "1000000000" }, "referral_type": { "description": "Referral type", "type": "string", "example": "Referral" } } }, "responses.ReferralsResp": { "type": "object", "properties": { "address": { "description": "referee address", "type": "string" }, "created_at": { "description": "Joined at timestamp in milliseconds", "type": "integer", "example": 1715592690488 }, "referral_code": { "description": "Referral code used to onboard the referee", "type": "string", "example": "maxdegen01" }, "referral_rewards": { "description": "Total referral commission earned from the fee of referee", "type": "string", "example": "0.123" }, "volume_traded": { "description": "Total volume traded by referee", "type": "string", "example": "0.123" } } }, "responses.RefreshInventoryResp": { "type": "object", "properties": { "nfts": { "type": "array", "items": { "$ref": "#/components/schemas/responses.Nft" } } } }, "responses.RequestInfo": { "type": "object", "properties": { "id": { "description": "Request id", "type": "string" }, "message": { "description": "Error message for failed requests", "type": "string" }, "request_type": { "description": "Type of request (MODIFY_ORDER)", "type": "string" }, "status": { "description": "Status of modify order request", "type": "string" } } }, "responses.RevokeSubkeyResponse": { "type": "object", "properties": { "public_key": { "description": "The public key of the revoked subkey", "type": "string", "example": "0xabcdef1234567890abcdef" } } }, "responses.RevokeTokenResponse": { "type": "object", "properties": { "lookup_id": { "description": "The lookup ID of the revoked token", "type": "string", "example": "uuid-123" } } }, "responses.RollingDetailsResp": { "type": "object", "properties": { "current_active_contract_symbol": { "description": "Current active contract symbol", "type": "string", "example": "Commodities.WTIJ6/USD" }, "current_active_contract_weight": { "description": "Front contract weight (\"0\" to \"1\")", "type": "string", "example": "0.75" }, "next_active_contract_symbol": { "description": "Next active contract symbol", "type": "string", "example": "Commodities.WTIK6/USD" }, "period_end": { "description": "UTC millis, end of current rolling period", "type": "integer", "example": 1718150400000 }, "period_start": { "description": "UTC millis, start of current rolling period", "type": "integer", "example": 1717545600000 } } }, "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.StakingConfigResponse": { "type": "object", "properties": { "dime_fee_discount_pct": { "description": "DIME fee payment discount percentage (e.g. \"20\")", "type": "string" }, "tiers": { "description": "All available staking tiers sorted by threshold", "type": "array", "items": { "$ref": "#/components/schemas/responses.StakingTierResp" } } } }, "responses.StakingStakeResp": { "type": "object", "properties": { "account": { "description": "Owner account address", "type": "string", "example": "0x1234abcd" }, "amount": { "description": "Staked DIME amount", "type": "string", "example": "50000" }, "created_at": { "description": "Server timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200000000000 }, "last_updated_at": { "description": "Last update timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200000000000 }, "lock_duration": { "description": "Lock duration in seconds chosen at stake time", "type": "integer", "example": 2592000 }, "stake_id": { "description": "On-chain stake ID (Pedersen hash)", "type": "string", "example": "0xabc123" }, "stake_txn_hash": { "description": "Transaction hash of the original stake", "type": "string", "example": "0xtxn123" }, "staked_at": { "description": "Block timestamp when staked (nanoseconds since epoch)", "type": "integer", "example": 1640995200000000000 }, "unstake_req_txn_hash": { "description": "Transaction hash of the unstake request", "type": "string", "example": "" }, "unstake_requested_at": { "description": "Block timestamp when unstake requested; 0 if not requested", "type": "integer", "example": 0 }, "unstake_txn_hash": { "description": "Transaction hash of the unstake completion", "type": "string", "example": "" }, "unstaked_at": { "description": "Block timestamp when unstaked; 0 if still active", "type": "integer", "example": 0 } } }, "responses.StakingSummaryResponse": { "type": "object", "properties": { "account": { "description": "Account address", "type": "string", "example": "0x1234abcd" }, "active_stakes": { "description": "Number of active stake entries", "type": "integer", "example": 2 }, "staking_tier": { "description": "Current staking tier name", "type": "string", "example": "Silver" }, "total_staked": { "description": "Total active staked DIME", "type": "string", "example": "50000" } } }, "responses.StakingTierResp": { "type": "object", "properties": { "fee_rates": { "description": "Absolute fee rates per asset type and order category", "type": "object", "additionalProperties": { "type": "string" } }, "min_staked": { "description": "Minimum DIME staked to qualify for this tier", "type": "string", "example": "50000" }, "tier_name": { "description": "Display name of the staking tier", "type": "string", "example": "Silver" }, "xp_multiplier": { "description": "XP earnings multiplier for this tier", "type": "string", "example": "1.3" } } }, "responses.Strategy": { "type": "object", "properties": { "address": { "description": "Contract address of the sub-operator", "type": "string", "example": "0x29464b79b02543ed8746bba6e71c8a15401dd27b7279a5fa2f2fe8e8cdfabb" }, "name": { "description": "Strategy name", "type": "string", "example": "Alpha Strategy" }, "visibility": { "description": "Owner-controlled visibility settings for the strategy", "allOf": [ { "$ref": "#/components/schemas/responses.Visibility" } ] } } }, "responses.Subkey": { "type": "object", "properties": { "account_id": { "description": "Account ID that owns this subkey", "type": "string", "example": "0x1234567890abcdef" }, "allowed_cidrs": { "description": "IP CIDR allowlist; empty means unrestricted", "type": "array", "items": { "type": "string" }, "example": [ "[\"203.0.113.0/24\"]" ] }, "created_at": { "description": "Subkey creation timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200 }, "id": { "description": "Unique subkey identifier", "type": "integer", "example": 1 }, "name": { "description": "User-provided subkey name", "type": "string", "example": "My Subkey" }, "public_key": { "description": "Subkey public key", "type": "string", "example": "0xabcdef1234567890abcdef" }, "revoked_at": { "description": "Revocation timestamp (nanoseconds since epoch, 0 if not revoked)", "type": "integer", "example": 0 }, "state": { "description": "Subkey state", "type": "string" }, "updated_at": { "description": "Last modification timestamp (nanoseconds since epoch)", "type": "integer", "example": 1640995200 } } }, "responses.SystemConfigResponse": { "type": "object", "properties": { "assets_limit_per_account": { "description": "Maximum number of token or synthetic positions allowed per account", "type": "integer", "example": 550 }, "block_explorer_url": { "description": "Block explorer URL for the current SN Instance", "type": "string", "example": "https://voyager.testnet.paradex.trade/" }, "bridged_tokens": { "description": "bridged tokens config\nhttps://github.com/starknet-io/starknet-addresses/blob/master/bridged_tokens/goerli.json", "type": "array", "items": { "$ref": "#/components/schemas/responses.BridgedToken" } }, "dime_staking_contract_address": { "description": "DIME Staking contract address", "type": "string" }, "environment": { "description": "Environment of the Paradex Instance", "type": "string", "example": "local" }, "l1_chain_id": { "description": "L1 chain ID value", "type": "string", "example": "5" }, "l1_core_contract_address": { "description": "Address of Starknet L1 core contract", "type": "string", "example": "0x182FE62c57461d4c5Ab1aE6F04f1D51aA1607daf" }, "l1_operator_address": { "description": "Address of Starknet L1 operator", "type": "string", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "l1_relayer_address": { "description": "Address of L1 Relayer", "type": "string", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "l2_relayer_address": { "description": "Address of L2 Relayer", "type": "string", "example": "0x63e762538C70442758Fd622116d817761c94FD6A" }, "liquidation_fee": { "description": "Liquidation fee", "type": "string", "example": "0.20" }, "oracle_address": { "description": "Oracle contract address", "type": "string", "example": "0x47c622ce5f7ff7fa17725df596f4f506364e49be0621eb142a75b44ee3689c6" }, "paraclear_account_hash": { "description": "Class hash of the account contract", "type": "string", "example": "0x033434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2" }, "paraclear_account_proxy_hash": { "description": "Proxy hash of the account contract", "type": "string", "example": "0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9" }, "paraclear_address": { "description": "Paraclear contract address", "type": "string", "example": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7554d" }, "paraclear_decimals": { "type": "integer" }, "paraclear_evm_account_hash": { "description": "Class hash of the EVM (secp256k1) account contract", "type": "string" }, "partial_liquidation_buffer": { "description": "Partial liquidation buffer. Account value is supposed to be at least this much above the MMR after partial liquidation", "type": "string", "example": "0.2" }, "partial_liquidation_share_increment": { "description": "Minimum granularity of partial liquidation share. The share is rounded up to the nearest multiple of this value", "type": "string", "example": "0.05" }, "starknet_chain_id": { "description": "Chain ID for the Starknet Instance", "type": "string", "example": "SN_CHAIN_ID" }, "starknet_fullnode_rpc_base_url": { "description": "Full node RPC Proxy base URL for Starknet", "type": "string", "example": "https://rpc.api.testnet.paradex.trade" }, "starknet_fullnode_rpc_url": { "description": "Full node RPC Proxy URL for Starknet", "type": "string", "example": "https://rpc.api.testnet.paradex.trade/rpc/v0_10" }, "starknet_gateway_url": { "description": "This field is deprecated", "type": "string" }, "universal_deployer_address": { "description": "Universal deployer address", "type": "string", "example": "0x1f3f9d3f1f0b7f3f9f3f9f3f9f3f9f3f9f3f9f3f" } } }, "responses.SystemStateResponse": { "type": "object", "properties": { "status": { "description": "Status of the system", "allOf": [ { "$ref": "#/components/schemas/responses.SystemStatus" } ], "example": "ok" } } }, "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": { "description": "Paradex Server time", "type": "string", "example": "1681493415023" } } }, "responses.TradeResult": { "type": "object", "properties": { "created_at": { "description": "Unix Millisecond timestamp at which trade was done", "type": "integer", "example": 1681497002041 }, "id": { "description": "Unique Trade ID per TradeType", "type": "string", "example": "12345643" }, "market": { "description": "Market for which trade was done", "type": "string", "example": "BTC-USD-PERP" }, "price": { "description": "Trade price", "type": "string", "example": "30001.2" }, "side": { "description": "Taker side", "allOf": [ { "$ref": "#/components/schemas/responses.OrderSide" } ] }, "size": { "description": "Trade size", "type": "string", "example": "0.01" }, "trade_type": { "description": "Trade type, can be FILL, LIQUIDATION, or RPI", "allOf": [ { "$ref": "#/components/schemas/responses.FillType" } ], "example": "FILL" } } }, "responses.TradebustResult": { "type": "object", "properties": { "account": { "description": "Paradex Account", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "busted_fill_id": { "description": "Unique ID of the busted fill", "type": "string", "example": "12342345" }, "created_at": { "description": "Unix timestamp in milliseconds when bust was created", "type": "integer", "example": 1681497002041 } } }, "responses.TraderRole": { "type": "string", "enum": [ "TAKER", "MAKER" ], "x-enum-varnames": [ "TraderRoleTaker", "TraderRoleMaker" ] }, "responses.TradingMode": { "type": "string", "enum": [ "STANDARD", "RFQ_ONLY" ], "x-enum-varnames": [ "TradingModeStandard", "TradingModeRfqOnly" ] }, "responses.TransactionResponse": { "type": "object", "properties": { "completed_at": { "description": "Timestamp from when the transaction was completed", "type": "integer" }, "created_at": { "description": "Timestamp from when the transaction was sent to blockchain gateway", "type": "integer" }, "hash": { "description": "Tx Hash of the settled trade // Hash of the transaction", "type": "string", "example": "0x445c05d6bfb899e39338440d199971c4d7f4cde7878ed3888df3f716efb8df2" }, "id": { "description": "Unique string ID of the event that triggered the transaction. For example, fill ID or liquidation ID", "type": "string", "example": "12342423" }, "state": { "description": "Status of the transaction on Starknet", "type": "string", "enum": [ "ACCEPTED_ON_L1", "ACCEPTED_ON_L2", "NOT_RECEIVED", "RECEIVED", "REJECTED", "REVERTED" ] }, "type": { "description": "Event that triggered the transaction", "type": "string", "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", "AIRDROP" ], "x-enum-varnames": [ "TransferKindDeposit", "TransferKindWithdrawal", "TransferKindUnwinding", "TransferKindVaultDeposit", "TransferKindVaultWithdrawal", "TransferKindAutoWithdrawal", "TransferKindAirdrop" ] }, "responses.TransferResult": { "description": "TransferResult", "type": "object", "properties": { "account": { "description": "Starknet Account address", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "amount": { "description": "Transferred amount", "type": "string", "example": "100" }, "auto_withdrawal_fee": { "description": "Fee for auto withdrawal in USDC", "type": "string", "example": "4.5" }, "bridge": { "description": "Bridge used for the transfer", "allOf": [ { "$ref": "#/components/schemas/responses.TransferBridge" } ], "example": "STARKGATE" }, "counterparty": { "description": "Counterparty address", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "created_at": { "description": "Unix Millis timestamp transfer was created on L2", "type": "integer", "example": 1681497002041 }, "direction": { "description": "Transfer direction (IN, OUT)", "allOf": [ { "$ref": "#/components/schemas/responses.TransferDirection" } ], "example": "OUT" }, "external_account": { "description": "External chain account address", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "external_chain": { "description": "External chain used for the transfer", "type": "string", "example": "ETHEREUM" }, "external_txn_hash": { "description": "Transaction hash on the external chain", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "failure_reason": { "description": "Reason for transfer failure", "type": "string", "example": "Gas fee too low" }, "id": { "description": "Transfer auto-generated ID", "type": "string", "example": "123456789" }, "kind": { "description": "Transfer Kind (DEPOSIT, WITHDRAWAL)", "allOf": [ { "$ref": "#/components/schemas/responses.TransferKind" } ], "example": "DEPOSIT" }, "last_updated_at": { "description": "Unix Millis timestamp transfer was last updated on L2", "type": "integer", "example": 1681497002041 }, "socialized_loss_factor": { "description": "Withdrawal's socialized loss factor", "type": "string", "example": "0" }, "status": { "description": "Transfer External State (PENDING, AVAILABLE, COMPLETED, FAILED)", "allOf": [ { "$ref": "#/components/schemas/responses.TransferStatus" } ], "example": "PENDING" }, "token": { "description": "Transferred token name", "type": "string", "example": "USDC" }, "txn_hash": { "description": "Transaction hash on Paradex chain", "type": "string", "example": "0x495d2eb5236a12b8b4ad7d3849ce6a203ce21c43f473c248dfd5ce70d9454fa" }, "vault_address": { "description": "Vault address", "type": "string", "example": "0x7a3b1c8f9e2d4e6f8a0c2b4d6e8f0a2c4b6e8d0a" }, "vault_unwind_completion_percentage": { "description": "Vault unwind completion percentage", "type": "string", "example": "0.35" } } }, "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": { "description": "Account ID", "type": "string" }, "leverage": { "description": "Leverage value", "type": "integer" }, "margin_type": { "description": "Margin type (CROSS/ISOLATED)", "type": "string" }, "market": { "description": "Market symbol", "type": "string" } } }, "responses.VaultAccountStrategyAccrual": { "type": "object", "properties": { "estimated_accrued_fee": { "description": "Estimated profit-share fee accrued by this depositor for this strategy, in USDC", "type": "string", "example": "0.45" }, "strategy": { "description": "Contract address of the sub-operator (strategy)", "type": "string", "example": "0x29464b79b02543ed8746bba6e71c8a15401dd27b7279a5fa2f2fe8e8cdfabb" } } }, "responses.VaultAccountSummaryResp": { "type": "object", "properties": { "address": { "description": "Contract address of the vault", "type": "string", "example": "0x1234567890abcdef" }, "created_at": { "description": "Unix timestamp in milliseconds of when the user joined the vault.", "type": "integer", "example": 1717171717 }, "deposited_amount": { "description": "Amount deposited on the vault by the user in USDC", "type": "string", "example": "123.45" }, "estimated_accrued_fee": { "description": "Estimated profit-share fee accrued by this depositor but not yet settled, in USDC. Covers the vault-level fee only, so it is a lower bound on the total.", "type": "string", "example": "1.23" }, "estimated_fee_breakdown": { "description": "Per-strategy split of the depositor's estimated accrued fee. Not yet reported; currently always empty.", "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultAccountStrategyAccrual" } }, "hwm_price": { "description": "High-water mark vault token price for this depositor. Profit share is charged only on gains above this price.", "type": "string", "example": "1.0512" }, "total_pnl": { "description": "Total P&L realized by the user in USD.", "type": "string", "example": "149.12" }, "total_roi": { "description": "Total ROI realized by the user in percentage, i.e. 0.1 means 10%.", "type": "string", "example": "0.724" }, "vtoken_amount": { "description": "Amount of vault tokens owned by the user", "type": "string", "example": "123.45" } } }, "responses.VaultAnalytics": { "type": "object", "properties": { "address": { "type": "string", "example": "0x1234567890abcdef" }, "annualized_volatility": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "apr": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "as_of": { "type": "string", "example": "2026-05-05 09:00:00.000" }, "best_period_return": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "max_drawdown": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "monthly_pnl_last_12m": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultMonthlyPnlEntry" } }, "pct_positive": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "pnl": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "recovery_hours": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "sharpe_ratio": { "$ref": "#/components/schemas/responses.WindowedMetrics" }, "top_holders": { "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultTopHolder" } }, "worst_period_return": { "$ref": "#/components/schemas/responses.WindowedMetrics" } } }, "responses.VaultAnalyticsResp": { "type": "object", "properties": { "address": { "type": "string", "example": "0x1234567890abcdef" }, "as_of": { "type": "string", "example": "2026-05-05 09:00:00.000" }, "substrategies": { "type": "array", "items": { "$ref": "#/components/schemas/responses.AccountAnalytics" } }, "vault_level": { "$ref": "#/components/schemas/responses.VaultAnalytics" } } }, "responses.VaultHistoricalDataResp": { "type": "object", "properties": { "address": { "description": "Contract address of the vault", "type": "string", "example": "0x1234567890abcdef" }, "data": { "description": "Ordered list of datapoints", "type": "array", "items": { "type": "number" } }, "timestamps": { "description": "Ordered list of timestamps", "type": "array", "items": { "type": "integer" } } } }, "responses.VaultKind": { "type": "string", "enum": [ "user", "protocol" ], "x-enum-varnames": [ "VaultKindUser", "VaultKindProtocol" ] }, "responses.VaultMonthlyPnlEntry": { "type": "object", "properties": { "month": { "type": "string", "example": "2026-05-01" }, "month_return_pct": { "type": "string", "example": "0.0123" } } }, "responses.VaultResp": { "type": "object", "properties": { "address": { "description": "Contract address of the vault", "type": "string", "example": "0x1234567890abcdef" }, "created_at": { "description": "Unix timestamp in milliseconds of when the vault has been created", "type": "integer", "example": 1517171717 }, "curator_name": { "description": "Curator name of the vault (empty string if not set)", "type": "string", "example": "Some Curator" }, "description": { "description": "Description of the vault", "type": "string", "example": "My description" }, "kind": { "description": "Kind of the vault: 'user' for user-defined vaults, 'protocol' for vaults controlled by Paradex", "allOf": [ { "$ref": "#/components/schemas/responses.VaultKind" } ], "example": "user" }, "last_updated_at": { "description": "Unix timestamp in milliseconds of when the vault was last updated", "type": "integer", "example": 1617171717 }, "lockup_period": { "description": "Lockup period of the vault in days", "type": "integer", "example": 1 }, "max_tvl": { "description": "Maximum amount of assets the vault can hold in USDC", "type": "integer", "example": 1000000 }, "name": { "description": "Name of the vault", "type": "string", "example": "MyVault" }, "operator_account": { "description": "Operator account of the vault", "type": "string", "example": "0x1234567890abcdef" }, "owner_account": { "description": "Owner account of the vault", "type": "string", "example": "0x0234567890abcdef" }, "profit_share": { "description": "Profit share of the vault in percentage, i.e. 10 means 10%", "type": "integer", "example": 10 }, "status": { "description": "Status of the vault", "allOf": [ { "$ref": "#/components/schemas/responses.VaultStatus" } ], "example": "ACTIVE" }, "strategies": { "description": "Strategies of the vault", "type": "array", "items": { "$ref": "#/components/schemas/responses.Strategy" } }, "strategy_description": { "description": "Strategy description of the vault (empty string if not set)", "type": "string", "example": "Delta Neutral" }, "token_address": { "description": "LP token address", "type": "string" }, "visibility": { "description": "Owner-controlled visibility settings for the vault", "allOf": [ { "$ref": "#/components/schemas/responses.Visibility" } ] } } }, "responses.VaultStatus": { "type": "string", "enum": [ "INITIALIZING", "ACTIVE", "CLOSED", "FAILED" ], "x-enum-varnames": [ "VaultStatusInitializing", "VaultStatusActive", "VaultStatusClosed", "VaultStatusFailed" ] }, "responses.VaultSummaryResp": { "type": "object", "properties": { "address": { "description": "Contract address of the vault", "type": "string", "example": "0x1234567890abcdef" }, "last_month_return": { "description": "APR return of the vault in the last trailing month in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.023" }, "max_drawdown": { "description": "Max all time drawdown realized by the vault in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.1916" }, "max_drawdown_24h": { "description": "Max drawdown realized by the vault in the last 24 hours in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.0138" }, "max_drawdown_30d": { "description": "Max drawdown realized by the vault in the last 30 days in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.1821" }, "max_drawdown_7d": { "description": "Max drawdown realized by the vault in the last 7 days in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.1124" }, "net_deposits": { "description": "Net deposits of the vault in USDC", "type": "string", "example": "1000000" }, "next_fee_settlement_at": { "description": "Estimated time of the vault's next profit-share fee settlement, as a Unix timestamp in milliseconds. Null when the next settlement time is not yet known.", "type": "integer", "example": 1719191919000, "nullable": true }, "num_depositors": { "description": "Number of depositors on the vault", "type": "integer", "example": 100 }, "owner_equity": { "description": "Vault equity of the owner (% of ownership) in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.145" }, "pnl_24h": { "description": "P&L of the vault in the last 24 hours in USD", "type": "string", "example": "13.41" }, "pnl_30d": { "description": "P&L of the vault in the last 30 days in USD", "type": "string", "example": "114.19" }, "pnl_7d": { "description": "P&L of the vault in the last 7 days in USD", "type": "string", "example": "91.31" }, "roi_24h": { "description": "Return of the vault in the last 24 hours in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.034" }, "roi_30d": { "description": "Return of the vault in the last 30 days in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.003" }, "roi_7d": { "description": "Return of the vault in the last 7 days in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.123" }, "strategies": { "description": "Profit-share terms and performance index for each of the vault's strategies", "type": "array", "items": { "$ref": "#/components/schemas/responses.VaultSummaryStrategy" } }, "total_pnl": { "description": "Total P&L of the vault in USD", "type": "string", "example": "149.12" }, "total_roi": { "description": "Total ROI of the vault in percentage, i.e. 0.1 means 10%", "type": "string", "example": "0.724" }, "tvl": { "description": "Total Value Locked (deposits + unrealized PnL) in USDC", "type": "string", "example": "1000000" }, "volume": { "description": "All time volume traded by the vault in USD", "type": "string", "example": "12345678.16" }, "volume_24h": { "description": "Volume traded by the vault in the last 24 hours in USD", "type": "string", "example": "45678.16" }, "volume_30d": { "description": "Volume traded by the vault in the last 30 days in USD", "type": "string", "example": "2345678.16" }, "volume_7d": { "description": "Volume traded by the vault in the last 7 days in USD", "type": "string", "example": "345678.16" }, "vtoken_price": { "description": "Current value of vault token price in USD", "type": "string", "example": "1.23" }, "vtoken_supply": { "description": "Total amount of available vault tokens", "type": "string", "example": "1000000" } } }, "responses.VaultSummaryStrategy": { "type": "object", "properties": { "fee_recipient": { "description": "Address that receives this strategy's profit-share fees. Set per strategy and need not match the strategy address. Empty if the vault operator has not set terms for this strategy yet.", "type": "string", "example": "0x7f2c5a1e9b48d3f06a1c8e5b2d94f7a3c60e18b5d4a29f7c3e8b1a6d05f24c9" }, "pnl_index": { "description": "Latest performance index recorded for this strategy", "type": "string", "example": "1.0512" }, "profit_share_percentage": { "description": "Profit share percentage agreed for this strategy, i.e. 10 means 10%. Empty if the vault operator has not set terms for this strategy yet.", "type": "string", "example": "10" }, "strategy": { "description": "Contract address of the sub-operator (strategy)", "type": "string", "example": "0x29464b79b02543ed8746bba6e71c8a15401dd27b7279a5fa2f2fe8e8cdfabb" } } }, "responses.VaultTopHolder": { "type": "object", "properties": { "percentage": { "type": "string", "example": "24.6371578053709186" }, "rank": { "type": "integer", "example": 1 }, "value_usdc": { "type": "string", "example": "3758808.50501487823" } } }, "responses.VaultsConfigResponse": { "type": "object", "properties": { "max_lockup_period_days": { "description": "Maximum lockup period in days an owner can configure for a vault", "type": "string", "example": "4" }, "max_profit_share_percentage": { "description": "Maximum profit share percentage (0-100) an owner can configure for a vault", "type": "string", "example": "50" }, "min_initial_deposit": { "description": "Minimum initial collateral deposit (in currency units) at vault creation. Only applies to the owner", "type": "string", "example": "1000" }, "min_lockup_period_days": { "description": "Minimum lockup period in days an owner can configure for a vault", "type": "string", "example": "1" }, "min_owner_share_percentage": { "description": "Minimum share percentage (0-100) the vault owner must maintain on the vault", "type": "string", "example": "5" }, "profit_share_period": { "description": "How often vault profit-share fees are settled, in seconds. Applies to all vaults; 0 means not configured", "type": "string", "example": "2592000" }, "vault_factory_address": { "description": "Address of the vault factory contract", "type": "string", "example": "0x1234567890abcdef" } } }, "responses.Visibility": { "type": "object", "properties": { "balances": { "description": "Whether the vault's balances are publicly visible", "type": "boolean", "example": true }, "positions": { "description": "Whether the vault's positions are publicly visible", "type": "boolean", "example": true } } }, "responses.VolShockParamsResp": { "type": "object", "properties": { "dte_floor_days": { "type": "number", "example": 1 }, "min_vol_shock_up": { "type": "number", "example": 0.4 }, "vega_power_long_dte": { "type": "number", "example": 0.13 }, "vega_power_short_dte": { "type": "number", "example": 0.3 } } }, "responses.VolumeTierKindInfo": { "type": "object", "properties": { "tier": { "description": "Effective tier name, e.g. \"VIP 1\"", "type": "string" }, "volume": { "description": "Traded volume for the tier's duration window", "type": "string" } } }, "responses.VolumeTierResp": { "type": "object", "properties": { "fee_rates": { "type": "object", "additionalProperties": { "type": "string" } }, "kind": { "type": "string", "example": "retail" }, "min_volume": { "type": "string", "example": "100000" }, "min_volume_duration": { "type": "string", "example": "14d" }, "nft_min_volume": { "type": "string", "example": "0" }, "sort_order": { "type": "integer", "example": 1 }, "tier_name": { "type": "string", "example": "VIP 1" } } }, "responses.WindowedMetrics": { "type": "object", "properties": { "window_1y": { "type": "string" }, "window_24h": { "type": "string" }, "window_30d": { "type": "string" }, "window_7d": { "type": "string" }, "window_90d": { "type": "string" }, "window_all": { "type": "string" } } }, "responses.XPTransfer": { "type": "object", "properties": { "amount": { "description": "Amount of XP transferred", "type": "integer", "example": 100 }, "created_at": { "description": "Creation timestamp (milliseconds since epoch)", "type": "integer", "example": 1640995200000 }, "fee": { "description": "Fee charged for the transfer (deducted from sender's balance)", "type": "integer", "example": 1 }, "id": { "description": "Unique transfer identifier", "type": "string", "example": "transfer_123" }, "is_private": { "description": "Whether the transfer is private (not shown on public feeds)", "type": "boolean", "example": false }, "recipient": { "description": "Address of the recipient (gaining XP)", "type": "string", "example": "0xfedcba0987654321" }, "season": { "description": "Season identifier ('season1' for Season 1, 'season2' for Season 2, etc.)", "type": "string", "example": "season2" }, "sender": { "description": "Address of the sender (losing XP)", "type": "string", "example": "0x1234567890abcdef" } } }, "services.TransferFeeConfigResponse": { "type": "object", "properties": { "fee_percentage": { "description": "Fee percentage charged on transfers (e.g., 0.01 = 1%)", "type": "number" } } } } } }