{ "openapi": "3.0.0", "info": { "title": "Deribit API", "version": "2.1.1" }, "servers": [ { "url": "https://test.deribit.com/api/v2" } ], "tags": [ { "name": "WebSocket Only", "description": "Can only be used over websockets." }, { "name": "Public", "description": "Public methods can be used without authentication." }, { "name": "Private", "description": "

Private methods require authentication. All requests must include a valid OAuth2 token.

\n

A token can be requested using the /public/auth method.

\n

When using the websockets protocol, the token must be included as a parameter access_token in the message. When using REST (HTTP GET), the token may also be passed in the Authorization header.

" }, { "name": "Authentication" }, { "name": "Session Management" }, { "name": "Subscription Management", "description": "Subscription works as [notifications](#notifications), so users will automatically (after subscribing) receive messages from the server. Overview for each channel response format is described in [subscriptions](#subscriptions) section." }, { "name": "Account Management" }, { "name": "Trading" }, { "name": "Market Data" }, { "name": "Wallet" }, { "name": "Chat" } ], "paths": { "/private/get_positions": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "currency", "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any", "example": "BTC" }, "required": false }, { "name": "kind", "in": "query", "schema": { "$ref": "#/components/schemas/kind_without_spot", "example": "future" }, "description": "Kind filter on positions", "required": false }, { "name": "subaccount_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "The user id for the subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetPositionsResponse" }, "400": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2236, "method": "private/get_positions", "params": { "currency": "BTC", "kind": "future" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves all open positions for the authenticated account. Returns position details including size, average entry price, mark price, unrealized P&L, initial margin, maintenance margin, and other position-related information.\n\nResults can be filtered by currency and instrument kind (future, option, etc.). To retrieve positions for a specific subaccount, use the `subaccount_id` parameter.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_positions)\n\n", "x-mint": { "metadata": { "title": "private/get_positions", "og:title": "private/get_positions", "keywords": [ "private/get_positions", "currency", "kind", "subaccount_id", "instrument_name", "average_price", "direction", "mark_price", "delta", "gamma", "vega", "theta", "index_price", "initial_margin", "maintenance_margin", "settlement_price", "total_profit_loss", "floating_profit_loss", "realized_profit_loss", "size", "size_currency", "average_price_usd", "floating_profit_loss_usd", "leverage", "realized_funding", "interest_value", "estimated_liquidation_price", "open_orders_margin" ] }, "href": "/api-reference/account-management/private-get_positions" } } }, "/private/get_position": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetPositionResponse" }, "400": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 404, "method": "private/get_position", "params": { "instrument_name": "BTC-PERPETUAL" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the open position for a specific instrument. Returns detailed position information including size, average entry price, mark price, unrealized P&L, initial margin, maintenance margin, and other position-related metrics.\n\nIf no position exists for the specified instrument, the response will indicate a zero position.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_position)\n\n", "x-mint": { "metadata": { "title": "private/get_position", "og:title": "private/get_position", "keywords": [ "private/get_position", "instrument_name", "kind", "average_price", "direction", "mark_price", "delta", "gamma", "vega", "theta", "index_price", "initial_margin", "maintenance_margin", "settlement_price", "total_profit_loss", "floating_profit_loss", "realized_profit_loss", "size", "size_currency", "average_price_usd", "floating_profit_loss_usd", "leverage", "realized_funding", "interest_value", "estimated_liquidation_price", "open_orders_margin" ] }, "href": "/api-reference/account-management/private-get_position" } } }, "/private/get_account_summary": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "subaccount_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "The user id for the subaccount" }, { "in": "query", "name": "extended", "required": false, "schema": { "example": true, "type": "boolean" }, "description": "Include additional fields" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAccountResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2515, "method": "private/get_account_summary", "params": { "currency": "BTC", "extended": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the account summary for a specific currency. The summary includes balance, equity, available funds, initial margin, maintenance margin, and other margin-related information.\n\nTo retrieve the summary for a specific subaccount, use the `subaccount_id` parameter. When the `extended` parameter is set to `true`, additional account details such as account ID, username, email, and account type are included.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_account_summary)\n\n", "x-mint": { "metadata": { "title": "private/get_account_summary", "og:title": "private/get_account_summary", "keywords": [ "private/get_account_summary", "currency", "subaccount_id", "extended", "total_pl", "session_rpl", "session_upl", "available_funds", "available_withdrawal_funds", "margin_balance", "balance", "spot_reserve", "additional_reserve", "fee_balance", "fee_group", "delta_total", "projected_delta_total", "deposit_address", "email", "equity", "futures_pl", "futures_session_rpl", "futures_session_upl", "initial_margin", "maintenance_margin", "estimated_liquidation_ratio", "system_name", "options_delta", "options_gamma", "options_pl", "options_session_rpl", "options_session_upl", "options_theta", "options_value", "options_vega", "options_gamma_map", "options_theta_map", "options_vega_map", "security_keys_enabled", "mmp_enabled", "projected_initial_margin", "projected_maintenance_margin", "username", "type", "login_enabled", "portfolio_margining_enabled", "cross_collateral_enabled", "margin_model", "total_equity_usd", "total_initial_margin_usd", "total_maintenance_margin_usd", "total_margin_balance_usd", "total_delta_total_usd", "interuser_transfers_enabled", "referrer_id", "limits", "creation_timestamp", "has_non_block_chain_equity", "self_trading_reject_mode", "self_trading_extended_to_subaccounts", "fees", "affiliate_promotion_fee", "trading_products_details", "receive_notifications", "is_direct_access_allowed" ] }, "href": "/api-reference/account-management/private-get_account_summary" } } }, "/private/get_account_summaries": { "get": { "parameters": [ { "name": "subaccount_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "The user id for the subaccount" }, { "in": "query", "name": "extended", "required": false, "schema": { "example": true, "type": "boolean" }, "description": "Include additional fields" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAccountSummariesResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2515, "method": "private/get_account_summaries", "params": { "extended": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a per-currency list of account summaries for the authenticated user. Each summary includes balance, equity, available funds, and margin information for each currency.\n\nTo retrieve summaries for a specific subaccount, use the `subaccount_id` parameter. When the `extended` parameter is set to `true`, additional account details such as account ID, username, email, and account type are included.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_account_summaries)\n\n", "x-mint": { "metadata": { "title": "private/get_account_summaries", "og:title": "private/get_account_summaries", "keywords": [ "private/get_account_summaries", "subaccount_id", "extended", "system_name", "username", "type", "login_enabled", "email", "security_keys_enabled", "mmp_enabled", "interuser_transfers_enabled", "referrer_id", "creation_timestamp", "self_trading_reject_mode", "self_trading_extended_to_subaccounts", "block_rfq_self_match_prevention", "affiliate_promotion_fee", "trading_products_details", "receive_notifications", "summaries", "total_pl", "session_rpl", "session_upl", "available_funds", "available_withdrawal_funds", "margin_balance", "balance", "spot_reserve", "additional_reserve", "fee_balance", "fee_group", "currency", "delta_total", "projected_delta_total", "deposit_address", "equity", "futures_pl", "futures_session_rpl", "futures_session_upl", "initial_margin", "maintenance_margin", "estimated_liquidation_ratio", "options_delta", "options_gamma", "options_pl", "options_session_rpl", "options_session_upl", "options_theta", "options_value", "options_vega", "options_gamma_map", "options_theta_map", "options_vega_map", "projected_initial_margin", "projected_maintenance_margin", "portfolio_margining_enabled", "cross_collateral_enabled", "margin_model", "total_equity_usd", "total_initial_margin_usd", "total_maintenance_margin_usd", "total_margin_balance_usd", "total_delta_total_usd", "limits", "has_non_block_chain_equity", "fees" ] }, "href": "/api-reference/account-management/private-get_account_summaries" } } }, "/private/pme/simulate": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/pme_currency", "example": "BTC" }, "description": "The currency for which the Extended Risk Matrix will be calculated. Use `CROSS` for Cross Collateral simulation." }, { "name": "add_positions", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "If `true`, adds simulated positions to current positions, otherwise uses only simulated positions. By default `true`" }, { "name": "simulated_positions", "required": false, "in": "query", "schema": { "type": "string", "description": "JSON string containing: object data" }, "description": "Object with positions in following form: `{InstrumentName1: Position1, InstrumentName2: Position2...}`, for example `{\"BTC-PERPETUAL\": -1.0}` (or corresponding URI-encoding for GET). Size in base currency." } ], "responses": { "200": { "$ref": "#/components/responses/PrivatePmeSimulateResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2255, "method": "private/pme/simulate", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Calculates the Extended Risk Matrix (ERM) and detailed margin information for Portfolio Margin accounts. The ERM provides a comprehensive view of portfolio risk across different scenarios and market conditions.\n\nYou can calculate the ERM for a specific currency or for the entire Cross-Collateral portfolio. The response includes margin requirements, risk metrics, and scenario analysis that helps assess portfolio risk under various market conditions.\n\nUse this method to understand margin requirements and risk exposure before making trading decisions in a Portfolio Margin account.\n\n**📖 Related Article:** [Portfolio Margin](https://support.deribit.com/hc/en-us/articles/25944756247837-Portfolio-Margin)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fpme%2Fsimulate)\n\n", "x-mint": { "metadata": { "title": "private/pme/simulate", "og:title": "private/pme/simulate", "keywords": [ "private/pme/simulate", "currency", "add_positions", "simulated_positions" ] }, "href": "/api-reference/account-management/private-simulate" } } }, "/private/simulate_portfolio": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency", "example": "BTC" }, "description": "The currency symbol" }, { "name": "add_positions", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "If `true`, adds simulated positions to current positions, otherwise uses only simulated positions. By default `true`" }, { "name": "simulated_positions", "required": false, "in": "query", "schema": { "type": "string", "description": "JSON string containing: object data" }, "description": "Object with positions in following form: `{InstrumentName1: Position1, InstrumentName2: Position2...}`, for example `{\"BTC-PERPETUAL\": -1000.0}` (or corresponding URI-encoding for GET). For futures in USD, for options in base currency." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSimulatePortfolioResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 22222, "method": "private/simulate_portfolio", "params": { "currency": "BTC", "add_positions": true, "simulated_positions": { "BTC-PERPETUAL": 1 } } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Calculates portfolio margin requirements and risk metrics for simulated positions or the current portfolio. This method helps you understand margin requirements before opening new positions or assess the impact of potential trades.\n\nYou can simulate adding new positions to the current portfolio or calculate margin for a completely simulated portfolio. The response includes initial margin, maintenance margin, available funds, and other risk metrics.\n\n**Note:** This method has a restricted rate limit of not more than once per second due to the computational complexity of portfolio margin calculations.\n\n**📖 Related Article:** [Portfolio Margin](https://support.deribit.com/hc/en-us/articles/25944756247837-Portfolio-Margin)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsimulate_portfolio)\n\n", "x-mint": { "metadata": { "title": "private/simulate_portfolio", "og:title": "private/simulate_portfolio", "keywords": [ "private/simulate_portfolio", "currency", "add_positions", "simulated_positions", "equity", "balance", "margin_balance", "initial_margin", "maintenance_margin", "projected_initial_margin", "projected_maintenance_margin", "available_funds", "available_withdrawal_funds", "available_subaccount_transfer_funds", "total_pl", "session_rpl", "session_upl", "futures_pl", "futures_session_rpl", "futures_session_upl", "options_pl", "options_session_rpl", "options_session_upl", "options_value", "options_delta", "options_gamma", "options_theta", "options_vega", "options_gamma_map", "options_theta_map", "options_vega_map", "delta_total", "delta_total_map", "projected_delta_total", "additional_reserve", "spot_reserve", "fee_balance", "locked_balance", "margin_model", "portfolio_margining_enabled", "cross_collateral_enabled", "total_equity_usd", "total_initial_margin_usd", "total_maintenance_margin_usd", "total_margin_balance_usd", "total_delta_total_usd" ] }, "href": "/api-reference/account-management/private-simulate_portfolio" } } }, "/private/get_access_log": { "get": { "parameters": [ { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetAccessLogResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_access_log", "params": { "offset": 0, "count": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a log of API access attempts and authentication events for the authenticated account. The log includes information such as IP addresses, timestamps, API methods called, and authentication status.\n\nUse this method to monitor account security, review API usage patterns, and identify unauthorized access attempts. Results can be paginated using the `offset` and `count` parameters.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_access_log)\n\n", "x-mint": { "metadata": { "title": "private/get_access_log", "og:title": "private/get_access_log", "keywords": [ "private/get_access_log", "offset", "count", "ip", "timestamp", "country", "city", "log", "data" ] }, "href": "/api-reference/account-management/private-get_access_log" } } }, "/private/get_affiliate_program_info": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PrivateGetAffiliateProgramInfoResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2, "method": "private/get_affiliate_program_info", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves information about the affiliate program status for the authenticated account. The response includes the number of referred affiliates, total payouts earned, pending payouts, and the unique affiliate referral link.\n\nUse this method to track your affiliate program performance and earnings.\n\n**📖 Related Support Article:** [Affiliate Program](https://support.deribit.com/hc/en-us/articles/25944777728797-Affiliate-Program)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_affiliate_program_info)\n\n", "x-mint": { "metadata": { "title": "private/get_affiliate_program_info", "og:title": "private/get_affiliate_program_info", "keywords": [ "private/get_affiliate_program_info", "is_enabled", "number_of_affiliates", "link", "received", "eth", "btc" ] }, "href": "/api-reference/account-management/private-get_affiliate_program_info" } } }, "/private/enable_affiliate_program": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 24, "method": "private/enable_affiliate_program", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Enables the affiliate program for the authenticated account. Once enabled, you can earn commissions by referring new users to Deribit.\n\nAfter enabling, you will receive a unique affiliate link that can be shared with potential users. Commissions are paid based on the trading activity of referred users.\n\n**📖 Related Support Article:** [Affiliate Program](https://support.deribit.com/hc/en-us/articles/25944777728797-Affiliate-Program)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fenable_affiliate_program)\n\n", "x-mint": { "metadata": { "title": "private/enable_affiliate_program", "og:title": "private/enable_affiliate_program", "keywords": [ "private/enable_affiliate_program" ] }, "href": "/api-reference/account-management/private-enable_affiliate_program" } } }, "/private/change_margin_model": { "get": { "parameters": [ { "name": "user_id", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": false, "description": "Id of a (sub)account - by default current user id is used" }, { "name": "margin_model", "in": "query", "schema": { "type": "string", "enum": [ "cross_pm", "cross_sm", "segregated_pm", "segregated_sm" ] }, "required": true, "description": "Margin model" }, { "name": "dry_run", "in": "query", "schema": { "type": "boolean", "example": true }, "required": false, "description": "If `true` request returns the result without switching the margining model. Default: `false`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateChangeMarginModelResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/change_margin_model", "params": { "user_id": 3, "margin_model": "cross_pm" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Changes the margin model for the authenticated account or a specified subaccount. Margin models determine how margin requirements are calculated (e.g., Standard Margin vs. Portfolio Margin).\n\nChanging the margin model may affect margin requirements, available funds, and trading capabilities. Use the `dry_run` parameter to preview the impact of the change before applying it.\n\n**📖 Related Article:** [Margin types and usage](https://support.deribit.com/hc/en-us/articles/25944811317149-Margin-types-and-usage)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_margin_model)\n\n", "x-mint": { "metadata": { "title": "private/change_margin_model", "og:title": "private/change_margin_model", "keywords": [ "private/change_margin_model", "user_id", "margin_model", "dry_run", "old_state", "new_state", "currency", "maintenance_margin_rate", "initial_margin_rate", "available_balance" ] }, "href": "/api-reference/account-management/private-change_margin_model" } } }, "/private/get_user_locks": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserLocksResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 74, "method": "private/get_user_locks", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves information about any account locks or restrictions currently active on the authenticated account. Account locks may be applied for security reasons, compliance requirements, or administrative purposes.\n\nThe response includes details about the type of lock, reason, and duration (if applicable). Some locks may prevent trading, withdrawals, or other account operations.\n\n**📖 Related Support Article:** [Emergency locking an account](https://support.deribit.com/hc/en-us/articles/25944602715805-Emergency-locking-an-account)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_locks)\n\n", "x-mint": { "metadata": { "title": "private/get_user_locks", "og:title": "private/get_user_locks", "keywords": [ "private/get_user_locks", "currency", "enabled", "message" ] }, "href": "/api-reference/account-management/private-get_user_locks" } } }, "/private/set_self_trading_config": { "get": { "parameters": [ { "name": "mode", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "reject_taker", "cancel_maker" ] }, "description": "Self trading prevention behavior: `reject_taker` (reject the incoming order), `cancel_maker` (cancel the matched order in the book)" }, { "name": "extended_to_subaccounts", "in": "query", "required": true, "schema": { "type": "boolean" }, "description": "If value is `true` trading is prevented between subaccounts of given account, otherwise they are treated separately" }, { "name": "block_rfq_self_match_prevention", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "When Block RFQ Self Match Prevention is enabled, it ensures that RFQs cannot be executed between accounts that belong to the same legal entity. This setting is independent of the general self-match prevention settings and must be configured separately." } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/set_self_trading_config", "params": { "mode": "cancel_maker", "extended_to_subaccounts": true, "block_rfq_self_match_prevention": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Configures self-trading prevention settings for the account. Self-trading occurs when orders from the same account (or related subaccounts) match against each other.\n\nYou can configure whether self-trading is allowed, blocked, or allowed only for specific scenarios. Settings can be extended to apply to subaccounts as well. For Block RFQ trading, separate self-match prevention settings are available.\n\n**📖 Related Support Article:** [Account settings page](https://support.deribit.com/hc/en-us/articles/25944634289693-Account-settings-page#heading-4)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_self_trading_config)\n\n", "x-mint": { "metadata": { "title": "private/set_self_trading_config", "og:title": "private/set_self_trading_config", "keywords": [ "private/set_self_trading_config", "mode", "extended_to_subaccounts", "block_rfq_self_match_prevention" ] }, "href": "/api-reference/account-management/private-set_self_trading_config" } } }, "/private/set_disabled_trading_products": { "get": { "parameters": [ { "name": "user_id", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of a (sub)account" }, { "name": "trading_products", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "perpetual", "futures", "options", "future_combos", "option_combos", "spots" ] } }, "description": "List of available trading products. Available products: perpetual, futures, options, future_combos, option_combos, spots\n", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "description": "Configures which trading products (instruments, currencies, or instrument types) are disabled for a subaccount. Disabled products cannot be traded by the subaccount, providing a way to restrict trading activities.\n\nThis is useful for risk management and compliance purposes. Only the main account owner can modify trading product restrictions for subaccounts.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_disabled_trading_products)\n\n", "x-mint": { "metadata": { "title": "private/set_disabled_trading_products", "og:title": "private/set_disabled_trading_products", "keywords": [ "private/set_disabled_trading_products", "user_id", "trading_products" ] }, "href": "/api-reference/account-management/private-set_disabled_trading_products" } } }, "/private/disable_api_key": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2861, "method": "private/disable_api_key", "params": { "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Disables an API key, preventing it from being used to authenticate API requests. The key remains in your account but cannot be used until it is re-enabled.\n\nThis is useful for temporarily suspending access without permanently deleting the key. All requests using this key will be rejected until it is enabled again.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fdisable_api_key)\n\n", "x-mint": { "metadata": { "title": "private/disable_api_key", "og:title": "private/disable_api_key", "keywords": [ "private/disable_api_key", "id", "timestamp", "client_id", "client_secret", "public_key", "max_scope", "enabled", "default", "name", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-disable_api_key" } } }, "/private/enable_api_key": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8580, "method": "private/enable_api_key", "params": { "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Enables a previously disabled API key, restoring its ability to authenticate API requests. The API key can be used immediately after being enabled.\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fenable_api_key)\n\n", "x-mint": { "metadata": { "title": "private/enable_api_key", "og:title": "private/enable_api_key", "keywords": [ "private/enable_api_key", "id", "timestamp", "client_id", "client_secret", "public_key", "max_scope", "enabled", "default", "name", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-enable_api_key" } } }, "/private/create_api_key": { "get": { "parameters": [ { "name": "max_scope", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/max_scope" }, "description": "Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.\n\n**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)\n" }, { "name": "name", "in": "query", "schema": { "type": "string", "example": "TestName" }, "description": "Name of key (only letters, numbers and underscores allowed; maximum length - 16 characters)", "required": false }, { "name": "public_key", "in": "query", "required": false, "schema": { "type": "string", "example": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAM7FWhKquNqLmTOV4hfYT5r3AjrYiORTT6Tn5HIfFNV8=\n-----END PUBLIC KEY-----" }, "description": "ED25519 or RSA PEM Encoded public key that should be used to create asymmetric API Key for signing requests/authentication requests with user's private key.

**📖 Related Article:** [Asymmetric API keys](https://docs.deribit.com/articles/asymmetric-api-keys)" }, { "name": "enabled_features", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "restricted_block_trades", "block_trade_approval" ] } }, "description": "List of enabled advanced on-key features. Available options:
- `restricted_block_trades`: Limit the block_trade read the scope of the API key to block trades that have been made using this specific API key
- `block_trade_approval`: Block trades created using this API key require additional user approval. Methods that use `block_rfq` scope are not affected by Block Trade approval feature
", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8974, "method": "private/create_api_key", "params": { "name": "Public key 1", "max_scope": "account:read trade:read block_trade:read_write wallet:none", "public_key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAM7FWhKquNqLmTOV4hfYT5r3AjrYiORTT6Tn5HIfFNV8=\n-----END PUBLIC KEY-----" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Creates a new API key with the specified scope and permissions. API keys are used for programmatic access to the Deribit API and can be restricted to specific operations and IP addresses.\n\nThe response includes both the API key ID and the secret key. Store the secret securely as it will not be displayed again. You can view the API key details (without the secret) using the `list_api_keys` method.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Articles:** \n- [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n- [Access Scope](https://docs.deribit.com/articles/access-scope)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_api_key)\n\n", "x-mint": { "metadata": { "title": "private/create_api_key", "og:title": "private/create_api_key", "keywords": [ "private/create_api_key", "max_scope", "name", "public_key", "enabled_features", "timestamp", "client_id", "client_secret", "enabled", "default", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-create_api_key" } } }, "/private/change_scope_in_api_key": { "get": { "parameters": [ { "name": "max_scope", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/max_scope" }, "description": "Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.\n\n**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)\n" }, { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2453, "method": "private/change_scope_in_api_key", "params": { "max_scope": "account:read_write wallet:read_write block_trade:read trade:read_write", "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Updates the scope (permissions) for an existing API key. The scope determines which operations the API key can perform (e.g., read-only, read-write, trading, etc.).\n\nWhen the scope is changed, the API key immediately loses access to operations outside the new scope. Applications using this key may need to be updated to reflect the new permissions.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Articles:** \n- [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n- [Access Scope](https://docs.deribit.com/articles/access-scope)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_scope_in_api_key)\n\n", "x-mint": { "metadata": { "title": "private/change_scope_in_api_key", "og:title": "private/change_scope_in_api_key", "keywords": [ "private/change_scope_in_api_key", "max_scope", "id", "timestamp", "client_id", "client_secret", "public_key", "enabled", "default", "name", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-change_scope_in_api_key" } } }, "/private/change_api_key_name": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" }, { "name": "name", "in": "query", "schema": { "type": "string", "example": "TestName" }, "required": true, "description": "Name of key (only letters, numbers and underscores allowed; maximum length - 16 characters)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2453, "method": "private/change_api_key_name", "params": { "name": "KeyName3", "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Updates the display name for an API key. The name is used for identification purposes in the API key list and does not affect the key's functionality or permissions.\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_api_key_name)\n\n", "x-mint": { "metadata": { "title": "private/change_api_key_name", "og:title": "private/change_api_key_name", "keywords": [ "private/change_api_key_name", "id", "name", "timestamp", "client_id", "client_secret", "public_key", "max_scope", "enabled", "default", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-change_api_key_name" } } }, "/private/list_api_keys": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PublicListApiKeysResponse" } }, "tags": [ "Account Management", "Private" ], "description": "Retrieves a list of all API keys associated with the authenticated account. The response includes key details such as ID, name, scope, creation date, last usage, and status (enabled/disabled), but does not include the secret keys for security reasons.\n\nUse this method to review and manage your API keys, check their permissions, and monitor their usage.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flist_api_keys)\n\n", "x-mint": { "metadata": { "title": "private/list_api_keys", "og:title": "private/list_api_keys", "keywords": [ "private/list_api_keys", "timestamp", "client_id", "client_secret", "public_key", "max_scope", "enabled", "default", "name", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-list_api_keys" } } }, "/private/reset_api_key": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 6524, "method": "private/reset_api_key", "params": { "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Generates a new secret key for an existing API key while keeping the same key ID and other properties. This is useful if the secret has been compromised or needs to be rotated for security purposes.\n\nThe old secret becomes invalid immediately, and the new secret is returned in the response. Store the new secret securely as it will not be displayed again. All applications using the old secret will need to be updated with the new secret.\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Freset_api_key)\n\n", "x-mint": { "metadata": { "title": "private/reset_api_key", "og:title": "private/reset_api_key", "keywords": [ "private/reset_api_key", "id", "timestamp", "client_id", "client_secret", "public_key", "max_scope", "enabled", "default", "name", "enabled_features", "ip_whitelist" ] }, "href": "/api-reference/account-management/private-reset_api_key" } } }, "/private/remove_api_key": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8190, "method": "private/remove_api_key", "params": { "id": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Permanently deletes an API key from your account. This operation cannot be undone. Once removed, the API key can no longer be used to authenticate requests, and all applications using this key will lose access.\n\nConsider disabling the key first if you want to temporarily suspend access, as disabled keys can be re-enabled later.\n\n**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fremove_api_key)\n\n", "x-mint": { "metadata": { "title": "private/remove_api_key", "og:title": "private/remove_api_key", "keywords": [ "private/remove_api_key", "id" ] }, "href": "/api-reference/account-management/private-remove_api_key" } } }, "/private/edit_api_key": { "get": { "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" }, { "name": "max_scope", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/max_scope" }, "description": "Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.\n\n**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)\n" }, { "name": "name", "in": "query", "schema": { "type": "string", "example": "TestName" }, "description": "Name of key (only letters, numbers and underscores allowed; maximum length - 16 characters)", "required": false }, { "name": "enabled", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Enables/disables the API key. `true` to enable, `false` to disable" }, { "name": "enabled_features", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "restricted_block_trades", "block_trade_approval" ] } }, "description": "List of enabled advanced on-key features. Available options:
- `restricted_block_trades`: Limit the block_trade read the scope of the API key to block trades that have been made using this specific API key
- `block_trade_approval`: Block trades created using this API key require additional user approval. Methods that use `block_rfq` scope are not affected by Block Trade approval feature
", "style": "form", "explode": true }, { "name": "ip_whitelist", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "description": "Whitelist provided IP address on a selected key", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateApiKeyResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2453, "method": "private/edit_api_key", "params": { "name": "NewKeyName", "max_scope": "account:read_write wallet:read_write block_trade:read trade:read_write", "id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Updates properties of an existing API key. You can modify the key name, scope, enabled status, features, and IP whitelist. At least one parameter must be provided.\n\nChanges take effect immediately. If you modify the scope, the API key will only have access to the newly specified permissions.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Articles:** \n- [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)\n- [Access Scope](https://docs.deribit.com/articles/access-scope)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit_api_key)\n\n", "x-mint": { "metadata": { "title": "private/edit_api_key", "og:title": "private/edit_api_key", "keywords": [ "private/edit_api_key", "id", "max_scope", "name", "enabled", "enabled_features", "ip_whitelist", "timestamp", "client_id", "client_secret", "public_key", "default" ] }, "href": "/api-reference/account-management/private-edit_api_key" } } }, "/public/get_announcements": { "get": { "parameters": [ { "name": "start_timestamp", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp", "default": "Current time" }, "description": "The most recent timestamp to return the results for (milliseconds since the UNIX epoch)", "required": false }, { "name": "count", "in": "query", "schema": { "type": "integer", "default": 5, "example": 10, "maximum": 50, "minimum": 1 }, "description": "Maximum count of returned announcements, default - `5`, maximum - `50`", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetAnnouncementsResponse" } }, "tags": [ "Account Management", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7661, "method": "public/get_announcements", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves platform announcements and important notices. Announcements include system updates, maintenance schedules, new features, policy changes, and other important information.\n\nResults are returned in reverse chronological order (newest first). The default `start_timestamp` is the current time, and the `count` parameter must be between 1 and 50 (default is 5).\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_announcements)\n\n", "x-mint": { "metadata": { "title": "public/get_announcements", "og:title": "public/get_announcements", "keywords": [ "public/get_announcements", "start_timestamp", "count", "body", "publication_timestamp", "important", "confirmation", "title" ] }, "href": "/api-reference/account-management/public-get_announcements" } } }, "/private/get_new_announcements": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PublicGetAnnouncementsResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3022, "method": "private/get_new_announcements", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves only unread announcements for the authenticated account. Announcements are marked as read when you use the `set_announcement_as_read` method or view them through the web interface.\n\nThis method is useful for displaying notification badges or highlighting new announcements that require the user's attention.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_new_announcements)\n\n", "x-mint": { "metadata": { "title": "private/get_new_announcements", "og:title": "private/get_new_announcements", "keywords": [ "private/get_new_announcements", "body", "publication_timestamp", "important", "confirmation", "title" ] }, "href": "/api-reference/account-management/private-get_new_announcements" } } }, "/private/set_announcement_as_read": { "get": { "parameters": [ { "in": "query", "name": "announcement_id", "required": true, "schema": { "type": "number", "example": 1550058362418 }, "description": "the ID of the announcement" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5147, "method": "private/set_announcement_as_read", "params": { "announcement_id": 1550058362418 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Marks a specific announcement as read. Once marked as read, the announcement will no longer appear in the `get_new_announcements` response, though it will still be available through `get_announcements`.\n\nThis helps track which announcements have been viewed and reduces notification clutter.\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_announcement_as_read)\n\n", "x-mint": { "metadata": { "title": "private/set_announcement_as_read", "og:title": "private/set_announcement_as_read", "keywords": [ "private/set_announcement_as_read", "announcement_id" ] }, "href": "/api-reference/account-management/private-set_announcement_as_read" } } }, "/private/get_email_language": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PrivateGetEmailLanguageResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9265, "method": "private/get_email_language", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the currently configured language preference for email notifications. Returns the language code (e.g., `en`, `ko`, `zh`, `ja`, `ru`) that is used for all email communications sent to the account.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_email_language)\n\n", "x-mint": { "metadata": { "title": "private/get_email_language", "og:title": "private/get_email_language", "keywords": [ "private/get_email_language" ] }, "href": "/api-reference/account-management/private-get_email_language" } } }, "/private/create_subaccount": { "get": { "tags": [ "Account Management", "Private" ], "responses": { "200": { "$ref": "#/components/responses/PrivateCreateSubaccountResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5414, "method": "private/create_subaccount", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Creates a new subaccount under the authenticated main account. Subaccounts allow you to organize trading activities and manage risk separately from the main account.\n\nThis method takes no parameters. The new subaccount will be created with default settings and can be configured using other subaccount management methods.\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write` and mainaccount\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_subaccount)\n\n", "x-mint": { "metadata": { "title": "private/create_subaccount", "og:title": "private/create_subaccount", "keywords": [ "private/create_subaccount", "email", "login_enabled", "is_password", "receive_notifications", "system_name", "security_keys_enabled", "security_keys_assignments", "username", "type", "portfolio", "margin_model", "disabled_trading_products", "proof_id", "proof_id_signature", "trading_products_details", "referrals_count", "btc(example)", "margin_balance", "currency", "maintenance_margin", "initial_margin", "equity", "balance", "available_withdrawal_funds", "available_funds", "additional_reserve", "spot_reserve", "enabled", "product", "overwriteable", "requires_consent" ] }, "href": "/api-reference/account-management/private-create_subaccount" } } }, "/private/change_subaccount_name": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "integer", "example": 7 }, "required": true, "description": "The user id for the subaccount" }, { "name": "name", "in": "query", "schema": { "type": "string", "example": "new_user_1_1" }, "required": true, "description": "The new user name" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3964, "method": "private/change_subaccount_name", "params": { "sid": 7, "name": "new_user_1_1" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Updates the display name (username) for a subaccount. The new name is used for identification purposes and does not affect the subaccount's functionality or access.\n\nOnly the main account owner can change subaccount names.\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write` and mainaccount\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_subaccount_name)\n\n", "x-mint": { "metadata": { "title": "private/change_subaccount_name", "og:title": "private/change_subaccount_name", "keywords": [ "private/change_subaccount_name", "sid", "name" ] }, "href": "/api-reference/account-management/private-change_subaccount_name" } } }, "/private/set_email_language": { "get": { "parameters": [ { "in": "query", "name": "language", "required": true, "schema": { "type": "string", "example": "en" }, "description": "The abbreviated language name. Valid values include `\"en\"`, `\"ko\"`, `\"zh\"`, `\"ja\"`, `\"ru\"`" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3269, "method": "private/set_email_language", "params": { "language": "en" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Sets the preferred language for email notifications sent to the authenticated account. Supported languages include English (`en`), Korean (`ko`), Chinese (`zh`), Japanese (`ja`), and Russian (`ru`).\n\nAll future email notifications will be sent in the selected language. This setting does not affect the language of the web interface or API responses.\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_email_language)\n\n", "x-mint": { "metadata": { "title": "private/set_email_language", "og:title": "private/set_email_language", "keywords": [ "private/set_email_language", "language" ] }, "href": "/api-reference/account-management/private-set_email_language" } } }, "/private/set_email_for_subaccount": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "integer", "example": 7 }, "required": true, "description": "The user id for the subaccount" }, { "name": "email", "in": "query", "schema": { "type": "string", "example": "user_1_1@email.com" }, "required": true, "description": "The email address for the subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1667, "method": "private/set_email_for_subaccount", "params": { "sid": 7, "email": "user_1_1@email.com" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Assigns an email address to a subaccount. This email can be used for direct login to the subaccount and for receiving notifications.\n\nThe email address owner will receive a confirmation email with a link to verify the email address. The email must be confirmed before it can be used for login.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_email_for_subaccount)\n\n", "x-mint": { "metadata": { "title": "private/set_email_for_subaccount", "og:title": "private/set_email_for_subaccount", "keywords": [ "private/set_email_for_subaccount", "sid", "email" ] }, "href": "/api-reference/account-management/private-set_email_for_subaccount" } } }, "/private/toggle_subaccount_login": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "integer", "example": 7 }, "required": true, "description": "The user id for the subaccount" }, { "name": "state", "in": "query", "schema": { "type": "string", "enum": [ "enable", "disable" ], "example": "enable" }, "required": true, "description": "enable or disable login." } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 938, "method": "private/toggle_subaccount_login", "params": { "sid": 7, "state": "enable" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Enables or disables direct login access for a subaccount. When login is disabled, the subaccount cannot be accessed directly using email and password authentication, but can still be accessed through the main account.\n\nIf login is disabled while an active session exists for the subaccount, that session will be immediately terminated.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Ftoggle_subaccount_login)\n\n", "x-mint": { "metadata": { "title": "private/toggle_subaccount_login", "og:title": "private/toggle_subaccount_login", "keywords": [ "private/toggle_subaccount_login", "sid", "state" ] }, "href": "/api-reference/account-management/private-toggle_subaccount_login" } } }, "/private/toggle_notifications_from_subaccount": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "integer", "example": 7 }, "required": true, "description": "The user id for the subaccount" }, { "name": "state", "in": "query", "schema": { "type": "boolean", "example": true }, "required": true, "description": "enable (`true`) or disable (`false`) notifications" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9995, "method": "private/toggle_notifications_from_subaccount", "params": { "sid": 7, "state": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Enables or disables email and other notifications for a subaccount. When notifications are disabled, the subaccount will not receive email alerts, trade confirmations, or other notification messages.\n\nThis setting only affects notifications sent to the subaccount's email address. Notifications sent to the main account are not affected.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Ftoggle_notifications_from_subaccount)\n\n", "x-mint": { "metadata": { "title": "private/toggle_notifications_from_subaccount", "og:title": "private/toggle_notifications_from_subaccount", "keywords": [ "private/toggle_notifications_from_subaccount", "sid", "state" ] }, "href": "/api-reference/account-management/private-toggle_notifications_from_subaccount" } } }, "/private/get_subaccounts": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "with_portfolio", "in": "query", "schema": { "type": "boolean", "example": true }, "description": "Portfolio flag: `true` for portfolio information, `false` for subaccount information only. `false` by default", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetSubaccountsResponse" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4947, "method": "private/get_subaccounts", "params": { "with_portfolio": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves information about all subaccounts associated with the main account. Returns details such as subaccount IDs, names, and status.\n\nWhen called from a subaccount, the response includes limited details for the main account and full details for the subaccount initiating the request.\n\nSet the `with_portfolio` parameter to `true` to include portfolio information (balances, positions, etc.) in the response. By default, only subaccount metadata is returned.\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts)\n\n", "x-mint": { "metadata": { "title": "private/get_subaccounts", "og:title": "private/get_subaccounts", "keywords": [ "private/get_subaccounts", "with_portfolio", "username", "type", "email", "not_confirmed_email", "security_keys_enabled", "security_keys_assignments", "system_name", "receive_notifications", "is_password", "margin_model", "proof_id", "proof_id_signature", "login_enabled", "portfolio", "btc(example)", "margin_balance", "currency", "maintenance_margin", "initial_margin", "equity", "balance", "available_withdrawal_funds", "available_funds", "additional_reserve", "spot_reserve" ] }, "href": "/api-reference/account-management/private-get_subaccounts" } } }, "/private/get_subaccounts_details": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "with_open_orders", "in": "query", "schema": { "type": "boolean" }, "description": "Optional parameter to ask for open orders list, default: `false`", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetSubaccountsDetailsResponse" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_subaccounts_details", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves position details for all subaccounts for a specific currency. Returns positions aggregated across all subaccounts, including size, average entry price, mark price, and P&L information.\n\nOptionally include open orders for each subaccount by setting the `with_open_orders` parameter to `true`.\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts_details)\n\n", "x-mint": { "metadata": { "title": "private/get_subaccounts_details", "og:title": "private/get_subaccounts_details", "keywords": [ "private/get_subaccounts_details", "currency", "with_open_orders", "uid", "positions", "open_orders", "instrument_name", "kind", "average_price", "direction", "mark_price", "delta", "gamma", "vega", "theta", "index_price", "initial_margin", "maintenance_margin", "settlement_price", "total_profit_loss", "floating_profit_loss", "realized_profit_loss", "size", "size_currency", "average_price_usd", "floating_profit_loss_usd", "leverage", "realized_funding", "interest_value", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/account-management/private-get_subaccounts_details" } } }, "/private/remove_subaccount": { "get": { "tags": [ "Account Management", "Private" ], "parameters": [ { "name": "subaccount_id", "in": "query", "schema": { "type": "integer", "example": 120 }, "required": true, "description": "The user id for the subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 6, "method": "private/remove_subaccount", "params": { "subaccount_id": 120 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Permanently removes a subaccount. The subaccount must be empty (no positions, no open orders, and zero balance) before it can be removed.\n\nThis operation cannot be undone. All subaccount data will be permanently deleted.\n\n**[TFA required](https://docs.deribit.com/articles/security-keys)**\n\n**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fremove_subaccount)\n\n", "x-mint": { "metadata": { "title": "private/remove_subaccount", "og:title": "private/remove_subaccount", "keywords": [ "private/remove_subaccount", "subaccount_id" ] }, "href": "/api-reference/account-management/private-remove_subaccount" } } }, "/private/get_transaction_log": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "query", "in": "query", "schema": { "type": "string", "example": "settlement" }, "required": false, "description": "The following keywords can be used to filter the results: `trade`, `maker`, `taker`, `open`, `close`, `liquidation`, `buy`, `sell`, `withdrawal`, `delivery`, `settlement`, `deposit`, `transfer`, `option`, `future`, `correction`, `block_trade`, `swap`. Plus withdrawal or transfer addresses" }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1 }, "description": "Count of transaction log entries returned, default - `100`, maximum - `250`" }, { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "integer", "example": 429946 }, "description": "Continuation token for pagination" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetTransactionLogResponse" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4, "method": "private/get_transaction_log", "params": { "currency": "BTC", "start_timestamp": "1613657734000", "end_timestamp": "1613660407000", "count": 5 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a detailed transaction log for the authenticated account. The log includes all account activities such as trades, deposits, withdrawals, transfers, fees, and other balance-affecting operations.\n\nResults can be filtered by currency, time range, and transaction type. Use the `continuation` parameter for pagination when retrieving large transaction histories. To retrieve transactions for a specific subaccount, use the `subaccount_id` parameter.\n\n**History Limit:** This API method has **no time limit** - users can query transaction history back to account creation. Note that the CSV export feature available on the website is year-limited to 2023. \n\n**Note - This method has distinct API rate limiting requirements:** Sustained rate: 1 request/second. For more information, see [Rate Limits](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).\n\n**📖 Related Support Article:** [Transaction log](https://support.deribit.com/hc/en-us/articles/25944587269021-Transaction-log)\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_transaction_log)\n\n", "x-mint": { "metadata": { "title": "private/get_transaction_log", "og:title": "private/get_transaction_log", "keywords": [ "private/get_transaction_log", "currency", "start_timestamp", "end_timestamp", "query", "count", "subaccount_id", "continuation", "logs", "timestamp", "user_id", "username", "commission", "cashflow", "balance", "change", "user_seq", "type", "info", "equity", "mark_price", "settlement_price", "index_price", "instrument_name", "position", "side", "amount", "price", "price_currency", "trade_id", "order_id", "user_role", "fee_role", "profit_as_cashflow", "interest_pl", "block_rfq_id", "ip", "session_rpl", "session_upl", "total_interest_pl", "contracts" ] }, "href": "/api-reference/account-management/private-get_transaction_log" } } }, "/private/list_custody_accounts": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" } ], "responses": { "200": { "$ref": "#/components/responses/GetlistCustodyAccounts200response" } }, "tags": [ "Account Management", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2515, "method": "private/list_custody_accounts", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a list of all custody accounts associated with the authenticated account for a specific currency. Custody accounts are used for clients who require segregated custody of their assets.\n\nThe response includes custody account details such as account name, status, balances, and configuration settings.\n\n**📖 Related Support Article:** [Custody Options](https://support.deribit.com/hc/en-us/articles/26533163120413-Custody-Options)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flist_custody_accounts)\n\n", "x-mint": { "metadata": { "title": "private/list_custody_accounts", "og:title": "private/list_custody_accounts", "keywords": [ "private/list_custody_accounts", "currency", "code", "message", "name", "balance", "pending_withdrawal_balance", "auto_deposit", "client_id", "external_id", "withdrawal_address", "withdrawal_address_change", "pending_withdrawal_addres", "deposit_address" ] }, "href": "/api-reference/account-management/private-list_custody_accounts" } } }, "/public/auth": { "get": { "tags": [ "Authentication", "Public" ], "parameters": [ { "name": "grant_type", "in": "query", "schema": { "type": "string", "enum": [ "client_credentials", "client_signature", "refresh_token" ], "example": "client_credentials" }, "required": true, "description": "Method of authentication" }, { "name": "client_id", "in": "query", "schema": { "type": "string", "example": "fo7WAPRm4P" }, "required": true, "description": "Required for grant type `` `client_credentials` `` and `` `client_signature` ``" }, { "name": "client_secret", "in": "query", "schema": { "type": "string", "example": "W0H6FJW4IRPZ1MOQ8FP6KMC5RZDUUKXS" }, "required": true, "description": "Required for grant type `` `client_credentials` ``" }, { "name": "refresh_token", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Required for grant type `` `refresh_token` ``" }, { "name": "timestamp", "in": "query", "schema": { "type": "integer" }, "required": true, "description": "Required for grant type `` `client_signature` ``.\n\nProvides time when request has been generated (milliseconds since the UNIX epoch).\n" }, { "name": "signature", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Required for grant type `` `client_signature` ``.\n\nIt's a cryptographic signature calculated over provided fields using user **secret key**. The signature should be calculated as an HMAC (Hash-based Message Authentication Code) with `` `SHA256` `` hash algorithm.\n" }, { "name": "nonce", "in": "query", "schema": { "type": "string" }, "description": "Optional for grant type `` `client_signature` ``.\n\nDelivers user generated initialization vector for the server token.\n", "required": false }, { "name": "data", "in": "query", "schema": { "type": "string" }, "description": "Optional for grant type `` `client_signature` ``.\n\nContains any user specific value.\n", "required": false }, { "name": "state", "in": "query", "schema": { "type": "string" }, "description": "Will be passed back in the response.", "required": false }, { "name": "scope", "in": "query", "schema": { "type": "string", "example": "connection" }, "description": "Describes type of the access for assigned token.\n\n\n**Possible values:**\n\n- `` `connection` ``\n- `` `session:name` ``\n- `` `trade:[read, read_write, none]` ``\n- `` `wallet:[read, read_write, none]` ``\n- `` `account:[read, read_write, none]` ``\n- `` `expires:NUMBER` ``\n- `` `ip:ADDR` ``\n\n\nDetails are elucidated in [Access scope](https://docs.deribit.com/articles/access-scope)\n", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PublicAuthResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9929, "method": "public/auth", "params": { "grant_type": "client_credentials", "client_id": "fo7WAPRm4P", "client_secret": "W0H6FJW4IRPZ1MOQ8FP6KMC5RZDUUKXS" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieve an OAuth access token, to be used for authentication of 'private' requests.\n\n**📖 Related Article:** [Authentication](https://docs.deribit.com/articles/authentication)\n\n**Authentication Methods:**\n\nThree methods of authentication are supported:\n\n\n- ``client_credentials`` - Using the client id and client secret that can be found on the API page on the website. This is the simplest method, suitable for server-to-server applications and quick setup.\n\n- ``client_signature`` - Enhanced security method that uses a cryptographic signature instead of sending the client secret directly. You generate an HMAC-SHA256 signature of a string containing a timestamp, a random nonce, and optional data, using your Client Secret as the key. This method requires `` `client_id` ``, `` `timestamp` `` (current time in milliseconds), `` `nonce` ``, `` `signature` ``, and optionally a `` `data` `` field. Deribit verifies the signature instead of requiring the raw secret. Best for enhanced security, asymmetric key pairs, and avoiding secret transmission. See the [Client Signature (WebSocket) guide](https://docs.deribit.com/articles/authentication#client-signature-websocket) for detailed signature calculation instructions.\n\n- ``refresh_token`` - Using a refresh token that was received from an earlier invocation. This allows you to obtain a new access token without re-supplying your Client ID and Client Secret. Best for long-lived sessions, token renewal, and avoiding re-authentication.\n\n\n**Response:**\n\nThe response will contain an access token, expiration period (number of seconds that the token is valid) and a refresh token that can be used to get a new set of tokens.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fauth)\n\n", "x-mint": { "metadata": { "title": "public/auth", "og:title": "public/auth", "keywords": [ "public/auth", "grant_type", "client_id", "client_secret", "refresh_token", "timestamp", "signature", "nonce", "data", "state", "scope", "access_token", "token_type", "expires_in", "sid", "enabled_features", "mandatory_tfa_status", "google_login" ] }, "href": "/api-reference/authentication/public-auth" } } }, "/public/exchange_token": { "get": { "tags": [ "Authentication", "Public" ], "parameters": [ { "name": "refresh_token", "in": "query", "schema": { "type": "string", "example": "1568800656974.1CWcuzUS.MGy49NK4hpTwvR1OYWfpqMEkH4T4oDg4tNIcrM7KdeyxXRcSFqiGzA_D4Cn7mqWocHmlS89FFmUYcmaN2H7lNKKTnhRg5EtrzsFCCiuyN0Wv9y-LbGLV3-Ojv_kbD50FoScQ8BDXS5b_w6Ir1MqEdQ3qFZ3MLcvlPiIgG2BqyJX3ybYnVpIlrVrrdYD1-lkjLcjxOBNJvvUKNUAzkQ" }, "required": true, "description": "Refresh token" }, { "name": "subject_id", "in": "query", "schema": { "type": "integer", "example": 10 }, "required": true, "description": "New subject id" }, { "name": "scope", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Optional scope override for the new session. Cannot exceed caller's permissions. Supports `session` scope for direct session creation during token exchange." } ], "responses": { "200": { "$ref": "#/components/responses/PublicTokenResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7619, "method": "public/exchange_token", "params": { "refresh_token": "1568800656974.1CWcuzUS.MGy49NK4hpTwvR1OYWfpqMEkH4T4oDg4tNIcrM7KdeyxXRcSFqiGzA_D4Cn7mqWocHmlS89FFmUYcmaN2H7lNKKTnhRg5EtrzsFCCiuyN0Wv9y-LbGLV3-Ojv_kbD50FoScQ8BDXS5b_w6Ir1MqEdQ3qFZ3MLcvlPiIgG2BqyJX3ybYnVpIlrVrrdYD1-lkjLcjxOBNJvvUKNUAzkQ", "subject_id": 10 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Generates a token for a new subject id. This method can be used to switch between subaccounts.\n\n**📖 Related Articles:** \n- [Fork and Exchange Tokens](https://docs.deribit.com/articles/authentication#fork-and-exchange-tokens)\n- [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fexchange_token)\n\n", "x-mint": { "metadata": { "title": "public/exchange_token", "og:title": "public/exchange_token", "keywords": [ "public/exchange_token", "refresh_token", "subject_id", "scope", "access_token", "token_type", "expires_in", "sid" ] }, "href": "/api-reference/authentication/public-exchange_token" } } }, "/public/fork_token": { "get": { "tags": [ "Authentication", "Public" ], "parameters": [ { "name": "refresh_token", "in": "query", "schema": { "type": "string", "example": "1568800656974.1CWcuzUS.MGy49NK4hpTwvR1OYWfpqMEkH4T4oDg4tNIcrM7KdeyxXRcSFqiGzA_D4Cn7mqWocHmlS89FFmUYcmaN2H7lNKKTnhRg5EtrzsFCCiuyN0Wv9y-LbGLV3-Ojv_kbD50FoScQ8BDXS5b_w6Ir1MqEdQ3qFZ3MLcvlPiIgG2BqyJX3ybYnVpIlrVrrdYD1-lkjLcjxOBNJvvUKNUAzkQ" }, "required": true, "description": "Refresh token" }, { "name": "session_name", "in": "query", "schema": { "type": "string", "example": "forked_session_name" }, "required": true, "description": "New session name" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTokenResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7620, "method": "public/fork_token", "params": { "refresh_token": "1568800656974.1CWcuzUS.MGy49NK4hpTwvR1OYWfpqMEkH4T4oDg4tNIcrM7KdeyxXRcSFqiGzA_D4Cn7mqWocHmlS89FFmUYcmaN2H7lNKKTnhRg5EtrzsFCCiuyN0Wv9y-LbGLV3-Ojv_kbD50FoScQ8BDXS5b_w6Ir1MqEdQ3qFZ3MLcvlPiIgG2BqyJX3ybYnVpIlrVrrdYD1-lkjLcjxOBNJvvUKNUAzkQ", "session_name": "forked_session_name" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Generates a token for a new named session. This method can be used only with session scoped tokens.\n\n**📖 More Details:** [Fork and Exchange Tokens](https://docs.deribit.com/articles/authentication#fork-and-exchange-tokens)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Ffork_token)\n\n", "x-mint": { "metadata": { "title": "public/fork_token", "og:title": "public/fork_token", "keywords": [ "public/fork_token", "refresh_token", "session_name", "access_token", "token_type", "expires_in", "scope", "sid" ] }, "href": "/api-reference/authentication/public-fork_token" } } }, "/private/logout": { "get": { "tags": [ "Authentication", "WebSocket Only", "Private" ], "parameters": [ { "name": "invalidate_token", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Token Invalidation: By default, all tokens created during the current session are invalidated when you call this method. You can control this behavior using this parameter: " } ], "responses": { "200": { "description": "Connection closed" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/logout", "params": { "access_token": "1529453804065.h2QrBgvn.oS36pCOmuK9EX7954lzCSkUioEtTMg7F5ShToM0ZfYlqU05OquXkQIe2_DDEkPhzmoPp1fBp0ycXShR_0jf-SMSXEdVqxLRWuOw-_StG5BMjToiAl27CbHY4P92MPhlMblTOtTImE81-5dFdyDVydpBwmlfKM3OSQ39kulP9bbfw-2jhyegOL0AgqJTY_tj554oHCQFTbq0A0ZWukukmxL2yu6iy34XdzaJB26Igy-3UxGBMwFu53EhjKBweh7xyP2nDm57-wybndJMtSyTGDXH3vjBVclo1iup5yRP", "invalidate_token": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Gracefully terminate the current WebSocket connection and optionally invalidate all tokens associated with the session.\n\nThis method provides a clean way to close WebSocket connections while preserving active orders when [**Cancel On Disconnect (COD)**](https://docs.deribit.com/api-reference/session-management/private-enable_cancel_on_disconnect) is enabled.\n\n**Use Cases:**\n\n- **Clean Shutdown:** Properly close WebSocket connections during application shutdown or restart\n- **Order Preservation:** Close connections without triggering order cancellations when COD is enabled\n- **Session Management:** Invalidate tokens to ensure security when closing connections\n- **Maintenance Operations:** Temporarily disconnect for system maintenance without affecting trading positions\n\n**Cancel On Disconnect (COD) Behavior:**\n\nWhen Cancel On Disconnect is enabled for your connection, this method provides a safe way to close the connection without triggering automatic order cancellations. This is different from other disconnection scenarios:\n\n- **Graceful logout** (this method): Orders are **NOT cancelled**, even if COD is enabled\n- **Unexpected disconnection:** Orders are **cancelled** if COD is enabled\n- **Inactivity timeout:** Orders are **cancelled** if COD is enabled\n- **Heartbeat failure:** Orders are **cancelled** if COD is enabled\n\nThis distinction allows you to perform planned disconnections (e.g., for maintenance, updates, or reconnection) while preserving your active orders.\n\n**WebSocket Only:**\n\nThis method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in a 400 error response.\n\n**Note:** This method has no response. The WebSocket connection is closed immediately after the request is processed.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flogout)\n\n", "x-mint": { "metadata": { "title": "private/logout", "og:title": "private/logout", "keywords": [ "private/logout", "invalidate_token" ] }, "href": "/api-reference/authentication/private-logout" } } }, "/private/get_block_rfqs": { "get": { "parameters": [ { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Count of Block RFQs returned, maximum - `1000`" }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "open", "filled", "traded", "cancelled", "expired", "closed" ] }, "description": "State of Block RFQ" }, { "name": "role", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "any", "taker", "maker" ] }, "description": "Role of the user in Block RFQ. When the `any` role is selected, the method returns all Block RFQs in which the user has participated, either as the `taker` or as a `maker`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "The continuation parameter specifies the starting point for fetching historical Block RFQs. When provided, the endpoint returns Block RFQs, starting from the specified ID and continuing backward (e.g., if `continuation` is 50, results will include Block RFQs of ID 49, 48, etc.)" }, { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/block_rfq_currency" }, "description": "The currency symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockRfqsResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_rfqs", "params": { "count": 20, "state": "open", "role": "maker" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns a list of Block RFQs that were either created by the user or assigned to them as a maker, sorted in descending order.\n\n`trades` and `mark_price` are only visible for the filled Block RFQ. When a `block_rfq_id` is specified, only that particular Block RFQ will be returned. If called by a `taker`, response will additionally include `makers` list and `label` if previously provided. If called by the `maker`, the `trades` will include the maker's alias, but only for trades in which this maker participated. Can be optionally filtered by currency.\n\nUse [private/get_block_rfq_quotes](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfq_quotes) to retrieve quotes for Block RFQs.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_rfqs)\n\n", "x-mint": { "metadata": { "title": "private/get_block_rfqs", "og:title": "private/get_block_rfqs", "keywords": [ "private/get_block_rfqs", "count", "state", "role", "continuation", "block_rfq_id", "currency", "block_rfqs", "creation_timestamp", "expiration_timestamp", "taker_rating", "makers", "amount", "min_trade_amount", "asks", "bids", "legs", "hedge", "combo_id", "label", "app_name", "mark_price", "disclosed", "taker", "index_prices", "included_in_taker_rating", "trades", "trade_trigger", "trade_allocations", "price", "last_update_timestamp", "execution_instruction", "expires_at", "ratio", "instrument_name", "direction", "maker", "hedge_amount", "cancel_reason", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-rfq/private-get_block_rfqs" } } }, "/private/create_block_rfq": { "get": { "parameters": [ { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg" } } } }, "description": "List of legs used to create Block RFQ", "style": "form", "explode": true }, { "name": "trade_allocations", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "integer", "description": "User ID (subaccount or main account) to allocate part of the RFQ amount." }, "client_info": { "type": "object", "properties": { "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } }, "description": "Client allocation info for brokers." }, "amount": { "type": "number", "description": "Amount allocated to this user or client." } } } }, "description": "List of allocations for Block RFQ pre-allocation. Allows to split amount between different (sub)accounts or broker clients. Each allocation must specify either `user_id` (for direct allocation) or `client_info` object (for broker allocation), and amount.", "style": "form", "explode": true }, { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ (maximum 64 characters)" }, { "name": "makers", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false, "description": "List of targeted Block RFQ makers. Only those makers will be notified about created Block RFQ. If the list is empty, all available makers will be targeted.", "style": "form", "explode": true }, { "name": "disclosed", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether the RFQ is non-anonymous, revealing both taker and maker aliases. It can be set to `false` (anonymous mode) only when at least 5 makers are targeted. Default value is `true`." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCreateBlockRfqResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/create_block_rfq", "params": { "legs": [ { "instrument_name": "BTC-15NOV24", "amount": 20000, "direction": "sell" } ], "hedge": { "amount": 10, "direction": "buy", "price": 70000, "instrument_name": "BTC-PERPETUAL" }, "label": "example", "makers": [ "MAKER1" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Taker method**\n\nCreates a new Block RFQ. Use [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information.\n\n**Block RFQ pre-allocation:** The taker can split the total amount between different (sub)accounts using the `trade_allocations` parameter. The taker can also allocate to himself. Each allocation must specify either `user_id` (for direct allocation) or `client_info` object (for broker allocation), and `amount`.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_block_rfq)\n\n", "x-mint": { "metadata": { "title": "private/create_block_rfq", "og:title": "private/create_block_rfq", "keywords": [ "private/create_block_rfq", "legs", "trade_allocations", "hedge", "label", "makers", "disclosed", "creation_timestamp", "expiration_timestamp", "block_rfq_id", "role", "state", "taker_rating", "amount", "min_trade_amount", "asks", "bids", "combo_id", "app_name", "mark_price", "taker", "index_prices", "included_in_taker_rating", "trades", "trade_trigger", "price", "last_update_timestamp", "execution_instruction", "expires_at", "ratio", "instrument_name", "direction", "maker", "hedge_amount", "cancel_reason", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-rfq/private-create_block_rfq" } } }, "/private/cancel_block_rfq": { "get": { "parameters": [ { "name": "block_rfq_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelBlockRfqResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/cancel_block_rfq", "params": { "block_rfq_id": 366 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Taker method**\n\nCancels a Block RFQ using the specified `block_rfq_id`.\n\nUse [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information, or [private/create_block_rfq](https://docs.deribit.com/api-reference/block-rfq/private-create_block_rfq) to create a new Block RFQ.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_block_rfq)\n\n", "x-mint": { "metadata": { "title": "private/cancel_block_rfq", "og:title": "private/cancel_block_rfq", "keywords": [ "private/cancel_block_rfq", "block_rfq_id", "creation_timestamp", "expiration_timestamp", "role", "state", "taker_rating", "makers", "amount", "min_trade_amount", "asks", "bids", "legs", "hedge", "combo_id", "label", "app_name", "mark_price", "disclosed", "taker", "index_prices", "included_in_taker_rating", "trades", "trade_trigger", "trade_allocations", "price", "last_update_timestamp", "execution_instruction", "expires_at", "ratio", "instrument_name", "direction", "maker", "hedge_amount", "cancel_reason", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-rfq/private-cancel_block_rfq" } } }, "/private/accept_block_rfq": { "get": { "parameters": [ { "name": "block_rfq_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "in": "query", "name": "price", "required": true, "schema": { "type": "number" }, "description": "Maximum acceptable price for execution" }, { "in": "query", "name": "amount", "required": true, "schema": { "$ref": "#/components/schemas/amount" }, "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of the trade from the taker perspective" }, { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" }, "ratio": { "type": "integer", "description": "Ratio of amount between legs" } } } }, "description": "List of legs used to trade Block RFQ", "style": "form", "explode": true }, { "name": "time_in_force", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "fill_or_kill", "good_til_cancelled" ], "example": "fill_or_kill" }, "description": "Specifies how long the order should remain active" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAcceptBlockRfqResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/accept_block_rfq", "params": { "block_rfq_id": 1, "legs": [ { "instrument_name": "BTC-8NOV24-70000-C", "ratio": 1, "direction": "buy" }, { "instrument_name": "BTC-8NOV24-72000-C", "ratio": 1, "direction": "sell" } ], "price": 0.01, "direction": "buy", "amount": 100, "time_in_force": "fill_or_kill" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Taker method**\n\nAllows Block RFQ taker to accept a quote by sending a single crossing price. The order can be either filled immediately (`fill_or_kill`) or remain active until cancelled (`good_til_cancelled`).\n\n**Note:** After Block RFQ creation, a grace period of 5 seconds begins, during which the taker cannot see quotes or trade the Block RFQ.\n\nUse [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information, or [private/cancel_block_rfq](https://docs.deribit.com/api-reference/block-rfq/private-cancel_block_rfq) to cancel a Block RFQ.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Faccept_block_rfq)\n\n", "x-mint": { "metadata": { "title": "private/accept_block_rfq", "og:title": "private/accept_block_rfq", "keywords": [ "private/accept_block_rfq", "block_rfq_id", "price", "amount", "direction", "hedge", "legs", "time_in_force", "trade_trigger", "block_trades", "state", "timestamp", "trades", "app_name", "broker_code", "broker_name", "trade_id", "trade_seq", "instrument_name", "order_type", "advanced", "order_id", "matching_id", "tick_direction", "index_price", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "block_trade_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-rfq/private-accept_block_rfq" } } }, "/private/cancel_block_rfq_trigger": { "get": { "parameters": [ { "name": "block_rfq_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelBlockRfqTriggerResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/cancel_block_rfq_trigger", "params": { "block_rfq_id": 123 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Taker method**\n\nAllows Block RFQ taker to cancel an active trigger for a Block RFQ. The response includes the full Block RFQ object with the trade trigger state set to cancelled.\n\nUse [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_block_rfq_trigger)\n\n", "x-mint": { "metadata": { "title": "private/cancel_block_rfq_trigger", "og:title": "private/cancel_block_rfq_trigger", "keywords": [ "private/cancel_block_rfq_trigger", "block_rfq_id", "creation_timestamp", "expiration_timestamp", "role", "state", "taker_rating", "makers", "amount", "min_trade_amount", "asks", "bids", "legs", "hedge", "combo_id", "label", "app_name", "mark_price", "disclosed", "taker", "index_prices", "included_in_taker_rating", "trades", "trade_trigger", "trade_allocations", "price", "last_update_timestamp", "execution_instruction", "expires_at", "ratio", "instrument_name", "direction", "maker", "hedge_amount", "cancel_reason", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-rfq/private-cancel_block_rfq_trigger" } } }, "/private/get_block_rfq_quotes": { "get": { "parameters": [ { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ" }, { "name": "block_rfq_quote_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ quote" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockRfqQuotesResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_rfq_quotes", "params": { "block_rfq_id": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Maker method**\n\nRetrieves all open quotes for Block RFQs. When a `block_rfq_id` is specified, only the open quotes for that particular Block RFQ will be returned. When a `label` is specified, all quotes with this label are returned. `block_rfq_quote_id` returns one specific quote.\n\nUse [private/add_block_rfq_quote](https://docs.deribit.com/api-reference/block-rfq/private-add_block_rfq_quote) to add quotes, or [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_rfq_quotes)\n\n", "x-mint": { "metadata": { "title": "private/get_block_rfq_quotes", "og:title": "private/get_block_rfq_quotes", "keywords": [ "private/get_block_rfq_quotes", "block_rfq_id", "label", "block_rfq_quote_id", "creation_timestamp", "last_update_timestamp", "quote_state", "execution_instruction", "price", "amount", "direction", "filled_amount", "legs", "hedge", "replaced", "app_name", "quote_state_reason", "ratio", "instrument_name" ] }, "href": "/api-reference/block-rfq/private-get_block_rfq_quotes" } } }, "/private/add_block_rfq_quote": { "get": { "parameters": [ { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ" }, { "name": "block_rfq_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "in": "query", "name": "amount", "required": true, "schema": { "$ref": "#/components/schemas/amount" }, "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of trade from the maker perspective" }, { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "ratio": { "type": "integer", "description": "Ratio of amount between legs" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" } } } }, "description": "List of legs used for Block RFQ quote", "style": "form", "explode": true }, { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, { "name": "execution_instruction", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "all_or_none", "any_part_of" ] }, "description": "

Execution instruction of the quote. Default - `any_part_of`

" }, { "in": "query", "name": "price", "required": false, "schema": { "type": "number" }, "description": "Aggregated price used for quoting future spreads." }, { "name": "expires_at", "required": false, "in": "query", "schema": { "type": "integer", "example": 1745312540321 }, "description": "The timestamp when the quote expires (milliseconds since the Unix epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAddBlockRfqQuoteResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/add_block_rfq_quote", "params": { "label": "example_quote", "block_rfq_id": 3, "amount": 10000, "direction": "buy", "legs": [ { "instrument_name": "BTC-15NOV24", "price": 69600, "ratio": "1", "direction": "buy" } ], "hedge": { "amount": 10, "direction": "buy", "price": 70000, "instrument_name": "BTC-PERPETUAL" }, "execution_instruction": "any_part_of", "expires_at": 1745312540321 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Maker method**\n\nAdds a quote to an existing Block RFQ. To calculate individual leg prices, use [private/get_leg_prices](https://docs.deribit.com/api-reference/combo-books/private-get_leg_prices).\n\nUse [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs) to retrieve Block RFQ information, or [private/edit_block_rfq_quote](https://docs.deribit.com/api-reference/block-rfq/private-edit_block_rfq_quote) to modify an existing quote.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fadd_block_rfq_quote)\n\n", "x-mint": { "metadata": { "title": "private/add_block_rfq_quote", "og:title": "private/add_block_rfq_quote", "keywords": [ "private/add_block_rfq_quote", "label", "block_rfq_id", "amount", "direction", "legs", "hedge", "execution_instruction", "price", "expires_at", "creation_timestamp", "last_update_timestamp", "block_rfq_quote_id", "quote_state", "filled_amount", "replaced", "app_name", "quote_state_reason", "ratio", "instrument_name" ] }, "href": "/api-reference/block-rfq/private-add_block_rfq_quote" } } }, "/private/edit_block_rfq_quote": { "get": { "parameters": [ { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "ratio": { "type": "integer", "description": "Ratio of amount between legs" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" } } } }, "description": "List of legs used for Block RFQ quote", "style": "form", "explode": true }, { "in": "query", "name": "amount", "required": true, "schema": { "$ref": "#/components/schemas/amount" }, "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, { "name": "block_rfq_quote_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ quote" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ" }, { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "in": "query", "name": "price", "required": false, "schema": { "type": "number" }, "description": "Aggregated price used for quoting future spreads." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateEditBlockRfqQuoteResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/edit_block_rfq_quote", "params": { "label": "example_quote", "block_rfq_id": 3, "amount": 20000, "direction": "buy", "legs": [ { "instrument_name": "BTC-15NOV24", "price": 74600, "ratio": "1", "direction": "buy" } ], "hedge": { "amount": 10, "direction": "buy", "price": 70000, "instrument_name": "BTC-PERPETUAL" }, "execution_instruction": "any_part_of" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Maker method**\n\nEdits a Block RFQ quote using the specified `block_rfq_quote_id`. Alternatively, you can use a combination of `block_rfq_id` and `label` to edit the quote.\n\nUse [private/add_block_rfq_quote](https://docs.deribit.com/api-reference/block-rfq/private-add_block_rfq_quote) to add new quotes, or [private/cancel_block_rfq_quote](https://docs.deribit.com/api-reference/block-rfq/private-cancel_block_rfq_quote) to cancel quotes.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit_block_rfq_quote)\n\n", "x-mint": { "metadata": { "title": "private/edit_block_rfq_quote", "og:title": "private/edit_block_rfq_quote", "keywords": [ "private/edit_block_rfq_quote", "legs", "amount", "block_rfq_quote_id", "label", "hedge", "block_rfq_id", "price", "creation_timestamp", "last_update_timestamp", "quote_state", "execution_instruction", "direction", "filled_amount", "replaced", "app_name", "quote_state_reason", "ratio", "instrument_name" ] }, "href": "/api-reference/block-rfq/private-edit_block_rfq_quote" } } }, "/private/cancel_block_rfq_quote": { "get": { "parameters": [ { "name": "block_rfq_quote_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ quote" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ" }, { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelBlockRfqQuoteResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/cancel_block_rfq_quote", "params": { "label": "example_quote", "block_rfq_id": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Maker method**\n\nCancels a single Block RFQ quote. You can identify the quote to cancel using either:\n\n- `block_rfq_quote_id` - the unique ID of the quote\n- `block_rfq_id` + `label` - the Block RFQ ID and the quote label\n\n**Note:** Mass cancellation by label is not supported. This method cancels only one quote at a time. To cancel all quotes, use [private/cancel_all_block_rfq_quotes](https://docs.deribit.com/api-reference/block-rfq/private-cancel_all_block_rfq_quotes).\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_block_rfq_quote)\n\n", "x-mint": { "metadata": { "title": "private/cancel_block_rfq_quote", "og:title": "private/cancel_block_rfq_quote", "keywords": [ "private/cancel_block_rfq_quote", "block_rfq_quote_id", "label", "block_rfq_id", "creation_timestamp", "last_update_timestamp", "quote_state", "execution_instruction", "price", "amount", "direction", "filled_amount", "legs", "hedge", "replaced", "app_name", "quote_state_reason", "ratio", "instrument_name" ] }, "href": "/api-reference/block-rfq/private-cancel_block_rfq_quote" } } }, "/private/cancel_all_block_rfq_quotes": { "get": { "parameters": [ { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllBlockRfqQuotesResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 24, "method": "private/cancel_all_block_rfq_quotes", "params": { "block_rfq_id": 154 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Maker method**\n\nCancels all user quotes in all Block RFQs. Optionally cancels all quotes in a specific RFQ if the `block_rfq_id` is provided.\n\n**Note:** Mass cancellation by label is not supported. This method will cancel all quotes regardless of their labels. To cancel a single quote, use [private/cancel_block_rfq_quote](https://docs.deribit.com/api-reference/block-rfq/private-cancel_block_rfq_quote).\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_block_rfq_quotes)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all_block_rfq_quotes", "og:title": "private/cancel_all_block_rfq_quotes", "keywords": [ "private/cancel_all_block_rfq_quotes", "block_rfq_id", "detailed" ] }, "href": "/api-reference/block-rfq/private-cancel_all_block_rfq_quotes" } } }, "/private/get_block_rfq_makers": { "get": { "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockRfqMakersResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_rfq_makers", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns a list of all available Block RFQ makers. This method takes no parameters.\n\nUse this method to retrieve the list of makers that can be specified when creating a Block RFQ with [private/create_block_rfq](https://docs.deribit.com/api-reference/block-rfq/private-create_block_rfq).\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_rfq_makers)\n\n", "x-mint": { "metadata": { "title": "private/get_block_rfq_makers", "og:title": "private/get_block_rfq_makers", "keywords": [ "private/get_block_rfq_makers" ] }, "href": "/api-reference/block-rfq/private-get_block_rfq_makers" } } }, "/public/get_block_rfq_trades": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any" }, "description": "The currency symbol or `\"any\"` for all" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "1738050297271:103" }, "description": "Continuation token for pagination. Consists of `timestamp` and `block_rfq_id`." }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Count of Block RFQs returned, maximum - `1000`" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetBlockRfqTradesResponse" } }, "tags": [ "Block RFQ", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_block_rfq_trades", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns a list of recent Block RFQ trades. Can be optionally filtered by currency.\n\nThis is a public method that provides market data about completed Block RFQ trades. For private Block RFQ information, use [private/get_block_rfqs](https://docs.deribit.com/api-reference/block-rfq/private-get_block_rfqs).\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_block_rfq_trades)\n\n", "x-mint": { "metadata": { "title": "public/get_block_rfq_trades", "og:title": "public/get_block_rfq_trades", "keywords": [ "public/get_block_rfq_trades", "currency", "continuation", "count", "block_rfqs", "timestamp", "direction", "amount", "mark_price", "legs", "combo_id", "hedge", "index_prices", "trades", "ratio", "instrument_name", "price", "hedge_amount" ] }, "href": "/api-reference/block-rfq/public-get_block_rfq_trades" } } }, "/private/get_block_rfq_user_info": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockRfqUserInfoResponse" } }, "tags": [ "Block RFQ", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_rfq_user_info", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns identity and rating information for the requesting account and its subaccounts. Includes both group-level and individual user-level alias data, if available.\n\nThis information is useful for understanding your Block RFQ maker identity and rating when participating in Block RFQ trades.\n\n**📖 Related Article:** [Deribit Block RFQ API walkthrough](https://docs.deribit.com/articles/block-rfq-api-walkthrough)\n\n**Scope:** `block_rfq:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_rfq_user_info)\n\n", "x-mint": { "metadata": { "title": "private/get_block_rfq_user_info", "og:title": "private/get_block_rfq_user_info", "keywords": [ "private/get_block_rfq_user_info", "parent", "users", "identity", "is_maker", "user_id", "taker_rating" ] }, "href": "/api-reference/block-rfq/private-get_block_rfq_user_info" } } }, "/private/simulate_block_trade": { "get": { "parameters": [ { "in": "query", "name": "role", "required": false, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" }, { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" } } } }, "description": "List of trades for block trade", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSimulateBlockTradeResponse" } }, "tags": [ "Block Trade", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/simulate_block_trade", "params": { "role": "maker", "trades": [ { "instrument_name": "BTC-PERPETUAL", "direction": "buy", "price": 11624, "amount": 40 }, { "instrument_name": "BTC-9AUG19-10250-P", "direction": "buy", "amount": 1.2, "price": 0.0707 } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Checks if a block trade can be executed without actually executing it. Use this method to verify that a block trade will succeed before proceeding with the actual execution.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsimulate_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/simulate_block_trade", "og:title": "private/simulate_block_trade", "keywords": [ "private/simulate_block_trade", "role", "trades" ] }, "href": "/api-reference/block-trade/private-simulate_block_trade" } } }, "/private/verify_block_trade": { "get": { "parameters": [ { "in": "query", "name": "timestamp", "required": true, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "Timestamp, shared with other party (milliseconds since the UNIX epoch)" }, { "in": "query", "name": "nonce", "required": true, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Nonce, shared with other party" }, { "in": "query", "name": "role", "required": true, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" }, { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" } } } }, "description": "List of trades for block trade", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateVerifyBlockTradeResponse" } }, "tags": [ "Block Trade", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/verify_block_trade", "params": { "nonce": "okpdjkdo", "timestamp": 1565172650935, "role": "maker", "trades": [ { "instrument_name": "BTC-PERPETUAL", "direction": "buy", "price": 11624, "amount": 40 }, { "instrument_name": "BTC-9AUG19-10250-P", "direction": "buy", "amount": 1.2, "price": 0.0707 } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Verifies and creates a block trade signature. This is the first step in the block trade workflow - the first party calls this method to generate a signature that must be shared with the second party.\n\n**Note:** In the API, the `direction` field is always expressed from the maker's perspective. This means that when you accept a block trade as a taker, the direction shown in the API represents the opposite side of your trade. For example, if you are buying puts as a taker, the API will show the operation as a \"sell put\" (maker's perspective), and you will be verifying and accepting a \"sell put\" block trade.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fverify_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/verify_block_trade", "og:title": "private/verify_block_trade", "keywords": [ "private/verify_block_trade", "timestamp", "nonce", "role", "trades", "signature" ] }, "href": "/api-reference/block-trade/private-verify_block_trade" } } }, "/private/execute_block_trade": { "get": { "parameters": [ { "in": "query", "name": "timestamp", "required": true, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "Timestamp, shared with other party (milliseconds since the UNIX epoch)" }, { "in": "query", "name": "nonce", "required": true, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Nonce, shared with other party" }, { "in": "query", "name": "role", "required": true, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" }, { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" } } } }, "description": "List of trades for block trade", "style": "form", "explode": true }, { "in": "query", "name": "counterparty_signature", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_signature" }, "description": "Signature of block trade generated by `private/verify_block_trade_method`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockTradeResponse" } }, "tags": [ "Block Trade", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/execute_block_trade", "params": { "nonce": "bszyprbq", "timestamp": 1590485535899, "role": "maker", "trades": [ { "instrument_name": "BTC-PERPETUAL", "direction": "sell", "price": 8900, "amount": 200000 }, { "instrument_name": "BTC-28MAY20-9000-C", "direction": "sell", "amount": 5, "price": 0.0133 } ], "counterparty_signature": "1590485595899.1Mn52L_Q.lNyNBzXXo-_QBT_wDuMgnhA7uS9tBqdQ5TLN6rxbuoAiQhyaJYGJrm5IV_9enp9niY_x8D60AJLm3yEKPUY1Dv3T0TW0n5-ADPpJF7Fpj0eVDZpZ6QCdX8snBWrSJ0TtqevnO64RCBlN1dIm2T70PP9dlhiqPDAUYI4fpB1vLYI" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Executes a block trade. This is the second step in the block trade workflow - the second party calls this method with the signature received from the first party to execute the trade.\n\nThe whole request must be exactly the same as in [private/verify_block_trade](https://docs.deribit.com/api-reference/block-trade/private-verify_block_trade), only the `role` field should be set appropriately - this means that both sides have to agree on the same `timestamp`, `nonce`, and `trades` fields, and the server will ensure that the `role` field is different between sides (each party accepts their own role).\n\nUsing the same `timestamp` and `nonce` by both sides in [private/verify_block_trade](https://docs.deribit.com/api-reference/block-trade/private-verify_block_trade) ensures that even if unintentionally both sides execute the given block trade with a valid `counterparty_signature`, the block trade will be executed only once.\n\n**Note:** In the API, the `direction` field is always expressed from the maker's perspective. This means that when you accept a block trade as a taker, the direction shown in the API represents the opposite side of your trade. For example, if you are buying puts as a taker, the API will show the operation as a \"sell put\" (maker's perspective), and you will be verifying and accepting a \"sell put\" block trade.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fexecute_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/execute_block_trade", "og:title": "private/execute_block_trade", "keywords": [ "private/execute_block_trade", "timestamp", "nonce", "role", "trades", "counterparty_signature", "app_name", "broker_code", "broker_name", "trade_id", "trade_seq", "instrument_name", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-trade/private-execute_block_trade" } } }, "/private/invalidate_block_trade_signature": { "get": { "parameters": [ { "in": "query", "name": "signature", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_signature" }, "description": "Signature of block trade that will be invalidated" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/invalidate_block_trade_signature", "params": { "signature": "1565173369982.1M9tO0Q-.z9n9WyZUU5op9pEz6Jtd2CI71QxQMMsCZAexnIfK9HQRT1pKH3clxeIbY7Bqm-yMcWIoE3IfCDPW5VEdiN-6oS0YkKUyXPD500MUf3ULKhfkmH81EZs" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Invalidates a block trade signature, effectively cancelling the block trade. This can be called at any time before [private/execute_block_trade](https://docs.deribit.com/api-reference/block-trade/private-execute_block_trade) is called.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Finvalidate_block_trade_signature)\n\n", "x-mint": { "metadata": { "title": "private/invalidate_block_trade_signature", "og:title": "private/invalidate_block_trade_signature", "keywords": [ "private/invalidate_block_trade_signature", "signature" ] }, "href": "/api-reference/block-trade/private-invalidate_block_trade_signature" } } }, "/private/get_block_trade": { "get": { "parameters": [ { "in": "query", "name": "id", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "Block trade id" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockTradeResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_trade", "params": { "id": "61" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns information about a specific block trade identified by `block_trade_id`.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/get_block_trade", "og:title": "private/get_block_trade", "keywords": [ "private/get_block_trade", "id", "timestamp", "trades", "app_name", "broker_code", "broker_name", "trade_id", "trade_seq", "instrument_name", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-trade/private-get_block_trade" } } }, "/private/get_block_trades": { "get": { "parameters": [ { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 101, "minimum": 1 }, "description": "Count of Block Trades returned, maximum - `101`" }, { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "Response will contain block trades older than the one provided in this field" }, { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "The id of the oldest block trade to be returned, `start_id` is required with `end_id`" }, { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, { "name": "broker_code", "in": "query", "required": false, "schema": { "type": "string", "example": "2krM7sJsx" }, "description": "Broker code to filter block trades. Only broker clients can use `broker_code` to filter broker block trades. Use `any` for all block trades." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockTradesResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_trades", "params": { "currency": "BTC", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns a list of the user's block trades. If currency is not provided, returns block trades for all currencies. `block_rfq_id` can be provided to receive block trades related to that particular Block RFQ.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_trades)\n\n", "x-mint": { "metadata": { "title": "private/get_block_trades", "og:title": "private/get_block_trades", "keywords": [ "private/get_block_trades", "currency", "count", "start_id", "end_id", "block_rfq_id", "broker_code", "timestamp", "trades", "app_name", "broker_name", "trade_id", "trade_seq", "instrument_name", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/block-trade/private-get_block_trades" } } }, "/private/get_block_trade_requests": { "get": { "parameters": [ { "name": "broker_code", "in": "query", "required": false, "schema": { "type": "string", "example": "jpqYKgg1" }, "description": "Broker code to filter block trade requests. Only broker clients can use `broker_code` to query for their executed broker block trades." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBlockTradeRequestsResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_block_trade_requests", "params": { "broker_code": "jpqYKgg1" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Provides a list of block trade requests including pending approvals, declined trades, and expired trades. `timestamp` and `nonce` received in response can be used with [private/approve_block_trade](https://docs.deribit.com/api-reference/block-trade/private-approve_block_trade) or [private/reject_block_trade](https://docs.deribit.com/api-reference/block-trade/private-reject_block_trade) to approve or reject the pending block trade.\n\nTo use the block trade approval feature, an [additional API key setting feature](https://docs.deribit.com/articles/creating-api-key#block-trade-approval-feature) called `enabled_features: block_trade_approval` is required. This key has to be given to the broker/registered partner who performs the trades on behalf of the user for the feature to be active. If the user wants to approve the trade, they must approve it from a different API key that doesn't have this feature enabled.\n\nOnly broker clients can use `broker_code` to query for their broker block trade requests.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_block_trade_requests)\n\n", "x-mint": { "metadata": { "title": "private/get_block_trade_requests", "og:title": "private/get_block_trade_requests", "keywords": [ "private/get_block_trade_requests", "broker_code", "nonce", "timestamp", "trades", "app_name", "username", "role", "user_id", "broker_name", "state", "counterparty_state", "combo_id", "value" ] }, "href": "/api-reference/block-trade/private-get_block_trade_requests" } } }, "/private/approve_block_trade": { "get": { "parameters": [ { "in": "query", "name": "timestamp", "required": true, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "Timestamp, shared with other party (milliseconds since the UNIX epoch)" }, { "in": "query", "name": "nonce", "required": true, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Nonce, shared with other party" }, { "in": "query", "name": "role", "required": true, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/approve_block_trade", "params": { "timestamp": 1711468813551, "nonce": "bt-468nha", "role": "maker" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Approves a pending block trade. `nonce` and `timestamp` are used to identify the block trade while `role` should be opposite to the trading counterparty.\n\nUse [private/get_block_trade_requests](https://docs.deribit.com/api-reference/block-trade/private-get_block_trade_requests) to retrieve pending block trades that require approval.\n\nTo use the block trade approval feature, an [additional API key setting feature](https://docs.deribit.com/articles/creating-api-key#block-trade-approval-feature) called `enabled_features: block_trade_approval` is required. This key has to be given to the broker/registered partner who performs the trades on behalf of the user for the feature to be active. If the user wants to approve the trade, they must approve it from a different API key that doesn't have this feature enabled.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fapprove_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/approve_block_trade", "og:title": "private/approve_block_trade", "keywords": [ "private/approve_block_trade", "timestamp", "nonce", "role" ] }, "href": "/api-reference/block-trade/private-approve_block_trade" } } }, "/private/reject_block_trade": { "get": { "parameters": [ { "in": "query", "name": "timestamp", "required": true, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "Timestamp, shared with other party (milliseconds since the UNIX epoch)" }, { "in": "query", "name": "nonce", "required": true, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Nonce, shared with other party" }, { "in": "query", "name": "role", "required": true, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/reject_block_trade", "params": { "timestamp": 1711468813551, "nonce": "bt-468nha", "role": "maker" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Rejects a pending block trade. `nonce` and `timestamp` are used to identify the block trade while `role` should be opposite to the trading counterparty.\n\nUse [private/get_block_trade_requests](https://docs.deribit.com/api-reference/block-trade/private-get_block_trade_requests) to retrieve pending block trades that require approval.\n\nTo use the block trade approval feature, an [additional API key setting feature](https://docs.deribit.com/articles/creating-api-key#block-trade-approval-feature) called `enabled_features: block_trade_approval` is required. This key has to be given to the broker/registered partner who performs the trades on behalf of the user for the feature to be active. If the user wants to approve the trade, they must approve it from a different API key that doesn't have this feature enabled.\n\n**📖 Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api)\n\n**Scope:** `block_trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Freject_block_trade)\n\n", "x-mint": { "metadata": { "title": "private/reject_block_trade", "og:title": "private/reject_block_trade", "keywords": [ "private/reject_block_trade", "timestamp", "nonce", "role" ] }, "href": "/api-reference/block-trade/private-reject_block_trade" } } }, "/private/get_broker_trades": { "get": { "parameters": [ { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "Response will contain block trades older than the one provided in this field" }, { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "The id of the oldest block trade to be returned, `start_id` is required with `end_id`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetBrokerTradesResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_broker_trades", "params": { "currency": "BTC", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Broker Method** Returns list of broker block trades. If currency is not provided, returns broker block trades for all currencies.\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_broker_trades)\n\n", "x-mint": { "metadata": { "title": "private/get_broker_trades", "og:title": "private/get_broker_trades", "keywords": [ "private/get_broker_trades", "currency", "count", "start_id", "end_id", "history", "next_start_id", "timestamp", "trades", "maker", "taker", "app_name", "broker_code", "broker_name", "trade_id", "trade_seq", "instrument_name", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name", "client_name", "client_link_name" ] }, "href": "/api-reference/block-trade/private-get_broker_trades" } } }, "/private/get_broker_trade_requests": { "get": { "responses": { "200": { "$ref": "#/components/responses/PrivateGetBrokerTradeRequestsResponse" } }, "tags": [ "Block Trade", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7, "method": "private/get_broker_trade_requests", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "**Broker Method** Provides a list of broker block trade requests including pending approvals, declined trades, and expired trades. `timestamp` and `nonce` received in response can be used to approve or reject the pending broker block trade. This method takes no parameters.\n\n**Scope:** `block_trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_broker_trade_requests)\n\n", "x-mint": { "metadata": { "title": "private/get_broker_trade_requests", "og:title": "private/get_broker_trade_requests", "keywords": [ "private/get_broker_trade_requests", "timestamp", "state", "trades", "maker", "taker", "nonce", "amount", "direction", "price", "instrument_name", "client_id", "user_id", "client_name", "client_link_name", "client_link_id" ] }, "href": "/api-reference/block-trade/private-get_broker_trade_requests" } } }, "/public/get_combos": { "get": { "tags": [ "Combo Books", "Public" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any" }, "description": "The currency symbol or `\"any\"` for all" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetCombosResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2, "method": "public/get_combos", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves information about active combos for the specified currency. Returns detailed information including leg structures and combo properties.\n\nFor a list of combo IDs only, use [public/get_combo_ids](https://docs.deribit.com/api-reference/combo-books/public-get_combo_ids). For details about a specific combo, use [public/get_combo_details](https://docs.deribit.com/api-reference/combo-books/public-get_combo_details).\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_combos)\n\n", "x-mint": { "metadata": { "title": "public/get_combos", "og:title": "public/get_combos", "keywords": [ "public/get_combos", "currency", "instrument_id", "state", "state_timestamp", "creation_timestamp", "legs", "instrument_name", "amount" ] }, "href": "/api-reference/combo-books/public-get_combos" } } }, "/public/get_combo_ids": { "get": { "tags": [ "Combo Books", "Public" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "state", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/combo_state" }, "description": "Combo state, if not provided combos of all states are considered" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetComboIdsResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_combo_ids", "params": { "currency": "BTC", "state": "active" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves available combo IDs. This method can be used to get the list of all combos, or only the list of combos in the given state.\n\nUse [public/get_combo_details](https://docs.deribit.com/api-reference/combo-books/public-get_combo_details) to retrieve detailed information about a specific combo.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_combo_ids)\n\n", "x-mint": { "metadata": { "title": "public/get_combo_ids", "og:title": "public/get_combo_ids", "keywords": [ "public/get_combo_ids", "currency", "state" ] }, "href": "/api-reference/combo-books/public-get_combo_ids" } } }, "/public/get_combo_details": { "get": { "tags": [ "Combo Books", "Public" ], "parameters": [ { "name": "combo_id", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/combo_id" }, "description": "Combo ID" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetComboDetailsResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3, "method": "public/get_combo_details", "params": { "combo_id": "BTC-FS-29APR22_PERP" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves detailed information about a specific combo, including its leg structure, state, and other properties.\n\nUse [public/get_combo_ids](https://docs.deribit.com/api-reference/combo-books/public-get_combo_ids) to get a list of available combo IDs.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_combo_details)\n\n", "x-mint": { "metadata": { "title": "public/get_combo_details", "og:title": "public/get_combo_details", "keywords": [ "public/get_combo_details", "combo_id", "instrument_id", "state", "state_timestamp", "creation_timestamp", "legs", "instrument_name", "amount" ] }, "href": "/api-reference/combo-books/public-get_combo_details" } } }, "/private/create_combo": { "get": { "parameters": [ { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "amount": { "$ref": "#/components/schemas/amount" }, "direction": { "$ref": "#/components/schemas/direction" } } } }, "description": "List of trades used to create a combo", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCreateComboResponse" } }, "tags": [ "Combo Books", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 6, "method": "private/create_combo", "params": { "trades": [ { "instrument_name": "BTC-29APR22-37500-C", "amount": "1", "direction": "buy" }, { "instrument_name": "BTC-29APR22-37500-P", "amount": "1", "direction": "sell" } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Verifies and creates a combo book or returns an existing combo matching the given trades. Combos allow trading on multiple instruments (futures and options) simultaneously as a single strategy.\n\nIf a combo matching the provided trades already exists, this method returns the existing combo. Otherwise, it creates a new combo book with the specified leg structure.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_combo)\n\n", "x-mint": { "metadata": { "title": "private/create_combo", "og:title": "private/create_combo", "keywords": [ "private/create_combo", "trades", "instrument_id", "state", "state_timestamp", "creation_timestamp", "legs", "instrument_name", "amount" ] }, "href": "/api-reference/combo-books/private-create_combo" } } }, "/private/get_leg_prices": { "get": { "parameters": [ { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg" } } } }, "description": "List of legs for which the prices will be calculated", "style": "form", "explode": true }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Price for the whole leg structure" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetLegPricesResponse" } }, "tags": [ "Combo Books", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_leg_prices", "params": { "price": 0.6, "legs": [ { "instrument_name": "BTC-1NOV24-67000-C", "direction": "buy", "amount": 2 }, { "instrument_name": "BTC-1NOV24-66000-C", "direction": "sell", "amount": 2 } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns individual leg prices for a given combo structure based on an aggregated price of the strategy and the mark prices of the individual legs.\n\n**Note:** Leg prices change dynamically with mark price fluctuations, and the algorithm is calibrated only for conventional option structures and future spreads. This method supports both inverse strategies and known linear structures within a single currency pair.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_leg_prices)\n\n", "x-mint": { "metadata": { "title": "private/get_leg_prices", "og:title": "private/get_leg_prices", "keywords": [ "private/get_leg_prices", "legs", "price", "amount", "ratio", "instrument_name", "direction" ] }, "href": "/api-reference/combo-books/private-get_leg_prices" } } }, "/public/get_order_book": { "get": { "parameters": [ { "in": "query", "name": "instrument_name", "required": true, "schema": { "type": "string", "example": "BTC-PERPETUAL" }, "description": "The instrument name for which to retrieve the order book, see [`public/get_instruments`](#public-get_instruments) to obtain instrument names." }, { "in": "query", "name": "depth", "required": false, "schema": { "type": "integer", "enum": [ 1, 5, 10, 20, 50, 100, 1000, 10000 ], "example": 5 }, "description": "The number of entries to return for bids and asks, maximum - `10000`." } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetOrderBookResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8772, "method": "public/get_order_book", "params": { "instrument_name": "BTC-PERPETUAL", "depth": 5 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the order book (bids and asks) for a given instrument, along with other market values such as best bid/ask prices, last trade price, mark price, and index price.\n\nThe order book depth can be controlled using the `depth` parameter, which accepts values from 1 to 10000. The response includes price levels sorted by price (bids descending, asks ascending).\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_order_book)\n\n", "x-mint": { "metadata": { "title": "public/get_order_book", "og:title": "public/get_order_book", "keywords": [ "public/get_order_book", "instrument_name", "depth", "timestamp", "state", "stats", "open_interest", "best_bid_price", "best_bid_amount", "best_ask_price", "best_ask_amount", "index_price", "min_price", "max_price", "mark_price", "last_price", "underlying_price", "underlying_index", "interest_rate", "bid_iv", "ask_iv", "mark_iv", "greeks", "funding_8h", "current_funding", "delivery_price", "settlement_price", "bids", "asks", "volume", "low", "high", "price_change", "volume_usd", "delta", "gamma", "rho", "theta", "vega" ] }, "href": "/api-reference/market-data/public-get_order_book" } } }, "/public/get_order_book_by_instrument_id": { "get": { "parameters": [ { "in": "query", "name": "instrument_id", "required": true, "schema": { "type": "integer" }, "description": "The instrument ID for which to retrieve the order book, see [`public/get_instruments`](#public-get_instruments) to obtain instrument IDs." }, { "in": "query", "name": "depth", "required": false, "schema": { "type": "integer", "enum": [ 1, 5, 10, 20, 50, 100, 1000, 10000 ] }, "description": "The number of entries to return for bids and asks, maximum - `10000`." } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetOrderBookResponse" } }, "tags": [ "Market Data", "Public" ], "description": "Retrieves the order book (bids and asks) for a given instrument ID, along with other market values such as best bid/ask prices, last trade price, mark price, and index price.\n\nThis method is similar to `get_order_book` but uses instrument ID instead of instrument name. The order book depth can be controlled using the `depth` parameter, which accepts values from 1 to 10000.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_order_book_by_instrument_id)\n\n", "x-mint": { "metadata": { "title": "public/get_order_book_by_instrument_id", "og:title": "public/get_order_book_by_instrument_id", "keywords": [ "public/get_order_book_by_instrument_id", "instrument_id", "depth", "instrument_name", "timestamp", "state", "stats", "open_interest", "best_bid_price", "best_bid_amount", "best_ask_price", "best_ask_amount", "index_price", "min_price", "max_price", "mark_price", "last_price", "underlying_price", "underlying_index", "interest_rate", "bid_iv", "ask_iv", "mark_iv", "greeks", "funding_8h", "current_funding", "delivery_price", "settlement_price", "bids", "asks", "volume", "low", "high", "price_change", "volume_usd", "delta", "gamma", "rho", "theta", "vega" ] }, "href": "/api-reference/market-data/public-get_order_book_by_instrument_id" } } }, "/public/get_last_settlements_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "in": "query", "name": "type", "required": false, "schema": { "$ref": "#/components/schemas/settlement_type" }, "description": "Settlement type" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "in": "query", "name": "search_start_timestamp", "required": false, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The latest timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicSettlementResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4497, "method": "public/get_last_settlements_by_currency", "params": { "currency": "BTC", "type": "delivery", "count": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves historical settlement, delivery, and bankruptcy events from all instruments within a given currency. Settlements occur when futures or options contracts expire and are settled at the delivery price.\n\nResults can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This data is useful for analyzing historical contract settlements and understanding market events.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_settlements_by_currency)\n\n", "x-mint": { "metadata": { "title": "public/get_last_settlements_by_currency", "og:title": "public/get_last_settlements_by_currency", "keywords": [ "public/get_last_settlements_by_currency", "currency", "type", "count", "continuation", "search_start_timestamp", "settlements", "funding", "funded", "index_price", "instrument_name", "mark_price", "position", "profit_loss", "session_bankruptcy", "session_profit_loss", "session_tax", "session_tax_rate", "socialized", "timestamp" ] }, "href": "/api-reference/market-data/public-get_last_settlements_by_currency" } } }, "/public/get_book_summary_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, if not provided instruments of all kinds are considered" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetBookSummaryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9344, "method": "public/get_book_summary_by_currency", "params": { "currency": "BTC", "kind": "future" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, and other market statistics for all instruments in a given currency.\n\nResults can be filtered by instrument kind (future, option, etc.). This method provides a quick overview of market activity across all instruments for a currency.\n\n**Note:** For real-time updates, we recommend using the WebSocket subscription to `ticker.{instrument_name}.{interval}` instead of polling this endpoint.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_book_summary_by_currency)\n\n", "x-mint": { "metadata": { "title": "public/get_book_summary_by_currency", "og:title": "public/get_book_summary_by_currency", "keywords": [ "public/get_book_summary_by_currency", "currency", "kind", "instrument_name", "high", "low", "base_currency", "quote_currency", "volume", "bid_price", "ask_price", "mid_price", "mark_price", "last", "open_interest", "creation_timestamp", "estimated_delivery_price", "volume_usd", "volume_notional", "current_funding", "funding_8h", "mark_iv", "interest_rate", "underlying_index", "underlying_price", "price_change" ] }, "href": "/api-reference/market-data/public-get_book_summary_by_currency" } } }, "/public/get_book_summary_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetBookSummaryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3659, "method": "public/get_book_summary_by_instrument", "params": { "instrument_name": "ETH-22FEB19-140-P" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, mark price, and other market statistics for a specific instrument.\n\nThis method provides a quick overview of current market activity and liquidity for a single instrument.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_book_summary_by_instrument)\n\n", "x-mint": { "metadata": { "title": "public/get_book_summary_by_instrument", "og:title": "public/get_book_summary_by_instrument", "keywords": [ "public/get_book_summary_by_instrument", "instrument_name", "high", "low", "base_currency", "quote_currency", "volume", "bid_price", "ask_price", "mid_price", "mark_price", "last", "open_interest", "creation_timestamp", "estimated_delivery_price", "volume_usd", "volume_notional", "current_funding", "funding_8h", "mark_iv", "interest_rate", "underlying_index", "underlying_price", "price_change" ] }, "href": "/api-reference/market-data/public-get_book_summary_by_instrument" } } }, "/public/get_last_settlements_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "in": "query", "name": "type", "required": false, "schema": { "$ref": "#/components/schemas/settlement_type" }, "description": "Settlement type" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "in": "query", "name": "search_start_timestamp", "required": false, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The latest timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicSettlementResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5482, "method": "public/get_last_settlements_by_instrument", "params": { "instrument_name": "BTC-22FEB19", "type": "settlement", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves historical settlement, delivery, and bankruptcy events for a specific instrument. Settlements occur when futures or options contracts expire and are settled at the delivery price.\n\nResults can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This method is useful for tracking settlement history for a specific instrument.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_settlements_by_instrument)\n\n", "x-mint": { "metadata": { "title": "public/get_last_settlements_by_instrument", "og:title": "public/get_last_settlements_by_instrument", "keywords": [ "public/get_last_settlements_by_instrument", "instrument_name", "type", "count", "continuation", "search_start_timestamp", "settlements", "funding", "funded", "index_price", "mark_price", "position", "profit_loss", "session_bankruptcy", "session_profit_loss", "session_tax", "session_tax_rate", "socialized", "timestamp" ] }, "href": "/api-reference/market-data/public-get_last_settlements_by_instrument" } } }, "/public/get_contract_size": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetContractSizeResponse" } }, "description": "Retrieves the contract size (also known as contract multiplier) for a given instrument. The contract size determines how many units of the underlying asset one contract represents.\n\nThis value is essential for calculating position values, margin requirements, and P&L calculations. Different instruments may have different contract sizes.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_contract_size)\n\n", "x-mint": { "metadata": { "title": "public/get_contract_size", "og:title": "public/get_contract_size", "keywords": [ "public/get_contract_size", "instrument_name", "contract_size" ] }, "href": "/api-reference/market-data/public-get_contract_size" } } }, "/public/get_trade_volumes": { "get": { "parameters": [ { "name": "extended", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Request for extended statistics. Including also 7 and 30 days volumes (default false)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetTradesVolumesResponse" } }, "tags": [ "Market Data", "Public" ], "description": "Retrieves aggregated 24-hour trade volumes for different instrument types and currencies. The volume statistics include all executed trades across the platform.\n\n**Note:** Position moves are not included in this volume. Block trades and Block RFQ trades are included in the volume calculations.\n\nUse the `extended` parameter to include additional volume statistics and breakdowns.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_trade_volumes)\n\n", "x-mint": { "metadata": { "title": "public/get_trade_volumes", "og:title": "public/get_trade_volumes", "keywords": [ "public/get_trade_volumes", "extended", "currency", "calls_volume", "puts_volume", "futures_volume", "spot_volume", "calls_volume_7d", "puts_volume_7d", "futures_volume_7d", "spot_volume_7d", "calls_volume_30d", "puts_volume_30d", "futures_volume_30d", "spot_volume_30d" ] }, "href": "/api-reference/market-data/public-get_trade_volumes" } } }, "/public/get_index_price": { "get": { "parameters": [ { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "Index identifier, matches (base) cryptocurrency with quote currency" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetIndexPriceResponse" } }, "tags": [ "Market Data", "Public" ], "description": "Retrieves the current index price value for a given index name. Index prices are used as reference prices for mark price calculations and settlement.\n\nUse `get_index_price_names` or `get_supported_index_names` to retrieve available index names.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_index_price)\n\n", "x-mint": { "metadata": { "title": "public/get_index_price", "og:title": "public/get_index_price", "keywords": [ "public/get_index_price", "index_name", "index_price", "estimated_delivery_price" ] }, "href": "/api-reference/market-data/public-get_index_price" } } }, "/public/get_index_price_names": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "extended", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "example": true }, "description": "When set to `true`, returns additional information including `future_combo_creation_enabled` and `option_combo_creation_enabled` for each index" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetIndexPriceNamesResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_index_price_names", "params": { "extended": true } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the identifiers (names) of all supported price indexes. Price indexes are reference prices used for mark price calculations, settlement, and other market operations.\n\nWhen the `extended` parameter is set to `true`, the response includes additional information such as whether future combo creation and option combo creation are enabled for each index.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_index_price_names)\n\n", "x-mint": { "metadata": { "title": "public/get_index_price_names", "og:title": "public/get_index_price_names", "keywords": [ "public/get_index_price_names", "extended", "name", "future_combo_creation_enabled", "option_combo_creation_enabled" ] }, "href": "/api-reference/market-data/public-get_index_price_names" } } }, "/public/get_supported_index_names": { "get": { "parameters": [ { "name": "type", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "all", "spot", "derivative" ] }, "description": "Type of a cryptocurrency price index" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetIndexPriceNamesResponse" } }, "tags": [ "Market Data", "Public" ], "description": "Retrieves the identifiers (names) of all supported price indexes, optionally filtered by index type. Price indexes are reference prices used for mark price calculations, settlement, and other market operations.\n\nUse the `type` parameter to filter indexes by type (e.g., spot, futures, etc.). This method helps discover available indexes for use with other API methods.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_supported_index_names)\n\n", "x-mint": { "metadata": { "title": "public/get_supported_index_names", "og:title": "public/get_supported_index_names", "keywords": [ "public/get_supported_index_names", "type", "name", "future_combo_creation_enabled", "option_combo_creation_enabled" ] }, "href": "/api-reference/market-data/public-get_supported_index_names" } } }, "/public/get_instruments": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any" }, "description": "The currency symbol or `\"any\"` for all" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, if not provided instruments of all kinds are considered" }, { "name": "expired", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Set to true to show recently expired instruments instead of active ones.", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetInstrumentsResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_instruments", "params": { "currency": "BTC", "kind": "future" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have recently expired.\n\n**Note - This method has distinct API rate limiting requirements:** Sustained rate: 1 request/second. To avoid rate limits, we recommend using either the REST requests for server-cached data or the WebSocket subscription to [instrument_state.{kind}.{currency}](https://docs.deribit.com/api-reference/subscription-channels/instrument-state-kind-currency) for real-time updates. For more information, see [Rate Limits](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).\n\nResults can be filtered by currency and instrument kind (future, option, etc.). Set the `expired` parameter to `true` to retrieve recently expired instruments instead of active ones.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_instruments)\n\n", "x-mint": { "metadata": { "title": "public/get_instruments", "og:title": "public/get_instruments", "keywords": [ "public/get_instruments", "currency", "kind", "expired", "settlement_currency", "counter_currency", "base_currency", "quote_currency", "min_trade_amount", "instrument_name", "instrument_id", "is_active", "settlement_period", "creation_timestamp", "tick_size", "tick_size_steps", "expiration_timestamp", "strike", "option_type", "future_type", "instrument_type", "contract_size", "maker_commission", "taker_commission", "max_liquidation_commission", "block_trade_commission", "block_trade_tick_size", "block_trade_min_trade_amount", "max_leverage", "price_index", "state", "above_price" ] }, "href": "/api-reference/market-data/public-get_instruments" } } }, "/public/get_instrument": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetInstrumentResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2, "method": "public/get_instrument", "params": { "instrument_name": "BTC-13JAN23-16000-P" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves detailed information about a specific instrument, including instrument specifications, contract details, tick size, settlement currency, expiration date (for futures and options), strike price (for options), and other instrument parameters.\n\nThis method is useful for obtaining instrument metadata needed for trading operations and calculations.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_instrument)\n\n", "x-mint": { "metadata": { "title": "public/get_instrument", "og:title": "public/get_instrument", "keywords": [ "public/get_instrument", "instrument_name", "kind", "settlement_currency", "counter_currency", "base_currency", "quote_currency", "min_trade_amount", "instrument_id", "is_active", "settlement_period", "creation_timestamp", "tick_size", "tick_size_steps", "expiration_timestamp", "strike", "option_type", "future_type", "instrument_type", "contract_size", "maker_commission", "taker_commission", "max_liquidation_commission", "block_trade_commission", "block_trade_tick_size", "block_trade_min_trade_amount", "max_leverage", "price_index", "state", "above_price" ] }, "href": "/api-reference/market-data/public-get_instrument" } } }, "/public/get_historical_volatility": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" } ], "tags": [ "Market Data", "Public" ], "responses": { "200": { "$ref": "#/components/responses/PublicGetHistoricalVolatilityResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8387, "method": "public/get_historical_volatility", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Provides historical volatility data for a given cryptocurrency. Historical volatility measures the degree of price variation over a past period and is useful for risk assessment and option pricing.\n\nThe response includes volatility statistics calculated from historical price movements. This data can be used for portfolio risk analysis and understanding market conditions.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_historical_volatility)\n\n", "x-mint": { "metadata": { "title": "public/get_historical_volatility", "og:title": "public/get_historical_volatility", "keywords": [ "public/get_historical_volatility", "currency", "timestamp", "value" ] }, "href": "/api-reference/market-data/public-get_historical_volatility" } } }, "/public/get_funding_rate_history": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetFundingRateHistoryResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7617, "method": "public/get_funding_rate_history", "params": { "instrument_name": "BTC-PERPETUAL", "start_timestamp": 1569888000000, "end_timestamp": 1569902400000 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves hourly historical funding rate (interest rate) data for a PERPETUAL instrument over a specified time period. Funding rates are periodic payments exchanged between long and short positions in perpetual contracts.\n\nThe response includes hourly funding rate values, which can be used to analyze funding rate trends and calculate historical funding costs. This method is applicable only for PERPETUAL instruments.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_funding_rate_history)\n\n", "x-mint": { "metadata": { "title": "public/get_funding_rate_history", "og:title": "public/get_funding_rate_history", "keywords": [ "public/get_funding_rate_history", "instrument_name", "start_timestamp", "end_timestamp", "timestamp", "prev_index_price", "index_price", "interest_1h", "interest_8h" ] }, "href": "/api-reference/market-data/public-get_funding_rate_history" } } }, "/public/get_funding_rate_value": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetFundingRateValueResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7617, "method": "public/get_funding_rate_value", "params": { "instrument_name": "BTC-PERPETUAL", "start_timestamp": 1569888000000, "end_timestamp": 1569974400000 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the funding rate (interest rate) value for a perpetual instrument over a specified time period. Funding rates are periodic payments exchanged between long and short positions in perpetual contracts.\n\nThis method is applicable only for PERPETUAL instruments. The funding rate is typically expressed as a percentage and is used to keep the perpetual contract price aligned with the underlying index price.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_funding_rate_value)\n\n", "x-mint": { "metadata": { "title": "public/get_funding_rate_value", "og:title": "public/get_funding_rate_value", "keywords": [ "public/get_funding_rate_value", "instrument_name", "start_timestamp", "end_timestamp" ] }, "href": "/api-reference/market-data/public-get_funding_rate_value" } } }, "/public/get_index_chart_data": { "get": { "parameters": [ { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "Index identifier, matches (base) cryptocurrency with quote currency" }, { "name": "range", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "1h", "1d", "2d", "1m", "1y", "all" ] }, "description": "Range of the data to return" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetIndexChartDataResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_index_chart_data", "params": { "index_name": "btc_usd", "range": "1m" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns historical price index chart data for the specified index name and time range. The data is formatted for use in charting applications and shows price index values over time.\n\nUse the `range` parameter to specify the time period for which to retrieve chart data. This method is useful for visualizing price index trends and historical movements.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_index_chart_data)\n\n", "x-mint": { "metadata": { "title": "public/get_index_chart_data", "og:title": "public/get_index_chart_data", "keywords": [ "public/get_index_chart_data", "index_name", "range" ] }, "href": "/api-reference/market-data/public-get_index_chart_data" } } }, "/public/get_mark_price_history": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetMarkPriceHistoryResponse" } }, "tags": [ "Market Data", "Mark Price", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_mark_price_history", "params": { "instrument_name": "BTC-25JUN21-50000-C", "start_timestamp": 1609376800000, "end_timestamp": 1609376810000 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves 5-minute historical mark price data for an instrument. Mark prices are used for margin calculations and position valuations.\n\n**Note:** Currently, mark price history is available only for a subset of options that participate in volatility index calculations. All other instruments, including futures and perpetuals, will return an empty list.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_mark_price_history)\n\n", "x-mint": { "metadata": { "title": "public/get_mark_price_history", "og:title": "public/get_mark_price_history", "keywords": [ "public/get_mark_price_history", "instrument_name", "start_timestamp", "end_timestamp" ] }, "href": "/api-reference/market-data/public-get_mark_price_history" } } }, "/public/get_expirations": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/settlement_currency_with_any_and_grouped" }, "description": "The currency symbol or `\"any\"` for all or '\"grouped\"' for all grouped by currency" }, { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/kind_future_or_option_with_any" }, "description": "Instrument kind, `\"future\"` or `\"option\"` or `\"any\"`" }, { "name": "currency_pair", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "The currency pair symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetExpirationsResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_expirations", "params": { "currency": "any", "kind": "any" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves all available expiration timestamps for instruments. This method can be used to discover which expiration dates are available for trading, which is useful for finding instruments with specific expiration dates.\n\nResults can be filtered by settlement currency, instrument kind (future or option), and currency pair. The response includes expiration timestamps in milliseconds since the UNIX epoch.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_expirations)\n\n", "x-mint": { "metadata": { "title": "public/get_expirations", "og:title": "public/get_expirations", "keywords": [ "public/get_expirations", "currency", "kind", "currency_pair" ] }, "href": "/api-reference/market-data/public-get_expirations" } } }, "/public/get_apr_history": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "currency", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "usde", "steth", "usdc", "build" ], "example": "steth" }, "description": "Currency for which to retrieve APR history" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "example": 5 }, "description": "Number of days to retrieve (default `365`, maximum `365`)" }, { "name": "before", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "Used to receive APR history before given epoch day" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetAprHistoryResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "public/get_apr_history", "params": { "currency": "steth", "limit": 5 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves historical Annual Percentage Rate (APR) data for yield-generating tokens. APR represents the annualized return rate for holding these tokens on Deribit.\n\nThis method is only applicable to yield-generating tokens: `USDE`, `STETH`, `USDC`, and `BUILD`. Use the `limit` parameter to specify the number of days to retrieve (default 365, maximum 365), and `before` to retrieve APR history before a specific epoch day.\n\n**📖 Related Support Article:** [Yield reward-bearing coins](https://support.deribit.com/hc/en-us/articles/31424939199261-Yield-reward-bearing-coins)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_apr_history)\n\n", "x-mint": { "metadata": { "title": "public/get_apr_history", "og:title": "public/get_apr_history", "keywords": [ "public/get_apr_history", "currency", "limit", "before", "continuation", "data", "day", "apr" ] }, "href": "/api-reference/market-data/public-get_apr_history" } } }, "/public/get_last_trades_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the first trade to be returned" }, { "name": "end_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the last trade to be returned" }, { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTradesHistoryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9267, "method": "public/get_last_trades_by_instrument", "params": { "instrument_name": "BTC-PERPETUAL", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest trades that have occurred for a specific instrument. Returns trade details including price, amount, direction, timestamp, and trade ID.\n\nResults can be filtered by sequence number range or timestamp range. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID).\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_trades_by_instrument)\n\n", "x-mint": { "metadata": { "title": "public/get_last_trades_by_instrument", "og:title": "public/get_last_trades_by_instrument", "keywords": [ "public/get_last_trades_by_instrument", "instrument_name", "start_seq", "end_seq", "start_timestamp", "end_timestamp", "count", "sorting", "trades", "has_more", "trade_id", "trade_seq", "timestamp", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "liquidation", "mark_price", "block_trade_id", "block_trade_leg_count", "combo_id", "combo_trade_id", "block_rfq_id" ] }, "href": "/api-reference/market-data/public-get_last_trades_by_instrument" } } }, "/public/get_last_trades_by_instrument_and_time": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTradesHistoryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3983, "method": "public/get_last_trades_by_instrument_and_time", "params": { "instrument_name": "ETH-PERPETUAL", "end_timestamp": 1590480022768, "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest trades that have occurred for a specific instrument within a specified time range. Returns trade details including price, amount, direction, timestamp, and trade ID.\n\nUse the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID). This method is useful for analyzing trading activity over specific time periods.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_trades_by_instrument_and_time)\n\n", "x-mint": { "metadata": { "title": "public/get_last_trades_by_instrument_and_time", "og:title": "public/get_last_trades_by_instrument_and_time", "keywords": [ "public/get_last_trades_by_instrument_and_time", "instrument_name", "start_timestamp", "end_timestamp", "count", "sorting", "trades", "has_more", "trade_id", "trade_seq", "timestamp", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "liquidation", "mark_price", "block_trade_id", "block_trade_leg_count", "combo_id", "combo_trade_id", "block_rfq_id" ] }, "href": "/api-reference/market-data/public-get_last_trades_by_instrument_and_time" } } }, "/public/get_last_trades_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the first trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the last trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTradesHistoryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9290, "method": "public/get_last_trades_by_currency", "params": { "currency": "BTC", "count": 3 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, and trade ID for all instruments in the currency.\n\nResults can be filtered by instrument kind and trade ID range or timestamp range. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID).\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_trades_by_currency)\n\n", "x-mint": { "metadata": { "title": "public/get_last_trades_by_currency", "og:title": "public/get_last_trades_by_currency", "keywords": [ "public/get_last_trades_by_currency", "currency", "kind", "start_id", "end_id", "start_timestamp", "end_timestamp", "count", "sorting", "trades", "has_more", "trade_id", "trade_seq", "instrument_name", "timestamp", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "liquidation", "mark_price", "block_trade_id", "block_trade_leg_count", "combo_id", "combo_trade_id", "block_rfq_id" ] }, "href": "/api-reference/market-data/public-get_last_trades_by_currency" } } }, "/public/get_last_trades_by_currency_and_time": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTradesHistoryResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1469, "method": "public/get_last_trades_by_currency_and_time", "params": { "currency": "BTC", "start_timestamp": 1590470022768, "end_timestamp": 1590480022768, "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest trades that have occurred for instruments in a specific currency within a specified time range. Returns trade details including price, amount, direction, timestamp, and trade ID.\n\nResults can be filtered by instrument kind. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID).\n\n> **Note:** This endpoint only returns trades from the last **24 hours**. Requests with `start_timestamp` older than 24 hours will return an empty result without an error.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_trades_by_currency_and_time)\n\n", "x-mint": { "metadata": { "title": "public/get_last_trades_by_currency_and_time", "og:title": "public/get_last_trades_by_currency_and_time", "keywords": [ "public/get_last_trades_by_currency_and_time", "currency", "kind", "start_timestamp", "end_timestamp", "count", "sorting", "trades", "has_more", "trade_id", "trade_seq", "instrument_name", "timestamp", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "liquidation", "mark_price", "block_trade_id", "block_trade_leg_count", "combo_id", "combo_trade_id", "block_rfq_id" ] }, "href": "/api-reference/market-data/public-get_last_trades_by_currency_and_time" } } }, "/public/get_currencies": { "get": { "tags": [ "Market Data", "Public" ], "responses": { "200": { "$ref": "#/components/responses/PublicGetCurrenciesResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7538, "method": "public/get_currencies", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves all cryptocurrencies supported by the Deribit API. Returns a list of available currencies with their codes and basic information.\n\nThis method takes no parameters and is useful for discovering which currencies are available for trading on the platform.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_currencies)\n\n", "x-mint": { "metadata": { "title": "public/get_currencies", "og:title": "public/get_currencies", "keywords": [ "public/get_currencies", "withdrawal_fee", "withdrawal_priorities", "min_withdrawal_fee", "currency", "currency_long", "min_confirmations", "coin_type", "in_cross_collateral_pool", "apr", "network_fee", "network_currency", "decimals", "name", "value" ] }, "href": "/api-reference/market-data/public-get_currencies" } } }, "/public/get_funding_chart_data": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "length", "in": "query", "schema": { "type": "string", "enum": [ "8h", "24h", "1m" ] }, "required": true, "description": "Specifies time period. `8h` - 8 hours, `24h` - 24 hours, `1m` - 1 month" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetFundingChartDataResponse" } }, "tags": [ "Market Data", "Public" ], "description": "Retrieves funding rate chart data points for a PERPETUAL instrument within a given time period. The data is formatted for use in charting applications and includes funding rate values at regular intervals.\n\nUse the `length` parameter to specify the time period for which to retrieve chart data. This method is useful for visualizing funding rate trends over time.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_funding_chart_data)\n\n", "x-mint": { "metadata": { "title": "public/get_funding_chart_data", "og:title": "public/get_funding_chart_data", "keywords": [ "public/get_funding_chart_data", "instrument_name", "length", "current_interest", "interest_8h", "data", "timestamp", "index_price" ] }, "href": "/api-reference/market-data/public-get_funding_chart_data" } } }, "/public/get_tradingview_chart_data": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "resolution", "in": "query", "schema": { "type": "string", "enum": [ 1, 3, 5, 10, 15, 30, 60, 120, 180, 360, 720, "1D" ] }, "required": true, "description": "Chart bars resolution given in full minutes or keyword `1D` (only some specific resolutions are supported)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetTradingviewChartDataResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 833, "method": "public/get_tradingview_chart_data", "params": { "instrument_name": "BTC-5APR19", "start_timestamp": 1554373800000, "end_timestamp": 1554376800000, "resolution": "30" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves publicly available market data formatted for generating TradingView-compatible candle charts. The data includes open, high, low, close (OHLC) prices and volume for specified time intervals.\n\nUse the `chart_resolution` parameter to specify the candle interval (e.g., 1m, 5m, 1h, 1d). This method provides the standard format used by TradingView and other charting platforms.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_tradingview_chart_data)\n\n", "x-mint": { "metadata": { "title": "public/get_tradingview_chart_data", "og:title": "public/get_tradingview_chart_data", "keywords": [ "public/get_tradingview_chart_data", "instrument_name", "start_timestamp", "end_timestamp", "resolution", "status", "ticks", "volume", "cost", "open", "close", "high", "low" ] }, "href": "/api-reference/market-data/public-get_tradingview_chart_data" } } }, "/public/get_volatility_index_data": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" }, { "name": "resolution", "in": "query", "schema": { "type": "string", "enum": [ 1, 60, 3600, 43200, "1D" ] }, "required": true, "description": "Time resolution given in full seconds or keyword `1D` (only some specific resolutions are supported)" } ], "responses": { "200": { "$ref": "#/components/responses/PublicGetVolatilityIndexDataResponse" } }, "tags": [ "Market Data", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 833, "method": "public/get_volatility_index_data", "params": { "currency": "BTC", "start_timestamp": 1599373800000, "end_timestamp": 1599376800000, "resolution": "60" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves volatility index (VIX) chart data formatted as candles. Volatility indexes measure market expectations of future volatility and are useful for risk assessment and trading strategies.\n\nUse the `vix_resolution` parameter to specify the candle interval. The data shows historical volatility index values over time and is formatted for use in charting applications.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_volatility_index_data)\n\n", "x-mint": { "metadata": { "title": "public/get_volatility_index_data", "og:title": "public/get_volatility_index_data", "keywords": [ "public/get_volatility_index_data", "currency", "start_timestamp", "end_timestamp", "resolution", "data", "continuation" ] }, "href": "/api-reference/market-data/public-get_volatility_index_data" } } }, "/public/ticker": { "get": { "tags": [ "Market Data", "Public" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTickerResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8106, "method": "public/ticker", "params": { "instrument_name": "BTC-PERPETUAL" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the ticker (24-hour statistics) for a specific instrument. The ticker includes the last trade price, best bid/ask prices, 24-hour high/low, 24-hour volume, open interest, mark price, and other market statistics.\n\nThis is a lightweight method for getting current market data for a single instrument. For real-time updates, consider using WebSocket subscriptions to ticker channels.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fticker)\n\n", "x-mint": { "metadata": { "title": "public/ticker", "og:title": "public/ticker", "keywords": [ "public/ticker", "instrument_name", "timestamp", "state", "stats", "open_interest", "best_bid_price", "best_bid_amount", "best_ask_price", "best_ask_amount", "index_price", "min_price", "max_price", "mark_price", "last_price", "underlying_price", "underlying_index", "interest_rate", "bid_iv", "ask_iv", "mark_iv", "greeks", "funding_8h", "current_funding", "interest_value", "delivery_price", "settlement_price", "estimated_delivery_price", "volume", "low", "high", "price_change", "volume_usd", "delta", "gamma", "rho", "theta", "vega" ] }, "href": "/api-reference/market-data/public-ticker" } } }, "/public/get_delivery_prices": { "get": { "parameters": [ { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "Index identifier, matches (base) cryptocurrency with quote currency" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" } ], "tags": [ "Market Data" ], "responses": { "200": { "$ref": "#/components/responses/PublicGetDeliveryPricesResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3601, "method": "public/get_delivery_prices", "params": { "index_name": "btc_usd", "offset": 0, "count": 5 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves historical delivery prices for a given index. Delivery prices are the settlement prices used when futures or options contracts expire and are settled.\n\nResults can be paginated using the `offset` and `count` parameters. This method is useful for analyzing historical settlement prices and understanding how contracts have been settled over time.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_delivery_prices)\n\n", "x-mint": { "metadata": { "title": "public/get_delivery_prices", "og:title": "public/get_delivery_prices", "keywords": [ "public/get_delivery_prices", "index_name", "offset", "count", "records_total", "data", "date", "delivery_price" ] }, "href": "/api-reference/market-data/public-get_delivery_prices" } } }, "/public/set_heartbeat": { "get": { "parameters": [ { "in": "query", "name": "interval", "required": true, "schema": { "example": 30, "type": "number" }, "description": "The heartbeat interval in seconds, but not less than 10" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "tags": [ "Session Management", "Public", "WebSocket Only" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9098, "method": "public/set_heartbeat", "params": { "interval": 30 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Signals the WebSocket connection to send and request heartbeats. Heartbeats can be used to detect stale connections.\n\nWhen heartbeats have been set up, the API server will send `heartbeat` messages and `test_request` messages. Your software should respond to `test_request` messages by sending a `/api/v2/public/test` request. If your software fails to do so, the API server will immediately close the connection. If your account is configured to cancel on disconnect, any orders opened over the connection will be cancelled.\n\n**WebSocket Only:** This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fset_heartbeat)\n\n", "x-mint": { "metadata": { "title": "public/set_heartbeat", "og:title": "public/set_heartbeat", "keywords": [ "public/set_heartbeat", "interval" ] }, "href": "/api-reference/session-management/public-set_heartbeat" } } }, "/public/disable_heartbeat": { "get": { "tags": [ "Session Management", "WebSocket Only", "Public" ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3562, "method": "public/disable_heartbeat", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Stop sending heartbeat messages. This method takes no parameters.\n\n**WebSocket Only:** This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fdisable_heartbeat)\n\n", "x-mint": { "metadata": { "title": "public/disable_heartbeat", "og:title": "public/disable_heartbeat", "keywords": [ "public/disable_heartbeat" ] }, "href": "/api-reference/session-management/public-disable_heartbeat" } } }, "/private/enable_cancel_on_disconnect": { "get": { "tags": [ "Session Management", "Private" ], "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "connection", "account" ] }, "description": "Specifies if Cancel On Disconnect change should be applied/checked for the current connection or the account (default - `connection`)

**NOTICE:** Scope `connection` can be used only when working via Websocket." } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7859, "method": "private/enable_cancel_on_disconnect", "params": { "scope": "account" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Enable Cancel On Disconnect for the connection. After enabling, all orders created via this connection will be automatically cancelled when the connection is closed.\n\nCancel is triggered in the following cases: when the TCP connection is properly terminated, when the connection is closed due to 10 minutes of inactivity, or when a heartbeat detects a disconnection. To reduce the inactivity timeout, consider using [public/set_heartbeat](https://docs.deribit.com/api-reference/session-management/public-set_heartbeat).\n\n**Note:** If the connection is gracefully closed using [private/logout](https://docs.deribit.com/api-reference/authentication/private-logout), cancel-on-disconnect will **not** be triggered.\n\n**Notice:** Cancel-on-Disconnect does not affect orders created by other connections - they will remain active! When change is applied on the `account` scope, then every newly opened connection will start with **active** Cancel on Disconnect.\n\n**WebSocket Only:** This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fenable_cancel_on_disconnect)\n\n", "x-mint": { "metadata": { "title": "private/enable_cancel_on_disconnect", "og:title": "private/enable_cancel_on_disconnect", "keywords": [ "private/enable_cancel_on_disconnect", "scope" ] }, "href": "/api-reference/session-management/private-enable_cancel_on_disconnect" } } }, "/private/disable_cancel_on_disconnect": { "get": { "tags": [ "Session Management", "Private" ], "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "connection", "account" ] }, "description": "Specifies if Cancel On Disconnect change should be applied/checked for the current connection or the account (default - `connection`)

**NOTICE:** Scope `connection` can be used only when working via Websocket." } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1569, "method": "private/disable_cancel_on_disconnect", "params": { "scope": "account" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Disable Cancel On Disconnect for the connection.\n\nWhen change is applied for the account, then every newly opened connection will start with **inactive** Cancel on Disconnect.\n\n**WebSocket Only:** This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.\n\n**Scope:** `account:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fdisable_cancel_on_disconnect)\n\n", "x-mint": { "metadata": { "title": "private/disable_cancel_on_disconnect", "og:title": "private/disable_cancel_on_disconnect", "keywords": [ "private/disable_cancel_on_disconnect", "scope" ] }, "href": "/api-reference/session-management/private-disable_cancel_on_disconnect" } } }, "/private/get_cancel_on_disconnect": { "get": { "tags": [ "Session Management", "Private" ], "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "connection", "account" ] }, "description": "Specifies if Cancel On Disconnect change should be applied/checked for the current connection or the account (default - `connection`)

**NOTICE:** Scope `connection` can be used only when working via Websocket." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetCancelOnDisconnectResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 220, "method": "private/get_cancel_on_disconnect", "params": { "scope": "account" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Read current Cancel On Disconnect configuration for the account.\n\n**Scope:** `account:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_cancel_on_disconnect)\n\n", "x-mint": { "metadata": { "title": "private/get_cancel_on_disconnect", "og:title": "private/get_cancel_on_disconnect", "keywords": [ "private/get_cancel_on_disconnect", "scope", "enabled" ] }, "href": "/api-reference/session-management/private-get_cancel_on_disconnect" } } }, "/public/subscribe": { "get": { "tags": [ "Subscription Management", "Public", "WebSocket Only" ], "parameters": [ { "name": "channels", "in": "query", "schema": { "type": "array", "items": { "type": "string", "example": "deribit_price_index.btc_usd" }, "example": [ "deribit_price_index.btc_usd" ] }, "required": true, "description": "A list of channels to subscribe to. See [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications) for all available channels.", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubscribeResponse" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3600, "method": "public/subscribe", "params": { "channels": [ "deribit_price_index.btc_usd" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Subscribe to one or more channels. This is the same method as `/private/subscribe`, but it can only be used for 'public' channels.\n\nFor a complete list of available subscription channels and their notification formats, see [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications).\n\n**Note - This method has distinct API rate limiting requirements:** Sustained rate: ~3.3 requests/second. For more information, see [Rate Limits](https://docs.deribit.com/articles/rate-limits).\n\n**📖 Related Article:** [Market Data Collection Best Practices](https://docs.deribit.com/articles/market-data-collection-best-practices)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fsubscribe)\n\n", "x-mint": { "metadata": { "title": "public/subscribe", "og:title": "public/subscribe", "keywords": [ "public/subscribe", "channels" ] }, "href": "/api-reference/subscription-management/public-subscribe" } } }, "/public/unsubscribe": { "get": { "tags": [ "Subscription Management", "Public", "WebSocket Only" ], "parameters": [ { "name": "channels", "in": "query", "schema": { "type": "array", "items": { "type": "string", "example": "deribit_price_index.btc_usd" }, "example": [ "deribit_price_index.btc_usd" ] }, "required": true, "description": "A list of channels to unsubscribe from. Only successfully unsubscribed channels will be returned in the result. See [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications) for all available channels.", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/Getunsubscribe200response" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8691, "method": "public/unsubscribe", "params": { "channels": [ "deribit_price_index.btc_usd" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Unsubscribe from one or more channels. The response contains only the channels that were successfully unsubscribed in this request.\n\nFor a complete list of available subscription channels and their notification formats, see [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications).\n\n**Note:** The `result` field in the response contains only the channels that were successfully processed and unsubscribed from this specific request. It does not include all previously subscribed topics. If a channel in the request is invalid, not subscribed, or fails validation, it will not appear in the result.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Funsubscribe)\n\n", "x-mint": { "metadata": { "title": "public/unsubscribe", "og:title": "public/unsubscribe", "keywords": [ "public/unsubscribe", "channels" ] }, "href": "/api-reference/subscription-management/public-unsubscribe" } } }, "/public/unsubscribe_all": { "get": { "tags": [ "Subscription Management", "WebSocket Only", "Public" ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 153, "method": "public/unsubscribe_all", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Unsubscribe from all the channels subscribed so far. This method takes no parameters.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Funsubscribe_all)\n\n", "x-mint": { "metadata": { "title": "public/unsubscribe_all", "og:title": "public/unsubscribe_all", "keywords": [ "public/unsubscribe_all" ] }, "href": "/api-reference/subscription-management/public-unsubscribe_all" } } }, "/private/subscribe": { "get": { "tags": [ "Subscription Management", "Private", "WebSocket Only" ], "parameters": [ { "name": "channels", "in": "query", "schema": { "type": "array", "items": { "type": "string", "example": "deribit_price_index.btc_usd" }, "example": [ "deribit_price_index.btc_usd" ] }, "required": true, "description": "A list of channels to subscribe to. See [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications) for all available channels.", "style": "form", "explode": true }, { "name": "label", "in": "query", "required": false, "schema": { "type": "string", "example": "TestLabel1" }, "description": "Optional label which will be added to notifications of private channels (max 16 characters)." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubscribeResponse" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4235, "method": "private/subscribe", "params": { "channels": [ "deribit_price_index.btc_usd" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Subscribe to one or more channels. The name of the channel determines what information will be provided, and in what form.\n\nFor a complete list of available subscription channels and their notification formats, see [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications).\n\n**Note - This method has distinct API rate limiting requirements:** Sustained rate: ~3.3 requests/second. For more information, see [Rate Limits](https://docs.deribit.com/articles/rate-limits).\n\n**📖 Related Article:** [Market Data Collection Best Practices](https://docs.deribit.com/articles/market-data-collection-best-practices)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsubscribe)\n\n", "x-mint": { "metadata": { "title": "private/subscribe", "og:title": "private/subscribe", "keywords": [ "private/subscribe", "channels", "label" ] }, "href": "/api-reference/subscription-management/private-subscribe" } } }, "/private/unsubscribe": { "get": { "tags": [ "Subscription Management", "Private", "WebSocket Only" ], "parameters": [ { "name": "channels", "in": "query", "schema": { "type": "array", "items": { "type": "string", "example": "deribit_price_index.btc_usd" }, "example": [ "deribit_price_index.btc_usd" ] }, "required": true, "description": "A list of channels to unsubscribe from. Only successfully unsubscribed channels will be returned in the result. See [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications) for all available channels.", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/Getunsubscribe200response" }, "401": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3370, "method": "private/unsubscribe", "params": { "channels": [ "deribit_price_index.btc_usd" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Unsubscribe from one or more channels. The response contains only the channels that were successfully unsubscribed in this request.\n\nFor a complete list of available subscription channels and their notification formats, see [Notifications and Subscriptions](https://docs.deribit.com/articles/notifications).\n\n**Note:** The `result` field in the response contains only the channels that were successfully processed and unsubscribed from this specific request. It does not include all previously subscribed topics. If a channel in the request is invalid, not subscribed, or fails validation, it will not appear in the result.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Funsubscribe)\n\n", "x-mint": { "metadata": { "title": "private/unsubscribe", "og:title": "private/unsubscribe", "keywords": [ "private/unsubscribe", "channels" ] }, "href": "/api-reference/subscription-management/private-unsubscribe" } } }, "/private/unsubscribe_all": { "get": { "tags": [ "Subscription Management", "WebSocket Only", "Private" ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 154, "method": "private/unsubscribe_all", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Unsubscribe from all the channels subscribed so far. This method takes no parameters.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Funsubscribe_all)\n\n", "x-mint": { "metadata": { "title": "private/unsubscribe_all", "og:title": "private/unsubscribe_all", "keywords": [ "private/unsubscribe_all" ] }, "href": "/api-reference/subscription-management/private-unsubscribe_all" } } }, "/public/hello": { "get": { "parameters": [ { "name": "client_name", "in": "query", "schema": { "type": "string", "example": "My Trading Software" }, "required": true, "description": "Client software name" }, { "name": "client_version", "in": "query", "schema": { "type": "string", "example": "1.0.2" }, "required": true, "description": "Client software version" } ], "responses": { "200": { "$ref": "#/components/responses/PublicTestResponse" } }, "tags": [ "Supporting", "Public", "WebSocket Only" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2841, "method": "public/hello", "params": { "client_name": "My Trading Software", "client_version": "1.0.2" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Method used to introduce the client software connected to Deribit platform over websocket. Provided data may have an impact on the maintained connection and will be collected for internal statistical purposes. In response, Deribit will also introduce itself.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fhello)\n\n", "x-mint": { "metadata": { "title": "public/hello", "og:title": "public/hello", "keywords": [ "public/hello", "client_name", "client_version", "version" ] }, "href": "/api-reference/supporting/public-hello" } } }, "/public/status": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PublicStatusResponse" } }, "tags": [ "Supporting", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 55, "method": "public/status", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Method used to get information about locked currencies\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fstatus)\n\n", "x-mint": { "metadata": { "title": "public/status", "og:title": "public/status", "keywords": [ "public/status", "locked", "locked_indices" ] }, "href": "/api-reference/supporting/public-status" } } }, "/public/test": { "get": { "parameters": [ { "in": "query", "name": "expected_result", "required": false, "schema": { "type": "string", "enum": [ "exception" ] }, "description": "The value \"exception\" will trigger an error response. This may be useful for testing wrapper libraries." } ], "responses": { "200": { "$ref": "#/components/responses/PublicTestResponse" } }, "tags": [ "Supporting", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8212, "method": "public/test", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Tests the connection to the API server, and returns its version. You can use this to make sure the API is reachable, and matches the expected version.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Ftest)\n\n", "x-mint": { "metadata": { "title": "public/test", "og:title": "public/test", "keywords": [ "public/test", "expected_result", "version" ] }, "href": "/api-reference/supporting/public-test" } } }, "/public/get_time": { "get": { "parameters": [], "responses": { "200": { "$ref": "#/components/responses/PublicGetTimeResponse" } }, "tags": [ "Supporting", "Public" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7365, "method": "public/get_time", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_time)\n\n", "x-mint": { "metadata": { "title": "public/get_time", "og:title": "public/get_time", "keywords": [ "public/get_time" ] }, "href": "/api-reference/supporting/public-get_time" } } }, "/private/get_settlement_history_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "in": "query", "name": "type", "required": false, "schema": { "$ref": "#/components/schemas/settlement_type" }, "description": "Settlement type" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "in": "query", "name": "search_start_timestamp", "required": false, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The latest timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSettlementResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8304, "method": "private/get_settlement_history_by_currency", "params": { "currency": "BTC", "type": "delivery", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves settlement, delivery, and bankruptcy events that have affected your account for a specific currency. Settlements occur when futures or options contracts expire and are settled at the delivery price.\n\nResults can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This data is useful for tracking account-affecting settlement events and understanding how contract expirations impact your account.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_settlement_history_by_currency)\n\n", "x-mint": { "metadata": { "title": "private/get_settlement_history_by_currency", "og:title": "private/get_settlement_history_by_currency", "keywords": [ "private/get_settlement_history_by_currency", "currency", "type", "count", "continuation", "search_start_timestamp", "settlements", "funding", "funded", "index_price", "instrument_name", "mark_price", "position", "profit_loss", "session_bankruptcy", "session_profit_loss", "session_tax", "session_tax_rate", "socialized", "timestamp" ] }, "href": "/api-reference/trading/private-get_settlement_history_by_currency" } } }, "/private/get_settlement_history_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "in": "query", "name": "type", "required": false, "schema": { "$ref": "#/components/schemas/settlement_type" }, "description": "Settlement type" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "in": "query", "name": "search_start_timestamp", "required": false, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The latest timestamp to return result from (milliseconds since the UNIX epoch)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSettlementResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2192, "method": "private/get_settlement_history_by_instrument", "params": { "instrument_name": "ETH-22FEB19", "type": "settlement", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves settlement, delivery, and bankruptcy events for a specific instrument that have affected your account. Settlements occur when futures or options contracts expire and are settled at the delivery price.\n\nResults can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This method is useful for tracking settlement events for a specific instrument.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_settlement_history_by_instrument)\n\n", "x-mint": { "metadata": { "title": "private/get_settlement_history_by_instrument", "og:title": "private/get_settlement_history_by_instrument", "keywords": [ "private/get_settlement_history_by_instrument", "instrument_name", "type", "count", "continuation", "search_start_timestamp", "settlements", "funding", "funded", "index_price", "mark_price", "position", "profit_loss", "session_bankruptcy", "session_profit_loss", "session_tax", "session_tax_rate", "socialized", "timestamp" ] }, "href": "/api-reference/trading/private-get_settlement_history_by_instrument" } } }, "/private/get_order_history_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" }, { "name": "include_old", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result orders older than 2 days, default - `false`" }, { "name": "include_unfilled", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result fully unfilled closed orders, default - `false`" }, { "name": "with_continuation", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "When set to true, the API response format changes from a simple list of orders to an object containing the orders and a continuation token." }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOrderHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1032, "method": "private/get_order_history_by_instrument", "params": { "instrument_name": "BTC-PERPETUAL", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the order history for a specific instrument. The history includes orders that have been partially or fully filled, as well as cancelled orders (if `include_unfilled_orders` is set to true).\n\nResults can be paginated using `offset` and `count` parameters, or using continuation tokens. Use `include_old_orders` to include orders from before a certain date, and `historical` to retrieve historical order data.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_order_history_by_instrument)\n\n", "x-mint": { "metadata": { "title": "private/get_order_history_by_instrument", "og:title": "private/get_order_history_by_instrument", "keywords": [ "private/get_order_history_by_instrument", "instrument_name", "count", "offset", "include_old", "include_unfilled", "with_continuation", "continuation", "historical", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_order_history_by_instrument" } } }, "/private/get_order_history_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" }, { "name": "include_old", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result orders older than 2 days, default - `false`" }, { "name": "include_unfilled", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result fully unfilled closed orders, default - `false`" }, { "name": "with_continuation", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "When set to true, the API response format changes from a simple list of orders to an object containing the orders and a continuation token." }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOrderHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9305, "method": "private/get_order_history_by_currency", "params": { "currency": "BTC", "kind": "future", "count": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the order history for a specific currency. The history includes orders that have been partially or fully filled, as well as cancelled orders (if `include_unfilled_orders` is set to true).\n\nResults can be filtered by instrument kind and paginated using `offset` and `count` parameters, or using continuation tokens. Use `include_old_orders` to include orders from before a certain date, and `historical` to retrieve historical order data.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_order_history_by_currency)\n\n", "x-mint": { "metadata": { "title": "private/get_order_history_by_currency", "og:title": "private/get_order_history_by_currency", "keywords": [ "private/get_order_history_by_currency", "currency", "kind", "count", "offset", "include_old", "include_unfilled", "with_continuation", "continuation", "historical", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_order_history_by_currency" } } }, "/private/get_order_state": { "get": { "tags": [ "Trading", "Private" ], "parameters": [ { "in": "query", "name": "order_id", "required": true, "schema": { "$ref": "#/components/schemas/order_id" }, "description": "The order id" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOrderStateResponse" }, "400": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4316, "method": "private/get_order_state", "params": { "order_id": "ETH-331562" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the current state of an order identified by its order ID. The response includes order details such as status (open, filled, cancelled), filled amount, remaining amount, price, and other order properties.\n\n**Important Note for Mass Quotes:** Quote orders are order-like structures that don't fully translate to normal orders. When checking order state for quotes, the `amount` field represents the remaining amount, not the original order amount.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_order_state)\n\n", "x-mint": { "metadata": { "title": "private/get_order_state", "og:title": "private/get_order_state", "keywords": [ "private/get_order_state", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_order_state" } } }, "/private/get_order_state_by_label": { "get": { "tags": [ "Trading", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOrderStateByLabelResponse" }, "400": { "$ref": "#/components/responses/ErrorMessageResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4316, "method": "private/get_order_state_by_label", "params": { "currency": "ETH", "label": "fooBar" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the state of recent orders that have a specific label. This is useful for tracking orders that share the same label, which is helpful for managing related orders.\n\nResults are filtered by currency and label. The response includes order details such as status, filled amount, remaining amount, and other order properties for all orders with the specified label.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_order_state_by_label)\n\n", "x-mint": { "metadata": { "title": "private/get_order_state_by_label", "og:title": "private/get_order_state_by_label", "keywords": [ "private/get_order_state_by_label", "currency", "label", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_order_state_by_label" } } }, "/private/get_open_orders": { "get": { "parameters": [ { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, if not provided instruments of all kinds are considered" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/order_type2" }, "description": "Order type, default - `all`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOpenOrdersResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1953, "method": "private/get_open_orders", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a list of all open orders for the authenticated account across all currencies. Open orders are orders that have been placed but not yet filled or cancelled.\n\nResults can be filtered by instrument kind and order type. This method provides a comprehensive view of all active orders.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders)\n\n", "x-mint": { "metadata": { "title": "private/get_open_orders", "og:title": "private/get_open_orders", "keywords": [ "private/get_open_orders", "kind", "type", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_open_orders" } } }, "/private/get_open_orders_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/order_type2" }, "description": "Order type, default - `all`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOpenOrdersResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8442, "method": "private/get_open_orders_by_instrument", "params": { "instrument_name": "ETH-22FEB19-120-C" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a list of all open orders for a specific instrument. Open orders are orders that have been placed but not yet filled or cancelled.\n\nResults can be filtered by order type. This method is useful for checking active orders for a particular instrument.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders_by_instrument)\n\n", "x-mint": { "metadata": { "title": "private/get_open_orders_by_instrument", "og:title": "private/get_open_orders_by_instrument", "keywords": [ "private/get_open_orders_by_instrument", "instrument_name", "type", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_open_orders_by_instrument" } } }, "/private/get_open_orders_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, if not provided instruments of all kinds are considered" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/order_type2" }, "description": "Order type, default - `all`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOpenOrdersResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1953, "method": "private/get_open_orders_by_currency", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a list of all open orders for a specific currency. Open orders are orders that have been placed but not yet filled or cancelled.\n\nResults can be filtered by instrument kind and order type. This method provides a view of all active orders within a currency.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders_by_currency)\n\n", "x-mint": { "metadata": { "title": "private/get_open_orders_by_currency", "og:title": "private/get_open_orders_by_currency", "keywords": [ "private/get_open_orders_by_currency", "currency", "kind", "type", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_open_orders_by_currency" } } }, "/private/get_open_orders_by_label": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOpenOrdersResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1953, "method": "private/get_open_orders_by_label", "params": { "currency": "BTC", "label": "fooBar" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a list of all open orders that have a specific label within a given currency. This is useful for tracking and managing groups of related orders that share the same label.\n\nOpen orders are orders that have been placed but not yet filled or cancelled. The label helps organize and identify related orders.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders_by_label)\n\n", "x-mint": { "metadata": { "title": "private/get_open_orders_by_label", "og:title": "private/get_open_orders_by_label", "keywords": [ "private/get_open_orders_by_label", "currency", "label", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-get_open_orders_by_label" } } }, "/private/get_order_margin_by_ids": { "get": { "parameters": [ { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "example": "123456" }, "example": [ "ETH-349280", "ETH-349279", "ETH-349278" ] }, "description": "Ids of orders", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetOrderMarginByIdsResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5625, "method": "private/get_order_margin_by_ids", "params": { "ids": [ "ETH-349280", "ETH-349279", "ETH-349278" ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the initial margin requirements for one or more orders identified by their order IDs. Initial margin is the amount of funds required to open a position with these orders.\n\nThis method is useful for calculating margin requirements before placing orders, helping to ensure sufficient funds are available.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_order_margin_by_ids)\n\n", "x-mint": { "metadata": { "title": "private/get_order_margin_by_ids", "og:title": "private/get_order_margin_by_ids", "keywords": [ "private/get_order_margin_by_ids", "ids", "order_id", "initial_margin", "initial_margin_currency" ] }, "href": "/api-reference/trading/private-get_order_margin_by_ids" } } }, "/private/get_trigger_order_history": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "instrument_name", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetTriggerOrderHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2552, "method": "private/get_trigger_order_history", "params": { "currency": "ETH", "count": 10 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves a detailed log of all trigger orders (stop orders, take-profit orders, etc.) for the authenticated account. The log includes trigger order creation, activation, execution, and cancellation events.\n\nResults can be filtered by currency and instrument name. Use pagination parameters (`count` and `continuation`) to retrieve large trigger order histories. This is useful for tracking trigger order activity and debugging trigger order behavior.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_trigger_order_history)\n\n", "x-mint": { "metadata": { "title": "private/get_trigger_order_history", "og:title": "private/get_trigger_order_history", "keywords": [ "private/get_trigger_order_history", "currency", "instrument_name", "count", "continuation", "entries", "timestamp", "trigger", "trigger_price", "trigger_offset", "trigger_order_id", "order_id", "order_state", "request", "direction", "price", "amount", "last_update_timestamp", "reduce_only", "post_only", "order_type", "label", "is_secondary_oto", "oco_ref", "source" ] }, "href": "/api-reference/trading/private-get_trigger_order_history" } } }, "/private/get_user_trades_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the first trade to be returned" }, { "name": "end_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the last trade to be returned" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserTradesHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5728, "method": "private/get_user_trades_by_instrument", "params": { "instrument_name": "ETH-PERPETUAL", "start_seq": 1966042, "count": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest user trades that have occurred for a specific instrument. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID.\n\nResults can be filtered by sequence number range or timestamp range. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID). Use `historical` to retrieve historical trade data.\n\nMain accounts may use the `subaccount_id` parameter to retrieve trade data for a specific subaccount (requires `mainaccount` scope).\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_instrument)\n\n", "x-mint": { "metadata": { "title": "private/get_user_trades_by_instrument", "og:title": "private/get_user_trades_by_instrument", "keywords": [ "private/get_user_trades_by_instrument", "instrument_name", "start_seq", "end_seq", "count", "start_timestamp", "end_timestamp", "historical", "sorting", "subaccount_id", "trades", "has_more", "trade_id", "trade_seq", "timestamp", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-get_user_trades_by_instrument" } } }, "/private/get_user_trades_by_instrument_and_time": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserTradesHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 276, "method": "private/get_user_trades_by_instrument_and_time", "params": { "instrument_name": "BTC-PERPETUAL", "start_timestamp": 1590470872894, "end_timestamp": 1590480872894, "count": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest user trades that have occurred for a specific instrument within a specified time range. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID.\n\nUse the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID). Use `historical` to retrieve historical trade data. This method is useful for analyzing trading activity over specific time periods.\n\nMain accounts may use the `subaccount_id` parameter to retrieve trade data for a specific subaccount (requires `mainaccount` scope).\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_instrument_and_time)\n\n", "x-mint": { "metadata": { "title": "private/get_user_trades_by_instrument_and_time", "og:title": "private/get_user_trades_by_instrument_and_time", "keywords": [ "private/get_user_trades_by_instrument_and_time", "instrument_name", "start_timestamp", "end_timestamp", "count", "sorting", "historical", "subaccount_id", "trades", "has_more", "trade_id", "trade_seq", "timestamp", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-get_user_trades_by_instrument_and_time" } } }, "/private/get_user_trades_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the first trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the last trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, { "name": "subaccount_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "The user id for the subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserTradesHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9367, "method": "private/get_user_trades_by_currency", "params": { "currency": "ETH", "start_id": "ETH-34066", "count": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest user trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID for all instruments in the currency.\n\nResults can be filtered by instrument kind, trade ID range, or timestamp range. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order. To retrieve trades for a specific subaccount, use the `subaccount_id` parameter. Use `historical` to retrieve historical trade data.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_currency)\n\n", "x-mint": { "metadata": { "title": "private/get_user_trades_by_currency", "og:title": "private/get_user_trades_by_currency", "keywords": [ "private/get_user_trades_by_currency", "currency", "kind", "start_id", "end_id", "count", "start_timestamp", "end_timestamp", "sorting", "historical", "subaccount_id", "trades", "has_more", "trade_id", "trade_seq", "instrument_name", "timestamp", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-get_user_trades_by_currency" } } }, "/private/get_user_trades_by_currency_and_time": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserTradesHistoryResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9292, "method": "private/get_user_trades_by_currency_and_time", "params": { "currency": "BTC", "start_timestamp": 1590480630731, "end_timestamp": 1510480630731, "count": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the latest user trades that have occurred for instruments in a specific currency within a specified time range. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID for all instruments in the currency.\n\nResults can be filtered by instrument kind. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order. Use `historical` to retrieve historical trade data. This method is useful for analyzing trading activity across a currency over specific time periods.\n\nMain accounts may use the `subaccount_id` parameter to retrieve trade data for a specific subaccount (requires `mainaccount` scope).\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_currency_and_time)\n\n", "x-mint": { "metadata": { "title": "private/get_user_trades_by_currency_and_time", "og:title": "private/get_user_trades_by_currency_and_time", "keywords": [ "private/get_user_trades_by_currency_and_time", "currency", "kind", "start_timestamp", "end_timestamp", "count", "sorting", "historical", "subaccount_id", "trades", "has_more", "trade_id", "trade_seq", "instrument_name", "timestamp", "order_type", "advanced", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "contracts", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "label", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "reduce_only", "post_only", "mmp", "risk_reducing", "api", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "quote_set_id", "quote_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-get_user_trades_by_currency_and_time" } } }, "/private/get_user_trades_by_order": { "get": { "parameters": [ { "in": "query", "name": "order_id", "required": true, "schema": { "$ref": "#/components/schemas/order_id" }, "description": "The order id" }, { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" } ], "tags": [ "Trading", "Private" ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetUserTradesByOrderResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3466, "method": "private/get_user_trades_by_order", "params": { "order_id": "ETH-584830574" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves all trades that were executed from a specific order. When an order is filled, it may result in multiple trades (partial fills). This method returns all trades associated with a given order ID.\n\nResults can be sorted in ascending or descending order by trade ID. Use `historical` to retrieve historical trade data. This is useful for tracking how an order was filled and analyzing execution quality.\n\nMain accounts may use the `subaccount_id` parameter to retrieve trade data for a specific subaccount (requires `mainaccount` scope).\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_order)\n\n", "x-mint": { "metadata": { "title": "private/get_user_trades_by_order", "og:title": "private/get_user_trades_by_order", "keywords": [ "private/get_user_trades_by_order", "order_id", "sorting", "historical", "subaccount_id" ] }, "href": "/api-reference/trading/private-get_user_trades_by_order" } } }, "/private/cancel_all": { "get": { "parameters": [ { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 8748, "method": "private/cancel_all", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all open orders and trigger orders for the authenticated account across all currencies and instrument kinds. This is a bulk cancellation operation useful for quickly clearing all active orders.\n\nUse the `detailed` parameter to receive a list of all cancelled orders. The `freeze_quotes` parameter can be used to freeze quotes instead of cancelling them.\n\n**Note:** This operation cannot be undone. All open orders will be permanently cancelled.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all", "og:title": "private/cancel_all", "keywords": [ "private/cancel_all", "detailed", "freeze_quotes" ] }, "href": "/api-reference/trading/private-cancel_all" } } }, "/private/cancel_all_by_instrument": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/simple_order_type" }, "description": "Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all`" }, { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "include_combos", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When set to `true` orders in combo instruments affecting a given position will also be cancelled. Default: `false`" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4122, "method": "private/cancel_all_by_instrument", "params": { "instrument_name": "ETH-22FEB19-120-P", "type": "all" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all open orders for a specific instrument. This is useful for quickly clearing all orders for a single instrument.\n\nOrders can be optionally filtered by order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders. The `include_combos` parameter can be used to include combo orders in the cancellation.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_instrument)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all_by_instrument", "og:title": "private/cancel_all_by_instrument", "keywords": [ "private/cancel_all_by_instrument", "instrument_name", "type", "detailed", "include_combos", "freeze_quotes" ] }, "href": "/api-reference/trading/private-cancel_all_by_instrument" } } }, "/private/cancel_all_by_currency": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/simple_order_type" }, "description": "Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all`" }, { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5663, "method": "private/cancel_all_by_currency", "params": { "currency": "BTC", "kind": "option" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all open orders for a specific currency. This is useful for quickly clearing all orders across multiple instruments in a currency.\n\nOrders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_currency)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all_by_currency", "og:title": "private/cancel_all_by_currency", "keywords": [ "private/cancel_all_by_currency", "currency", "kind", "type", "detailed", "freeze_quotes" ] }, "href": "/api-reference/trading/private-cancel_all_by_currency" } } }, "/private/cancel_all_by_currency_pair": { "get": { "parameters": [ { "name": "currency_pair", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "The currency pair symbol" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/simple_order_type" }, "description": "Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all`" }, { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5663, "method": "private/cancel_all_by_currency_pair", "params": { "currency_pair": "BTC_USD", "kind": "option" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all open orders for a specific currency pair. This is useful for quickly clearing all orders across instruments in a currency pair.\n\nOrders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_currency_pair)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all_by_currency_pair", "og:title": "private/cancel_all_by_currency_pair", "keywords": [ "private/cancel_all_by_currency_pair", "currency_pair", "kind", "type", "detailed", "freeze_quotes" ] }, "href": "/api-reference/trading/private-cancel_all_by_currency_pair" } } }, "/private/cancel_all_by_kind_or_type": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any_and_list" }, "description": "The currency symbol, list of currency symbols or `\"any\"` for all" }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/simple_order_type" }, "description": "Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all`" }, { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2, "method": "private/cancel_all_by_kind_or_type", "params": { "currency": [ "BTC", "ETH" ], "kind": "future" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all open orders in one or more currencies, optionally filtered by instrument kind and/or order type. This provides flexible bulk cancellation across multiple currencies.\n\nSpecify one or more currencies, and optionally filter by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_kind_or_type)\n\n", "x-mint": { "metadata": { "title": "private/cancel_all_by_kind_or_type", "og:title": "private/cancel_all_by_kind_or_type", "keywords": [ "private/cancel_all_by_kind_or_type", "currency", "kind", "type", "detailed", "freeze_quotes" ] }, "href": "/api-reference/trading/private-cancel_all_by_kind_or_type" } } }, "/private/cancel_by_label": { "get": { "parameters": [ { "name": "label", "in": "query", "schema": { "type": "string" }, "required": true, "description": "user defined label for the order (maximum 64 characters)" }, { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelAllResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 47, "method": "private/cancel_by_label", "params": { "label": "label" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels all orders (including trigger orders) that have a specific label. This is useful for managing groups of related orders that share the same label.\n\nOrders can be cancelled across all currencies or filtered to a specific currency. When cancelling by currency, the currency queue is used for processing.\n\n**Rate Limits:** When called without the `currency` parameter, this method is subject to `cancel_all` rate limits. Different rate limit values may apply for per-currency cancels versus calls without providing the currency parameter.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_by_label)\n\n", "x-mint": { "metadata": { "title": "private/cancel_by_label", "og:title": "private/cancel_by_label", "keywords": [ "private/cancel_by_label", "label", "currency" ] }, "href": "/api-reference/trading/private-cancel_by_label" } } }, "/private/cancel_quotes": { "get": { "parameters": [ { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." }, { "name": "cancel_type", "in": "query", "schema": { "enum": [ "delta", "quote_set_id", "instrument", "instrument_kind", "currency", "currency_pair", "all" ], "type": "string", "example": "delta" }, "required": true, "description": "Type of cancel criteria." }, { "name": "min_delta", "in": "query", "schema": { "type": "number", "example": 0.4 }, "required": false, "description": "Min delta to cancel by delta (for `cancel_type`: `delta`)." }, { "name": "max_delta", "in": "query", "schema": { "type": "number", "example": 0.6 }, "required": false, "description": "Max delta to cancel by delta (for `cancel_type`: `delta`)." }, { "name": "quote_set_id", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Unique identifier for the Quote set." }, { "name": "instrument_name", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Instrument name." }, { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "currency_pair", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "The currency pair symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelQuotesResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5663, "method": "private/cancel_quotes", "params": { "cancel_type": "delta", "min_delta": 0.4, "max_delta": 0.6 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels quotes (mass quote orders) based on various criteria. This method provides flexible options for cancelling quotes:\n\n- `delta`: Cancels quotes within a delta range defined by `min_delta` and `max_delta`\n- `quote_set_id`: Cancels quotes by a specific Quote Set identifier\n- `instrument`: Cancels all quotes associated with a particular instrument\n- `kind`: Cancels all quotes for a certain instrument kind\n- `currency`: Cancels all quotes in a specified currency\n- `currency_pair`: Cancels all quotes in a specified currency pair\n- `all`: Cancels all quotes\n\nUse the `detailed` parameter to receive a list of all cancelled quotes.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_quotes)\n\n", "x-mint": { "metadata": { "title": "private/cancel_quotes", "og:title": "private/cancel_quotes", "keywords": [ "private/cancel_quotes", "detailed", "freeze_quotes", "cancel_type", "min_delta", "max_delta", "quote_set_id", "instrument_name", "kind", "currency", "currency_pair" ] }, "href": "/api-reference/trading/private-cancel_quotes" } } }, "/private/cancel": { "get": { "parameters": [ { "in": "query", "name": "order_id", "required": true, "schema": { "$ref": "#/components/schemas/order_id" }, "description": "The order id" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateCancelResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 4214, "method": "private/cancel", "params": { "order_id": "ETH-SLIS-12" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels a specific order identified by its order ID. The order must be open (not yet filled or cancelled) to be cancelled successfully.\n\nOnce cancelled, the order is removed from the order book and cannot be restored. Any unfilled portion of the order will be cancelled.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel)\n\n", "x-mint": { "metadata": { "title": "private/cancel", "og:title": "private/cancel", "keywords": [ "private/cancel", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco" ] }, "href": "/api-reference/trading/private-cancel" } } }, "/private/buy": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "contracts", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ] }, "required": false, "description": "The order type, default: `\"limit\"`" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency (Only for limit and stop_limit orders)

When adding an order with advanced=usd, the field price should be the option price value in USD.

When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, { "name": "time_in_force", "in": "query", "schema": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ] }, "required": false, "description": "

Specifies how long the order remains in effect. Default `\"good_til_cancelled\"`

" }, { "name": "display_amount", "in": "query", "schema": { "type": "number", "default": 1 }, "required": false, "description": "Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well." }, { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread.

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, { "name": "reject_post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with `\"post_only\"` set to true

" }, { "name": "reduce_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, the order is considered reduce-only which is intended to only reduce a current position" }, { "name": "trigger_price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, { "name": "trigger_offset", "in": "query", "schema": { "type": "number" }, "required": false, "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, { "name": "trigger", "in": "query", "schema": { "$ref": "#/components/schemas/trigger" }, "required": false, "description": "Defines the trigger type. Required for `\"Stop-Loss\"`, `\"Take-Profit\"` and `\"Trailing\"` trigger orders" }, { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.)" }, { "name": "mmp", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "Order MMP flag, only for order_type 'limit'" }, { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." }, { "name": "linked_order_type", "in": "query", "schema": { "type": "string", "enum": [ "one_triggers_other", "one_cancels_other", "one_triggers_one_cancels_other" ] }, "required": false, "description": "

The type of the linked order.

" }, { "name": "trigger_fill_condition", "in": "query", "schema": { "type": "string", "enum": [ "first_hit", "complete_fill", "incremental" ], "default": "first_hit" }, "required": false, "description": "

The fill condition of the linked order (Only for linked order types), default: `first_hit`.

" }, { "name": "otoco_config", "in": "query", "schema": { "type": "array", "items": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" }, "type": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ], "description": "The order type, default: \"limit\"" }, "label": { "type": "string", "description": "user defined label for the order (maximum 64 characters)" }, "price": { "type": "number", "description": "The order price in base currency (Only for limit and stop_limit orders)" }, "reduce_only": { "type": "boolean", "default": false, "description": "If true, the order is considered reduce-only which is intended to only reduce a current position" }, "time_in_force": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ], "description": "Specifies how long the order remains in effect. Default \"good_til_cancelled\"" }, "post_only": { "type": "boolean", "default": false, "description": "If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (according to the direction of the order)." }, "reject_post_only": { "type": "boolean", "default": false, "description": "If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected." }, "trigger_price": { "type": "number", "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, "trigger_offset": { "type": "number", "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, "trigger": { "$ref": "#/components/schemas/trigger", "description": "Defines the trigger type. Required for \"Stop-Loss\", \"Take-Profit\" and \"Trailing\" trigger orders" } } } }, "description": "List of orders to create or cancel when this order is filled.", "style": "form", "explode": true, "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PrivateBuyAndSellResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5275, "method": "private/buy", "params": { "instrument_name": "ETH-PERPETUAL", "amount": 40, "type": "market", "label": "market0000234" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Places a buy order for an instrument. Supports various order types including limit, market, stop, and advanced order types (stop-limit, take-profit, take-profit-limit, trailing-stop, etc.).\n\nYou can specify order parameters such as price, quantity, time-in-force, post-only, reduce-only, and trigger conditions. Orders can be labeled for easier management and tracking.\n\n**📖 Related Article:** [Order Management Best Practices](https://docs.deribit.com/articles/order-management-best-practices)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fbuy)\n\n", "x-mint": { "metadata": { "title": "private/buy", "og:title": "private/buy", "keywords": [ "private/buy", "instrument_name", "amount", "contracts", "type", "label", "price", "time_in_force", "display_amount", "post_only", "reject_post_only", "reduce_only", "trigger_price", "trigger_offset", "trigger", "advanced", "mmp", "valid_until", "linked_order_type", "trigger_fill_condition", "otoco_config", "order", "trades", "order_id", "order_state", "order_type", "original_order_type", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "api", "web", "mobile", "refresh_amount", "filled_amount", "average_price", "implv", "usd", "triggered", "trigger_reference_price", "block_trade", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-buy" } } }, "/private/sell": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "contracts", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ] }, "required": false, "description": "The order type, default: `\"limit\"`" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency (Only for limit and stop_limit orders)

When adding an order with advanced=usd, the field price should be the option price value in USD.

When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, { "name": "time_in_force", "in": "query", "schema": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ] }, "required": false, "description": "

Specifies how long the order remains in effect. Default `\"good_til_cancelled\"`

" }, { "name": "display_amount", "in": "query", "schema": { "type": "number", "default": 1 }, "required": false, "description": "Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well." }, { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just above the spread.

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, { "name": "reject_post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with `\"post_only\"` set to true

" }, { "name": "reduce_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, the order is considered reduce-only which is intended to only reduce a current position" }, { "name": "trigger_price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, { "name": "trigger_offset", "in": "query", "schema": { "type": "number" }, "required": false, "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, { "name": "trigger", "in": "query", "schema": { "$ref": "#/components/schemas/trigger" }, "required": false, "description": "Defines the trigger type. Required for `\"Stop-Loss\"`, `\"Take-Profit\"` and `\"Trailing\"` trigger orders" }, { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.)" }, { "name": "mmp", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "Order MMP flag, only for order_type 'limit'" }, { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." }, { "name": "linked_order_type", "in": "query", "schema": { "type": "string", "enum": [ "one_triggers_other", "one_cancels_other", "one_triggers_one_cancels_other" ] }, "required": false, "description": "

The type of the linked order.

" }, { "name": "trigger_fill_condition", "in": "query", "schema": { "type": "string", "enum": [ "first_hit", "complete_fill", "incremental" ], "default": "first_hit" }, "required": false, "description": "

The fill condition of the linked order (Only for linked order types), default: `first_hit`.

" }, { "name": "otoco_config", "in": "query", "schema": { "type": "array", "items": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" }, "type": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ], "description": "The order type, default: \"limit\"" }, "label": { "type": "string", "description": "user defined label for the order (maximum 64 characters)" }, "price": { "type": "number", "description": "The order price in base currency (Only for limit and stop_limit orders)" }, "reduce_only": { "type": "boolean", "default": false, "description": "If true, the order is considered reduce-only which is intended to only reduce a current position" }, "time_in_force": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ], "description": "Specifies how long the order remains in effect. Default \"good_til_cancelled\"" }, "post_only": { "type": "boolean", "default": false, "description": "If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (according to the direction of the order)." }, "reject_post_only": { "type": "boolean", "default": false, "description": "If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected." }, "trigger_price": { "type": "number", "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, "trigger_offset": { "type": "number", "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, "trigger": { "$ref": "#/components/schemas/trigger", "description": "Defines the trigger type. Required for \"Stop-Loss\", \"Take-Profit\" and \"Trailing\" trigger orders" } } } }, "description": "List of orders to create or cancel when this order is filled.", "style": "form", "explode": true, "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PrivateBuyAndSellResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2148, "method": "private/sell", "params": { "instrument_name": "ETH-PERPETUAL", "amount": 123, "type": "stop_limit", "price": 145.61, "trigger_price": 145, "trigger": "last_price" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Places a sell order for an instrument. Supports various order types including limit, market, stop, and advanced order types (stop-limit, take-profit, take-profit-limit, trailing-stop, etc.).\n\nYou can specify order parameters such as price, quantity, time-in-force, post-only, reduce-only, and trigger conditions. Orders can be labeled for easier management and tracking. Market Maker Protection (MMP) can be enabled to prevent excessive quoting.\n\n**📖 Related Article:** [Order Management Best Practices](https://docs.deribit.com/articles/order-management-best-practices)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsell)\n\n", "x-mint": { "metadata": { "title": "private/sell", "og:title": "private/sell", "keywords": [ "private/sell", "instrument_name", "amount", "contracts", "type", "label", "price", "time_in_force", "display_amount", "post_only", "reject_post_only", "reduce_only", "trigger_price", "trigger_offset", "trigger", "advanced", "mmp", "valid_until", "linked_order_type", "trigger_fill_condition", "otoco_config", "order", "trades", "order_id", "order_state", "order_type", "original_order_type", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "api", "web", "mobile", "refresh_amount", "filled_amount", "average_price", "implv", "usd", "triggered", "trigger_reference_price", "block_trade", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-sell" } } }, "/private/edit": { "get": { "parameters": [ { "in": "query", "name": "order_id", "required": true, "schema": { "$ref": "#/components/schemas/order_id" }, "description": "The order id" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "contracts", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency.

When editing an option order with advanced=usd, the field price should be the option price value in USD.

When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, { "name": "reduce_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, the order is considered reduce-only which is intended to only reduce a current position" }, { "name": "reject_post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with `\"post_only\"` set to true

" }, { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options)" }, { "name": "trigger_price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, { "name": "trigger_offset", "in": "query", "schema": { "type": "number" }, "required": false, "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, { "name": "mmp", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "Order MMP flag, only for order_type 'limit'" }, { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." }, { "name": "display_amount", "in": "query", "schema": { "type": "number", "default": 1 }, "required": false, "description": "Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateEditResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3725, "method": "private/edit", "params": { "order_id": "438994", "amount": 4, "price": 222, "advanced": "implv" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Modifies an existing order by changing its price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type.\n\nThe order is identified by its order ID. Only open orders can be edited. Changes take effect immediately and may result in the order being filled if the new price matches the market.\n\n**📖 Related Article:** [Order Management Best Practices](https://docs.deribit.com/articles/order-management-best-practices)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit)\n\n", "x-mint": { "metadata": { "title": "private/edit", "og:title": "private/edit", "keywords": [ "private/edit", "order_id", "amount", "contracts", "price", "post_only", "reduce_only", "reject_post_only", "advanced", "trigger_price", "trigger_offset", "mmp", "valid_until", "display_amount", "order", "trades", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "label", "api", "web", "mobile", "refresh_amount", "filled_amount", "average_price", "implv", "usd", "triggered", "trigger", "trigger_reference_price", "block_trade", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-edit" } } }, "/private/edit_by_label": { "get": { "parameters": [ { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" }, { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "contracts", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency.

When editing an option order with advanced=usd, the field price should be the option price value in USD.

When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, { "name": "reduce_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, the order is considered reduce-only which is intended to only reduce a current position" }, { "name": "reject_post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with `\"post_only\"` set to true

" }, { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options)" }, { "name": "trigger_price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, { "name": "mmp", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "Order MMP flag, only for order_type 'limit'" }, { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateEditResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9, "method": "private/edit_by_label", "params": { "instrument_name": "BTC-PERPETUAL", "label": "i_love_deribit", "amount": 150, "price": 50111 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Modifies an order identified by its label. This method works only when there is exactly one open order with the specified label.\n\nYou can change the order's price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type. Changes take effect immediately.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit_by_label)\n\n", "x-mint": { "metadata": { "title": "private/edit_by_label", "og:title": "private/edit_by_label", "keywords": [ "private/edit_by_label", "label", "instrument_name", "amount", "contracts", "price", "post_only", "reduce_only", "reject_post_only", "advanced", "trigger_price", "mmp", "valid_until", "order", "trades", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "api", "web", "mobile", "refresh_amount", "display_amount", "filled_amount", "average_price", "implv", "usd", "triggered", "trigger", "trigger_offset", "trigger_reference_price", "block_trade", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-edit_by_label" } } }, "/private/close_position": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "limit", "market" ] }, "required": true, "description": "The order type" }, { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Optional price for limit order." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateBuyAndSellResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 6130, "method": "private/close_position", "params": { "instrument_name": "ETH-PERPETUAL", "type": "limit", "price": 145.17 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.\n\nYou can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position)\n\n", "x-mint": { "metadata": { "title": "private/close_position", "og:title": "private/close_position", "keywords": [ "private/close_position", "instrument_name", "type", "price", "order", "trades", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "creation_timestamp", "last_update_timestamp", "direction", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "mmp_group", "quote_set_id", "quote_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name" ] }, "href": "/api-reference/trading/private-close_position" } } }, "/private/get_margins": { "get": { "parameters": [ { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, { "in": "query", "name": "price", "required": true, "schema": { "type": "number", "example": 3725 }, "description": "Price" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetMarginsResponse" } }, "tags": [ "Trading", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7, "method": "private/get_margins", "params": { "instrument_name": "BTC-PERPETUAL", "amount": 10000, "price": 3725 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Calculates margin requirements for a hypothetical order on a given instrument. Returns initial margin and maintenance margin for the specified instrument, quantity, and price.\n\nThis method is useful for estimating margin requirements before placing an order, helping to ensure sufficient funds are available and understanding the margin impact of potential trades.\n\n**Scope:** `trade:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_margins)\n\n", "x-mint": { "metadata": { "title": "private/get_margins", "og:title": "private/get_margins", "keywords": [ "private/get_margins", "instrument_name", "amount", "price", "buy", "sell", "min_price", "max_price" ] }, "href": "/api-reference/trading/private-get_margins" } } }, "/private/get_mmp_config": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "index_name", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_derivative" }, "description": "Index identifier of derivative instrument on the platform; skipping this parameter will return all configurations" }, { "name": "mmp_group", "required": false, "in": "query", "schema": { "type": "string", "example": "MassQuoteBot7" }, "description": "Specifies the MMP group for which the configuration is being retrieved. MMP groups are used for Mass Quotes. If MMP group is not provided, the method returns the configuration for the MMP settings for regular orders. The `index_name` must be specified before using this parameter.\n\n**Note:** Leaving `mmp_group` empty is explicitly allowed and is the correct way to retrieve configuration for the orders MMP group. It is not an error or an incomplete request — omitting this field intentionally targets the default orders MMP group rather than any named mass quote group.\n\n**📖 Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications)\n" }, { "name": "block_rfq", "required": false, "in": "query", "schema": { "type": "boolean", "default": false }, "description": "If true, retrieves MMP configuration for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings.\n" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetMmpConfigResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7859, "method": "private/get_mmp_config", "params": { "index_name": "btc_usd", "mmp_group": "MassQuoteBot7" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves Market Maker Protection (MMP) configuration for an index. Returns all currently active MMP parameters for the selected index, including the interval, `frozen_time`, quantity/delta/vega limits, and `max_quote_quantity`.\n\nIf the `index_name` parameter is not provided, a list of all MMP configurations is returned. An empty list means no MMP configuration exists. This method is useful for verifying your configuration or confirming applied updates.\n\nFor Mass Quotes, specify the `mmp_group` parameter to retrieve configuration for a specific MMP group. If no group is provided, returns configuration for regular orders. Set `block_rfq` to `true` to retrieve MMP configuration for Block RFQ (requires `block_rfq:read` scope).\n\nEach entry in the response includes an `id` field (integer) that uniquely identifies the MMP group. This integer ID is the programmatic identifier for the group and can be used to reference it in contexts where the string `mmp_group` name is not accepted. Entries that have no `mmp_group` name in the response correspond to the orders MMP group (the default group).\n\n**📖 Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection)\n\n**Scope:** `trade:read` or `block_rfq:read` (when `block_rfq` = `true`)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_mmp_config)\n\n", "x-mint": { "metadata": { "title": "private/get_mmp_config", "og:title": "private/get_mmp_config", "keywords": [ "private/get_mmp_config", "index_name", "mmp_group", "block_rfq", "interval", "frozen_time", "quantity_limit", "delta_limit", "vega_limit", "max_quote_quantity", "trade_count_limit" ] }, "href": "/api-reference/trading/private-get_mmp_config" } } }, "/private/get_mmp_status": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "index_name", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_derivative" }, "description": "Index identifier of derivative instrument on the platform; skipping this parameter will return all configurations" }, { "name": "mmp_group", "required": false, "in": "query", "schema": { "type": "string", "example": "MassQuoteBot7" }, "description": "Specifies the MMP group for which the status is being retrieved. The `index_name` must be specified before using this parameter.\n\n**📖 Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications)\n" }, { "name": "block_rfq", "required": false, "in": "query", "schema": { "type": "boolean", "default": false }, "description": "If true, retrieves MMP status for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP status is completely separate from normal order/quote MMP status.\n" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetMmpStatusResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7851, "method": "private/get_mmp_status", "params": { "index_name": "btc_usd", "mmp_group": "MassQuoteBot7" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves Market Maker Protection (MMP) status for a triggered index or MMP group. Returns the live MMP state including whether MMP is enabled or triggered, remaining frozen time (if triggered), whether quoting is currently allowed, and any active freeze conditions.\n\nIf the `index_name` parameter is not provided, a list of all triggered MMP statuses is returned. This method lets you track whether protection is active and when quoting will resume.\n\nFor Mass Quotes, specify the `mmp_group` parameter to check status for a specific MMP group. Set `block_rfq` to `true` to retrieve MMP status for Block RFQ (requires `block_rfq:read` scope).\n\n**📖 Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection)\n\n**Scope:** `trade:read` or `block_rfq:read` (when `block_rfq` = `true`)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_mmp_status)\n\n", "x-mint": { "metadata": { "title": "private/get_mmp_status", "og:title": "private/get_mmp_status", "keywords": [ "private/get_mmp_status", "index_name", "mmp_group", "block_rfq", "frozen_until" ] }, "href": "/api-reference/trading/private-get_mmp_status" } } }, "/private/set_mmp_config": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_derivative" }, "description": "Index identifier of derivative instrument on the platform" }, { "name": "interval", "required": true, "in": "query", "schema": { "type": "integer", "minimum": 0, "maximum": 3600, "example": 60 }, "description": "The duration of the monitoring window in seconds. For example, an `interval` of `3` implies a 3-second window.\n\nThe `interval` begins after the first trade. If a new trade is executed after the `interval` has ended, a new `interval` is started, and counters reset. If a trade occurs during an already running `interval`, that `interval` continues unaffected.\n\nThis mechanism allows the platform to track activity in short, rolling windows to identify potentially risky trading behavior.\n\nIf set to `0`, MMP is removed.\n\nMaximum value: `3600` seconds (1 hour).\n" }, { "name": "frozen_time", "required": true, "in": "query", "schema": { "type": "integer", "minimum": 0, "maximum": 3600, "example": 0 }, "description": "Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted.\n\nIf you want to disable automatic reset, set `frozen_time` to `0`. In that case, a manual reset is required using the `private/reset_mmp` method.\n\nManual reset is also possible during the frozen time period.\n\nMaximum value: `3600` seconds (1 hour).\n" }, { "name": "mmp_group", "required": false, "in": "query", "schema": { "type": "string", "example": "MassQuoteBot7" }, "description": "Designates the MMP group for which the configuration is being set. If the specified group is already associated with a different `index_name`, an error is returned. This parameter enables distinct configurations for each MMP group, linked to particular `index_name`. Maximum 64 characters. Case sensitive. Cannot be empty string.\n\n**📖 Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications)\n" }, { "name": "quantity_limit", "required": false, "in": "query", "schema": { "type": "number", "example": 3 }, "description": "The total traded quantity, measured in units of the base currency (e.g., BTC in `BTC-PERPETUAL`), within the `interval`.\n\nThis count is direction-agnostic—a buy followed by a sell counts double.\n\nExample: Buy `10` BTC and sell `10` BTC = `20` total quantity.\n\nApplicable to both options and futures.\n\nPositive value with maximum 4 decimal places.\n" }, { "name": "delta_limit", "required": false, "in": "query", "schema": { "type": "number" }, "description": "The maximum allowable net transaction delta change during the `interval`.\n\nExpressed in units of base currency.\n\nThe `delta_limit` is treated as an absolute threshold: e.g., `delta_limit: 10` → MMP is triggered if net transaction delta exceeds `+10` or drops below `-10`.\n\nDirection matters: buying `+5` delta and selling `−5` delta cancels out if within the same `interval`.\n\n**Note:** Note that we use the net transaction delta instead of delta. Net Transaction Delta = `Delta - Mark Price`. In the rest of this document, \"delta\" actually refers to net transaction delta.\n\nPositive value with maximum 4 decimal places.\n" }, { "name": "vega_limit", "required": false, "in": "query", "schema": { "type": "number" }, "description": "The maximum change in vega exposure allowed within a given `interval`, measured in absolute terms.\n\nExpressed in USD, representing the change in sensitivity to implied volatility across executed trades.\n\nThis parameter is primarily relevant for options traders managing risk in volatile markets.\n\nSimilar to `delta_limit`, the `vega_limit` is direction-aware and evaluated on a net basis. If the exposure exceeds the set threshold (positively or negatively), MMP will be triggered.\n\n**Notice:** When evaluating Delta and Vega limits for MMP, Deribit uses the greeks at the moment of trade execution. The system does not re-evaluate Delta or Vega using live greeks at the time of MMP checking.\n\nPositive value with maximum 4 decimal places.\n" }, { "name": "max_quote_quantity", "required": true, "in": "query", "schema": { "type": "number", "example": 2.5 }, "description": "Maximum Quote Quantity (MQQ) in base currency. MQQ is configured per index but enforced per side, per order book (instrument) — the total combined size of open MMP orders per side per instrument cannot exceed MQQ. **See response description for detailed information about MQQ behavior and limitations.** Maximum 4 decimal places." }, { "name": "block_rfq", "required": false, "in": "query", "schema": { "type": "boolean", "default": false }, "description": "If true, configures MMP for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings.\n" }, { "name": "trade_count_limit", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "For Block RFQ only (`block_rfq` = `true`). Sets the maximum number of Block RFQ trades allowed in the lookback window. Each RFQ trade counts as `+1` towards the limit (not individual legs). Works across all currency pairs. When using this parameter, `index_name` must be set to `\"all\"`. Maximum - `1000`." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSetMmpConfigResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7859, "method": "private/set_mmp_config", "params": { "index_name": "btc_usd", "mmp_group": "MassQuoteBot7", "interval": 60, "frozen_time": 0, "quantity_limit": 3, "max_quote_quantity": 2.5 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Configures Market Maker Protection (MMP) for a specific index. This method sets the monitoring window, freeze duration, and exposure limits (quantity, delta, vega, and Maximum Quote Quantity).\n\nAt least one limit parameter must be set. Maximum Quote Quantity (MQQ) is a required parameter that limits the total combined size of open MMP orders. MQQ is configured per index but enforced per side, per order book (instrument).\n\nThe `interval` parameter defines the monitoring window duration in seconds. The `frozen_time` parameter sets how long MMP remains active after being triggered. Set `frozen_time` to `0` to disable automatic reset (manual reset required).\n\nFor Mass Quotes, use the `mmp_group` parameter to configure MMP for a specific group. Set `block_rfq` to `true` to configure MMP for Block RFQ (requires `block_rfq:read_write` scope). Set `interval` to `0` to remove MMP configuration.\n\n**📖 Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection)\n\n**Scope:** `trade:read_write` or `block_rfq:read_write` (when `block_rfq` = `true`)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_mmp_config)\n\n", "x-mint": { "metadata": { "title": "private/set_mmp_config", "og:title": "private/set_mmp_config", "keywords": [ "private/set_mmp_config", "index_name", "interval", "frozen_time", "mmp_group", "quantity_limit", "delta_limit", "vega_limit", "max_quote_quantity", "block_rfq", "trade_count_limit" ] }, "href": "/api-reference/trading/private-set_mmp_config" } } }, "/private/reset_mmp": { "get": { "tags": [ "Trading", "Matching Engine", "Private" ], "parameters": [ { "name": "index_name", "required": true, "in": "query", "schema": { "type": "string", "example": "btc_usd" }, "description": "Currency pair for which to reset MMP limits.\n\n**For regular MMP (`block_rfq = false`):** Must be a specific currency pair (e.g., \"btc_usd\", \"eth_usd\"). The value `\"all\"` is not allowed.\n\n**For Block RFQ MMP (`block_rfq = true`):** Can be either a specific currency pair or `\"all\"` to reset MMP limits across all currency pairs.\n" }, { "name": "mmp_group", "required": false, "in": "query", "schema": { "type": "string", "example": "MassQuoteBot7" }, "description": "Specifies the MMP group for which limits are being reset. If this parameter is omitted, the method resets the traditional (no group) MMP limits.\n\n**📖 Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications)\n" }, { "name": "block_rfq", "required": false, "in": "query", "schema": { "type": "boolean", "default": false }, "description": "If true, resets MMP for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings. When `block_rfq = true`, the `index_name` parameter can be set to `\"all\"` to reset limits across all currency pairs.\n" } ], "responses": { "200": { "$ref": "#/components/responses/OkResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7859, "method": "private/reset_mmp", "params": { "index_name": "btc_usd", "mmp_group": "MassQuoteBot7" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Resets Market Maker Protection (MMP) limits for the specified currency pair or MMP group. If MMP protection has been triggered and quoting is frozen, this method allows you to manually resume quoting.\n\nIf the configured `frozen_time` has expired, the system will automatically reset MMP. If `frozen_time` is set to `0` (automatic reset disabled), you must call this method to re-enable quoting. You can also perform a manual reset during the frozen period if you want to resume quoting early.\n\nFor regular MMP (`block_rfq = false`), the `index_name` must be a specific currency pair (e.g., \"btc_usd\", \"eth_usd\"). For Block RFQ MMP (`block_rfq = true`), you can set `index_name` to `\"all\"` to reset limits across all currency pairs. Use the `mmp_group` parameter to reset limits for a specific MMP group.\n\n**📖 Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection)\n\n**Scope:** `trade:read_write` or `block_rfq:read_write` (when `block_rfq` = `true`)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Freset_mmp)\n\n", "x-mint": { "metadata": { "title": "private/reset_mmp", "og:title": "private/reset_mmp", "keywords": [ "private/reset_mmp", "index_name", "mmp_group", "block_rfq" ] }, "href": "/api-reference/trading/private-reset_mmp" } } }, "/private/mass_quote": { "get": { "parameters": [ { "name": "wait_for_response", "in": "query", "schema": { "type": "boolean" }, "required": false, "description": "If false, the response is sent immediately after the risk check. If true, the response is sent after the orders all go through the matching engine. Default - `true`." }, { "name": "detailed", "in": "query", "schema": { "type": "boolean", "example": true }, "required": false, "description": "Flag to receive a list of all order changes and a list of errors, or to only receive a list of errors. Default - `false`." }, { "name": "quote_id", "in": "query", "schema": { "type": "string", "example": "1" }, "required": true, "description": "Identifier of a mass quote message. Can be used to match trades to requests. We recommend using an incrementing counter." }, { "name": "mmp_group", "in": "query", "schema": { "type": "string", "example": "default" }, "required": true, "description": "Name of the MMP group. An MMP group has to be used and only one quote can exist per instrument per side per MMP group." }, { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." }, { "name": "quotes", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "type": "string", "description": "The name of the instrument." }, "quote_set_id": { "type": "string", "description": "User-defined label that can be used for targeted cancels using private/cancel_quotes." }, "ask": { "type": "object", "properties": { "price": { "type": "number", "description": "The price of this side of the quote. If no price is supplied, only the amount is amended." }, "amount": { "type": "number", "description": "The amount of this side of the quote. If no quantity is supplied, only the price is amended." }, "post_only": { "type": "boolean", "default": false, "description": "If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread. Default - `false`" }, "reject_post_only": { "type": "boolean", "default": false, "description": "If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected. Only valid in combination with \"post_only\" set to `true`. Default value - `false`" } }, "description": "Order details for the ask. If not provided, `bid` must be present." }, "bid": { "type": "object", "properties": { "price": { "type": "number", "description": "The price of this side of the quote. If no price is supplied, only the amount is amended." }, "amount": { "type": "number", "description": "The amount of this side of the quote. If no quantity is supplied, only the price is amended." }, "post_only": { "type": "boolean", "default": false, "description": "If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread. Default - `false`" }, "reject_post_only": { "type": "boolean", "default": false, "description": "If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected. Only valid in combination with \"post_only\" set to `true`. Default value - `false`" } }, "description": "Order details for the bid. If not provided, `ask` must be present." } } }, "example": [ { "instrument_name": "BTC-PERPETUAL", "quote_set_id": "futures", "ask": { "price": 43800, "amount": 10 }, "bid": { "price": 43700, "amount": 10 } }, { "instrument_name": "BTC-22DEC23-41600-C", "quote_set_id": "options", "ask": { "price": 0.05, "amount": 1 }, "bid": { "price": 0.04, "amount": 1 } } ] }, "description": "List of quotes.", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivateMassQuoteResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7859, "method": "private/mass_quote", "params": { "detailed": true, "quote_id": "1", "mmp_group": "default", "quotes": [ { "instrument_name": "BTC-PERPETUAL", "quote_set_id": "futures", "ask": { "price": 43800, "amount": 10 }, "bid": { "price": 43700, "amount": 10 } }, { "instrument_name": "BTC-22DEC23-41600-C", "quote_set_id": "options", "ask": { "price": 0.05, "amount": 1 }, "bid": { "price": 0.04, "amount": 1 } } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Places buy and/or sell orders (quotes) on one or more instruments simultaneously. This method is designed for market makers who need to quote on multiple instruments efficiently.\n\n**Requirements:**\n- Cancel-on-Disconnect must be enabled (see [private/enable_cancel_on_disconnect](https://docs.deribit.com/api-reference/session-management/private-enable_cancel_on_disconnect)), otherwise the request will return an error.\n- This endpoint can only be used after approval from the administrators.\n\nEach quote can include both bid and ask sides, or just one side. Quotes are identified by `quote_set_id` for targeted cancellation. Use the `wait_for_response` parameter to control whether to wait for all orders to be processed before returning.\n\n**📖 Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fmass_quote)\n\n", "x-mint": { "metadata": { "title": "private/mass_quote", "og:title": "private/mass_quote", "keywords": [ "private/mass_quote", "wait_for_response", "detailed", "quote_id", "mmp_group", "valid_until", "quotes", "orders", "trades", "errors_count", "pending_requests_count", "pending_requests", "errors", "order_id", "order_state", "order_type", "original_order_type", "time_in_force", "is_rebalance", "is_liquidation", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "reject_post_only", "reduce_only", "api", "web", "mobile", "refresh_amount", "display_amount", "amount", "contracts", "filled_amount", "average_price", "advanced", "implv", "usd", "triggered", "trigger", "trigger_price", "trigger_offset", "trigger_reference_price", "block_trade", "mmp", "risk_reducing", "replaced", "auto_replaced", "quote", "quote_set_id", "trigger_order_id", "app_name", "mmp_cancelled", "cancel_reason", "oto_order_ids", "trigger_fill_condition", "oco_ref", "primary_order_id", "is_secondary_oto", "is_primary_otoco", "trade_id", "trade_seq", "timestamp", "matching_id", "tick_direction", "index_price", "iv", "underlying_price", "liquidation", "liquidity", "fee", "fee_currency", "state", "block_trade_id", "block_rfq_id", "block_rfq_quote_id", "profit_loss", "mark_price", "legs", "combo_id", "combo_trade_id", "trade_allocations", "user_id", "client_info", "client_id", "client_link_id", "name", "side", "code", "message" ] }, "href": "/api-reference/trading/private-mass_quote" } } }, "/private/move_positions": { "get": { "parameters": [ { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "source_uid", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of source subaccount. Can be found in `My Account >> Subaccounts` tab" }, { "name": "target_uid", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of target subaccount. Can be found in `My Account >> Subaccounts` tab" }, { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade - if not provided average price of the position is used" }, "amount": { "type": "number", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. Amount can't exceed position size." } } } }, "description": "List of trades for position move", "style": "form", "explode": true } ], "responses": { "200": { "$ref": "#/components/responses/PrivatePositionMoveResponse" } }, "tags": [ "Trading", "Matching Engine", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3, "method": "private/move_positions", "params": { "currency": "BTC", "source_uid": 3, "target_uid": 23, "trades": [ { "instrument_name": "BTC-PERPETUAL", "price": "35800", "amount": "110" }, { "instrument_name": "BTC-28JAN22-32500-C", "amount": "0.1" } ] } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Moves positions from a source subaccount to a target subaccount. This operation transfers open positions between subaccounts, which is useful for rebalancing or reorganizing trading activities.\n\nPositions can be filtered by currency. The operation creates trades to transfer positions, which may affect P&L and margin calculations.\n\n**Note - This method has distinct API rate limiting requirements:** \n- Sustained rate: 6 requests/minute\n- Weekly limit: 100 move_position uses per week (168 hours)\n\nFor more information, see [Rate Limits](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).\n\n**Important:** In rare cases, the request may return an `internal_server_error`. This does not necessarily mean the operation failed entirely. Part or all of the position transfer might have still been processed successfully. Check the positions in both accounts to verify the transfer status.\n\n**📖 Related Article:** [Moving Positions](https://docs.deribit.com/articles/moving-positions-api)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fmove_positions)\n\n", "x-mint": { "metadata": { "title": "private/move_positions", "og:title": "private/move_positions", "keywords": [ "private/move_positions", "currency", "source_uid", "target_uid", "trades", "instrument_name", "direction", "price", "amount" ] }, "href": "/api-reference/trading/private-move_positions" } } }, "/private/get_deposits": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetDepositsResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 5611, "method": "private/get_deposits", "params": { "currency": "BTC", "count": 10, "offset": 0 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieve the latest user deposits. Returns a list of deposit transactions with their status, amounts, addresses, confirmations, and other relevant details.\n\n**📖 Related Article:** [Managing Deposits](https://docs.deribit.com/articles/managing-deposits-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_deposits)\n\n", "x-mint": { "metadata": { "title": "private/get_deposits", "og:title": "private/get_deposits", "keywords": [ "private/get_deposits", "currency", "count", "offset", "data", "address", "amount", "state", "transaction_id", "source_address", "received_timestamp", "updated_timestamp", "note", "clearance_state", "refund_transaction_id" ] }, "href": "/api-reference/wallet/private-get_deposits" } } }, "/private/create_deposit_address": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateDepositAddressResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7538, "method": "private/create_deposit_address", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Creates a new deposit address for the specified currency. Each currency can have multiple deposit addresses. Use this method to generate a new address for receiving deposits.\n\n**Note:**\n\nFor Bitcoin, a new address can be generated every 24 hours.\n\nFor ERC20, Solana and XRP only one address can be generated.\n\n**Note:**\n\nIf an ERC20 address is generated, this address will be automatically added for every asset that uses ERC20 addresses.\n\n**📖 Related Article:** [Managing Deposits](https://docs.deribit.com/articles/managing-deposits-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_deposit_address)\n\n", "x-mint": { "metadata": { "title": "private/create_deposit_address", "og:title": "private/create_deposit_address", "keywords": [ "private/create_deposit_address", "currency", "creation_timestamp", "address", "type" ] }, "href": "/api-reference/wallet/private-create_deposit_address" } } }, "/private/get_current_deposit_address": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateDepositAddressResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 3461, "method": "private/get_current_deposit_address", "params": { "currency": "BTC" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieve the current deposit address for the specified currency. Returns the most recently created or used deposit address for receiving funds.\n\n**📖 Related Article:** [Managing Deposits](https://docs.deribit.com/articles/managing-deposits-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_current_deposit_address)\n\n", "x-mint": { "metadata": { "title": "private/get_current_deposit_address", "og:title": "private/get_current_deposit_address", "keywords": [ "private/get_current_deposit_address", "currency", "creation_timestamp", "address", "type" ] }, "href": "/api-reference/wallet/private-get_current_deposit_address" } } }, "/private/withdraw": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format, it must be in address book" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be withdrawn" }, { "name": "priority", "in": "query", "schema": { "type": "string", "enum": [ "insane", "extreme_high", "very_high", "high", "mid", "low", "very_low" ] }, "required": false, "description": "Withdrawal priority, optional for BTC, default: `high`" }, { "in": "query", "name": "nonce", "required": false, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Optional idempotency nonce. If provided, subsequent requests with the same nonce will return the previously created transaction instead of creating a new one. Must be 8-128 characters. The nonce is persisted on the resulting transaction and returned in the response." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateWithdrawResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 6931, "method": "private/withdraw", "params": { "currency": "BTC", "address": "2NBqqD5GRJ8wHy1PYyCXTe9ke5226FhavBz", "amount": 0.4, "priority": "mid" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Creates a new withdrawal request. This method allows you to withdraw funds from your account to an external address. The withdrawal can be configured with priority settings and must use an address from your address book.\n\n**Withdrawal Checks & Balance Updates**\n\nWithdrawal funds are checked twice: when a user requests a withdrawal and again when they confirm it via the email link. If available funds decrease between these steps, the withdrawal may be rejected.\n\nA withdrawal may also be rejected if the on-chain fee increases between the request and confirmation.\n\nThe withdrawal amount is deducted only after all checks pass and the transaction is scheduled. The web-interface Withdrawal tab displays all withdrawals regardless of their status (pending, cancelled, rejected, or completed).\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write` and mainaccount\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fwithdraw)\n\n", "x-mint": { "metadata": { "title": "private/withdraw", "og:title": "private/withdraw", "keywords": [ "private/withdraw", "currency", "address", "amount", "priority", "nonce", "confirmed_timestamp", "created_timestamp", "fee", "state", "transaction_id", "updated_timestamp" ] }, "href": "/api-reference/wallet/private-withdraw" } } }, "/private/cancel_withdrawal": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "in": "query", "name": "id", "required": true, "schema": { "type": "number", "example": 1 }, "description": "The withdrawal id" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateWithdrawResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7420, "method": "private/cancel_withdrawal", "params": { "currency": "BTC", "id": 1 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancels a pending withdrawal request. This method allows you to cancel a withdrawal that has not yet been processed. Once a withdrawal is processed, it cannot be cancelled.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_withdrawal)\n\n", "x-mint": { "metadata": { "title": "private/cancel_withdrawal", "og:title": "private/cancel_withdrawal", "keywords": [ "private/cancel_withdrawal", "currency", "id", "address", "amount", "confirmed_timestamp", "created_timestamp", "fee", "priority", "state", "transaction_id", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-cancel_withdrawal" } } }, "/private/get_withdrawals": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetWithdrawalsResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 2745, "method": "private/get_withdrawals", "params": { "currency": "BTC", "count": 10, "offset": 0 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieve the latest user withdrawals. Returns a list of withdrawal requests with their status, amounts, addresses, and other relevant details.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_withdrawals)\n\n", "x-mint": { "metadata": { "title": "private/get_withdrawals", "og:title": "private/get_withdrawals", "keywords": [ "private/get_withdrawals", "currency", "count", "offset", "data", "address", "amount", "confirmed_timestamp", "created_timestamp", "fee", "priority", "state", "transaction_id", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-get_withdrawals" } } }, "/private/get_address_book": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type" }, "required": true, "description": "Address book type" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAddressBookResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 31, "method": "private/get_address_book", "params": { "currency": "BTC", "type": "withdrawal" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves the address book entries of the given type. Returns all saved addresses that can be used for withdrawals, along with their labels and beneficiary information if available.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_address_book)\n\n", "x-mint": { "metadata": { "title": "private/get_address_book", "og:title": "private/get_address_book", "keywords": [ "private/get_address_book", "currency", "type", "address", "creation_timestamp", "label", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "agreed", "personal", "info_required", "status", "waiting_timestamp", "requires_confirmation", "requires_confirmation_change" ] }, "href": "/api-reference/wallet/private-get_address_book" } } }, "/private/add_to_address_book": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type" }, "required": true, "description": "Address book type" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format" }, { "name": "label", "in": "query", "schema": { "$ref": "#/components/schemas/address_label" }, "required": true, "description": "Label of the address book entry" }, { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": true, "description": "Name of beneficiary VASP" }, { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": true, "description": "DID of beneficiary VASP" }, { "name": "beneficiary_vasp_website", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "required": false, "description": "Website of the beneficiary VASP. Required if the address book entry is associated with a VASP that is not included in the list of known VASPs" }, { "name": "beneficiary_first_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_first_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_last_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_last_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_company_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_company_name" }, "description": "Beneficiary company name (if beneficiary is a company)", "required": false }, { "name": "beneficiary_address", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_address" }, "required": true, "description": "Geographical address of the beneficiary" }, { "name": "agreed", "in": "query", "schema": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "required": true, "description": "Indicates that the user agreed to shared provided information with 3rd parties" }, { "name": "personal", "in": "query", "schema": { "$ref": "#/components/schemas/personal_wallet" }, "required": true, "description": "The user confirms that he provided address belongs to him and he has access to it via an un-hosted wallet software" }, { "name": "extra_currencies", "in": "query", "schema": { "$ref": "#/components/schemas/extra_currencies" }, "description": "The user can pass a list of currencies to add the address for. It is currently available ONLY for ERC20 currencies. Without passing this paramater for an ERC20 currency, the address will be added to ALL of the ERC20 currencies.", "required": false } ], "responses": { "200": { "$ref": "#/components/responses/PrivateAddToAddressBookResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/add_to_address_book", "params": { "currency": "BTC", "type": "withdrawal", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj", "label": "Main address", "beneficiary_vasp_name": "Money`s Gone", "beneficiary_vasp_did": "did:example:123456789abcdefghi", "beneficiary_first_name": "John", "beneficiary_last_name": "Doe", "beneficiary_address": "NL, Amsterdam, Street, 1", "agreed": true, "personal": false } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Adds a new address to the address book. The address book allows you to store addresses for withdrawals, along with beneficiary information for compliance purposes.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fadd_to_address_book)\n\n", "x-mint": { "metadata": { "title": "private/add_to_address_book", "og:title": "private/add_to_address_book", "keywords": [ "private/add_to_address_book", "currency", "type", "address", "label", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "agreed", "personal", "extra_currencies", "creation_timestamp", "info_required", "status", "waiting_timestamp", "requires_confirmation", "requires_confirmation_change" ] }, "href": "/api-reference/wallet/private-add_to_address_book" } } }, "/private/remove_from_address_book": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type" }, "required": true, "description": "Address book type" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format, it must be in address book" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateRemoveFromAddressBookResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/remove_from_address_book", "params": { "currency": "BTC", "type": "transfer", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Removes an entry from the address book. This method allows you to delete a saved address that is no longer needed.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fremove_from_address_book)\n\n", "x-mint": { "metadata": { "title": "private/remove_from_address_book", "og:title": "private/remove_from_address_book", "keywords": [ "private/remove_from_address_book", "currency", "type", "address" ] }, "href": "/api-reference/wallet/private-remove_from_address_book" } } }, "/private/update_in_address_book": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type" }, "required": true, "description": "Address book type" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format, it must be in address book" }, { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": true, "description": "Name of beneficiary VASP" }, { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": true, "description": "DID of beneficiary VASP" }, { "name": "beneficiary_vasp_website", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "required": false, "description": "Website of the beneficiary VASP. Required if the address book entry is associated with a VASP that is not included in the list of known VASPs" }, { "name": "beneficiary_first_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_first_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_last_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_last_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_company_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_company_name" }, "description": "Beneficiary company name (if beneficiary is a company)", "required": false }, { "name": "beneficiary_address", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_address" }, "required": true, "description": "Geographical address of the beneficiary" }, { "name": "agreed", "in": "query", "schema": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "required": true, "description": "Indicates that the user agreed to shared provided information with 3rd parties" }, { "name": "personal", "in": "query", "schema": { "$ref": "#/components/schemas/personal_wallet" }, "required": true, "description": "The user confirms that he provided address belongs to him and he has access to it via an un-hosted wallet software" }, { "name": "label", "in": "query", "schema": { "$ref": "#/components/schemas/address_label" }, "required": true, "description": "Label of the address book entry" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateUpdateInAddressBookResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/update_in_address_book", "params": { "currency": "BTC", "type": "withdrawal", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj", "label": "Main address", "beneficiary_vasp_name": "Money`s Gone", "beneficiary_vasp_did": "did:example:123456789abcdefghi", "beneficiary_first_name": "John", "beneficiary_last_name": "Doe", "beneficiary_address": "NL, Amsterdam, Street, 1", "agreed": true, "personal": false } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Updates beneficiary information for an address in the address book. This method allows you to add or modify beneficiary details required for compliance purposes when making withdrawals to certain addresses.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fupdate_in_address_book)\n\n", "x-mint": { "metadata": { "title": "private/update_in_address_book", "og:title": "private/update_in_address_book", "keywords": [ "private/update_in_address_book", "currency", "type", "address", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "agreed", "personal", "label" ] }, "href": "/api-reference/wallet/private-update_in_address_book" } } }, "/private/save_address_beneficiary": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format" }, { "name": "tag", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Tag for XRP addresses" }, { "name": "agreed", "in": "query", "schema": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "required": true, "description": "Indicates that the user agreed to shared provided information with 3rd parties" }, { "name": "personal", "in": "query", "schema": { "$ref": "#/components/schemas/personal_wallet" }, "required": true, "description": "The user confirms that he provided address belongs to him and he has access to it via an un-hosted wallet software" }, { "name": "unhosted", "in": "query", "schema": { "type": "boolean" }, "required": true, "description": "Indicates if the address belongs to an unhosted wallet" }, { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": true, "description": "Name of beneficiary VASP" }, { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": true, "description": "DID of beneficiary VASP" }, { "name": "beneficiary_vasp_website", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "required": false, "description": "Website of the beneficiary VASP. Required if the address book entry is associated with a VASP that is not included in the list of known VASPs" }, { "name": "beneficiary_first_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_first_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_last_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_last_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, { "name": "beneficiary_company_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_company_name" }, "description": "Beneficiary company name (if beneficiary is a company)", "required": false }, { "name": "beneficiary_address", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_address" }, "required": true, "description": "Geographical address of the beneficiary" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSaveAddressBeneficiaryResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/save_address_beneficiary", "params": { "currency": "BTC", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj", "agreed": true, "personal": false, "unhosted": false, "beneficiary_vasp_name": "Money's Gone", "beneficiary_vasp_did": "did:example:123456789abcdefghi", "beneficiary_vasp_website": "https://example.com", "beneficiary_first_name": "John", "beneficiary_last_name": "Doe", "beneficiary_company_name": "Example Corp", "beneficiary_address": "NL, Amsterdam, Street, 1" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Saves beneficiary information for an address. This method allows you to store beneficiary details required for compliance purposes, including VASP information, personal details, and wallet type classification.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsave_address_beneficiary)\n\n", "x-mint": { "metadata": { "title": "private/save_address_beneficiary", "og:title": "private/save_address_beneficiary", "keywords": [ "private/save_address_beneficiary", "currency", "address", "tag", "agreed", "personal", "unhosted", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "user_id", "created", "updated" ] }, "href": "/api-reference/wallet/private-save_address_beneficiary" } } }, "/private/get_address_beneficiary": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format" }, { "name": "tag", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Tag for XRP addresses" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetAddressBeneficiaryResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/get_address_beneficiary", "params": { "currency": "BTC", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieves beneficiary information for a specific address. Returns the stored beneficiary details including VASP information, personal details, and wallet type classification.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_address_beneficiary)\n\n", "x-mint": { "metadata": { "title": "private/get_address_beneficiary", "og:title": "private/get_address_beneficiary", "keywords": [ "private/get_address_beneficiary", "currency", "address", "tag", "user_id", "agreed", "personal", "unhosted", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "created", "updated" ] }, "href": "/api-reference/wallet/private-get_address_beneficiary" } } }, "/private/delete_address_beneficiary": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format" }, { "name": "tag", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Tag for XRP addresses" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateDeleteAddressBeneficiaryResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/delete_address_beneficiary", "params": { "currency": "BTC", "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf0uyj" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Deletes beneficiary information for a specific address.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fdelete_address_beneficiary)\n\n", "x-mint": { "metadata": { "title": "private/delete_address_beneficiary", "og:title": "private/delete_address_beneficiary", "keywords": [ "private/delete_address_beneficiary", "currency", "address", "tag" ] }, "href": "/api-reference/wallet/private-delete_address_beneficiary" } } }, "/private/list_address_beneficiaries": { "get": { "parameters": [ { "name": "currency", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, { "name": "address", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Address in currency format" }, { "name": "tag", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Tag for XRP addresses" }, { "name": "created_before", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by creation timestamp (before)" }, { "name": "created_after", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by creation timestamp (after)" }, { "name": "updated_before", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by update timestamp (before)" }, { "name": "updated_after", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by update timestamp (after)" }, { "name": "personal", "in": "query", "schema": { "type": "boolean" }, "required": false, "description": "Filter by personal wallet flag" }, { "name": "unhosted", "in": "query", "schema": { "type": "boolean" }, "required": false, "description": "Filter by unhosted wallet flag" }, { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": false, "description": "Filter by beneficiary VASP name" }, { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": false, "description": "Filter by beneficiary VASP DID" }, { "name": "beneficiary_vasp_website", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "required": false, "description": "Website of the beneficiary VASP. Required if the address book entry is associated with a VASP that is not included in the list of known VASPs" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 }, "required": false, "description": "Maximum number of results to return" }, { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateListAddressBeneficiariesResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 42, "method": "private/list_address_beneficiaries", "params": { "currency": "BTC", "limit": 10 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Lists address beneficiaries with optional filtering and pagination. Returns all saved beneficiary information for addresses, with support for filtering by currency, address, wallet type, VASP details, and date ranges.\n\n**📖 Related Article:** [Managing Withdrawals](https://docs.deribit.com/articles/managing-withdrawals-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flist_address_beneficiaries)\n\n", "x-mint": { "metadata": { "title": "private/list_address_beneficiaries", "og:title": "private/list_address_beneficiaries", "keywords": [ "private/list_address_beneficiaries", "currency", "address", "tag", "created_before", "created_after", "updated_before", "updated_after", "personal", "unhosted", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_vasp_website", "limit", "continuation", "data", "count", "user_id", "agreed", "beneficiary_first_name", "beneficiary_last_name", "beneficiary_company_name", "beneficiary_address", "created", "updated" ] }, "href": "/api-reference/wallet/private-list_address_beneficiaries" } } }, "/private/submit_transfer_to_subaccount": { "get": { "tags": [ "Wallet", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be transferred" }, { "name": "destination", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of destination subaccount. Can be found in `My Account >> Subaccounts` tab" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubmitTransferResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 210, "method": "private/submit_transfer_to_subaccount", "params": { "currency": "ETH", "amount": 12.1234, "destination": 20 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Transfer funds from the main account to a subaccount.\n\n**📖 Related Article:** [Managing Transfers](https://docs.deribit.com/articles/managing-transfers-api)\n\n**Scope:** `wallets:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsubmit_transfer_to_subaccount)\n\n", "x-mint": { "metadata": { "title": "private/submit_transfer_to_subaccount", "og:title": "private/submit_transfer_to_subaccount", "keywords": [ "private/submit_transfer_to_subaccount", "currency", "amount", "destination", "created_timestamp", "type", "other_side", "state", "direction", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-submit_transfer_to_subaccount" } } }, "/private/submit_transfer_between_subaccounts": { "get": { "tags": [ "Wallet", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be transferred" }, { "name": "destination", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of destination subaccount. Can be found in `My Account >> Subaccounts` tab" }, { "name": "source", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": false, "description": "Id of the source (sub)account. Can be found in `My Account >> Subaccounts` tab. By default, it is the Id of the account which made the request. However, if a different \"source\" is specified, the user must possess the mainaccount scope, and only other subaccounts can be designated as the source." }, { "in": "query", "name": "nonce", "required": false, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Optional idempotency nonce. If provided, subsequent requests with the same nonce will return the previously created transaction instead of creating a new one. Must be 8-128 characters. The nonce is persisted on the resulting transaction and returned in the response." } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubmitTransferResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 210, "method": "private/submit_transfer_between_subaccounts", "params": { "currency": "ETH", "amount": 12.1234, "destination": 20, "source": 10 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Transfer funds between two subaccounts or between a subaccount and the main account.\n\n**📖 Related Article:** [Managing Transfers](https://docs.deribit.com/articles/managing-transfers-api)\n\n**Scope:** `wallets:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsubmit_transfer_between_subaccounts)\n\n", "x-mint": { "metadata": { "title": "private/submit_transfer_between_subaccounts", "og:title": "private/submit_transfer_between_subaccounts", "keywords": [ "private/submit_transfer_between_subaccounts", "currency", "amount", "destination", "source", "nonce", "created_timestamp", "type", "other_side", "state", "direction", "updated_timestamp" ] }, "href": "/api-reference/wallet/private-submit_transfer_between_subaccounts" } } }, "/private/submit_transfer_to_user": { "get": { "tags": [ "Wallet", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be transferred" }, { "name": "destination", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Destination wallet's address taken from address book" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubmitTransferResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9421, "method": "private/submit_transfer_to_user", "params": { "currency": "ETH", "amount": 13.456, "destination": "0x4aa0753d798d668056920094d65321a8e8913e26" } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Transfer funds to another user. This method allows you to send funds from your main account to another Deribit user's account. The transfer is processed internally and does not require blockchain transactions.\n\n**📖 Related Article:** [Managing Transfers](https://docs.deribit.com/articles/managing-transfers-api)\n\n**Scope:** `wallet:read_write` and mainaccount\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsubmit_transfer_to_user)\n\n", "x-mint": { "metadata": { "title": "private/submit_transfer_to_user", "og:title": "private/submit_transfer_to_user", "keywords": [ "private/submit_transfer_to_user", "currency", "amount", "destination", "created_timestamp", "type", "other_side", "state", "direction", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-submit_transfer_to_user" } } }, "/private/get_transfers": { "get": { "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetTransfersResponse" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 7606, "method": "private/get_transfers", "params": { "currency": "BTC", "count": 10 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Retrieve the user's transfers list. Returns a list of internal transfers between accounts, subaccounts, or to other users, including their status, amounts, and other relevant details.\n\n**📖 Related Article:** [Managing Transfers](https://docs.deribit.com/articles/managing-transfers-api)\n\n**Scope:** `wallet:read`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_transfers)\n\n", "x-mint": { "metadata": { "title": "private/get_transfers", "og:title": "private/get_transfers", "keywords": [ "private/get_transfers", "currency", "count", "offset", "data", "created_timestamp", "type", "amount", "other_side", "state", "direction", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-get_transfers" } } }, "/private/cancel_transfer_by_id": { "get": { "tags": [ "Wallet", "Private" ], "parameters": [ { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, { "name": "id", "in": "query", "schema": { "$ref": "#/components/schemas/transfer_id" }, "required": true, "description": "Id of transfer" } ], "responses": { "200": { "$ref": "#/components/responses/PrivateSubmitTransferResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 9187, "method": "private/cancel_transfer_by_id", "params": { "currency": "BTC", "id": 2 } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Cancel a pending transfer by its ID. This method allows you to cancel a transfer that has not yet been processed. Once a transfer is processed, it cannot be cancelled.\n\n**📖 Related Article:** [Managing Transfers](https://docs.deribit.com/articles/managing-transfers-api)\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_transfer_by_id)\n\n", "x-mint": { "metadata": { "title": "private/cancel_transfer_by_id", "og:title": "private/cancel_transfer_by_id", "keywords": [ "private/cancel_transfer_by_id", "currency", "id", "created_timestamp", "type", "amount", "other_side", "state", "direction", "updated_timestamp", "nonce" ] }, "href": "/api-reference/wallet/private-cancel_transfer_by_id" } } }, "/private/get_reward_eligibility": { "get": { "tags": [ "Wallet", "Private" ], "responses": { "200": { "$ref": "#/components/responses/PrivateGetRewardEligibilityResponse" } }, "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/get_reward_eligibility", "params": {} }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Returns reward eligibility status and APR data for all supported currencies.\n\nThis method takes no parameters.\n\n**📖 Related Support Article:** [Yield reward-bearing coins](https://support.deribit.com/hc/en-us/articles/31424939199261-Yield-reward-bearing-coins)\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_reward_eligibility)\n\n", "x-mint": { "metadata": { "title": "private/get_reward_eligibility", "og:title": "private/get_reward_eligibility", "keywords": [ "private/get_reward_eligibility", "eligibility_status", "apr_sma7" ] }, "href": "/api-reference/wallet/private-get_reward_eligibility" } } }, "/private/set_clearance_originator": { "get": { "parameters": [ { "in": "query", "name": "deposit_id", "required": true, "schema": { "type": "string", "description": "JSON string containing: currency, user_id, address, tx_hash" }, "description": "Id of the deposit" }, { "in": "query", "name": "originator", "required": true, "schema": { "type": "string", "description": "JSON string containing: is_personal, company_name, first_name, last_name, address" }, "description": "Information about the originator of the deposit" } ], "responses": { "200": { "$ref": "#/components/responses/deposit" } }, "tags": [ "Wallet", "Private" ], "requestBody": { "content": { "application/json": { "examples": { "request": { "value": { "jsonrpc": "2.0", "id": 1, "method": "private/set_clearance_originator", "params": { "deposit_id": { "currency": "BTC", "user_id": 123, "address": "2NBqqD5GRJ8wHy1PYyCXTe9ke5226FhavBz", "tx_hash": "230669110fdaf0a0dbcdc079b6b8b43d5af29cc73683835b9bc6b3406c065fda" }, "originator": { "is_personal": false, "first_name": "First", "last_name": "Last", "company_name": "Company Name", "address": "NL, Amsterdam, Street, 1" } } }, "description": "JSON-RPC Request Example" } } } }, "description": "JSON-RPC request body" }, "description": "Sets originator of the deposit\n\n**Scope:** `wallet:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_clearance_originator)\n\n", "x-mint": { "metadata": { "title": "private/set_clearance_originator", "og:title": "private/set_clearance_originator", "keywords": [ "private/set_clearance_originator", "deposit_id", "originator", "currency", "address", "amount", "state", "transaction_id", "source_address", "received_timestamp", "updated_timestamp", "note", "clearance_state", "refund_transaction_id" ] }, "href": "/api-reference/wallet/private-set_clearance_originator" } } } }, "components": { "parameters": { "continuation": { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT" }, "description": "Continuation token for pagination" }, "continuation_as_integer": { "name": "continuation", "in": "query", "required": false, "schema": { "type": "integer", "example": 429946 }, "description": "Continuation token for pagination" }, "instrument_name": { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, "combo_id": { "name": "combo_id", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/combo_id" }, "description": "Combo ID" }, "combo_trades": { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "amount": { "$ref": "#/components/schemas/amount" }, "direction": { "$ref": "#/components/schemas/direction" } } } }, "description": "List of trades used to create a combo", "style": "form", "explode": true }, "index_name": { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "Index identifier, matches (base) cryptocurrency with quote currency" }, "index_name_for_dvol": { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_for_dvol" }, "description": "Index identifier supported for DVOL" }, "index_name_derivative": { "name": "index_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_derivative" }, "description": "Index identifier of derivative instrument on the platform" }, "index_name_derivative_optional": { "name": "index_name", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/index_name_derivative" }, "description": "Index identifier of derivative instrument on the platform; skipping this parameter will return all configurations" }, "type_of_supported_index": { "name": "type", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "all", "spot", "derivative" ] }, "description": "Type of a cryptocurrency price index" }, "subscription_interval": { "name": "interval", "in": "query", "schema": { "type": "string", "enum": [ "agg2", "100ms", "raw" ] }, "required": true, "description": "Frequency of notifications. Events will be aggregated over this interval. The value `raw` means no aggregation will be applied **(Please note that `raw` interval is only available to authorized users)**" }, "subscription_interval_non_raw": { "name": "interval", "in": "query", "schema": { "type": "string", "enum": [ "100ms", "agg2" ] }, "required": true, "description": "Frequency of notifications. Events will be aggregated over this interval." }, "optional_instrument_name": { "name": "instrument_name", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name" }, "instrument_name_options_only": { "name": "instrument_name", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/instrument_name" }, "description": "Instrument name - options only" }, "currency": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, "wallet_currency": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, "currency_pair": { "name": "currency_pair", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "The currency pair symbol" }, "currency_pair_optional": { "name": "currency_pair", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/index_name" }, "description": "The currency pair symbol" }, "expiration": { "name": "expiration", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The timestamp of expiration (milliseconds since the Unix epoch)" }, "currency_with_any": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any" }, "description": "The currency symbol or `\"any\"` for all" }, "currency_with_any_and_list": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any_and_list" }, "description": "The currency symbol, list of currency symbols or `\"any\"` for all" }, "currency_with_any_and_grouped": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/currency_with_any_and_grouped" }, "description": "The currency symbol or `\"any\"` for all or '\"grouped\"' for all grouped by currency" }, "settlement_currency_with_any_and_grouped": { "name": "currency", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/settlement_currency_with_any_and_grouped" }, "description": "The currency symbol or `\"any\"` for all or '\"grouped\"' for all grouped by currency" }, "kind_with_any": { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_any" }, "description": "Instrument kind or `\"any\"` for all" }, "kind_strict": { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, `\"future\"` or `\"option\"`" }, "kind_future_or_option_with_any": { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/kind_future_or_option_with_any" }, "description": "Instrument kind, `\"future\"` or `\"option\"` or `\"any\"`" }, "optional_currency": { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/currency" }, "description": "The currency symbol" }, "optional_currency_block_rfq": { "in": "query", "name": "currency", "required": false, "schema": { "$ref": "#/components/schemas/block_rfq_currency" }, "description": "The currency symbol" }, "optional_kind": { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind" }, "description": "Instrument kind, if not provided instruments of all kinds are considered" }, "kind_with_combo_all": { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all" }, "only_combo_kind": { "name": "kind", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/only_combo_kind" }, "description": "Combo instrument kind, `\"combo\"` for any combo" }, "optional_kind_with_combo_all": { "name": "kind", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/kind_with_combo_all" }, "description": "Instrument kind, `\"combo\"` for any combo or `\"any\"` for all. If not provided instruments of all kinds are considered" }, "optional_combo_state": { "name": "state", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/combo_state" }, "description": "Combo state, if not provided combos of all states are considered" }, "optional_order_type": { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/order_type2" }, "description": "Order type, default - `all`" }, "optional_simple_order_type": { "name": "type", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/simple_order_type" }, "description": "Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all`" }, "detailed_bool_for_cancel_all": { "name": "detailed", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders.\n\n**📖 Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods)\n\nDefault: `false`\n" }, "include_combos_for_cancel_all": { "name": "include_combos", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "When set to `true` orders in combo instruments affecting a given position will also be cancelled. Default: `false`" }, "freeze_quotes": { "name": "freeze_quotes", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request." }, "start_timestamp": { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, "trade_start_timestamp": { "name": "start_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, "optional_trade_start_timestamp": { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch). When param is provided trades are returned from the earliest" }, "optional_start_timestamp": { "name": "start_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The earliest timestamp to return result from (milliseconds since the UNIX epoch)" }, "end_timestamp": { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch)" }, "trade_end_timestamp": { "name": "end_timestamp", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, "optional_trade_end_timestamp": { "name": "end_timestamp", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The most recent timestamp to return result from (milliseconds since the UNIX epoch). Only one of params: start_timestamp, end_timestamp is truly required" }, "optional_start_trade_id": { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the first trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, "optional_end_trade_id": { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/trade_id" }, "description": "The ID of the last trade to be returned. Number for BTC trades, or hyphen name in ex. `\"ETH-15\"` # `\"ETH_USDC-16\"`" }, "optional_start_seq": { "name": "start_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the first trade to be returned" }, "optional_end_seq": { "name": "end_seq", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "The sequence number of the last trade to be returned" }, "optional_count10": { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `10`, maximum - `1000`" }, "optional_count20": { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `20`, maximum - `1000`" }, "optional_count100": { "name": "count", "required": false, "in": "query", "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Number of requested items, default - `100`, maximum - `1000`" }, "optional_sorting": { "name": "sorting", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/sorting" }, "description": "Direction of results sorting (`default` value means no sorting, results will be returned in order in which they left the database)" }, "optional_offset": { "name": "offset", "in": "query", "required": false, "schema": { "example": 10, "type": "integer" }, "description": "The offset for pagination, default - `0`" }, "optional_include_old_orders": { "name": "include_old", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result orders older than 2 days, default - `false`" }, "optional_include_unfilled_orders": { "name": "include_unfilled", "in": "query", "required": false, "schema": { "example": false, "type": "boolean" }, "description": "Include in result fully unfilled closed orders, default - `false`" }, "order_id": { "in": "query", "name": "order_id", "required": true, "schema": { "$ref": "#/components/schemas/order_id" }, "description": "The order id" }, "block_trade_id": { "in": "query", "name": "id", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "Block trade id" }, "optional_block_trade_start_id": { "name": "start_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "Response will contain block trades older than the one provided in this field" }, "optional_block_trade_end_id": { "name": "end_id", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/block_trade_id" }, "description": "The id of the oldest block trade to be returned, `start_id` is required with `end_id`" }, "block_trade_timestamp": { "in": "query", "name": "timestamp", "required": true, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "Timestamp, shared with other party (milliseconds since the UNIX epoch)" }, "block_trade_nonce": { "in": "query", "name": "nonce", "required": true, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Nonce, shared with other party" }, "wallet_nonce": { "in": "query", "name": "nonce", "required": false, "schema": { "$ref": "#/components/schemas/nonce" }, "description": "Optional idempotency nonce. If provided, subsequent requests with the same nonce will return the previously created transaction instead of creating a new one. Must be 8-128 characters. The nonce is persisted on the resulting transaction and returned in the response." }, "block_trade_role": { "in": "query", "name": "role", "required": true, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" }, "block_trade_role_optional": { "in": "query", "name": "role", "required": false, "schema": { "$ref": "#/components/schemas/role" }, "description": "Describes if user wants to be maker or taker of trades" }, "trade_price": { "in": "query", "name": "price", "required": true, "schema": { "type": "number" }, "description": "Price for trade" }, "block_rfq_trade_price": { "in": "query", "name": "price", "required": true, "schema": { "type": "number" }, "description": "Maximum acceptable price for execution" }, "block_rfq_aggregated_price": { "in": "query", "name": "price", "required": false, "schema": { "type": "number" }, "description": "Aggregated price used for quoting future spreads." }, "position_move_price": { "in": "query", "name": "price", "required": false, "schema": { "type": "number" }, "description": "Price for trade - if not provided average price of the position is used" }, "trade_amount": { "in": "query", "name": "amount", "required": false, "schema": { "$ref": "#/components/schemas/amount" }, "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "trade_amount_required": { "in": "query", "name": "amount", "required": true, "schema": { "$ref": "#/components/schemas/amount" }, "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "position_move_amount": { "in": "query", "name": "amount", "required": true, "schema": { "type": "number" }, "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. Amount can't exceed position size." }, "trade_direction": { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of trade from the maker perspective" }, "leg_direction": { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of selected leg" }, "block_trade_trades": { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" } } } }, "description": "List of trades for block trade", "style": "form", "explode": true }, "position_move_trades": { "in": "query", "name": "trades", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade - if not provided average price of the position is used" }, "amount": { "type": "number", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. Amount can't exceed position size." } } } }, "description": "List of trades for position move", "style": "form", "explode": true }, "block_trade_counterparty_signature": { "in": "query", "name": "counterparty_signature", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_signature" }, "description": "Signature of block trade generated by `private/verify_block_trade_method`" }, "block_trade_signature_to_invalidate": { "in": "query", "name": "signature", "required": true, "schema": { "$ref": "#/components/schemas/block_trade_signature" }, "description": "Signature of block trade that will be invalidated" }, "order_quantity": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, "margins_quantity": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "order_contracts": { "name": "contracts", "in": "query", "schema": { "type": "number" }, "required": false, "description": "It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned." }, "order_type": { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ] }, "required": false, "description": "The order type, default: `\"limit\"`" }, "optional_settlement_type": { "in": "query", "name": "type", "required": false, "schema": { "$ref": "#/components/schemas/settlement_type" }, "description": "Settlement type" }, "optional_settlement_start_timestamp": { "in": "query", "name": "search_start_timestamp", "required": false, "schema": { "$ref": "#/components/schemas/timestamp" }, "description": "The latest timestamp to return result from (milliseconds since the UNIX epoch)" }, "simple_order_type_market_limit": { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "limit", "market" ] }, "required": true, "description": "The order type" }, "order_label": { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "user defined label for the order (maximum 64 characters)" }, "required_order_label": { "name": "label", "in": "query", "schema": { "type": "string" }, "required": true, "description": "user defined label for the order (maximum 64 characters)" }, "edit_order_price": { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency.

When editing an option order with advanced=usd, the field price should be the option price value in USD.

When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, "order_price": { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "

The order price in base currency (Only for limit and stop_limit orders)

When adding an order with advanced=usd, the field price should be the option price value in USD.

When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

" }, "linked_order_type": { "name": "linked_order_type", "in": "query", "schema": { "type": "string", "enum": [ "one_triggers_other", "one_cancels_other", "one_triggers_one_cancels_other" ] }, "required": false, "description": "

The type of the linked order.

" }, "otoco_config": { "name": "otoco_config", "in": "query", "schema": { "type": "array", "items": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of trade from the maker perspective" }, "type": { "type": "string", "enum": [ "limit", "stop_limit", "take_limit", "market", "stop_market", "take_market", "market_limit", "trailing_stop" ], "description": "The order type, default: \"limit\"" }, "label": { "type": "string", "description": "user defined label for the order (maximum 64 characters)" }, "price": { "type": "number", "description": "The order price in base currency (Only for limit and stop_limit orders)" }, "reduce_only": { "type": "boolean", "default": false, "description": "If true, the order is considered reduce-only which is intended to only reduce a current position" }, "time_in_force": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ], "description": "Specifies how long the order remains in effect. Default \"good_til_cancelled\"" }, "post_only": { "type": "boolean", "default": false, "description": "If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (according to the direction of the order)." }, "reject_post_only": { "type": "boolean", "default": false, "description": "If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected." }, "trigger_price": { "type": "number", "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, "trigger_offset": { "type": "number", "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, "trigger": { "$ref": "#/components/schemas/trigger", "description": "Defines the trigger type. Required for \"Stop-Loss\", \"Take-Profit\" and \"Trailing\" trigger orders" } } } }, "description": "List of orders to create or cancel when this order is filled.", "required": false, "style": "form", "explode": true }, "trigger_fill_condition": { "name": "trigger_fill_condition", "in": "query", "schema": { "type": "string", "enum": [ "first_hit", "complete_fill", "incremental" ], "default": "first_hit" }, "required": false, "description": "

The fill condition of the linked order (Only for linked order types), default: `first_hit`.

" }, "order_side": { "name": "side", "in": "query", "schema": { "type": "string", "$ref": "#/components/schemas/side" }, "required": false, "description": "Side - `buy` or `sell`" }, "time_in_force": { "name": "time_in_force", "in": "query", "schema": { "type": "string", "default": "good_til_cancelled", "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ] }, "required": false, "description": "

Specifies how long the order remains in effect. Default `\"good_til_cancelled\"`

" }, "length_for_perpetual_chart": { "name": "length", "in": "query", "schema": { "type": "string", "enum": [ "8h", "24h", "1m" ] }, "required": true, "description": "Specifies time period. `8h` - 8 hours, `24h` - 24 hours, `1m` - 1 month" }, "max_show": { "name": "max_show", "in": "query", "schema": { "type": "number", "default": 1 }, "required": false, "description": "Deprecated. Maximum amount within an order to be shown to other customers, `0` for invisible order" }, "display_amount": { "name": "display_amount", "in": "query", "schema": { "type": "number", "default": 1 }, "required": false, "description": "Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well." }, "post_only_buy": { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread.

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, "post_only_sell": { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just above the spread.

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, "post_only_edit": { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": true }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, "post_only_secondary": { "name": "post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (according to the direction of the order).

Only valid in combination with time_in_force=`\"good_til_cancelled\"`

" }, "reject_post_only": { "name": "reject_post_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with `\"post_only\"` set to true

" }, "optional_default": { "name": "default", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, new key is marked as default" }, "reduce_only": { "name": "reduce_only", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "If `true`, the order is considered reduce-only which is intended to only reduce a current position" }, "trigger_price": { "name": "trigger_price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)" }, "trigger_offset": { "name": "trigger_offset", "in": "query", "schema": { "type": "number" }, "required": false, "description": "The maximum deviation from the price peak beyond which the order will be triggered" }, "mmp": { "name": "mmp", "in": "query", "schema": { "type": "boolean", "default": false }, "required": false, "description": "Order MMP flag, only for order_type 'limit'" }, "valid_until": { "name": "valid_until", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time." }, "trigger": { "name": "trigger", "in": "query", "schema": { "$ref": "#/components/schemas/trigger" }, "required": false, "description": "Defines the trigger type. Required for `\"Stop-Loss\"`, `\"Take-Profit\"` and `\"Trailing\"` trigger orders" }, "advanced_order_type": { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.)" }, "edit_advanced_order_type": { "name": "advanced", "in": "query", "schema": { "$ref": "#/components/schemas/advanced" }, "required": false, "description": "Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options)" }, "optional_price": { "name": "price", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Optional price for limit order." }, "currency_custody_address": { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Custody address in currency format" }, "currency_address_from_address_book": { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format, it must be in address book" }, "currency_address": { "name": "address", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Address in currency format" }, "transfer_currency_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be transferred" }, "withdrawal_currency_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of funds to be withdrawn" }, "deposit_currency_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount of deposited funds" }, "currency_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Amount" }, "optional_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Amount" }, "withdrawal_priority": { "name": "priority", "in": "query", "schema": { "type": "string", "enum": [ "insane", "extreme_high", "very_high", "high", "mid", "low", "very_low" ] }, "required": false, "description": "Withdrawal priority, optional for BTC, default: `high`" }, "withdrawal_id": { "in": "query", "name": "id", "required": true, "schema": { "type": "number", "example": 1 }, "description": "The withdrawal id" }, "boolean_state": { "name": "state", "required": true, "in": "query", "schema": { "type": "boolean" } }, "boolean_value": { "name": "value", "required": true, "in": "query", "schema": { "type": "boolean" } }, "boolean_enabled": { "name": "enabled", "required": true, "in": "query", "schema": { "type": "boolean" } }, "address_book_type": { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type" }, "required": true, "description": "Address book type" }, "address_book_type_without_deposit_source": { "name": "type", "in": "query", "schema": { "$ref": "#/components/schemas/address_book_type_without_deposit_source" }, "required": true, "description": "Address book type" }, "address_label": { "name": "label", "in": "query", "schema": { "$ref": "#/components/schemas/address_label" }, "required": true, "description": "Label of the address book entry" }, "beneficiary_vasp_name": { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": true, "description": "Name of beneficiary VASP" }, "beneficiary_vasp_did": { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": true, "description": "DID of beneficiary VASP" }, "beneficiary_first_name": { "name": "beneficiary_first_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_first_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, "beneficiary_last_name": { "name": "beneficiary_last_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_last_name" }, "description": "First name of beneficiary (if beneficiary is a person)", "required": false }, "beneficiary_company_name": { "name": "beneficiary_company_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_company_name" }, "description": "Beneficiary company name (if beneficiary is a company)", "required": false }, "beneficiary_address": { "name": "beneficiary_address", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_address" }, "required": true, "description": "Geographical address of the beneficiary" }, "beneficiary_vasp_website": { "name": "beneficiary_vasp_website", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "required": false, "description": "Website of the beneficiary VASP. Required if the address book entry is associated with a VASP that is not included in the list of known VASPs" }, "agree_to_share_with_3rd_party": { "name": "agreed", "in": "query", "schema": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "required": true, "description": "Indicates that the user agreed to shared provided information with 3rd parties" }, "personal_wallet": { "name": "personal", "in": "query", "schema": { "$ref": "#/components/schemas/personal_wallet" }, "required": true, "description": "The user confirms that he provided address belongs to him and he has access to it via an un-hosted wallet software" }, "extra_currencies": { "name": "extra_currencies", "in": "query", "schema": { "$ref": "#/components/schemas/extra_currencies" }, "description": "The user can pass a list of currencies to add the address for. It is currently available ONLY for ERC20 currencies. Without passing this paramater for an ERC20 currency, the address will be added to ALL of the ERC20 currencies.", "required": false }, "transfer_direction": { "name": "direction", "in": "query", "schema": { "$ref": "#/components/schemas/transfer_direction" }, "required": true, "description": "Direction of transfer" }, "transfer_destination_for_user": { "name": "destination", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Destination wallet's address taken from address book" }, "transfer_destination_for_subaccount": { "name": "destination", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of destination subaccount. Can be found in `My Account >> Subaccounts` tab" }, "transfer_source_for_subaccount": { "name": "source", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": false, "description": "Id of the source (sub)account. Can be found in `My Account >> Subaccounts` tab. By default, it is the Id of the account which made the request. However, if a different \"source\" is specified, the user must possess the mainaccount scope, and only other subaccounts can be designated as the source." }, "user_id": { "name": "user_id", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of a (sub)account" }, "optional_user_id": { "name": "user_id", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": false, "description": "Id of a (sub)account - by default current user id is used" }, "trade_allocation_user_id": { "name": "user_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "User ID (subaccount or main account) to allocate part of the RFQ amount." }, "trade_allocation_client_id": { "name": "client_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "trade_allocation_client_link_id": { "name": "client_link_id", "in": "query", "schema": { "type": "integer" }, "required": false, "description": "ID assigned to a single user in a client; available to broker." }, "trade_allocation_client_info": { "name": "client_info", "in": "query", "schema": { "type": "string", "description": "JSON string containing: client_id, client_link_id" }, "required": false, "description": "Client allocation info for brokers." }, "trade_allocation_amount": { "name": "amount", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Amount allocated to this user or client." }, "pme_enabled": { "name": "enabled", "in": "query", "schema": { "type": "boolean", "example": true }, "required": true, "description": "Whether PM or SM should be enabled - PM while `true`, SM otherwise" }, "dry_run": { "name": "dry_run", "in": "query", "schema": { "type": "boolean", "example": true }, "required": false, "description": "If `true` request returns the result without switching the margining model. Default: `false`" }, "margin_model": { "name": "margin_model", "in": "query", "schema": { "type": "string", "enum": [ "cross_pm", "cross_sm", "segregated_pm", "segregated_sm" ] }, "required": true, "description": "Margin model" }, "position_move_source_uid": { "name": "source_uid", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of source subaccount. Can be found in `My Account >> Subaccounts` tab" }, "position_move_target_uid": { "name": "target_uid", "in": "query", "schema": { "type": "integer", "example": 1 }, "required": true, "description": "Id of target subaccount. Can be found in `My Account >> Subaccounts` tab" }, "transfer_id": { "name": "id", "in": "query", "schema": { "$ref": "#/components/schemas/transfer_id" }, "required": true, "description": "Id of transfer" }, "tfa": { "name": "tfa", "in": "query", "schema": { "type": "string" }, "required": false, "description": "TFA code, required when TFA is enabled for current account" }, "client_software_name": { "name": "client_name", "in": "query", "schema": { "type": "string", "example": "My Trading Software" }, "required": true, "description": "Client software name" }, "client_software_version": { "name": "client_version", "in": "query", "schema": { "type": "string", "example": "1.0.2" }, "required": true, "description": "Client software version" }, "chart_resolution": { "name": "resolution", "in": "query", "schema": { "type": "string", "enum": [ 1, 3, 5, 10, 15, 30, 60, 120, 180, 360, 720, "1D" ] }, "required": true, "description": "Chart bars resolution given in full minutes or keyword `1D` (only some specific resolutions are supported)" }, "vix_resolution": { "name": "resolution", "in": "query", "schema": { "type": "string", "enum": [ 1, 60, 3600, 43200, "1D" ] }, "required": true, "description": "Time resolution given in full seconds or keyword `1D` (only some specific resolutions are supported)" }, "key_id": { "name": "id", "in": "query", "required": true, "schema": { "type": "integer", "example": 1 }, "description": "API key ID" }, "key_name": { "name": "name", "in": "query", "schema": { "type": "string", "example": "TestName" }, "description": "Name of key (only letters, numbers and underscores allowed; maximum length - 16 characters)", "required": false }, "key_name_required": { "name": "name", "in": "query", "schema": { "type": "string", "example": "TestName" }, "required": true, "description": "Name of key (only letters, numbers and underscores allowed; maximum length - 16 characters)" }, "key_scope": { "name": "max_scope", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/max_scope" }, "description": "Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.\n\n**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)\n" }, "key_features": { "name": "enabled_features", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "restricted_block_trades", "block_trade_approval" ] } }, "description": "List of enabled advanced on-key features. Available options:
- `restricted_block_trades`: Limit the block_trade read the scope of the API key to block trades that have been made using this specific API key
- `block_trade_approval`: Block trades created using this API key require additional user approval. Methods that use `block_rfq` scope are not affected by Block Trade approval feature
", "style": "form", "explode": true }, "enable_key": { "name": "enabled", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Enables/disables the API key. `true` to enable, `false` to disable" }, "whitelist_ip": { "name": "ip_whitelist", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "description": "Whitelist provided IP address on a selected key", "style": "form", "explode": true }, "public_key": { "name": "public_key", "in": "query", "required": false, "schema": { "type": "string", "example": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAM7FWhKquNqLmTOV4hfYT5r3AjrYiORTT6Tn5HIfFNV8=\n-----END PUBLIC KEY-----" }, "description": "ED25519 or RSA PEM Encoded public key that should be used to create asymmetric API Key for signing requests/authentication requests with user's private key.

**📖 Related Article:** [Asymmetric API keys](https://docs.deribit.com/articles/asymmetric-api-keys)" }, "optional_query": { "name": "query", "in": "query", "schema": { "type": "string", "example": "settlement" }, "required": false, "description": "The following keywords can be used to filter the results: `trade`, `maker`, `taker`, `open`, `close`, `liquidation`, `buy`, `sell`, `withdrawal`, `delivery`, `settlement`, `deposit`, `transfer`, `option`, `future`, `correction`, `block_trade`, `swap`. Plus withdrawal or transfer addresses" }, "email": { "name": "email", "in": "query", "schema": { "type": "string", "example": "john.doe@example.com" }, "required": true, "description": "Email address of account" }, "recovery_code": { "name": "code", "in": "query", "schema": { "type": "string" }, "required": true, "description": "One time recovery code" }, "password": { "name": "password", "in": "query", "schema": { "type": "string" }, "required": true, "description": "The password for the account" }, "cod_scope": { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "connection", "account" ] }, "description": "Specifies if Cancel On Disconnect change should be applied/checked for the current connection or the account (default - `connection`)

**NOTICE:** Scope `connection` can be used only when working via Websocket." }, "range": { "name": "range", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "1h", "1d", "2d", "1m", "1y", "all" ] }, "description": "Range of the data to return" }, "extended_volume_statistics": { "name": "extended", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Request for extended statistics. Including also 7 and 30 days volumes (default false)" }, "custody_name": { "name": "custody", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/custody_name" }, "description": "Custody name" }, "client_id": { "name": "client_id", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/client_id" }, "description": "API key client_id" }, "security_key_name": { "name": "name", "required": true, "in": "query", "schema": { "type": "string" }, "description": "Name of security key, only alpha numeric chars allowed with - and _" }, "security_key_id": { "name": "key_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "Security Key Id" }, "security_key_reset_code": { "name": "code", "required": true, "in": "query", "schema": { "type": "string" }, "description": "Security Key reset code" }, "invalidate_token": { "name": "invalidate_token", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Token Invalidation: By default, all tokens created during the current session are invalidated when you call this method. You can control this behavior using this parameter: " }, "self_trading_mode": { "name": "mode", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "reject_taker", "cancel_maker" ] }, "description": "Self trading prevention behavior: `reject_taker` (reject the incoming order), `cancel_maker` (cancel the matched order in the book)" }, "extended_to_subaccounts": { "name": "extended_to_subaccounts", "in": "query", "required": true, "schema": { "type": "boolean" }, "description": "If value is `true` trading is prevented between subaccounts of given account, otherwise they are treated separately" }, "block_rfq_self_match_prevention": { "name": "block_rfq_self_match_prevention", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "When Block RFQ Self Match Prevention is enabled, it ensures that RFQs cannot be executed between accounts that belong to the same legal entity. This setting is independent of the general self-match prevention settings and must be configured separately." }, "request_id": { "name": "requestId", "required": true, "in": "query", "schema": { "type": "string" }, "description": "Request ID" }, "balance": { "name": "balance", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Current custody balance of the user" }, "difference": { "name": "difference", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Difference between current \"in exchange\" balance and current custody balance that happened due to the settlement." }, "jwt_recipient": { "name": "recipient", "in": "query", "schema": { "type": "string", "enum": [ "zendesk" ] }, "description": "Recipient of the token", "required": false }, "external_id": { "name": "external_id", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/external_id" }, "description": "User ID in the external system. (i.e. in custodian system)" }, "business_registration_number": { "name": "business_registration_number", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/business_registration_number" }, "description": "The registration number of the company" }, "trading_products": { "name": "trading_products", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "perpetual", "futures", "options", "future_combos", "option_combos", "spots" ] } }, "description": "List of available trading products. Available products: perpetual, futures, options, future_combos, option_combos, spots\n", "style": "form", "explode": true }, "withdrawal_policy_mode": { "name": "mode", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/withdrawal_policy_mode" }, "description": "Withdrawal Policy mode" }, "withdrawal_policy_limit_bucket": { "name": "limit_bucket", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/withdrawal_policy_limit_bucket" }, "description": "Withdrawal Policy limit bucket" }, "withdrawal_policy_category": { "name": "category", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/withdrawal_policy_category" }, "description": "Withdrawal Policy category" }, "withdrawal_policy_amount": { "name": "amount", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/withdrawal_policy_amount" }, "description": "Amount or flag to use default value" }, "simulated_positions_map": { "name": "simulated_positions", "required": false, "in": "query", "schema": { "type": "string", "description": "JSON string containing: object data" }, "description": "Object with positions in following form: `{InstrumentName1: Position1, InstrumentName2: Position2...}`, for example `{\"BTC-PERPETUAL\": -1000.0}` (or corresponding URI-encoding for GET). For futures in USD, for options in base currency." }, "simulated_positions_map_base": { "name": "simulated_positions", "required": false, "in": "query", "schema": { "type": "string", "description": "JSON string containing: object data" }, "description": "Object with positions in following form: `{InstrumentName1: Position1, InstrumentName2: Position2...}`, for example `{\"BTC-PERPETUAL\": -1.0}` (or corresponding URI-encoding for GET). Size in base currency." }, "add_positions": { "name": "add_positions", "required": false, "in": "query", "schema": { "type": "boolean" }, "description": "If `true`, adds simulated positions to current positions, otherwise uses only simulated positions. By default `true`" }, "leg_ratio": { "name": "ratio", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "Ratio of amount between legs" }, "block_rfq_id": { "name": "block_rfq_id", "required": true, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, "optional_block_rfq_id": { "name": "block_rfq_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ" }, "block_rfq_label": { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ (maximum 64 characters)" }, "block_rfq_amount": { "in": "query", "name": "amount", "required": true, "schema": { "$ref": "#/components/schemas/amount" }, "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "block_rfq_legs": { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg" } } } }, "description": "List of legs used to create Block RFQ", "style": "form", "explode": true }, "block_rfq_hedge_leg": { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, "block_rfq_trade_legs": { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" }, "ratio": { "type": "integer", "description": "Ratio of amount between legs" } } } }, "description": "List of legs used to trade Block RFQ", "style": "form", "explode": true }, "block_rfq_legs_quote": { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "price": { "type": "number", "description": "Price for trade" }, "ratio": { "type": "integer", "description": "Ratio of amount between legs" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" } } } }, "description": "List of legs used for Block RFQ quote", "style": "form", "explode": true }, "block_rfq_hedge_leg_quote": { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, "block_rfq_hedge_leg_trade": { "in": "query", "name": "hedge", "required": false, "schema": { "type": "string", "description": "JSON string containing: instrument_name, direction, price, amount" }, "description": "Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ" }, "block_rfq_quote_id": { "name": "block_rfq_quote_id", "required": false, "in": "query", "schema": { "type": "integer" }, "description": "ID of the Block RFQ quote" }, "block_rfq_quote_label": { "name": "label", "in": "query", "schema": { "type": "string" }, "required": false, "description": "User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ" }, "hedge_leg_price": { "name": "price", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Hedge leg price" }, "block_rfq_makers": { "name": "makers", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false, "description": "List of targeted Block RFQ makers. Only those makers will be notified about created Block RFQ. If the list is empty, all available makers will be targeted.", "style": "form", "explode": true }, "execution_instruction": { "name": "execution_instruction", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "all_or_none", "any_part_of" ] }, "description": "

Execution instruction of the quote. Default - `any_part_of`

" }, "block_rfq_count": { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1 }, "description": "Count of Block RFQs returned, maximum - `1000`" }, "block_trade_count": { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 101, "minimum": 1 }, "description": "Count of Block Trades returned, maximum - `101`" }, "transaction_log_count": { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1 }, "description": "Count of transaction log entries returned, default - `100`, maximum - `250`" }, "block_rfq_continuation": { "name": "continuation", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "The continuation parameter specifies the starting point for fetching historical Block RFQs. When provided, the endpoint returns Block RFQs, starting from the specified ID and continuing backward (e.g., if `continuation` is 50, results will include Block RFQs of ID 49, 48, etc.)" }, "block_rfq_string_continuation": { "name": "continuation", "in": "query", "required": false, "schema": { "type": "string", "example": "1738050297271:103" }, "description": "Continuation token for pagination. Consists of `timestamp` and `block_rfq_id`." }, "block_rfq_state": { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "open", "filled", "traded", "cancelled", "expired", "closed" ] }, "description": "State of Block RFQ" }, "block_rfq_role": { "name": "role", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "any", "taker", "maker" ] }, "description": "Role of the user in Block RFQ. When the `any` role is selected, the method returns all Block RFQs in which the user has participated, either as the `taker` or as a `maker`" }, "block_rfq_taker_direction": { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of the trade from the taker perspective" }, "block_rfq_leg_direction": { "in": "query", "name": "direction", "required": true, "schema": { "$ref": "#/components/schemas/direction" }, "description": "Direction of selected leg. Must match the direction of the corresponding leg in the Block RFQ" }, "legs_for_prices": { "in": "query", "name": "legs", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name", "description": "Instrument name" }, "amount": { "$ref": "#/components/schemas/amount", "description": "It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "direction": { "$ref": "#/components/schemas/direction", "description": "Direction of selected leg" } } } }, "description": "List of legs for which the prices will be calculated", "style": "form", "explode": true }, "legs_price": { "name": "price", "in": "query", "schema": { "type": "number" }, "required": true, "description": "Price for the whole leg structure" }, "deposit_id": { "in": "query", "name": "deposit_id", "required": true, "schema": { "type": "string", "description": "JSON string containing: currency, user_id, address, tx_hash" }, "description": "Id of the deposit" }, "originator": { "in": "query", "name": "originator", "required": true, "schema": { "type": "string", "description": "JSON string containing: is_personal, company_name, first_name, last_name, address" }, "description": "Information about the originator of the deposit" }, "tx_hash": { "name": "tx_hash", "in": "query", "required": true, "schema": { "type": "string" }, "example": "1b1fb5568515e2b79503501e3d3680b2d0838d5dfc2d15a04eb8cd9fbbe0b572", "description": "Transaction id in a proper format for the currency" }, "is_personal": { "name": "is_personal", "in": "query", "required": true, "schema": { "type": "boolean" }, "description": "If the user is the originator of the deposit" }, "company_name": { "name": "company_name", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Company name of the originator if the originator is a legal entity" }, "first_name": { "name": "first_name", "in": "query", "required": true, "schema": { "type": "string" }, "description": "If the user is the originator of the deposit" }, "last_name": { "name": "last_name", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Last name of the originator if the originator is a person" }, "address": { "name": "address", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Geographical address of the originator" }, "optional_subaccount_id": { "name": "subaccount_id", "in": "query", "required": false, "schema": { "type": "integer", "example": 9 }, "description": "Id of a subaccount" }, "historical": { "name": "historical", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether historical trade and order records should be retrieved.\n\n- `false` (default): Returns recent records: orders for 30 min, trades for 24h.\n- `true`: Fetches historical records, available after a short delay due to indexing. Recent data is not included.\n\n**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)\n" }, "with_continuation": { "name": "with_continuation", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "When set to true, the API response format changes from a simple list of orders to an object containing the orders and a continuation token." }, "disclosed": { "name": "disclosed", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Determines whether the RFQ is non-anonymous, revealing both taker and maker aliases. It can be set to `false` (anonymous mode) only when at least 5 makers are targeted. Default value is `true`." }, "custody_settlement_id": { "name": "id", "in": "query", "required": true, "schema": { "type": "string", "example": "dec42708-2ec6-4cdd-8f9d-d49bbe94d0aa" }, "description": "Unique identifier of the settlement." }, "custody_settlement_review_reason": { "name": "reason", "in": "query", "required": false, "schema": { "type": "string", "example": "Balance discrepancy" }, "description": "Optional reason provided for ignoring or rejecting the instruction" }, "custody_settlement_review_action": { "name": "action", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "confirm", "ignore", "reject" ] }, "description": "Action taken by the custodian" }, "custody_settlement_review": { "in": "query", "name": "currencies", "required": true, "schema": { "type": "string", "description": "JSON string containing: currency, action, reason" }, "description": "List of review instructions for each currency" }, "expected_custody_balance": { "name": "expected_custody_balance", "in": "query", "required": true, "schema": { "type": "number", "example": 2.341 }, "description": "Expected custody balance of the user" }, "custody_settlement_amount": { "name": "amount", "in": "query", "required": true, "schema": { "type": "number", "example": 2.341 }, "description": "Amount to be settled" }, "custody_balance": { "in": "query", "name": "custody_balance", "required": true, "schema": { "type": "number" }, "description": "Balance of the user in the custodian system." }, "custody_settlement_initiate": { "in": "query", "name": "currencies", "required": true, "schema": { "type": "string", "description": "JSON string containing: currency, custody_balance" }, "description": "Request settlement for the given currencies" }, "custody_currency": { "name": "currency", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The currency supported by custodian and exchange" }, "expires_at": { "name": "expires_at", "required": false, "in": "query", "schema": { "type": "integer", "example": 1745312540321 }, "description": "The timestamp when the quote expires (milliseconds since the Unix epoch)" }, "address_tag": { "name": "tag", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Tag for XRP addresses" }, "unhosted_wallet": { "name": "unhosted", "in": "query", "schema": { "type": "boolean" }, "required": true, "description": "Indicates if the address belongs to an unhosted wallet" }, "wallet_currency_optional": { "name": "currency", "required": false, "in": "query", "schema": { "$ref": "#/components/schemas/wallet_currency" }, "description": "The currency symbol" }, "currency_address_optional": { "name": "address", "in": "query", "schema": { "type": "string" }, "required": false, "description": "Address in currency format" }, "created_before": { "name": "created_before", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by creation timestamp (before)" }, "created_after": { "name": "created_after", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by creation timestamp (after)" }, "updated_before": { "name": "updated_before", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by update timestamp (before)" }, "updated_after": { "name": "updated_after", "in": "query", "schema": { "$ref": "#/components/schemas/timestamp" }, "required": false, "description": "Filter by update timestamp (after)" }, "personal_wallet_optional": { "name": "personal", "in": "query", "schema": { "type": "boolean" }, "required": false, "description": "Filter by personal wallet flag" }, "unhosted_wallet_optional": { "name": "unhosted", "in": "query", "schema": { "type": "boolean" }, "required": false, "description": "Filter by unhosted wallet flag" }, "beneficiary_vasp_name_optional": { "name": "beneficiary_vasp_name", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "required": false, "description": "Filter by beneficiary VASP name" }, "beneficiary_vasp_did_optional": { "name": "beneficiary_vasp_did", "in": "query", "schema": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "required": false, "description": "Filter by beneficiary VASP DID" }, "limit_optional": { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 }, "required": false, "description": "Maximum number of results to return" }, "trade_allocations": { "name": "trade_allocations", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "integer", "description": "User ID (subaccount or main account) to allocate part of the RFQ amount." }, "client_info": { "type": "object", "properties": { "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } }, "description": "Client allocation info for brokers." }, "amount": { "type": "number", "description": "Amount allocated to this user or client." } } } }, "description": "List of allocations for Block RFQ pre-allocation. Allows to split amount between different (sub)accounts or broker clients. Each allocation must specify either `user_id` (for direct allocation) or `client_info` object (for broker allocation), and amount.", "style": "form", "explode": true } }, "schemas": { "custody_account": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "name": { "$ref": "#/components/schemas/custody_name" }, "balance": { "$ref": "#/components/schemas/currency_amount", "description": "Balance available on custody account" }, "pending_withdrawal_balance": { "$ref": "#/components/schemas/currency_amount", "description": "Pending balance transferred from trading account to custody account" }, "auto_deposit": { "type": "boolean", "description": "When set to 'true' all new funds added to custody balance will be automatically transferred to trading balance" }, "client_id": { "type": "string", "description": "API key 'client id' used to reserve/release funds in custody platform, requires scope 'custody:read_write'" }, "external_id": { "$ref": "#/components/schemas/external_id" }, "withdrawal_address": { "type": "string", "description": "Address that is used for withdrawals" }, "withdrawal_address_change": { "type": "number", "description": "UNIX timestamp after when new withdrawal address will be used for withdrawals" }, "pending_withdrawal_addres": { "type": "string", "description": "New withdrawal address that will be used after 'withdrawal_address_change'" }, "deposit_address": { "type": "string", "description": "Address that can be used for deposits" } }, "required": [ "currency", "name", "pending_withdrawal_balance" ], "type": "object", "description": "Custody account" }, "custody_log": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "request_id": { "type": "string", "description": "Request ID" }, "request": { "type": "string", "enum": [ "add_funds", "remove_funds", "deposit_funds", "withdraw_funds" ], "description": "Request type" }, "success": { "type": "boolean", "description": "When request was successful set to `true`" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "amount": { "$ref": "#/components/schemas/currency_amount" } }, "required": [ "currency", "request_id", "request", "success", "timestamp" ], "type": "object", "description": "Custody log" }, "book_summary": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "high": { "example": 7022.89, "type": "number", "description": "Price of the 24h highest trade" }, "low": { "example": 7022.89, "type": "number", "description": "Price of the 24h lowest trade, `null` if there weren't any trades" }, "base_currency": { "example": "ETH", "type": "string", "description": "Base currency" }, "quote_currency": { "example": "USD", "type": "string", "description": "Quote currency" }, "volume": { "example": 223, "type": "number", "description": "The total 24h traded volume (in base currency)" }, "bid_price": { "example": 7022.89, "type": "number", "description": "The current best bid price, `null` if there aren't any bids" }, "ask_price": { "example": 7022.89, "type": "number", "description": "The current best ask price, `null` if there aren't any asks" }, "mid_price": { "example": 7022.89, "type": "number", "description": "The average of the best bid and ask, `null` if there aren't any asks or bids" }, "mark_price": { "example": 7022.89, "type": "number", "description": "The current instrument market price" }, "last": { "example": 7022.89, "type": "number", "description": "The price of the latest trade, `null` if there weren't any trades" }, "open_interest": { "example": 0.5, "type": "number", "description": "Optional (only for derivatives). The total amount of outstanding contracts in the corresponding amount units. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "creation_timestamp": { "$ref": "#/components/schemas/timestamp" }, "estimated_delivery_price": { "example": 11628.81, "type": "number", "description": "Optional (only for derivatives). Estimated delivery price for the market." }, "volume_usd": { "type": "number", "description": "Volume in USD" }, "volume_notional": { "type": "number", "description": "Volume in quote currency (futures and spots only)" }, "current_funding": { "type": "number", "example": 0.12344, "description": "Current funding (perpetual only)" }, "funding_8h": { "type": "number", "description": "Funding 8h (perpetual only)" }, "mark_iv": { "$ref": "#/components/schemas/mark_iv" }, "interest_rate": { "example": 0, "type": "number", "description": "Interest rate used in implied volatility calculations (options only)" }, "underlying_index": { "example": "index_price", "type": "string", "description": "Name of the underlying future, or `'index_price'` (options only)" }, "underlying_price": { "example": 6745.34, "type": "number", "description": "underlying price for implied volatility calculations (options only)" }, "price_change": { "example": 10.23, "type": "number", "description": "24-hour price change expressed as a percentage, `null` if there weren't any trades" } }, "required": [ "instrument_name", "high", "low", "base_currency", "quote_currency", "volume", "bid_price", "ask_price", "mid_price", "mark_price", "last", "open_interest", "creation_timestamp" ], "type": "object" }, "position": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "kind": { "$ref": "#/components/schemas/kind" }, "average_price": { "type": "number", "description": "Average price of trades that built this position" }, "direction": { "$ref": "#/components/schemas/position_direction" }, "mark_price": { "type": "number", "description": "Current mark price for position's instrument" }, "delta": { "type": "number", "description": "Delta parameter" }, "gamma": { "type": "number", "description": "Only for options, Gamma parameter" }, "vega": { "type": "number", "description": "Only for options, Vega parameter" }, "theta": { "type": "number", "description": "Only for options, Theta parameter" }, "index_price": { "type": "number", "description": "Current index price" }, "initial_margin": { "type": "number", "description": "Initial margin" }, "maintenance_margin": { "type": "number", "description": "Maintenance margin" }, "settlement_price": { "type": "number", "description": "Optional (not added for spot). Last settlement price for position's instrument 0 if instrument wasn't settled yet" }, "total_profit_loss": { "type": "number", "description": "Profit or loss from position" }, "floating_profit_loss": { "type": "number", "description": "Floating profit or loss" }, "realized_profit_loss": { "type": "number", "description": "Realized profit or loss" }, "size": { "type": "number", "description": "Position size for futures size in quote currency (e.g. USD), for options size is in base currency (e.g. BTC)" }, "size_currency": { "type": "number", "description": "Only for futures, position size in base currency" }, "average_price_usd": { "type": "number", "description": "Only for options, average price in USD" }, "floating_profit_loss_usd": { "type": "number", "description": "Only for options, floating profit or loss in USD" }, "leverage": { "type": "integer", "description": "Current available leverage for future position" }, "realized_funding": { "type": "number", "description": "Realized Funding in current session included in session realized profit or loss, only for positions of perpetual instruments" }, "interest_value": { "type": "number", "description": "Value used to calculate `realized_funding` (perpetual only)" } }, "required": [ "instrument_name", "kind", "average_price", "direction", "mark_price", "delta", "index_price", "initial_margin", "maintenance_margin", "settlement_price", "total_profit_loss", "floating_profit_loss", "realized_profit_loss", "size" ], "type": "object" }, "position_with_elp": { "allOf": [ { "$ref": "#/components/schemas/position" }, { "properties": { "estimated_liquidation_price": { "type": "number", "description": "Estimated liquidation price, added only for futures, for users with `segregated_sm` margin model" }, "open_orders_margin": { "type": "number", "description": "Open orders margin" } }, "required": [ "estimated_liquidation_price", "open_orders_margin" ] } ] }, "transfer_item": { "properties": { "id": { "$ref": "#/components/schemas/transfer_id" }, "created_timestamp": { "$ref": "#/components/schemas/timestamp" }, "type": { "$ref": "#/components/schemas/transfer_type" }, "currency": { "$ref": "#/components/schemas/currency" }, "amount": { "$ref": "#/components/schemas/currency_amount" }, "other_side": { "$ref": "#/components/schemas/transfer_other_side" }, "state": { "$ref": "#/components/schemas/transfer_state" }, "direction": { "$ref": "#/components/schemas/transfer_direction" }, "updated_timestamp": { "$ref": "#/components/schemas/timestamp" }, "nonce": { "type": "string", "description": "Optional idempotency nonce if provided in the request" } }, "required": [ "currency", "id", "type", "amount", "state", "other_side", "updated_timestamp", "created_timestamp" ], "type": "object" }, "address_book_item": { "properties": { "currency": { "$ref": "#/components/schemas/wallet_currency" }, "address": { "$ref": "#/components/schemas/currency_address" }, "creation_timestamp": { "$ref": "#/components/schemas/timestamp" }, "type": { "$ref": "#/components/schemas/address_book_type" }, "label": { "$ref": "#/components/schemas/address_label" }, "beneficiary_vasp_name": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "beneficiary_vasp_did": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "beneficiary_vasp_website": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "beneficiary_first_name": { "$ref": "#/components/schemas/beneficiary_first_name" }, "beneficiary_last_name": { "$ref": "#/components/schemas/beneficiary_last_name" }, "beneficiary_company_name": { "$ref": "#/components/schemas/beneficiary_company_name" }, "beneficiary_address": { "$ref": "#/components/schemas/beneficiary_address" }, "agreed": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "personal": { "$ref": "#/components/schemas/personal_wallet" }, "info_required": { "$ref": "#/components/schemas/address_info_required" }, "status": { "$ref": "#/components/schemas/status" }, "waiting_timestamp": { "$ref": "#/components/schemas/waiting_timestamp" }, "requires_confirmation": { "$ref": "#/components/schemas/requires_confirmation" }, "requires_confirmation_change": { "$ref": "#/components/schemas/requires_confirmation_change" } }, "required": [ "currency", "address", "creation_timestamp" ], "type": "object" }, "address_beneficiary_item": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "address": { "$ref": "#/components/schemas/currency_address" }, "tag": { "type": "string", "nullable": true, "description": "Tag for XRP addresses (optional)" }, "user_id": { "$ref": "#/components/schemas/user_id" }, "agreed": { "$ref": "#/components/schemas/agree_to_share_with_3rd_party" }, "personal": { "$ref": "#/components/schemas/personal_wallet" }, "unhosted": { "$ref": "#/components/schemas/unhosted_wallet" }, "beneficiary_vasp_name": { "$ref": "#/components/schemas/beneficiary_vasp_name" }, "beneficiary_vasp_did": { "$ref": "#/components/schemas/beneficiary_vasp_did" }, "beneficiary_vasp_website": { "$ref": "#/components/schemas/beneficiary_vasp_website" }, "beneficiary_first_name": { "$ref": "#/components/schemas/beneficiary_first_name" }, "beneficiary_last_name": { "$ref": "#/components/schemas/beneficiary_last_name" }, "beneficiary_company_name": { "$ref": "#/components/schemas/beneficiary_company_name" }, "beneficiary_address": { "$ref": "#/components/schemas/beneficiary_address" }, "created": { "$ref": "#/components/schemas/timestamp" }, "updated": { "$ref": "#/components/schemas/timestamp" } }, "required": [ "currency", "address", "user_id", "agreed", "personal", "unhosted", "beneficiary_vasp_name", "beneficiary_vasp_did", "beneficiary_address", "created", "updated" ], "type": "object" }, "address_ownership_item": { "properties": { "owner_vasp_did": { "$ref": "#/components/schemas/did" }, "address": { "$ref": "#/components/schemas/currency_address" }, "address_type": { "$ref": "#/components/schemas/currency_address_type" }, "asset": { "$ref": "#/components/schemas/currency" }, "source": { "$ref": "#/components/schemas/source" } }, "required": [ "owner_vasp_did", "address", "address_type", "asset", "source" ], "type": "object" }, "vasp_item": { "properties": { "did": { "$ref": "#/components/schemas/did" }, "jurisdictions": { "$ref": "#/components/schemas/jurisdictions" }, "name": { "$ref": "#/components/schemas/vasp_name" } }, "required": [ "did", "name" ], "type": "object" }, "withdrawal": { "properties": { "address": { "$ref": "#/components/schemas/currency_address" }, "amount": { "$ref": "#/components/schemas/currency_amount" }, "confirmed_timestamp": { "type": "integer", "example": 1536569522277, "nullable": true, "description": "The timestamp (milliseconds since the Unix epoch) of withdrawal confirmation, `null` when not confirmed" }, "created_timestamp": { "$ref": "#/components/schemas/timestamp" }, "currency": { "$ref": "#/components/schemas/currency" }, "fee": { "$ref": "#/components/schemas/fee" }, "id": { "type": "integer", "example": 1, "description": "Withdrawal id in Deribit system" }, "priority": { "type": "number", "example": 1, "description": "Id of priority level" }, "state": { "$ref": "#/components/schemas/withdrawal_state" }, "transaction_id": { "$ref": "#/components/schemas/currency_transaction_id" }, "updated_timestamp": { "$ref": "#/components/schemas/timestamp" }, "nonce": { "type": "string", "description": "Optional idempotency nonce if provided in the request" } }, "required": [ "currency", "address", "amount", "state", "transaction_id", "updated_timestamp" ], "type": "object" }, "deposit": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "address": { "$ref": "#/components/schemas/currency_address" }, "amount": { "$ref": "#/components/schemas/currency_amount" }, "state": { "$ref": "#/components/schemas/deposit_state" }, "transaction_id": { "$ref": "#/components/schemas/currency_transaction_id" }, "source_address": { "$ref": "#/components/schemas/currency_address" }, "received_timestamp": { "$ref": "#/components/schemas/timestamp" }, "updated_timestamp": { "$ref": "#/components/schemas/timestamp" }, "note": { "type": "string" }, "clearance_state": { "$ref": "#/components/schemas/clearance_state" }, "refund_transaction_id": { "$ref": "#/components/schemas/currency_transaction_id" } }, "required": [ "currency", "address", "amount", "state", "transaction_id", "received_timestamp", "updated_timestamp" ], "type": "object" }, "portfolio": { "properties": { "btc(example)": { "$ref": "#/components/schemas/currency_portfolio" } }, "type": "object" }, "trades_volumes": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "calls_volume": { "example": 20.1, "type": "number", "description": "Total 24h trade volume for call options." }, "puts_volume": { "example": 60.2, "type": "number", "description": "Total 24h trade volume for put options." }, "futures_volume": { "example": 30.5178, "type": "number", "description": "Total 24h trade volume for futures." }, "spot_volume": { "example": 11.6, "type": "number", "description": "Total 24h trade for spot." }, "calls_volume_7d": { "example": 75.6, "type": "number", "description": "Total 7d trade volume for call options." }, "puts_volume_7d": { "example": 356.9, "type": "number", "description": "Total 7d trade volume for put options." }, "futures_volume_7d": { "example": 213.8841, "type": "number", "description": "Total 7d trade volume for futures." }, "spot_volume_7d": { "example": 64.8, "type": "number", "description": "Total 7d trade for spot." }, "calls_volume_30d": { "example": 547.3, "type": "number", "description": "Total 30d trade volume for call options." }, "puts_volume_30d": { "example": 785.5, "type": "number", "description": "Total 30d trade volume for put options." }, "futures_volume_30d": { "example": 998.2128, "type": "number", "description": "Total 30d trade volume for futures." }, "spot_volume_30d": { "example": 310.5, "type": "number", "description": "Total 30d trade for spot." } }, "required": [ "currency", "futures_volume", "puts_volume", "calls_volume" ], "type": "object" }, "currency_portfolio": { "properties": { "margin_balance": { "type": "number", "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "currency": { "type": "string", "enum": [ "btc", "eth" ], "description": "The selected currency" }, "maintenance_margin": { "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "initial_margin": { "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "equity": { "type": "number", "description": "The account's current equity" }, "balance": { "type": "number", "description": "The account's balance" }, "available_withdrawal_funds": { "type": "number", "description": "The account's available to withdrawal funds" }, "available_funds": { "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "additional_reserve": { "$ref": "#/components/schemas/additional_reserve" }, "spot_reserve": { "type": "number", "description": "The account's balance reserved in active spot orders" } }, "required": [ "margin_balance", "currency", "maintenance_margin", "initial_margin", "equity", "balance", "available_withdrawal_funds", "available_funds", "additional_reserve", "spot_reserve" ], "type": "object" }, "api_key": { "properties": { "id": { "$ref": "#/components/schemas/key_id" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "client_id": { "$ref": "#/components/schemas/client_id" }, "client_secret": { "$ref": "#/components/schemas/client_secret" }, "public_key": { "$ref": "#/components/schemas/public_key" }, "max_scope": { "$ref": "#/components/schemas/max_scope" }, "enabled": { "$ref": "#/components/schemas/api_key_enabled" }, "default": { "$ref": "#/components/schemas/api_key_default" }, "name": { "$ref": "#/components/schemas/api_key_name" }, "enabled_features": { "$ref": "#/components/schemas/api_key_features" }, "ip_whitelist": { "type": "array", "description": "List of IP addresses whitelisted for a selected key" } }, "required": [ "id", "timestamp", "client_id", "client_secret", "max_scope", "default" ], "type": "object" }, "security_key": { "properties": { "id": { "$ref": "#/components/schemas/security_key_id" }, "name": { "$ref": "#/components/schemas/security_key_name" }, "type": { "$ref": "#/components/schemas/security_key_type" }, "assignments": { "$ref": "#/components/schemas/security_key_assignments" }, "timestamp": { "$ref": "#/components/schemas/security_key_timestamp" }, "last_used": { "$ref": "#/components/schemas/security_key_last_used" } }, "required": [ "id", "type", "name", "assignments", "timestamp", "last_used" ], "type": "object" }, "access_log": { "properties": { "id": { "$ref": "#/components/schemas/id" }, "ip": { "type": "string", "description": "IP address of source that generated action" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "country": { "type": "string", "description": "Country where the IP address is registered (estimated)" }, "city": { "type": "string", "description": "City where the IP address is registered (estimated)" }, "log": { "type": "string", "description": "Action description. Possible values:\n\n- ``changed_email`` - email was changed\n- ``changed_password`` - password was changed\n- ``disabled_tfa`` - TFA was disabled\n- ``enabled_tfa`` - TFA was enabled\n- ``success`` - successful login\n- ``failure`` - login failure\n- ``enabled_subaccount_login`` - login was enabled for subaccount (in `data` - subaccount uid)\n- ``disabled_subaccount_login`` - login was disabled for subaccount (in `data` - subaccount uid)\n- ``new_api_key`` - API key was created (in `data` key client id)\n- ``removed_api_key`` - API key was removed (in `data` key client id)\n- ``changed_scope`` - scope of API key was changed (in `data` key client id)\n- ``changed_whitelist`` - whitelist of API key was edited (in `data` key client id)\n- ``disabled_api_key`` - API key was disabled (in `data` key client id)\n- ``enabled_api_key`` - API key was enabled (in `data` key client id)\n- ``reset_api_key`` - API key was reset (in `data` key client id)\n" }, "data": { "description": "Optional, additional information about action, type depends on `log` value", "oneOf": [ { "type": "object" }, { "type": "string" } ] } }, "required": [ "id", "ip", "timestamp", "country", "city", "log" ], "type": "object" }, "order": { "properties": { "order_id": { "$ref": "#/components/schemas/order_id" }, "order_state": { "$ref": "#/components/schemas/order_state" }, "order_type": { "$ref": "#/components/schemas/order_type" }, "original_order_type": { "$ref": "#/components/schemas/original_order_type" }, "time_in_force": { "$ref": "#/components/schemas/time_in_force" }, "is_rebalance": { "type": "boolean", "description": "Optional (only for spot). `true` if order was automatically created during cross-collateral balance restoration" }, "is_liquidation": { "type": "boolean", "description": "Optional (not added for spot). `true` if order was automatically created during liquidation" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "creation_timestamp": { "$ref": "#/components/schemas/timestamp" }, "last_update_timestamp": { "$ref": "#/components/schemas/timestamp" }, "direction": { "$ref": "#/components/schemas/direction" }, "price": { "$ref": "#/components/schemas/open_order_price" }, "label": { "$ref": "#/components/schemas/label" }, "post_only": { "$ref": "#/components/schemas/post_only" }, "reject_post_only": { "$ref": "#/components/schemas/reject_post_only" }, "reduce_only": { "$ref": "#/components/schemas/reduce_only" }, "api": { "$ref": "#/components/schemas/api" }, "web": { "$ref": "#/components/schemas/web" }, "mobile": { "$ref": "#/components/schemas/mobile" }, "refresh_amount": { "$ref": "#/components/schemas/refresh_amount" }, "display_amount": { "$ref": "#/components/schemas/display_amount" }, "amount": { "$ref": "#/components/schemas/amount" }, "contracts": { "$ref": "#/components/schemas/contracts" }, "filled_amount": { "$ref": "#/components/schemas/filled_amount" }, "average_price": { "$ref": "#/components/schemas/average_price" }, "advanced": { "$ref": "#/components/schemas/advanced" }, "implv": { "$ref": "#/components/schemas/implv" }, "usd": { "$ref": "#/components/schemas/usd" }, "triggered": { "$ref": "#/components/schemas/triggered" }, "trigger": { "$ref": "#/components/schemas/trigger" }, "trigger_price": { "$ref": "#/components/schemas/trigger_price" }, "trigger_offset": { "$ref": "#/components/schemas/trigger_offset" }, "trigger_reference_price": { "$ref": "#/components/schemas/trigger_reference_price" }, "block_trade": { "$ref": "#/components/schemas/block_trade_order" }, "mmp": { "type": "boolean", "description": "`true` if the order is a MMP order, otherwise `false`." }, "risk_reducing": { "type": "boolean", "description": "`true` if the order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users), otherwise `false`." }, "replaced": { "type": "boolean", "description": "`true` if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise `false`." }, "auto_replaced": { "type": "boolean", "description": "Options, advanced orders only - `true` if last modification of the order was performed by the pricing engine, otherwise `false`." }, "quote": { "type": "boolean", "description": "If order is a quote. Present only if true." }, "mmp_group": { "type": "string", "description": "Name of the MMP group supplied in the `private/mass_quote` request. Only present for quote orders." }, "quote_set_id": { "type": "string", "description": "Identifier of the QuoteSet supplied in the `private/mass_quote` request. Only present for quote orders." }, "quote_id": { "type": "string", "description": "The same QuoteID as supplied in the `private/mass_quote` request. Only present for quote orders." }, "trigger_order_id": { "type": "string", "example": "SLIB-370", "description": "Id of the trigger order that created the order (Only for orders that were created by triggered orders)." }, "app_name": { "type": "string", "example": "Example Application", "description": "The name of the application that placed the order on behalf of the user (optional)." }, "mmp_cancelled": { "type": "boolean", "example": true, "description": "`true` if order was cancelled by mmp trigger (optional)" }, "cancel_reason": { "$ref": "#/components/schemas/cancel_reason" }, "oto_order_ids": { "type": "array", "items": { "$ref": "#/components/schemas/order_id", "description": "Order Id" }, "description": "The Ids of the orders that will be triggered if the order is filled" }, "trigger_fill_condition": { "$ref": "#/components/schemas/trigger_fill_condition" }, "oco_ref": { "$ref": "#/components/schemas/oco_ref" }, "primary_order_id": { "$ref": "#/components/schemas/order_id", "description": "ID of the order that triggered this order." }, "is_secondary_oto": { "$ref": "#/components/schemas/is_secondary_oto" }, "is_primary_otoco": { "type": "boolean", "description": "`true` if the order is an order that can trigger an OCO pair, otherwise not present." } }, "required": [ "order_id", "order_state", "order_type", "time_in_force", "instrument_name", "creation_timestamp", "last_update_timestamp", "direction", "price", "label", "post_only", "api" ], "type": "object" }, "orders": { "items": { "$ref": "#/components/schemas/order" }, "type": "array" }, "price_index": { "example": "btc_usdc", "type": "string", "description": "Name of price index that is used for this instrument" }, "trigger_order_history_record": { "properties": { "timestamp": { "$ref": "#/components/schemas/timestamp" }, "trigger": { "$ref": "#/components/schemas/trigger" }, "trigger_price": { "$ref": "#/components/schemas/trigger_price" }, "trigger_offset": { "$ref": "#/components/schemas/trigger_offset" }, "trigger_order_id": { "type": "string", "example": "SLTB-187015", "description": "Id of the user order used for the trigger-order reference before triggering" }, "order_id": { "$ref": "#/components/schemas/order_id" }, "order_state": { "$ref": "#/components/schemas/order_state_stop" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "request": { "type": "string", "example": "trigger:order", "description": "Type of last request performed on the trigger order by user or system. `\"cancel\"` - when order was cancelled, `\"trigger:order\"` - when trigger order spawned market or limit order after being triggered" }, "direction": { "$ref": "#/components/schemas/direction" }, "price": { "$ref": "#/components/schemas/price" }, "amount": { "$ref": "#/components/schemas/amount" }, "last_update_timestamp": { "$ref": "#/components/schemas/timestamp" }, "reduce_only": { "$ref": "#/components/schemas/reduce_only" }, "post_only": { "$ref": "#/components/schemas/post_only" }, "order_type": { "type": "string", "enum": [ "limit", "market" ], "description": "Requested order type: `\"limit` or `\"market\"`" }, "label": { "$ref": "#/components/schemas/label_presentation" }, "is_secondary_oto": { "$ref": "#/components/schemas/is_secondary_oto" }, "oco_ref": { "$ref": "#/components/schemas/oco_ref" }, "source": { "type": "string", "example": "api", "description": "Source of the order that is linked to the trigger order." } }, "required": [ "trigger", "timestamp", "trigger_price", "trigger_order_id", "order_state", "request", "post_only", "order_type", "price", "order_id", "trigger_offset", "instrument_name", "amount", "direction", "reduce_only" ], "type": "object" }, "settlement": { "properties": { "funding": { "example": -0.000002511, "type": "number", "description": "funding (in base currency ; settlement for perpetual product only)" }, "funded": { "example": 0, "type": "number", "description": "funded amount (bankruptcy only)" }, "index_price": { "example": 11008.37, "type": "number", "description": "underlying index price at time of event (in quote currency; settlement and delivery only)" }, "instrument_name": { "example": "BTC-30MAR18", "type": "string", "description": "instrument name (settlement and delivery only)" }, "mark_price": { "example": 11000, "type": "number", "description": "mark price for at the settlement time (in quote currency; settlement and delivery only)" }, "position": { "example": 1000, "type": "number", "description": "position size (in quote currency; settlement and delivery only)" }, "profit_loss": { "example": 0, "type": "number", "description": "profit and loss (in base currency; settlement and delivery only)" }, "session_bankruptcy": { "example": 0.001160788, "type": "number", "description": "value of session bankruptcy (in base currency; bankruptcy only)" }, "session_profit_loss": { "example": 0.001160788, "type": "number", "description": "total value of session profit and losses (in base currency)" }, "session_tax": { "example": -0.001160788, "type": "number", "description": "total amount of paid taxes/fees (in base currency; bankruptcy only)" }, "session_tax_rate": { "example": 0.000103333, "type": "number", "description": "rate of paid taxes/fees (in base currency; bankruptcy only)" }, "socialized": { "example": -0.001160788, "type": "number", "description": "the amount of the socialized losses (in base currency; bankruptcy only)" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "type": { "$ref": "#/components/schemas/settlement_type" } }, "required": [ "type", "timestamp", "session_profit_loss", "position", "instrument_name", "index_price", "funding" ], "type": "object" }, "public_trade": { "properties": { "trade_id": { "$ref": "#/components/schemas/trade_id" }, "trade_seq": { "$ref": "#/components/schemas/trade_seq" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "timestamp": { "$ref": "#/components/schemas/trade_timestamp" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Trade direction of the taker" }, "tick_direction": { "$ref": "#/components/schemas/tick_direction" }, "index_price": { "type": "number", "description": "Index Price at the moment of trade" }, "price": { "$ref": "#/components/schemas/price", "description": "The price of the trade" }, "amount": { "type": "number", "description": "Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "contracts": { "type": "number", "description": "Trade size in contract units (optional, may be absent in historical trades)" }, "iv": { "type": "number", "description": "Option implied volatility for the price (Option only)" }, "liquidation": { "type": "string", "enum": [ "M", "T", "MT" ], "description": "Optional field (only for trades caused by liquidation): `\"M\"` when maker side of trade was under liquidation, `\"T\"` when taker side was under liquidation, `\"MT\"` when both sides of trade were under liquidation" }, "mark_price": { "type": "number", "description": "Mark Price at the moment of trade" }, "block_trade_id": { "$ref": "#/components/schemas/block_trade_id_in_result" }, "block_trade_leg_count": { "$ref": "#/components/schemas/block_trade_leg_count" }, "combo_id": { "type": "string", "description": "Optional field containing combo instrument name if the trade is a combo trade" }, "combo_trade_id": { "type": "number", "description": "Optional field containing combo trade identifier if the trade is a combo trade" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ - when trade was part of the Block RFQ" } }, "required": [ "trade_id", "instrument_name", "timestamp", "trade_seq", "direction", "tick_direction", "index_price", "price", "amount", "mark_price" ], "type": "object" }, "user_trade": { "properties": { "trade_id": { "$ref": "#/components/schemas/trade_id" }, "trade_seq": { "$ref": "#/components/schemas/trade_seq" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "timestamp": { "$ref": "#/components/schemas/trade_timestamp" }, "order_type": { "type": "string", "enum": [ "limit", "market", "liquidation" ], "description": "Order type: `\"limit`, `\"market\"`, or `\"liquidation\"`" }, "advanced": { "type": "string", "enum": [ "usd", "implv" ], "description": "Advanced type of user order: `\"usd\"` or `\"implv\"` (only for options; omitted if not applicable)" }, "order_id": { "type": "string", "description": "Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade" }, "matching_id": { "type": "string", "description": "Always `null`" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Trade direction of the taker" }, "tick_direction": { "$ref": "#/components/schemas/tick_direction" }, "index_price": { "type": "number", "description": "Index Price at the moment of trade" }, "price": { "$ref": "#/components/schemas/price", "description": "The price of the trade" }, "amount": { "type": "number", "description": "Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "contracts": { "type": "number", "description": "Trade size in contract units (optional, may be absent in historical trades)" }, "iv": { "type": "number", "description": "Option implied volatility for the price (Option only)" }, "underlying_price": { "type": "number", "description": "Underlying price for implied volatility calculations (Options only)" }, "liquidation": { "type": "string", "enum": [ "M", "T", "MT" ], "description": "Optional field (only for trades caused by liquidation): `\"M\"` when maker side of trade was under liquidation, `\"T\"` when taker side was under liquidation, `\"MT\"` when both sides of trade were under liquidation" }, "liquidity": { "type": "string", "enum": [ "M", "T" ], "description": "Describes what was role of users order: `\"M\"` when it was maker order, `\"T\"` when it was taker order" }, "fee": { "type": "number", "description": "User's fee in units of the specified `fee_currency`" }, "fee_currency": { "$ref": "#/components/schemas/currency" }, "label": { "$ref": "#/components/schemas/label_presentation" }, "state": { "$ref": "#/components/schemas/order_state_in_user_trade" }, "block_trade_id": { "$ref": "#/components/schemas/block_trade_id_in_result" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ - when trade was part of the Block RFQ" }, "block_rfq_quote_id": { "type": "integer", "description": "ID of the Block RFQ quote - when trade was part of the Block RFQ" }, "reduce_only": { "type": "string", "description": "`true` if user order is reduce-only" }, "post_only": { "type": "string", "description": "`true` if user order is post-only" }, "mmp": { "type": "boolean", "description": "`true` if user order is MMP" }, "risk_reducing": { "type": "boolean", "description": "`true` if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)" }, "api": { "type": "boolean", "description": "`true` if user order was created with API" }, "profit_loss": { "$ref": "#/components/schemas/profit_loss" }, "mark_price": { "type": "number", "description": "Mark Price at the moment of trade" }, "legs": { "type": "array", "description": "Optional field containing leg trades if trade is a combo trade (present when querying for **only** combo trades and in `combo_trades` events)" }, "combo_id": { "type": "string", "description": "Optional field containing combo instrument name if the trade is a combo trade" }, "combo_trade_id": { "type": "number", "description": "Optional field containing combo trade identifier if the trade is a combo trade" }, "quote_set_id": { "type": "string", "description": "QuoteSet of the user order (optional, present only for orders placed with `private/mass_quote`)" }, "quote_id": { "type": "string", "description": "QuoteID of the user order (optional, present only for orders placed with `private/mass_quote`)" }, "trade_allocations": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "integer", "description": "User ID to which part of the trade is allocated. For brokers the User ID is obstructed." }, "amount": { "type": "number", "description": "Amount allocated to this user." }, "fee": { "type": "number", "description": "Fee for the allocated part of the trade." }, "client_info": { "type": "object", "properties": { "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." }, "name": { "type": "string", "description": "Name of the linked user within the client; available to broker." } }, "description": "Optional client allocation info for brokers." } }, "required": [ "amount", "fee" ] }, "description": "List of allocations for Block RFQ pre-allocation. Each allocation specifies `user_id`, `amount`, and `fee` for the allocated part of the trade. For broker client allocations, a `client_info` object will be included." } }, "required": [ "trade_id", "trade_seq", "instrument_name", "timestamp", "order_id", "matching_id", "direction", "tick_direction", "index_price", "price", "amount", "fee", "fee_currency", "state", "mark_price" ], "type": "object" }, "pending_block_trade": { "properties": { "nonce": { "type": "string", "example": "bF1_gfgcsd", "description": "Nonce that can be used to approve or reject pending block trade." }, "timestamp": { "type": "integer", "description": "Timestamp that can be used to approve or reject pending block trade." }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/pending_block_trade" } }, "app_name": { "type": "string", "example": "Example Application", "description": "The name of the application that executed the block trade on behalf of the user (optional)." }, "username": { "type": "string", "example": "Trader", "description": "Username of the user who initiated the block trade." }, "role": { "$ref": "#/components/schemas/role" }, "user_id": { "$ref": "#/components/schemas/user_id" }, "broker_code": { "type": "string", "example": "jpqYKgg1", "description": "Broker code associated with the broker block trade." }, "broker_name": { "type": "string", "example": "Test Broker", "description": "Name of the broker associated with the block trade." }, "state": { "type": "object", "properties": { "value": { "type": "string", "enum": [ "initial", "accepted", "rejected", "executed" ], "description": "State value." }, "timestamp": { "type": "integer", "description": "State timestamp." } }, "required": [ "value", "timestamp" ], "description": "State of the pending block trade for current user." }, "counterparty_state": { "type": "object", "properties": { "value": { "type": "string", "enum": [ "initial", "accepted", "rejected", "executed" ], "description": "State value." }, "timestamp": { "type": "integer", "description": "State timestamp." } }, "required": [ "value", "timestamp" ], "description": "State of the pending block trade for the other party (optional)." }, "combo_id": { "type": "string", "example": "BTC-CS-27JUN25-80000_85000", "description": "Combo instrument identifier" } }, "required": [ "nonce", "timestamp", "trades", "app_name", "role", "user_id", "state" ], "type": "object" }, "combo": { "properties": { "id": { "$ref": "#/components/schemas/combo_id" }, "instrument_id": { "$ref": "#/components/schemas/instrument_id" }, "state": { "$ref": "#/components/schemas/combo_state" }, "state_timestamp": { "$ref": "#/components/schemas/timestamp" }, "creation_timestamp": { "$ref": "#/components/schemas/timestamp" }, "legs": { "type": "array", "items": { "$ref": "#/components/schemas/combo_leg" } } }, "type": "object" }, "combo_leg": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "amount": { "$ref": "#/components/schemas/combo_leg_amount" } }, "type": "object" }, "position_move_trade": { "properties": { "source_uid": { "type": "integer", "description": "Trade source uid" }, "target_uid": { "type": "integer", "description": "Trade target uid" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Trade direction from source perspective" }, "price": { "$ref": "#/components/schemas/price", "description": "The price of the trade" }, "amount": { "type": "number", "description": "Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." } }, "required": [ "instrument_name", "direction", "price", "amount" ], "type": "object" }, "instrument": { "properties": { "kind": { "$ref": "#/components/schemas/kind" }, "settlement_currency": { "type": "string", "enum": [ "BTC", "ETH" ], "description": "Optional (not added for spot). Settlement currency for the instrument." }, "counter_currency": { "type": "string", "enum": [ "USD", "USDC" ], "description": "Counter currency for the instrument." }, "base_currency": { "type": "string", "enum": [ "BTC", "ETH" ], "description": "The underlying currency being traded." }, "quote_currency": { "type": "string", "enum": [ "USD" ], "description": "The currency in which the instrument prices are quoted." }, "min_trade_amount": { "type": "number", "example": 0.1, "description": "Minimum amount for trading. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "instrument_id": { "$ref": "#/components/schemas/instrument_id" }, "is_active": { "type": "boolean", "description": "Indicates if the instrument can currently be traded." }, "settlement_period": { "type": "string", "enum": [ "month", "week", "perpetual" ], "description": "Optional (not added for spot). The settlement period." }, "creation_timestamp": { "type": "integer", "example": 1536569522277, "description": "The time when the instrument was first created (milliseconds since the UNIX epoch)." }, "tick_size": { "type": "number", "example": 0.0001, "description": "Specifies minimal price change and, as follows, the number of decimal places for instrument prices." }, "tick_size_steps": { "$ref": "#/components/schemas/tick_size_step" }, "expiration_timestamp": { "type": "integer", "description": "The time when the instrument will expire (milliseconds since the UNIX epoch)." }, "strike": { "type": "number", "description": "The strike value (only for options)." }, "option_type": { "type": "string", "enum": [ "call", "put" ], "description": "The option type (only for options)." }, "future_type": { "type": "string", "enum": [ "linear", "reversed" ], "description": "Future type (only for futures)(field is deprecated and will be removed in the future, `instrument_type` should be used instead)." }, "instrument_type": { "type": "string", "description": "Type of the instrument. `linear` or `reversed`" }, "contract_size": { "type": "integer", "example": 1, "description": "Contract size for instrument." }, "maker_commission": { "type": "number", "example": 0.0001, "description": "Maker commission for instrument." }, "taker_commission": { "type": "number", "example": 0.0005, "description": "Taker commission for instrument." }, "max_liquidation_commission": { "type": "number", "example": 0.001, "description": "Maximal liquidation trade commission for instrument (only for futures)." }, "block_trade_commission": { "type": "number", "example": 0.0005, "description": "Block Trade commission for instrument." }, "block_trade_tick_size": { "type": "number", "example": 0.01, "description": "Specifies minimal price change for block trading." }, "block_trade_min_trade_amount": { "type": "number", "example": 25, "description": "Minimum amount for block trading." }, "max_leverage": { "type": "integer", "example": 100, "description": "Maximal leverage for instrument (only for futures)." }, "price_index": { "$ref": "#/components/schemas/price_index" }, "state": { "$ref": "#/components/schemas/book_state" } }, "required": [ "kind", "base_currency", "quote_currency", "min_trade_amount", "instrument_name", "is_active", "settlement_period", "creation_timestamp", "tick_size", "expiration_timestamp", "contract_size", "price_index" ], "type": "object" }, "currency": { "enum": [ "BTC", "ETH", "USDC", "USDT", "EURR" ], "type": "string", "description": "Currency, i.e `\"BTC\"`, `\"ETH\"`, `\"USDC\"`" }, "currency_with_apr": { "properties": { "withdrawal_fee": { "type": "number", "example": 0.0001, "description": "The total transaction fee paid for withdrawals" }, "withdrawal_priorities": { "type": "array", "items": { "$ref": "#/components/schemas/key_number_pair" } }, "min_withdrawal_fee": { "type": "number", "example": 0.0001, "description": "The minimum transaction fee paid for withdrawals" }, "currency": { "type": "string", "example": "BTC", "description": "The abbreviation of the currency. This abbreviation is used elsewhere in the API to identify the currency." }, "currency_long": { "type": "string", "example": "Bitcoin", "description": "The full name for the currency." }, "min_confirmations": { "type": "integer", "example": 2, "description": "Minimum number of block chain confirmations before deposit is accepted." }, "coin_type": { "type": "string", "enum": [ "BITCOIN", "ETHER" ], "description": "The type of the currency." }, "in_cross_collateral_pool": { "type": "boolean", "description": "`true` if the currency is part of the cross collateral pool" }, "apr": { "type": "number", "description": "Simple Moving Average (SMA) of the last 7 days of rewards. If fewer than 7 days of reward data are available, the APR is calculated as the average of the available rewards. Only applicable to yield-generating tokens (`USDE`, `STETH`, `USDC`, `BUILD`)." }, "network_fee": { "type": "number", "example": 0.0001, "description": "The network fee" }, "network_currency": { "type": "string", "example": "BTC", "description": "The currency of the network" }, "decimals": { "type": "integer", "example": 6, "description": "The number of decimal places for the currency" } }, "required": [ "currency", "currency_long", "min_confirmations", "withdrawal_fee", "coin_type", "in_cross_collateral_pool" ], "type": "object" }, "key_number_pair": { "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "type": "object" }, "order_id_initial_margin_pair": { "properties": { "order_id": { "$ref": "#/components/schemas/order_id" }, "initial_margin": { "type": "number", "description": "Initial margin of order" }, "initial_margin_currency": { "type": "string", "description": "Currency of initial margin" } }, "required": [ "order_id", "initial_margin" ], "type": "object" }, "user_change": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } }, "orders": { "type": "array", "items": { "$ref": "#/components/schemas/order" } }, "position": { "type": "array", "items": { "$ref": "#/components/schemas/position" } } }, "type": "object" }, "block_trade": { "properties": { "id": { "$ref": "#/components/schemas/block_trade_id" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } }, "app_name": { "type": "string", "example": "Example Application", "description": "The name of the application that executed the block trade on behalf of the user (optional)." }, "broker_code": { "type": "string", "example": "2krM7sJsx", "description": "Broker code associated with the broker block trade." }, "broker_name": { "type": "string", "example": "Test Broker", "description": "Name of the broker associated with the block trade." } }, "required": [ "id", "timestamp", "trades" ], "type": "object" }, "position_move": { "properties": { "trades": { "type": "array", "items": { "$ref": "#/components/schemas/position_move_trade" } } }, "required": [ "trades" ], "type": "object" }, "transaction_log": { "properties": { "id": { "$ref": "#/components/schemas/id" }, "currency": { "$ref": "#/components/schemas/currency" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "user_id": { "$ref": "#/components/schemas/user_id" }, "username": { "$ref": "#/components/schemas/username" }, "commission": { "$ref": "#/components/schemas/commission" }, "cashflow": { "type": "number", "description": "For futures and perpetual contracts: Realized session PNL (since last settlement). For options: the amount paid or received for the options traded." }, "balance": { "type": "number", "description": "Cash balance after the transaction" }, "change": { "type": "number", "description": "Change in cash balance. For trades: fees and options premium paid/received. For settlement: Futures session PNL and perpetual session funding." }, "user_seq": { "type": "integer", "description": "Sequential identifier of user transaction" }, "type": { "type": "string", "description": "Transaction category/type. The most common are: `trade`, `deposit`, `withdrawal`, `settlement`, `delivery`, `transfer`, `swap`, `correction`. New types can be added any time in the future" }, "info": { "type": "object", "description": "Additional information regarding transaction. Strongly dependent on the log entry type" }, "equity": { "type": "number", "description": "Updated equity value after the transaction" }, "mark_price": { "type": "number", "description": "Market price during the trade" }, "settlement_price": { "type": "number", "description": "The settlement price for the instrument during the delivery" }, "index_price": { "type": "number", "description": "The index price for the instrument during the delivery" }, "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "position": { "type": "number", "description": "Updated position size after the transaction" }, "side": { "type": "string", "description": "One of: `short` or `long` in case of settlements, `close sell` or `close buy` in case of deliveries, `open sell`, `open buy`, `close sell`, `close buy` in case of trades" }, "amount": { "type": "number", "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "price": { "type": "number", "description": "Settlement/delivery price or the price level of the traded contracts" }, "price_currency": { "type": "string", "description": "Currency symbol associated with the `price` field value" }, "trade_id": { "$ref": "#/components/schemas/trade_id" }, "order_id": { "$ref": "#/components/schemas/order_id" }, "user_role": { "$ref": "#/components/schemas/role" }, "fee_role": { "$ref": "#/components/schemas/fee_role" }, "profit_as_cashflow": { "type": "boolean", "description": "Indicator informing whether the cashflow is waiting for settlement or not" }, "interest_pl": { "type": "number", "description": "Actual funding rate of trades and settlements on perpetual instruments" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ - when trade was part of the Block RFQ" }, "ip": { "type": "string", "description": "The IP address from which the trade was initiated" }, "session_rpl": { "$ref": "#/components/schemas/rpl" }, "session_upl": { "$ref": "#/components/schemas/upl" }, "total_interest_pl": { "type": "number", "description": "Total session funding rate" }, "contracts": { "$ref": "#/components/schemas/contracts" } }, "required": [ "id", "currency", "timestamp", "user_id", "commission", "cashflow", "balance", "change", "user_seq", "type" ], "type": "object" }, "get_balance": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "equity": { "type": "number", "description": "Equity of the main account" }, "available_withdrawal_funds": { "type": "number", "description": "Funds available for withdrawal" }, "total_equity": { "type": "number", "description": "Equity of the main account + subaccounts" }, "custody": { "type": "number", "description": "Custody balance" }, "pnl": { "type": "number", "description": "Profit net loss of the user (total_equity - custody)" }, "encrypted": { "type": "number", "description": "The encrypted result json in base64 format. It can be used to verify that values are generated by Deribit." } }, "required": [ "currency", "equity", "available_withdrawal_funds", "total_equity", "custody", "pnl" ], "type": "object" }, "get_custody_balance": { "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "equity": { "type": "number", "description": "Equity of the main account" }, "available_withdrawal_funds": { "type": "number", "description": "Funds available for withdrawal" }, "total_equity": { "type": "number", "description": "Equity of the main account + subaccounts. Takes into account external equity." }, "custody": { "type": "number", "description": "Custody balance" }, "pnl": { "type": "number", "description": "Profit net loss of the user (total_equity - custody)" }, "encrypted": { "type": "number", "description": "The encrypted result json in base64 format. It can be used to verify that values are generated by Deribit." } }, "required": [ "currency", "equity", "available_withdrawal_funds", "total_equity", "custody", "pnl" ], "type": "object" }, "withdrawal_policy_mode": { "enum": [ "manual", "automated", "suspended" ], "type": "string", "description": "Withdrawal Policy mode, i.e. `\"manual\"`, `\"automated\"`, `\"suspended\"`" }, "withdrawal_policy_limits": { "properties": { "h24": { "$ref": "#/components/schemas/withdrawal_policy_limit_buckets" } }, "required": [ "h24" ], "type": "object" }, "expirations": { "properties": { "currency": { "$ref": "#/components/schemas/currency_with_any_and_grouped" }, "kind": { "$ref": "#/components/schemas/kind_future_or_option_with_any" } }, "type": "object", "description": "A map where each key is valid currency (e.g. btc, eth, usdc), and the value is a list of expirations or a map where each key is a valid kind (future or options) and value is a list of expirations from every instrument" }, "ErrorMessageResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "message": { "type": "string" }, "error": { "type": "integer" } }, "required": [ "jsonrpc", "message", "error" ], "type": "object" }, "OkResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "enum": [ "ok" ], "description": "Result of method execution. `ok` in case of success" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetTimeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "integer", "example": 1517329113791, "description": "Current timestamp (milliseconds since the UNIX epoch)" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetInstrumentsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/instrument" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetInstrumentResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/instrument" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetExpirationsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/expirations" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetFundingRateHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "$ref": "#/components/schemas/timestamp" }, "prev_index_price": { "$ref": "#/components/schemas/price" }, "index_price": { "$ref": "#/components/schemas/price" }, "interest_1h": { "type": "number", "description": "1hour interest rate" }, "interest_8h": { "type": "number", "description": "8hour interest rate" } } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetFundingRateValueResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "number" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetFundingChartDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "current_interest": { "type": "number", "example": 0.005000670552845, "description": "Current interest" }, "interest_8h": { "type": "number", "example": 0.0040080896931, "description": "Current interest 8h" }, "data": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "$ref": "#/components/schemas/timestamp" }, "index_price": { "$ref": "#/components/schemas/index_price" }, "interest_8h": { "type": "number", "example": 0.004999511380756577, "description": "Historical interest 8h value" } }, "required": [ "timestamp", "index_price", "interest_8h" ] } } }, "required": [ "current_interest", "data", "interest_8h" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetTradingviewChartDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "no_data" ], "description": "Status of the query: `ok` or `no_data`" }, "ticks": { "type": "array", "items": { "$ref": "#/components/schemas/timestamp" }, "description": "Values of the time axis given in milliseconds since UNIX epoch" }, "volume": { "type": "array", "items": { "$ref": "#/components/schemas/chart_volume" }, "description": "List of volume bars (in base currency, one per candle)" }, "cost": { "type": "array", "items": { "$ref": "#/components/schemas/chart_volume" }, "description": "List of cost bars (volume in quote currency, one per candle)" }, "open": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of prices at open (one per candle)" }, "close": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of prices at close (one per candle)" }, "high": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of highest price levels (one per candle)" }, "low": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of lowest price levels (one per candle)" } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetMarkpriceChartDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "no_data" ], "description": "Status of the query: `ok` or `no_data`" }, "ticks": { "type": "array", "items": { "$ref": "#/components/schemas/timestamp" }, "description": "Values of the time axis given in milliseconds since UNIX epoch" }, "open": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of prices at open (one per candle)" }, "close": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of prices at close (one per candle)" }, "high": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of highest price levels (one per candle)" }, "low": { "type": "array", "items": { "$ref": "#/components/schemas/quote_price" }, "description": "List of lowest price levels (one per candle)" } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetVolatilityIndexDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "data": { "type": "array", "description": "Candles as an array of arrays with 5 values each. The inner values correspond to the timestamp in ms, open, high, low, and close values of the volatility index correspondingly." }, "continuation": { "type": "integer", "description": "Continuation - to be used as the `end_timestamp` parameter on the next request. `NULL` when no continuation." } }, "description": "Volatility index candles." } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetMarkPriceHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "description": "Markprice history values as an array of arrays with 2 values each. The inner values correspond to the timestamp in ms and the markprice itself." } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetIndexChartDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "description": "**Response:**\nThe response returns an array of data points, where each data point is an array containing:\n\n- **Index 0**: Timestamp in milliseconds since the Unix epoch\n- **Index 1**: Average index price at that timestamp\n\nExample response structure:\n```json\n[\n [1573228800000, 8751.7138636],\n [1573232400000, 8751.7138636],\n [1573236000000, 8751.7138636]\n]\n```\n\nEach entry in the result array represents a single data point:\n\n- The first value (timestamp) indicates when the price was recorded\n- The second value (price) is the average index price at that timestamp\n\nThe data points are returned in chronological order, making them ready for direct use in charting libraries.\n" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetCurrenciesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/currency_with_apr" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetHistoricalVolatilityResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "integer" }, "value": { "type": "number" } }, "required": [ "timestamp", "value" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetDeliveryPricesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "records_total": { "type": "number", "example": 120, "description": "Available delivery prices" }, "data": { "type": "array", "items": { "type": "object", "properties": { "date": { "$ref": "#/components/schemas/date" }, "delivery_price": { "$ref": "#/components/schemas/delivery_price" } }, "required": [ "date", "delivery_price" ] } } }, "required": [ "records_total", "data" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetContractSizeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "contract_size": { "$ref": "#/components/schemas/contract_size" } }, "required": [ "contract_size" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetAprHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "continuation": { "$ref": "#/components/schemas/continuation" }, "data": { "type": "array", "items": { "type": "object", "properties": { "day": { "type": "integer", "description": "The full epoch day" }, "apr": { "type": "number", "description": "The APR of the day" } } } } }, "required": [ "data" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicAuthResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "access_token": { "type": "string", "example": "843SehgeX5n6XxEU4XbABx4Cny5Akai5iHiJePTsvUw7", "description": "OAuth access token to be used for authentication of 'private' requests" }, "token_type": { "type": "string", "enum": [ "bearer" ], "description": "Authorization type, allowed value - `bearer`" }, "expires_in": { "type": "integer", "example": 315360000, "description": "Token lifetime in seconds" }, "refresh_token": { "type": "string", "example": "6faf8L36JdaSqsjCEEiwqifPpj6JB18RWwiWHrsGTZ91", "description": "Can be used to request a new token (with a new lifetime)" }, "scope": { "type": "string", "description": "Type of the access for assigned token" }, "state": { "type": "string", "description": "Copied from the input (if applicable)" }, "sid": { "type": "string", "description": "Optional Session id" }, "enabled_features": { "$ref": "#/components/schemas/api_key_features" }, "mandatory_tfa_status": { "type": "string", "example": "enabled", "description": "2FA is required for privileged methods" }, "google_login": { "type": "boolean", "description": "The access token was acquired by logging in through Google." } }, "required": [ "access_token", "token_type", "expires_in", "refresh_token", "scope" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicTokenResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "access_token": { "type": "string", "example": "843SehgeX5n6XxEU4XbABx4Cny5Akai5iHiJePTsvUw7" }, "token_type": { "type": "string", "enum": [ "bearer" ], "description": "Authorization type, allowed value - `bearer`" }, "expires_in": { "type": "integer", "example": 315360000, "description": "Token lifetime in seconds" }, "refresh_token": { "type": "string", "example": "6faf8L36JdaSqsjCEEiwqifPpj6JB18RWwiWHrsGTZ91", "description": "Can be used to request a new token (with a new lifetime)" }, "scope": { "type": "string", "description": "Type of the access for assigned token" }, "sid": { "type": "string", "description": "Optional Session id" } }, "required": [ "access_token", "token_type", "expires_in", "refresh_token", "scope" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicTickerResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/TickerNotification" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicTickersByExpirationResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/TickerNotification" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicTradesHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "trades": { "type": "array", "items": { "$ref": "#/components/schemas/public_trade" } }, "has_more": { "type": "boolean" } }, "required": [ "trades", "has_more" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicTestResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "version": { "example": "2.1.26", "type": "string", "description": "The API version" } }, "required": [ "version" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicStatusResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "locked": { "type": "string", "description": "`true` when platform is locked in all currencies, `partial` when some currencies are locked, `false` - when there are not currencies locked" }, "locked_indices": { "type": "array", "description": "List of currency indices locked platform-wise" } }, "required": [ "locked" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicSettlementResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "continuation": { "$ref": "#/components/schemas/continuation" }, "settlements": { "type": "array", "items": { "$ref": "#/components/schemas/settlement" } } }, "required": [ "continuation", "settlements" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetAnnouncementsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "properties": { "body": { "example": "An announcement", "type": "string", "description": "The HTML body of the announcement" }, "publication_timestamp": { "example": 1527844253000, "type": "integer", "description": "The timestamp (milliseconds since the Unix epoch) of announcement publication" }, "id": { "example": 19288317, "type": "number", "description": "A unique identifier for the announcement" }, "important": { "example": false, "type": "boolean", "description": "Whether the announcement is marked as important" }, "confirmation": { "type": "boolean", "example": false, "description": "Whether the user confirmation is required for this announcement" }, "title": { "example": "Example announcement", "type": "string", "description": "The title of the announcement" } }, "required": [ "title", "body", "important", "id", "publication_timestamp" ], "type": "object" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetOrderBookResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/TickerNotificationWithBidsAndAsks" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetBookSummaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/book_summary" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetIndexPriceResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "index_price": { "example": 11628.81, "type": "number", "description": "Value of requested index" }, "estimated_delivery_price": { "example": 11628.81, "type": "number", "description": "Estimated delivery price for the market. For more details, see Documentation > General > Expiration Price" } }, "required": [ "index_price", "estimated_delivery_price" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetIndexPriceNamesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Index name" }, "future_combo_creation_enabled": { "type": "boolean", "description": "Whether future combo creation is enabled for this index (only present when `extended`=`true`)" }, "option_combo_creation_enabled": { "type": "boolean", "description": "Whether option combo creation is enabled for this index (only present when `extended`=`true`)" } }, "required": [ "name" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetTradesVolumesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/trades_volumes" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetSecurityKeysResetDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "email": { "example": "support@deribit.com", "type": "string", "description": "Email of account which Security Keys are about to reset" } }, "required": [ "email" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetCombosResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/combo" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetComboIdsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/combo_id" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetComboDetailsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/combo" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCreateComboResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/combo" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetLegPricesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "legs": { "$ref": "#/components/schemas/leg_structure" }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." } }, "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetPositionResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/position_with_elp" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetPositionsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/position_with_elp" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSubscribeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "string", "example": "deribit_price_index.btc_usd" }, "description": "A list of subscribed channels." } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetOrderMarginByIdsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/order_id_initial_margin_pair" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateBuyAndSellResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "order": { "$ref": "#/components/schemas/order" }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } } }, "required": [ "order", "trades" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetOrderStateResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/order" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetOrderStateByLabelResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/orders" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetTriggerOrderHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/trigger_order_history_record" } }, "continuation": { "$ref": "#/components/schemas/continuation" } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetSubaccountsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "username": { "type": "string" }, "type": { "enum": [ "main", "subaccount" ], "type": "string" }, "id": { "type": "integer", "description": "Account/Subaccount identifier" }, "email": { "type": "string", "description": "User email" }, "not_confirmed_email": { "type": "string", "description": "New email address that has not yet been confirmed. This field is only included if `with_portfolio` == `true`." }, "security_keys_enabled": { "type": "boolean", "description": "Whether the Security Keys authentication is enabled" }, "security_keys_assignments": { "type": "array", "description": "Names of assignments with Security Keys assigned" }, "system_name": { "type": "string", "description": "System generated user nickname" }, "receive_notifications": { "type": "boolean", "description": "When `true` - receive all notification emails on the main email" }, "is_password": { "type": "boolean", "description": "`true` when password for the subaccount has been configured" }, "margin_model": { "type": "string", "description": "Margin model" }, "proof_id": { "type": "string", "description": "Hashed identifier used in the Proof Of Liability for the subaccount. This identifier allows you to find your entries in the Deribit Proof-Of-Reserves files. IMPORTANT: Keep it secret to not disclose your entries in the Proof-Of-Reserves." }, "proof_id_signature": { "type": "string", "description": "Signature used as a base string for proof_id hash. IMPORTANT: Keep it secret to not disclose your entries in the Proof-Of-Reserves." }, "login_enabled": { "type": "boolean", "description": "Informs whether login to the subaccount is enabled" }, "portfolio": { "$ref": "#/components/schemas/portfolio", "description": "Only if with_portfolio == true" } }, "required": [ "username", "email", "type", "tfa_enabled", "receive_notifications", "is_password", "system_name", "id" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetSubaccountsDetailsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "uid": { "type": "integer", "description": "Account/Subaccount identifier" }, "positions": { "type": "array", "items": { "$ref": "#/components/schemas/position" } }, "open_orders": { "type": "array", "items": { "$ref": "#/components/schemas/order" } } }, "required": [ "uid", "positions" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCreateSubaccountResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "email": { "example": "user@example.com", "type": "string", "description": "User email" }, "login_enabled": { "type": "boolean", "description": "Informs whether login to the subaccount is enabled" }, "is_password": { "type": "boolean", "description": "`true` when password for the subaccount has been configured" }, "receive_notifications": { "type": "boolean", "description": "When `true` - receive all notification emails on the main email" }, "system_name": { "example": "username_1", "type": "string", "description": "System generated user nickname" }, "security_keys_enabled": { "type": "boolean", "description": "Whether the Security Keys authentication is enabled" }, "security_keys_assignments": { "type": "array", "items": { "type": "string" }, "description": "Names of assignments with Security Keys assigned" }, "username": { "type": "string", "description": "Account name (given by user)" }, "type": { "enum": [ "subaccount" ], "type": "string", "description": "Account type" }, "id": { "type": "integer", "description": "Subaccount identifier" }, "portfolio": { "$ref": "#/components/schemas/portfolio", "description": "Portfolio information for the subaccount" }, "margin_model": { "type": "string", "description": "Margin model" }, "disabled_trading_products": { "type": "array", "items": { "type": "string" }, "description": "List of disabled trading products" }, "proof_id": { "type": "string", "description": "hashed identifier used in the Proof Of Liability for the subaccount. This identifier allows you to find your entries in the Deribit Proof-Of-Reserves files. IMPORTANT: Keep it secret to not disclose your entries in the Proof-Of-Reserves." }, "proof_id_signature": { "type": "string", "description": "signature used as a base string for proof_id hash. IMPORTANT: Keep it secret to not disclose your entries in the Proof-Of-Reserves." }, "trading_products_details": { "type": "array", "items": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "product": { "type": "string" }, "overwriteable": { "type": "boolean" }, "requires_consent": { "type": "boolean" } } }, "description": "Details about trading products availability" }, "referrals_count": { "type": "integer", "description": "Number of referrals" } }, "required": [ "username", "type", "id", "login_enabled", "is_password", "receive_notifications", "system_name", "email", "security_keys_enabled", "security_keys_assignments", "margin_model", "disabled_trading_products", "proof_id", "proof_id_signature", "trading_products_details", "referrals_count" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetUserTradesByOrderResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" } }, "required": [ "jsonrpc" ], "type": "object" }, "PrivateGetUserTradesHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } }, "has_more": { "type": "boolean" } }, "required": [ "trades", "has_more" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetDepositsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/deposit" } }, "count": { "$ref": "#/components/schemas/result_count" } }, "required": [ "data", "count" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateWithdrawResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/withdrawal" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetWithdrawalsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/withdrawal" } }, "count": { "$ref": "#/components/schemas/result_count" } }, "required": [ "data", "count" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateDepositAddressResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "creation_timestamp": { "$ref": "#/components/schemas/timestamp" }, "currency": { "$ref": "#/components/schemas/currency" }, "address": { "$ref": "#/components/schemas/currency_address" }, "type": { "$ref": "#/components/schemas/wallet_address_type" } }, "required": [ "creation_timestamp", "currency", "address", "type" ], "description": "Object if address is created, null otherwise" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAddressBookResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/address_book_item" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAddToAddressBookResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/address_book_item" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateRemoveFromAddressBookResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "example": "ok", "description": "ok" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateUpdateInAddressBookResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "example": "ok", "description": "ok" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSaveAddressBeneficiaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/address_beneficiary_item" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetAddressBeneficiaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/address_beneficiary_item" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateDeleteAddressBeneficiaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "example": "ok", "description": "ok" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateListAddressBeneficiariesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/address_beneficiary_item" } }, "continuation": { "$ref": "#/components/schemas/continuation" }, "count": { "type": "integer", "example": 42, "description": "Total number of results available" } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetTransfersResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/transfer_item" } }, "count": { "$ref": "#/components/schemas/result_count" } }, "required": [ "data", "count" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSubmitTransferResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/transfer_item" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetRewardEligibilityResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "eligibility_status": { "type": "string", "enum": [ "eligible", "partially_eligible", "non_eligible" ], "description": "" }, "apr_sma7": { "type": "number", "example": 4.156, "description": "Simple Moving Average (SMA) of the last 7 days of rewards for the currency" } }, "required": [ "eligibility_status", "apr_sma7" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAccountResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "total_pl": { "example": 0.02032221, "type": "number", "description": "Profit and loss" }, "session_rpl": { "$ref": "#/components/schemas/rpl" }, "session_upl": { "$ref": "#/components/schemas/upl" }, "available_funds": { "example": 2.2638913, "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "available_withdrawal_funds": { "type": "number", "example": 2.26, "description": "The account's available to withdrawal funds" }, "margin_balance": { "type": "number", "example": 2.25, "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "balance": { "example": 3.4906363, "type": "number", "description": "The account's balance" }, "spot_reserve": { "example": 0.3, "type": "number", "description": "The account's balance reserved in active spot orders" }, "additional_reserve": { "$ref": "#/components/schemas/additional_reserve" }, "fee_balance": { "$ref": "#/components/schemas/fee_balance" }, "fee_group": { "type": "string", "description": "Fee group indicates the level of fee discounts applied to an account. Use `extended`: `true` to view this field. If the field is missing, the account is not assigned to any fee group. **📖 Related Support Article:** [Automatically applied volume based fee discounts](https://support.deribit.com/hc/en-us/articles/25944746248989-Fees#heading-11)" }, "currency": { "example": "ETH", "type": "string", "description": "The selected currency" }, "delta_total": { "$ref": "#/components/schemas/delta_total" }, "projected_delta_total": { "$ref": "#/components/schemas/projected_delta_total" }, "deposit_address": { "example": "14diAAyXL5UzhPTCKC998ch2GV7DMb7yDi", "type": "string", "description": "The deposit address for the account (if available)" }, "email": { "example": "support@deribit.com", "type": "string", "description": "User email (available when parameter `extended` = `true`)" }, "equity": { "example": 2.6437733, "type": "number", "description": "The account's current equity" }, "futures_pl": { "example": 0, "type": "number", "description": "Futures profit and Loss" }, "futures_session_rpl": { "example": 0, "type": "number", "description": "Futures session realized profit and Loss" }, "futures_session_upl": { "example": 0, "type": "number", "description": "Futures session unrealized profit and Loss" }, "initial_margin": { "example": 0.379882, "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "maintenance_margin": { "example": 0.1334519, "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "estimated_liquidation_ratio": { "$ref": "#/components/schemas/estimated_liquidation_ratio" }, "system_name": { "example": "myname", "type": "string", "description": "System generated user nickname (available when parameter `extended` = `true`)" }, "options_delta": { "example": 0, "type": "number", "description": "Options summary delta" }, "options_gamma": { "example": 0, "type": "number", "description": "Options summary gamma" }, "options_pl": { "example": 0, "type": "number", "description": "Options profit and Loss" }, "options_session_rpl": { "example": 0, "type": "number", "description": "Options session realized profit and Loss" }, "options_session_upl": { "example": 0, "type": "number", "description": "Options session unrealized profit and Loss" }, "options_theta": { "example": 0, "type": "number", "description": "Options summary theta" }, "options_value": { "example": 0, "type": "number", "description": "Options value" }, "options_vega": { "example": 0, "type": "number", "description": "Options summary vega" }, "options_gamma_map": { "type": "object", "description": "Map of options' gammas per index" }, "options_theta_map": { "type": "object", "description": "Map of options' thetas per index" }, "options_vega_map": { "type": "object", "description": "Map of options' vegas per index" }, "security_keys_enabled": { "example": false, "type": "boolean", "description": "Whether Security Key authentication is enabled (available when parameter `extended` = `true`)" }, "mmp_enabled": { "example": false, "type": "boolean", "description": "Whether MMP is enabled (available when parameter `extended` = `true`)" }, "projected_initial_margin": { "$ref": "#/components/schemas/projected_initial_margin" }, "projected_maintenance_margin": { "$ref": "#/components/schemas/projected_maintenance_margin" }, "username": { "type": "string", "example": "name", "description": "Account name (given by user) (available when parameter `extended` = `true`)" }, "type": { "enum": [ "main", "subaccount" ], "type": "string", "description": "Account type (available when parameter `extended` = `true`)" }, "login_enabled": { "type": "boolean", "example": false, "description": "Whether account is loginable using email and password (available when parameter `extended` = `true` and account is a subaccount)" }, "id": { "type": "integer", "example": 12354, "description": "Account id (available when parameter `extended` = `true`)" }, "portfolio_margining_enabled": { "type": "boolean", "example": true, "description": "`true` when portfolio margining is enabled for user" }, "cross_collateral_enabled": { "type": "boolean", "example": true, "description": "When `true` cross collateral is enabled for user" }, "margin_model": { "type": "string", "example": "segregated_sm", "description": "Name of user's currently enabled margin model" }, "total_equity_usd": { "example": 2.6437733, "type": "number", "description": "Optional (only for users using cross margin). The account's total equity in all cross collateral currencies, expressed in USD" }, "total_initial_margin_usd": { "example": 0.379882, "type": "number", "description": "Optional (only for users using cross margin). The account's total initial margin in all cross collateral currencies, expressed in USD" }, "total_maintenance_margin_usd": { "example": 0.1334519, "type": "number", "description": "Optional (only for users using cross margin). The account's total maintenance margin in all cross collateral currencies, expressed in USD" }, "total_margin_balance_usd": { "type": "number", "example": 2.25, "description": "Optional (only for users using cross margin). The account's total margin balance in all cross collateral currencies, expressed in USD" }, "total_delta_total_usd": { "type": "number", "example": 1.8, "description": "Optional (only for users using cross margin). The account's total delta total in all cross collateral currencies, expressed in USD" }, "interuser_transfers_enabled": { "type": "boolean", "example": false, "description": "`true` when the inter-user transfers are enabled for user (available when parameter `extended` = `true`)" }, "referrer_id": { "type": "string", "example": "517.6035", "description": "Optional identifier of the referrer (of the affiliation program, and available when parameter `extended` = `true`), which link was used by this account at registration. It coincides with suffix of the affiliation link path after `/reg-`" }, "limits": { "$ref": "#/components/schemas/api_limits" }, "creation_timestamp": { "type": "integer", "example": 1542100802842, "description": "Time at which the account was created (milliseconds since the Unix epoch; available when parameter `extended` = `true`)" }, "has_non_block_chain_equity": { "type": "boolean", "description": "Optional field returned with value `true` when user has non block chain equity that is excluded from proof of reserve calculations" }, "self_trading_reject_mode": { "type": "string", "description": "Self trading rejection behavior - `reject_taker` or `cancel_maker` (available when parameter `extended` = `true`)" }, "self_trading_extended_to_subaccounts": { "type": "string", "description": "`true` if self trading rejection behavior is applied to trades between subaccounts (available when parameter `extended` = `true`)" }, "fees": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "default": { "type": "object", "properties": { "type": { "type": "string", "description": "Fee type - `relative` if fee is calculated as a fraction of base instrument fee, `fixed` if fee is calculated solely using user fee" }, "taker": { "type": "number", "description": "Taker fee" }, "maker": { "type": "number", "description": "Maker fee" } }, "required": [ "type", "taker", "maker" ] }, "block_trade": { "type": "number", "description": "Block trade fee (if applicable)" } }, "required": [ "default" ] } }, "description": "Fee structure for all currency pairs and instrument types related to the currency (available when parameter `extended` = `true` and user has any discounts). Keys are index names (e.g., \"btc_usd\"), values are objects with instrument types as keys (option, perpetual, future)." }, "affiliate_promotion_fee": { "type": "number", "example": 0, "description": "Affiliate promotion fee (if greater than 0.0)" }, "trading_products_details": { "type": "object", "description": "Which trading products are enabled or can be overwritten for the account" }, "receive_notifications": { "type": "boolean", "example": false, "description": "Whether the account receives notifications" }, "is_direct_access_allowed": { "type": "boolean", "example": false, "description": "Whether Direct Access trading is enabled for the account." } }, "required": [ "equity", "currency", "maintenance_margin", "initial_margin", "available_funds", "available_withdrawal_funds", "balance", "session_upl", "session_rpl", "total_pl", "options_pl", "options_session_upl", "options_session_rpl", "options_delta", "options_gamma", "options_vega", "options_value", "options_theta", "futures_pl", "options_gamma_map", "options_theta_map", "options_vega_map", "futures_session_upl", "futures_session_rpl", "projected_maintenance_margin", "delta_total", "projected_delta_total", "security_keys_enabled", "system_name", "username", "email", "type", "id" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAccountSummariesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "id": { "type": "integer", "example": 12354, "description": "Account id (available when parameter `extended` = `true`)" }, "system_name": { "example": "myname", "type": "string", "description": "System generated user nickname (available when parameter `extended` = `true`)" }, "username": { "type": "string", "example": "name", "description": "Account name (given by user) (available when parameter `extended` = `true`)" }, "type": { "enum": [ "main", "subaccount" ], "type": "string", "description": "Account type (available when parameter `extended` = `true`)" }, "login_enabled": { "type": "boolean", "example": false, "description": "Whether account is loginable using email and password (available when parameter `extended` = `true` and account is a subaccount)" }, "email": { "example": "support@deribit.com", "type": "string", "description": "User email (available when parameter `extended` = `true`)" }, "security_keys_enabled": { "example": false, "type": "boolean", "description": "Whether Security Key authentication is enabled (available when parameter `extended` = `true`)" }, "mmp_enabled": { "example": false, "type": "boolean", "description": "Whether MMP is enabled (available when parameter `extended` = `true`)" }, "interuser_transfers_enabled": { "type": "boolean", "example": false, "description": "`true` when the inter-user transfers are enabled for user (available when parameter `extended` = `true`)" }, "referrer_id": { "type": "string", "example": "517.6035", "description": "Optional identifier of the referrer (of the affiliation program, and available when parameter `extended` = `true`), which link was used by this account at registration. It coincides with suffix of the affiliation link path after `/reg-`" }, "creation_timestamp": { "type": "integer", "example": 1542100802842, "description": "Time at which the account was created (milliseconds since the Unix epoch; available when parameter `extended` = `true`)" }, "self_trading_reject_mode": { "type": "string", "description": "Self trading rejection behavior - `reject_taker` or `cancel_maker` (available when parameter `extended` = `true`)" }, "self_trading_extended_to_subaccounts": { "type": "string", "description": "`true` if self trading rejection behavior is applied to trades between subaccounts (available when parameter `extended` = `true`)" }, "block_rfq_self_match_prevention": { "type": "string", "description": "When Block RFQ Self Match Prevention is enabled, it ensures that RFQs cannot be executed between accounts that belong to the same legal entity. This setting is independent of the general self-match prevention settings and must be configured separately." }, "affiliate_promotion_fee": { "type": "number", "example": 0, "description": "Affiliate promotion fee (if greater than 0.0)" }, "trading_products_details": { "type": "object", "description": "Which trading products are enabled or can be overwritten for the account" }, "receive_notifications": { "type": "boolean", "example": false, "description": "Whether the account receives notifications" }, "summaries": { "type": "array", "items": { "type": "object", "properties": { "total_pl": { "example": 0.02032221, "type": "number", "description": "Profit and loss" }, "session_rpl": { "$ref": "#/components/schemas/rpl" }, "session_upl": { "$ref": "#/components/schemas/upl" }, "available_funds": { "example": 2.2638913, "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "available_withdrawal_funds": { "type": "number", "example": 2.26, "description": "The account's available to withdrawal funds" }, "margin_balance": { "type": "number", "example": 2.25, "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "balance": { "example": 3.4906363, "type": "number", "description": "The account's balance" }, "spot_reserve": { "example": 0.3, "type": "number", "description": "The account's balance reserved in active spot orders" }, "additional_reserve": { "$ref": "#/components/schemas/additional_reserve" }, "fee_balance": { "$ref": "#/components/schemas/fee_balance" }, "fee_group": { "type": "string", "description": "Fee group indicates the level of fee discounts applied to an account. Use `extended`: `true` to view this field. If the field is missing, the account is not assigned to any fee group. **📖 Related Support Article:** [Automatically applied volume based fee discounts](https://support.deribit.com/hc/en-us/articles/25944746248989-Fees#heading-11)" }, "currency": { "example": "ETH", "type": "string", "description": "Currency of the summary" }, "delta_total": { "$ref": "#/components/schemas/delta_total" }, "projected_delta_total": { "$ref": "#/components/schemas/projected_delta_total" }, "deposit_address": { "example": "14diAAyXL5UzhPTCKC998ch2GV7DMb7yDi", "type": "string", "description": "The deposit address for the account (if available)" }, "equity": { "example": 2.6437733, "type": "number", "description": "The account's current equity" }, "futures_pl": { "example": 0, "type": "number", "description": "Futures profit and Loss" }, "futures_session_rpl": { "example": 0, "type": "number", "description": "Futures session realized profit and Loss" }, "futures_session_upl": { "example": 0, "type": "number", "description": "Futures session unrealized profit and Loss" }, "initial_margin": { "example": 0.379882, "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "maintenance_margin": { "example": 0.1334519, "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "estimated_liquidation_ratio": { "$ref": "#/components/schemas/estimated_liquidation_ratio" }, "options_delta": { "example": 0, "type": "number", "description": "Options summary delta" }, "options_gamma": { "example": 0, "type": "number", "description": "Options summary gamma" }, "options_pl": { "example": 0, "type": "number", "description": "Options profit and Loss" }, "options_session_rpl": { "example": 0, "type": "number", "description": "Options session realized profit and Loss" }, "options_session_upl": { "example": 0, "type": "number", "description": "Options session unrealized profit and Loss" }, "options_theta": { "example": 0, "type": "number", "description": "Options summary theta" }, "options_value": { "example": 0, "type": "number", "description": "Options value" }, "options_vega": { "example": 0, "type": "number", "description": "Options summary vega" }, "options_gamma_map": { "type": "object", "description": "Map of options' gammas per index" }, "options_theta_map": { "type": "object", "description": "Map of options' thetas per index" }, "options_vega_map": { "type": "object", "description": "Map of options' vegas per index" }, "projected_initial_margin": { "$ref": "#/components/schemas/projected_initial_margin" }, "projected_maintenance_margin": { "$ref": "#/components/schemas/projected_maintenance_margin" }, "portfolio_margining_enabled": { "type": "boolean", "example": true, "description": "`true` when portfolio margining is enabled for user" }, "cross_collateral_enabled": { "type": "boolean", "example": true, "description": "When `true` cross collateral is enabled for user" }, "margin_model": { "type": "string", "example": "segregated_sm", "description": "Name of user's currently enabled margin model" }, "total_equity_usd": { "example": 2.6437733, "type": "number", "description": "Optional (only for users using cross margin). The account's total equity in all cross collateral currencies, expressed in USD" }, "total_initial_margin_usd": { "example": 0.379882, "type": "number", "description": "Optional (only for users using cross margin). The account's total initial margin in all cross collateral currencies, expressed in USD" }, "total_maintenance_margin_usd": { "example": 0.1334519, "type": "number", "description": "Optional (only for users using cross margin). The account's total maintenance margin in all cross collateral currencies, expressed in USD" }, "total_margin_balance_usd": { "type": "number", "example": 2.25, "description": "Optional (only for users using cross margin). The account's total margin balance in all cross collateral currencies, expressed in USD" }, "total_delta_total_usd": { "type": "number", "example": 1.8, "description": "Optional (only for users using cross margin). The account's total delta total in all cross collateral currencies, expressed in USD" }, "limits": { "$ref": "#/components/schemas/api_limits" }, "has_non_block_chain_equity": { "type": "boolean", "description": "Optional field returned with value `true` when user has non block chain equity that is excluded from proof of reserve calculations" }, "fees": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "default": { "type": "object", "properties": { "type": { "type": "string", "description": "Fee calculation type (e.g., fixed, relative)" }, "taker": { "type": "number", "description": "Taker fee" }, "maker": { "type": "number", "description": "Maker fee" } }, "required": [ "type", "taker", "maker" ] }, "block_trade": { "type": "number", "description": "Block trade fee (if applicable)" } }, "required": [ "default" ] } }, "description": "Fee structure for all currency pairs and instrument types related to the currency (available when parameter `extended` = `true` and user has any discounts). Keys are index names (e.g., \"btc_usd\"), values are objects with instrument types as keys (option, perpetual, future)." }, "affiliate_promotion_fee": { "type": "number", "example": 0, "description": "Affiliate promotion fee (if greater than 0.0)" }, "trading_products_details": { "type": "object", "description": "Which trading products are enabled or can be overwritten for the account" }, "receive_notifications": { "type": "boolean", "example": false, "description": "Whether the account receives notifications" } }, "required": [ "equity", "currency", "maintenance_margin", "initial_margin", "available_funds", "available_withdrawal_funds", "balance", "session_upl", "session_rpl", "total_pl", "options_pl", "options_session_upl", "options_session_rpl", "options_delta", "options_gamma", "options_vega", "options_value", "options_theta", "futures_pl", "options_gamma_map", "options_theta_map", "options_vega_map", "futures_session_upl", "futures_session_rpl", "projected_maintenance_margin", "delta_total", "projected_delta_total" ] }, "description": "Aggregated list of per-currency account summaries" } }, "required": [ "security_keys_enabled", "system_name", "username", "email", "type", "id" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/order" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelAllResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "number", "example": 7, "description": "Total number of successfully cancelled orders" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetEmailLanguageResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "example": "en", "description": "The abbreviation of the language" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateEditResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "order": { "$ref": "#/components/schemas/order" }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } } }, "required": [ "order", "trades" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetOrderHistoryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/order" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetOpenOrdersResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/order" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSettlementResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "continuation": { "$ref": "#/components/schemas/continuation" }, "settlements": { "type": "array", "items": { "$ref": "#/components/schemas/settlement" } } }, "required": [ "continuation", "settlements" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetMarginsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "buy": { "example": 0.01681367, "type": "number", "description": "Margin when buying" }, "sell": { "example": 0.01680479, "type": "number", "description": "Margin when selling" }, "min_price": { "$ref": "#/components/schemas/min_price" }, "max_price": { "$ref": "#/components/schemas/max_price" } }, "required": [ "buy", "sell", "min_price", "max_price" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateApiKeyResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/api_key" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelQuotesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "number", "example": 3, "description": "Total number of successfully cancelled quotes" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateMassQuoteResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "orders": { "type": "array", "items": { "$ref": "#/components/schemas/order" } }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/user_trade" } }, "errors_count": { "type": "integer", "description": "Number of errors (present when `detailed` : `false`)." }, "pending_requests_count": { "type": "integer", "description": "Number of pending quotes (present when `wait_for_response`: `false` and `detailed` : `false`)." }, "pending_requests": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "type": "string", "description": "Instrument name." }, "side": { "type": "string", "description": "Quote side - `bid` or `ask`." } } }, "description": "List of pending quotes (present when `wait_for_response`: `false` and `detailed` : `true`)." }, "errors": { "type": "array", "items": { "type": "object", "properties": { "instrument_name": { "type": "string", "description": "Instrument name." }, "side": { "type": "string", "description": "Quote side - `bid` or `ask`." }, "error": { "type": "object", "description": "Error data." }, "code": { "type": "integer", "description": "Error code" }, "message": { "type": "string", "description": "Error message." } } }, "description": "List of errors (present when `detailed` : `true`)." } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetMmpConfigResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "index_name": { "$ref": "#/components/schemas/index_name" }, "interval": { "type": "integer", "minimum": 0, "maximum": 3600, "description": "The duration of the monitoring window in seconds. For example, an interval of 3 implies a 3-second window.

The interval begins after the first trade.

If a new trade is executed after the interval has ended, a new interval is started, and counters reset.

If a trade occurs during an already running interval, that interval continues unaffected.

This mechanism allows the platform to track activity in short, rolling windows to identify potentially risky trading behavior.

If set to 0, MMP is disabled.

Maximum value: 3600 seconds (1 hour)." }, "frozen_time": { "type": "integer", "minimum": 0, "maximum": 3600, "description": "Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted.

If you want to disable automatic reset, set frozen_time to 0. In that case, a manual reset is required using the private/reset_mmp method.

Manual reset is also possible during the frozen time period.

Maximum value: 3600 seconds (1 hour)." }, "id": { "type": "integer", "format": "int64", "description": "Integer identifier for the MMP group (int64). This is the programmatic identifier for the group. Entries without an `mmp_group` name correspond to the orders MMP group (the default group)." }, "mmp_group": { "type": "string", "description": "Name of the MMP group. Absent for the orders MMP group (the default group), which has no string name — its entry is identified by the `id` field alone." }, "quantity_limit": { "type": "number", "description": "The total traded quantity, measured in units of the base currency (e.g., BTC in BTC-PERPETUAL), within the interval.

This count is direction-agnostic—a buy followed by a sell counts double.

Example: Buy 10 BTC and sell 10 BTC = 20 total quantity.

Applicable to both options and futures.

Note: Once this is set, an initial margin will be reserved even without any open positions. Initial Margin due to quantity_limit = quantity_limit * 0.03

Maximum 4 decimal places." }, "delta_limit": { "type": "number", "description": "The maximum allowable net transaction delta change during the interval.

Expressed in units of base currency.

The delta_limit is treated as an absolute threshold: e.g., delta_limit: 10 → MMP is triggered if net transaction delta exceeds +10 or drops below -10.

Direction matters: buying +5 delta and selling −5 delta cancels out if within the same interval.

Note: Note that we use the net transaction delta instead of delta. Net Transaction Delta = Delta - Mark Price. In the rest of this document, \"delta\" actually refers to net transaction delta.

Maximum 4 decimal places." }, "vega_limit": { "type": "number", "description": "The maximum change in vega exposure allowed within a given interval, measured in absolute terms.

Expressed in USD, representing the change in sensitivity to implied volatility across executed trades.

This parameter is primarily relevant for options traders managing risk in volatile markets.

Similar to delta_limit, the vega_limit is direction-aware and evaluated on a net basis. If the exposure exceeds the set threshold (positively or negatively), MMP will be triggered.

Notice: When evaluating Delta and Vega limits for MMP, Deribit uses the greeks at the moment of trade execution. The system does not re-evaluate Delta or Vega using live greeks at the time of MMP checking.

Maximum 4 decimal places." }, "max_quote_quantity": { "type": "number", "description": "Maximum Quote Quantity (MQQ). MQQ is configured per index but enforced per side, per order book (instrument) — the total combined size of open MMP orders per side per instrument cannot exceed MQQ (specified in base currency). MQQ is used for Initial Margin calculation (3% of MQQ is taken as Initial Margin for MMP orders and quotes).

**Important Notes:**
- **Configured per index, enforced per instrument:** MQQ is configured at the index level (an MMP group is linked to an index). However, the limit is enforced separately per order book (instrument) per side. \"Per order book\" means per instrument (not per expiry). The limit is NOT the sum across all instruments — each instrument has its own separate MQQ enforcement.
- **MQQ limits cumulative size, not order count:** For example, with MQQ of 3 BTC, you can place multiple orders (three orders of 1 BTC each, or one order of 2.5 BTC plus one of 0.5 BTC) as long as the total size per side per instrument does not exceed 3 BTC
- **MQQ is separate per MMP group:** Each MMP group has its own independent MQQ configuration. MQQ limits are enforced separately for each MMP group.
- **MQQ vs Quantity Limit relationship:** You can set MQQ > `quantity_limit`. This allows quotes to be larger than the quantity limit, and enables MMP to trigger on partial fills of quotes. This decouples the MMP reserved margin from the MMP quantity limit.
- **Base currency:** MQQ is specified and enforced in base currency
- **Inverse futures:** Size is calculated as Amount / Price to convert to base currency
- **Inverse future spreads:** Size is calculated as Amount / IndexPrice
- **SM accounts:** MMP orders and quotes on options and option_combos are not supported for SM accounts
- **Rejections:** MQQ is enforced for **MMP-enabled orders and quotes**. Quote entries and MMP-enabled orders (i.e., orders with `mmp=true`) are rejected if their individual size is greater than `max_quote_quantity`, or if accepting them would make the total open MMP size per side per instrument exceed `max_quote_quantity`. Non‑MMP orders are not subject to MQQ and may be larger than `max_quote_quantity`.
- **Precision:** All MMP configuration values support maximum 4 decimal places
- **Latency:** There are no latency benefits from MQQ if you already use mass quotes." }, "block_rfq": { "type": "boolean", "description": "If true, indicates MMP configuration for Block RFQ. Block RFQ MMP settings are completely separate from normal order/quote MMP settings." }, "trade_count_limit": { "type": "integer", "description": "For Block RFQ only. The maximum number of Block RFQ trades allowed in the lookback window. Each RFQ trade counts as +1 towards the limit (not individual legs). Works across all currency pairs." } }, "required": [ "index_name", "interval", "frozen_time" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetMmpStatusResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "index_name": { "$ref": "#/components/schemas/index_name" }, "frozen_until": { "type": "integer", "description": "Timestamp (milliseconds since the UNIX epoch) until the user will be frozen - 0 means that the user is frozen until manual reset." }, "mmp_group": { "type": "string", "example": "MassQuoteBot7", "description": "Triggered mmp group, this parameter is optional (appears only for Mass Quote orders trigger)" }, "block_rfq": { "type": "boolean", "example": false, "description": "If true, indicates that the MMP status is for Block RFQ. Block RFQ MMP status is completely separate from normal order/quote MMP status." } }, "required": [ "index_name", "frozen_until", "mmp_group" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSetMmpConfigResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "index_name": { "$ref": "#/components/schemas/index_name" }, "interval": { "type": "integer", "minimum": 0, "maximum": 3600, "description": "The duration of the monitoring window in seconds. For example, an interval of 3 implies a 3-second window.

The interval begins after the first trade.

If a new trade is executed after the interval has ended, a new interval is started, and counters reset.

If a trade occurs during an already running interval, that interval continues unaffected.

This mechanism allows the platform to track activity in short, rolling windows to identify potentially risky trading behavior.

If set to 0, MMP is disabled.

Maximum value: 3600 seconds (1 hour)." }, "frozen_time": { "type": "integer", "minimum": 0, "maximum": 3600, "description": "Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted.

If you want to disable automatic reset, set frozen_time to 0. In that case, a manual reset is required using the private/reset_mmp method.

Manual reset is also possible during the frozen time period.

Maximum value: 3600 seconds (1 hour)." }, "id": { "type": "integer", "format": "int64", "description": "Integer identifier for the MMP group (int64). This is the programmatic identifier for the group. Entries without an `mmp_group` name correspond to the orders MMP group (the default group)." }, "mmp_group": { "type": "string", "description": "Name of the MMP group. Absent for the orders MMP group (the default group), which has no string name — its entry is identified by the `id` field alone." }, "quantity_limit": { "type": "number", "description": "The total traded quantity, measured in units of the base currency (e.g., BTC in BTC-PERPETUAL), within the interval.

This count is direction-agnostic—a buy followed by a sell counts double.

Example: Buy 10 BTC and sell 10 BTC = 20 total quantity.

Applicable to both options and futures.

Note: Once this is set, an initial margin will be reserved even without any open positions. Initial Margin due to quantity_limit = quantity_limit * 0.03

Maximum 4 decimal places." }, "delta_limit": { "type": "number", "description": "The maximum allowable net transaction delta change during the interval.

Expressed in units of base currency.

The delta_limit is treated as an absolute threshold: e.g., delta_limit: 10 → MMP is triggered if net transaction delta exceeds +10 or drops below -10.

Direction matters: buying +5 delta and selling −5 delta cancels out if within the same interval.

Note: Note that we use the net transaction delta instead of delta. Net Transaction Delta = Delta - Mark Price. In the rest of this document, \"delta\" actually refers to net transaction delta.

Maximum 4 decimal places." }, "vega_limit": { "type": "number", "description": "The maximum change in vega exposure allowed within a given interval, measured in absolute terms.

Expressed in USD, representing the change in sensitivity to implied volatility across executed trades.

This parameter is primarily relevant for options traders managing risk in volatile markets.

Similar to delta_limit, the vega_limit is direction-aware and evaluated on a net basis. If the exposure exceeds the set threshold (positively or negatively), MMP will be triggered.

Notice: When evaluating Delta and Vega limits for MMP, Deribit uses the greeks at the moment of trade execution. The system does not re-evaluate Delta or Vega using live greeks at the time of MMP checking.

Maximum 4 decimal places." }, "max_quote_quantity": { "type": "number", "description": "Maximum Quote Quantity (MQQ). MQQ is configured per index but enforced per side, per order book (instrument) — the total combined size of open MMP orders per side per instrument cannot exceed MQQ (specified in base currency). MQQ is used for Initial Margin calculation (3% of MQQ is taken as Initial Margin for MMP orders and quotes).

**Important Notes:**
- **Configured per index, enforced per instrument:** MQQ is configured at the index level (an MMP group is linked to an index). However, the limit is enforced separately per order book (instrument) per side. \"Per order book\" means per instrument (not per expiry). The limit is NOT the sum across all instruments — each instrument has its own separate MQQ enforcement.
- **MQQ limits cumulative size, not order count:** For example, with MQQ of 3 BTC, you can place multiple orders (three orders of 1 BTC each, or one order of 2.5 BTC plus one of 0.5 BTC) as long as the total size per side per instrument does not exceed 3 BTC
- **MQQ is separate per MMP group:** Each MMP group has its own independent MQQ configuration. MQQ limits are enforced separately for each MMP group.
- **MQQ vs Quantity Limit relationship:** You can set MQQ > `quantity_limit`. This allows quotes to be larger than the quantity limit, and enables MMP to trigger on partial fills of quotes. This decouples the MMP reserved margin from the MMP quantity limit.
- **Base currency:** MQQ is specified and enforced in base currency
- **Inverse futures:** Size is calculated as Amount / Price to convert to base currency
- **Inverse future spreads:** Size is calculated as Amount / IndexPrice
- **SM accounts:** MMP orders and quotes on options and option_combos are not supported for SM accounts
- **Rejections:** MQQ is enforced for **MMP-enabled orders and quotes**. Quote entries and MMP-enabled orders (i.e., orders with `mmp=true`) are rejected if their individual size is greater than `max_quote_quantity`, or if accepting them would make the total open MMP size per side per instrument exceed `max_quote_quantity`. Non‑MMP orders are not subject to MQQ and may be larger than `max_quote_quantity`.
- **Precision:** All MMP configuration values support maximum 4 decimal places
- **Latency:** There are no latency benefits from MQQ if you already use mass quotes." }, "block_rfq": { "type": "boolean", "description": "If true, indicates MMP configuration for Block RFQ. Block RFQ MMP settings are completely separate from normal order/quote MMP settings." }, "trade_count_limit": { "type": "integer", "description": "For Block RFQ only. The maximum number of Block RFQ trades allowed in the lookback window. Each RFQ trade counts as +1 towards the limit (not individual legs). Works across all currency pairs." } }, "required": [ "index_name", "interval", "frozen_time" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetAccessLogResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/access_log" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateChangeMarginModelResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "old_state": { "type": "object", "properties": { "maintenance_margin_rate": { "type": "number", "description": "Maintenance margin rate before change" }, "initial_margin_rate": { "type": "number", "description": "Initial margin rate before change" }, "available_balance": { "type": "number", "description": "Available balance before change" } }, "required": [ "maintenance_margin_rate", "initial_margin_rate", "available_balance" ], "description": "Represents portfolio state before change" }, "new_state": { "type": "object", "properties": { "maintenance_margin_rate": { "type": "number", "description": "Maintenance margin rate after change" }, "initial_margin_rate": { "type": "number", "description": "Initial margin rate after change" }, "available_balance": { "type": "number", "description": "Available balance after change" } }, "required": [ "maintenance_margin_rate", "initial_margin_rate", "available_balance" ], "description": "Represents portfolio state after change" }, "currency": { "$ref": "#/components/schemas/currency" } }, "required": [ "old_state", "new_state", "currency" ] } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetSecurityKeyActivationDataResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "activation_challenge": { "type": "string", "description": "Activation challenge, needs to be send with activation request" }, "account": { "type": "string", "description": "Email address of current account" }, "issuer": { "type": "string", "description": "Domain name" }, "type": { "$ref": "#/components/schemas/security_key_type" }, "secret": { "type": "string", "description": "TFA Secret (for tfa type only)" }, "data": { "type": "object", "description": "Data for U2F activation" } }, "required": [ "activation_challenge" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateListSecurityKeysResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/security_key" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetSecurityKeyStatusResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "basic", "advanced" ], "description": "Current Security Keys management mode" }, "enabled": { "type": "boolean", "description": "`true` if there is any assignment to any key made" }, "assignments": { "type": "array", "items": { "type": "string", "enum": [ "login", "account", "wallet", "admin" ], "description": "" }, "description": "List of assignments that has Security Key assigned, allowed values: `login`, `account`, `wallet`, `admin`" } }, "required": [ "mode", "enabled", "assignments" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetCancelOnDisconnectResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "scope": { "$ref": "#/components/schemas/cod_scope" }, "enabled": { "$ref": "#/components/schemas/enabled_field" } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetTransactionLogResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "continuation": { "$ref": "#/components/schemas/continuation_with_null" }, "logs": { "type": "array", "items": { "$ref": "#/components/schemas/transaction_log" } } }, "required": [ "continuation", "logs" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockTradeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_trade" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivatePositionMoveResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/position_move" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockTradesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/block_trade" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSimulateBlockTradeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "boolean", "description": "`true` if block trade can be executed, `false` otherwise" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateVerifyBlockTradeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "signature": { "$ref": "#/components/schemas/block_trade_signature" } }, "required": [ "signature" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockTradeRequestsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/pending_block_trade" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateChangePasswordResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "access_token": { "type": "string", "example": "843SehgeX5n6XxEU4XbABx4Cny5Akai5iHiJePTsvUw7" }, "token_type": { "type": "string", "enum": [ "bearer" ], "description": "Authorization type, allowed value - `bearer`" }, "expires_in": { "type": "integer", "example": 315360000, "description": "Token lifetime in seconds" }, "refresh_token": { "type": "string", "example": "6faf8L36JdaSqsjCEEiwqifPpj6JB18RWwiWHrsGTZ91", "description": "Can be used to request a new token (with a new lifetime)" }, "scope": { "type": "string", "description": "Type of the access for assigned token" } }, "required": [ "access_token", "token_type", "expires_in", "refresh_token", "scope" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockRfqsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "block_rfqs": { "type": "array", "items": { "$ref": "#/components/schemas/block_rfq" } }, "continuation": { "$ref": "#/components/schemas/continuation" } }, "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCreateBlockRfqResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_rfq" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelBlockRfqResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_rfq" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAcceptBlockRfqResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "trade_trigger": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "untriggered" ] }, "price": { "type": "number" }, "direction": { "type": "string", "enum": [ "buy", "sell" ] } } }, "block_trades": { "type": "array", "items": { "$ref": "#/components/schemas/block_trade" } } }, "required": [ "trade_trigger", "block_trades" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelBlockRfqTriggerResponse": { "$ref": "#/components/schemas/block_rfq" }, "PrivateGetBlockRfqQuotesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/block_rfq_quote" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateAddBlockRfqQuoteResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_rfq_quote" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateEditBlockRfqQuoteResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_rfq_quote" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelBlockRfqQuoteResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/block_rfq_quote" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCancelAllBlockRfqQuotesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "number", "example": 7, "description": "Total number of successfully cancelled quotes" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockRfqMakersResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "description": "A list of available makers." } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicGetBlockRfqTradesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "block_rfqs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the Block RFQ" }, "timestamp": { "$ref": "#/components/schemas/trade_timestamp" }, "direction": { "$ref": "#/components/schemas/direction", "description": "Trade direction of the taker" }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "mark_price": { "type": "number", "description": "Mark Price at the moment of trade" }, "legs": { "$ref": "#/components/schemas/leg_structure" }, "combo_id": { "$ref": "#/components/schemas/combo_id" }, "hedge": { "$ref": "#/components/schemas/block_rfq_hedge_leg" }, "index_prices": { "type": "object", "description": "A map of index prices for the underlying instrument(s) at the time of trade execution, where keys are price index names and values are prices." }, "trades": { "type": "array", "items": { "type": "object", "properties": { "direction": { "$ref": "#/components/schemas/direction" }, "price": { "$ref": "#/components/schemas/price" }, "amount": { "type": "number", "description": "Trade amount. For options, linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." }, "hedge_amount": { "type": "number", "description": "Amount of the hedge leg. For linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." } } } } } } }, "continuation": { "$ref": "#/components/schemas/block_rfq_trade_tape_continuation" } }, "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBlockRfqUserInfoResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "parent": { "type": "object", "properties": { "identity": { "type": "string", "description": "Group-level alias identifying the account group as a whole." }, "is_maker": { "type": "boolean", "description": "Indicates whether the Parent Identity has maker scope." } }, "description": "Parent Identity (group alias), representing the overall account group (main + subaccounts)." }, "users": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "$ref": "#/components/schemas/user_id" }, "taker_rating": { "type": "number", "description": "Taker rating associated with this account, if available." }, "identity": { "type": "string", "description": "Specific alias identifying this account individually." }, "is_maker": { "type": "boolean", "description": "Indicates whether this account has maker scope." } } } } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicListApiKeysResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/api_key" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetUserLocksResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "items": { "type": "object", "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "enabled": { "type": "boolean", "description": "Value is set to 'true' when user account is locked in currency" }, "message": { "type": "string", "description": "Optional information for user why his account is locked" } }, "required": [ "currency", "enabled" ] }, "type": "array" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetAffiliateProgramInfoResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "is_enabled": { "type": "boolean", "description": "Status of affiliate program" }, "number_of_affiliates": { "type": "number", "description": "Number of affiliates" }, "link": { "type": "string", "description": "Affiliate link" }, "received": { "type": "object", "properties": { "eth": { "type": "number", "description": "Total payout received in ETH" }, "btc": { "type": "number", "description": "Total payout received in BTC" } }, "required": [ "btc", "eth" ] } }, "required": [ "is_enabled" ], "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateStatsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "user": { "type": "object", "description": "Statistics of the user" }, "apps": { "type": "array", "description": "Statistics of the applications owned by the user" } }, "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateSimulatePortfolioResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "currency": { "example": "BTC", "type": "string", "description": "Currency of the simulation" }, "equity": { "example": 150075253.91354558, "type": "number", "description": "The account's current equity" }, "balance": { "example": 150076473.4995114, "type": "number", "description": "The account's balance" }, "margin_balance": { "example": 153534213.79481918, "type": "number", "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "initial_margin": { "example": 37662472.03416069, "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "maintenance_margin": { "example": 30129215.84817124, "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "projected_initial_margin": { "$ref": "#/components/schemas/projected_initial_margin" }, "projected_maintenance_margin": { "$ref": "#/components/schemas/projected_maintenance_margin" }, "available_funds": { "example": 115871741.76065847, "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "available_withdrawal_funds": { "example": 115871741.76065847, "type": "number", "description": "The account's available to withdrawal funds" }, "available_subaccount_transfer_funds": { "example": 0, "type": "number", "description": "The account's available funds for subaccount transfers" }, "total_pl": { "example": 40419.10179263, "type": "number", "description": "Profit and loss" }, "session_rpl": { "$ref": "#/components/schemas/rpl" }, "session_upl": { "$ref": "#/components/schemas/upl" }, "futures_pl": { "example": 39497.54616685, "type": "number", "description": "Futures profit and loss" }, "futures_session_rpl": { "example": 1.309136, "type": "number", "description": "Futures session realized profit and loss" }, "futures_session_upl": { "example": -164.48253509, "type": "number", "description": "Futures session unrealized profit and loss" }, "options_pl": { "example": 921.55562578, "type": "number", "description": "Options profit and loss" }, "options_session_rpl": { "example": 0, "type": "number", "description": "Options session realized profit and loss" }, "options_session_upl": { "example": -174.67960675, "type": "number", "description": "Options session unrealized profit and loss" }, "options_value": { "example": -1056.41256672, "type": "number", "description": "Options value" }, "options_delta": { "example": 2883.38481, "type": "number", "description": "Options summary delta" }, "options_gamma": { "example": -0.03907, "type": "number", "description": "Options summary gamma" }, "options_theta": { "example": 142583.29246, "type": "number", "description": "Options summary theta" }, "options_vega": { "example": -39322.23046, "type": "number", "description": "Options summary vega" }, "options_gamma_map": { "type": "object", "description": "Map of options' gammas per index" }, "options_theta_map": { "type": "object", "description": "Map of options' thetas per index" }, "options_vega_map": { "type": "object", "description": "Map of options' vegas per index" }, "delta_total": { "$ref": "#/components/schemas/delta_total" }, "delta_total_map": { "type": "object", "description": "Map of total deltas per index" }, "projected_delta_total": { "$ref": "#/components/schemas/projected_delta_total" }, "additional_reserve": { "$ref": "#/components/schemas/additional_reserve" }, "spot_reserve": { "example": 0, "type": "number", "description": "The account's balance reserved in active spot orders" }, "fee_balance": { "$ref": "#/components/schemas/fee_balance" }, "locked_balance": { "example": 0, "type": "number", "description": "The account's locked balance" }, "margin_model": { "type": "string", "example": "cross_pm", "description": "Name of user's currently enabled margin model" }, "portfolio_margining_enabled": { "type": "boolean", "example": true, "description": "`true` when portfolio margining is enabled for user" }, "cross_collateral_enabled": { "type": "boolean", "example": true, "description": "When `true` cross collateral is enabled for user" }, "total_equity_usd": { "example": 13075634611389.318, "type": "number", "description": "Optional (only for users using cross margin). The account's total equity in all cross collateral currencies, expressed in USD" }, "total_initial_margin_usd": { "example": 3139528603778.822, "type": "number", "description": "Optional (only for users using cross margin). The account's total initial margin in all cross collateral currencies, expressed in USD" }, "total_maintenance_margin_usd": { "example": 2511559381417.215, "type": "number", "description": "Optional (only for users using cross margin). The account's total maintenance margin in all cross collateral currencies, expressed in USD" }, "total_margin_balance_usd": { "example": 12798550648250.61, "type": "number", "description": "Optional (only for users using cross margin). The account's total margin balance in all cross collateral currencies, expressed in USD" }, "total_delta_total_usd": { "example": 6157454218.3753195, "type": "number", "description": "Optional (only for users using cross margin). The account's total delta total in all cross collateral currencies, expressed in USD" } }, "description": "Portfolio margin simulation result" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivatePmeSimulateResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "description": "Simulation details" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivatePmeParamsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "description": "PM open order restrictions" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PublicPlaceholderResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "description": "See example. (type: any)" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateChatSetNickResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "nick": { "type": "string", "example": "user12121212" }, "jid_node": { "type": "string", "example": "www.user12121" } }, "required": [ "nick", "jid_node" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateChatGetAccountSummaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "nick": { "type": "string", "example": "user12121212" }, "registered": { "type": "boolean" }, "email": { "type": "string", "example": "user12121@gmail.com" }, "system_name": { "type": "string", "example": "user1212121" } }, "required": [ "registered" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivatePutBalanceResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "balance": { "type": "number", "description": "Updated \"in custody\" balance of the user as seen by the exchange" } }, "required": [ "balance" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBalanceResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/get_custody_balance" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBalanceSnapshotResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "total_equity": { "type": "number", "description": "Equity of the main account + subaccounts. Takes into account external equity." }, "custody": { "type": "number", "description": "Custody balance" }, "pnl": { "type": "number", "description": "Profit net loss of the user (total_equity - custody)" }, "accounts": { "type": "object", "properties": { "available_withdrawal_funds": { "type": "number", "description": "The account's available to withdrawal funds" }, "available_funds": { "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "initial_margin": { "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "maintenance_margin": { "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "equity": { "type": "number", "description": "The account's current equity" }, "margin_balance": { "type": "number", "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "main": { "type": "boolean", "description": "Main account or subaccount" }, "balance": { "type": "number", "description": "Balance of the (sub)account" }, "user_id": { "type": "integer", "description": "Id of a (sub)account" }, "snapshot_timestamp": { "type": "integer", "description": "Timestamp of the snapshot" } }, "required": [ "available_withdrawal_funds", "available_funds", "initial_margin", "maintenance_margin", "equity", "margin_balance", "main", "balance", "user_id" ], "description": "Represents portfolio of main-account and sub-accounts" }, "signature": { "type": "string", "description": "The signature, encode as base64. Signature is generated using RSA SHA256 with 4096bit key. The signature can be verified using the signature_payload and Deribit's public key." }, "signature_payload": { "type": "string", "description": "Serialized JSON string of the result (without the `signature` and `signature_payload` fields). The JSON string is compressed using Gzip and encoded in Base64. To validate the process, the user should first decode the Base64-encoded `signature_payload` and then un-Gzip the decoded payload to retrieve the original JSON string. Next, the user should verify the `signature` by using the decoded JSON string along with the corresponding public key, ensuring that the signature was correctly generated." }, "signed_at": { "type": "integer", "description": "Timestamp of the signature" } }, "required": [ "currency", "accounts", "total_equity", "custody", "pnl" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetAllBalancesSnapshotResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "balances": { "type": "array", "properties": { "currency": { "$ref": "#/components/schemas/currency" }, "total_equity": { "type": "number", "description": "Equity of the main account + subaccounts. Takes into account external equity." }, "custody": { "type": "number", "description": "Custody balance" }, "pnl": { "type": "number", "description": "Profit net loss of the user (total_equity - custody)" }, "accounts": { "type": "object", "properties": { "available_withdrawal_funds": { "type": "number", "description": "The account's available to withdrawal funds" }, "available_funds": { "type": "number", "description": "The account's available funds. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "initial_margin": { "type": "number", "description": "The account's initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "maintenance_margin": { "type": "number", "description": "The maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "equity": { "type": "number", "description": "The account's current equity" }, "margin_balance": { "type": "number", "description": "The account's margin balance. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "main": { "type": "boolean", "description": "Main account or subaccount" }, "balance": { "type": "number", "description": "Balance of the (sub)account" }, "user_id": { "type": "integer", "description": "Id of a (sub)account" }, "snapshot_timestamp": { "type": "integer", "description": "Timestamp of the snapshot" } }, "required": [ "available_withdrawal_funds", "available_funds", "initial_margin", "maintenance_margin", "equity", "margin_balance", "main", "balance", "user_id" ], "description": "Represents portfolio of main-account and sub-accounts" } }, "description": "User balance in a given currency" }, "signature": { "type": "string", "description": "The signature, encode as base64. Signature is generated using RSA SHA256 with 4096bit key. The signature can be verified using the signature_payload and Deribit's public key." }, "signature_payload": { "type": "string", "description": "Serialized JSON string of the result (without the `signature` and `signature_payload` fields). The JSON string is compressed using Gzip and encoded in Base64. To validate the process, the user should first decode the Base64-encoded `signature_payload` and then un-Gzip the decoded payload to retrieve the original JSON string. Next, the user should verify the `signature` by using the decoded JSON string along with the corresponding public key, ensuring that the signature was correctly generated." }, "signed_at": { "type": "integer", "description": "Timestamp of the signature" } }, "required": [ "currency", "accounts", "total_equity", "custody", "pnl" ] } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateCustodySettlementResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/custody_settlement" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetJwtResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "string", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQyLCJndWlkIjo0MjQyLCJlbWFpbCI6InRyYWRlckBkZXJpYml0LmNvbSIsImRpc3BsYXlfbmFtZSI6IlRyYWRlciJ9.d-QIJqBr8E1wrG_XIQHD0VPPDP3RJqA0Va8rC2V4VCE" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "MulticastGetPacketResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "properties": { "packet": { "type": "string", "description": "The base64 encoded binary multicast packet" } }, "type": "object" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "MulticastGetPacketsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "properties": { "seq": { "type": "integer", "description": "The sequence number of the multicast packet" }, "packet": { "type": "string", "description": "The base64 encoded binary multicast packet" } }, "required": [ "seq", "packet" ], "type": "object" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "MulticastGetInstrumentDictionaryResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "additionalProperties": { "type": "integer" }, "description": "Dictionary that maps the names of active instruments into their corresponding integer id's" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "AddressOwnershipResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/address_ownership_item" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "VaspsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/vasp_item" } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetWithdrawalPolicyModeResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/withdrawal_policy_mode" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetWithdrawalPolicyLimitsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "$ref": "#/components/schemas/withdrawal_policy_limits" } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBrokerTradesResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "object", "properties": { "history": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the block trade history entry." }, "timestamp": { "type": "integer", "description": "Timestamp of the block trade history entry (milliseconds since the UNIX epoch)." }, "trades": { "type": "array", "items": { "$ref": "#/components/schemas/block_trade" } }, "maker": { "type": "object", "properties": { "user_id": { "type": "integer", "description": "Obscured user id of the maker." }, "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "client_name": { "type": "string", "description": "Name of the client; available to broker." }, "client_link_name": { "type": "string", "description": "Name of the linked user within the client; available to broker." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } } }, "taker": { "type": "object", "properties": { "user_id": { "type": "integer", "description": "Obscured user id of the taker." }, "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "client_name": { "type": "string", "description": "Name of the client; available to broker." }, "client_link_name": { "type": "string", "description": "Name of the linked user within the client; available to broker." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } } } } } }, "next_start_id": { "type": "integer", "description": "The next start ID for pagination." } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "PrivateGetBrokerTradeRequestsResponse": { "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "description": "The JSON-RPC version (2.0)" }, "id": { "type": "integer", "description": "The id that was sent in the request" }, "result": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "integer", "description": "Timestamp of the broker block trade request (milliseconds since the UNIX epoch)." }, "state": { "type": "string", "description": "State of the broker block trade request." }, "trades": { "type": "array", "items": { "type": "object", "properties": { "amount": { "type": "number", "description": "Trade amount." }, "direction": { "type": "string", "description": "Trade direction (buy or sell)." }, "price": { "type": "number", "description": "Trade price." }, "instrument_name": { "type": "string", "description": "Name of the traded instrument." } } } }, "maker": { "type": "object", "properties": { "state": { "type": "string", "description": "State of the request from the maker side: `initial`, `approved`, or `rejected`." }, "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "user_id": { "type": "string", "description": "Obscured user id of the maker." }, "client_name": { "type": "string", "description": "Name of the client; available to broker." }, "client_link_name": { "type": "string", "description": "Name of the linked user within the client; available to broker." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } } }, "taker": { "type": "object", "properties": { "state": { "type": "string", "description": "State of the request from the taker side: `initial`, `approved`, or `rejected`." }, "client_id": { "type": "integer", "description": "ID of a client; available to broker. Represents a group of users under a common name." }, "user_id": { "type": "string", "description": "Obscured user id of the taker." }, "client_name": { "type": "string", "description": "Name of the client; available to broker." }, "client_link_name": { "type": "string", "description": "Name of the linked user within the client; available to broker." }, "client_link_id": { "type": "integer", "description": "ID assigned to a single user in a client; available to broker." } } }, "nonce": { "type": "string", "description": "Nonce for approving or rejecting the broker block trade request." } } } } }, "required": [ "jsonrpc", "result" ], "type": "object" }, "TickerNotification": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "state": { "$ref": "#/components/schemas/book_state" }, "stats": { "$ref": "#/components/schemas/stats" }, "open_interest": { "$ref": "#/components/schemas/open_interest" }, "best_bid_price": { "$ref": "#/components/schemas/best_bid_price" }, "best_bid_amount": { "$ref": "#/components/schemas/best_bid_amount" }, "best_ask_price": { "$ref": "#/components/schemas/best_ask_price" }, "best_ask_amount": { "$ref": "#/components/schemas/best_ask_amount" }, "index_price": { "$ref": "#/components/schemas/index_price" }, "min_price": { "$ref": "#/components/schemas/min_price" }, "max_price": { "$ref": "#/components/schemas/max_price" }, "mark_price": { "$ref": "#/components/schemas/mark_price" }, "last_price": { "$ref": "#/components/schemas/last_price" }, "underlying_price": { "$ref": "#/components/schemas/underlying_price" }, "underlying_index": { "$ref": "#/components/schemas/underlying_index" }, "interest_rate": { "$ref": "#/components/schemas/interest_rate" }, "bid_iv": { "$ref": "#/components/schemas/bid_iv" }, "ask_iv": { "$ref": "#/components/schemas/ask_iv" }, "mark_iv": { "$ref": "#/components/schemas/mark_iv" }, "greeks": { "$ref": "#/components/schemas/greeks" }, "funding_8h": { "$ref": "#/components/schemas/funding_8h" }, "current_funding": { "$ref": "#/components/schemas/current_funding" }, "interest_value": { "$ref": "#/components/schemas/interest_value" }, "delivery_price": { "$ref": "#/components/schemas/delivery_price" }, "settlement_price": { "$ref": "#/components/schemas/settlement_price" }, "estimated_delivery_price": { "$ref": "#/components/schemas/estimated_delivery_price" } }, "required": [ "instrument_name", "timestamp", "state", "stats", "open_interest", "index_price", "best_bid_price", "best_bid_amount", "best_ask_price", "best_ask_amount", "min_price", "max_price", "mark_price", "last_price", "estimated_delivery_price" ], "type": "object" }, "TickerNotificationWithBidsAndAsks": { "properties": { "instrument_name": { "$ref": "#/components/schemas/instrument_name" }, "timestamp": { "$ref": "#/components/schemas/timestamp" }, "state": { "$ref": "#/components/schemas/book_state" }, "stats": { "$ref": "#/components/schemas/stats" }, "open_interest": { "$ref": "#/components/schemas/open_interest" }, "best_bid_price": { "$ref": "#/components/schemas/best_bid_price" }, "best_bid_amount": { "$ref": "#/components/schemas/best_bid_amount" }, "best_ask_price": { "$ref": "#/components/schemas/best_ask_price" }, "best_ask_amount": { "$ref": "#/components/schemas/best_ask_amount" }, "index_price": { "$ref": "#/components/schemas/index_price" }, "min_price": { "$ref": "#/components/schemas/min_price" }, "max_price": { "$ref": "#/components/schemas/max_price" }, "mark_price": { "$ref": "#/components/schemas/mark_price" }, "last_price": { "$ref": "#/components/schemas/last_price" }, "underlying_price": { "$ref": "#/components/schemas/underlying_price" }, "underlying_index": { "$ref": "#/components/schemas/underlying_index" }, "interest_rate": { "$ref": "#/components/schemas/interest_rate" }, "bid_iv": { "$ref": "#/components/schemas/bid_iv" }, "ask_iv": { "$ref": "#/components/schemas/ask_iv" }, "mark_iv": { "$ref": "#/components/schemas/mark_iv" }, "greeks": { "$ref": "#/components/schemas/greeks" }, "funding_8h": { "$ref": "#/components/schemas/funding_8h" }, "current_funding": { "$ref": "#/components/schemas/current_funding" }, "delivery_price": { "$ref": "#/components/schemas/delivery_price" }, "settlement_price": { "$ref": "#/components/schemas/settlement_price" }, "bids": { "$ref": "#/components/schemas/bids" }, "asks": { "$ref": "#/components/schemas/asks" } }, "required": [ "instrument_name", "timestamp", "state", "stats", "open_interest", "index_price", "best_bid_price", "best_bid_amount", "best_ask_price", "best_ask_amount", "min_price", "max_price", "mark_price", "last_price", "bids", "asks" ], "type": "object" }, "id": { "example": 5967413, "type": "integer", "description": "Unique identifier" }, "book_state": { "enum": [ "open", "settlement", "delivered", "inactive", "locked", "halted", "archivized" ], "type": "string", "description": "The state of the order book. Represents the current lifecycle stage of the instrument.\n\n**State Lifecycle and Meanings:**\n\n- `open`: Default state for running books. In this state book is accepting new orders, edits, cancels; prices should be updated, trading is live.\n- `settlement`: Books enters to this state during settlement/delivery. New orders, edits, cancels are not accepted. After this state normally next state should be `open` if it was settlement, or `delivered` if it was delivery. On enter to this state good till day orders in book are canceled.\n- `delivered`: Final state of book that has been delivered. New orders, edits, cancels are not accepted. After some time book process will be terminated and, instrument moved to `expired_instruments` and its `instrument_state` will become archivized. On enter to this all open orders in book are canceled.\n- `inactive`: After a book is deactivated, this state is set on book. New orders, edits, cancels are not accepted. On enter to this all open orders in book are canceled. Book in this state is not considered as open. This can be also final state for book.\n- `locked`: New orders, edits, are not accepted, only cancels ARE accepted. In some cases when configured books can start as locked or it may become locked on admin request. Settlement is possible on locked books.\n- `halted`: The state that books enter as a result of an error. Settlement is not possible when there is at least one book in this state.\n- `archivized`: Set when instrument is moved to `expired_instruments` table, final state.\n" }, "greeks": { "properties": { "delta": { "type": "number", "description": "(Only for option) The delta value for the option. This is the **Black Scholes Delta** for individual option expiries. \n\nNote that DeltaTotal in account summary uses Net Transaction Delta instead. See the greeks object description for more details.\n" }, "gamma": { "type": "number", "description": "(Only for option) The gamma value for the option. Calculated using standard Black Scholes without adjustments.\n\nGamma measures the rate of change of delta with respect to changes in the underlying asset price.\n" }, "rho": { "type": "number", "description": "(Only for option) The rho value for the option. Calculated using standard Black Scholes without adjustments.\n\nRho measures the sensitivity of the option price to changes in the risk-free interest rate.\n" }, "theta": { "type": "number", "description": "(Only for option) The theta value for the option. Deribit uses the **minimum of (1 day Theta, lifetime theta of the option)**.\n\nSo if you take an option with 1 hour to expire for example, generally Black Scholes Theta will give you the equivalent 1 day Theta. Whereas we show the 1 hour Theta, so our Theta would differ from Black Scholes Theta when time to expiry is less than 1 day.\n\nTheta measures the rate of change of the option price with respect to time decay.\n" }, "vega": { "type": "number", "description": "(Only for option) The vega value for the option. Calculated using standard Black Scholes without adjustments.\n\nVega (not actually a Greek symbol) measures the sensitivity of the option price to changes in implied volatility.\n" } }, "required": [ "delta", "gamma", "rho", "theta", "vega" ], "type": "object", "description": "Only for options. Greeks are risk measures that describe how the option's price changes with respect to various factors.\n\n**Delta (Δ)**\n\nDeribit uses two different Deltas:\n- **DeltaTotal** in the account summary uses the **Net Transaction Delta (NTD)**\n- **Delta** for individual option expiries is the **Black Scholes Delta**\n\nIn the settings section you can toggle Net Transaction Delta instead.\n\n**What is DeltaTotal in the account summary?**\n`DeltaTotal = Net Transaction Delta of options + BTC Position of Futures`\n\n**What is Net Transaction Delta?**\n`Net Transaction Delta = Black Scholes Delta - Mark Price of Options`\n\n**Why do we use a Net Transaction Delta?**\nThe Delta Total uses the Net Transaction Delta (or price adjusted Delta) of the options. This is because, from a risk perspective, we are interested in the change in Bitcoin price as the underlying changes.\n\nYou should actually treat your delta as **Equity + Delta Total** if you want to have less risk for your USD PnL.\n\n**Example:** Consider a call option with strike 0, which has a Black Scholes Delta of 1 and Net Transaction Delta = 0.\n\nImagine you have 2 BTC equity and no positions and BTC price is at USD 60k. In that case you would short 2 Futures contracts to hedge your USD exposure to BTC.\n\nNow let's say you buy one call with strike 0. The question is if you should sell another future?\n\nThe call will always have a price of 1 BTC. So you buy it at 1 BTC which equates to USD 60k. Let's say the price increases to USD 70k. The value of the call is still 1 BTC. At settlement you receive 1 BTC for the call. So you paid 1 BTC and then receive 1 BTC which means your USD PnL on buying the call is 0. If you sold a future on it, then you would actually lose on the future.\n\n⚠️ **During the 30 minute settlement period we decay your Delta.** See [Delta decay during settlement](https://support.deribit.com/hc/en-us/articles/25944751433757-Delta-decay-during-settlement) for more details.\n\n**Theta (Θ)**\n\nThe Theta that Deribit uses is the **minimum of (1 day Theta, lifetime theta of the option)**. So if you take an option with 1 hour to expire for example, generally Black Scholes Theta will give you the equivalent 1 day Theta. Whereas we show the 1 hour Theta, so our Theta would differ from Black Scholes Theta when time to expiry is less than 1 day.\n\n**Vega, Gamma, and Rho**\n\nVega (not actually a Greek symbol), Gamma, Theta and Rho values shown on Deribit are calculated using **standard Black Scholes without adjustments**.\n" }, "bids": { "items": { "items": { "type": "number" }, "minItems": 2, "maxItems": 2, "type": "array", "description": "List of bids (price-amount pairs)" }, "type": "array" }, "asks": { "items": { "items": { "type": "number" }, "minItems": 2, "maxItems": 2, "type": "array", "description": "List of asks (price-amount pairs)" }, "type": "array" }, "tick_size_step": { "properties": { "above_price": { "type": "number", "description": "The price from which the increased tick size applies" }, "tick_size": { "type": "number", "description": "Tick size to be used above the price. It must be multiple of the minimum tick size." } }, "type": "object" }, "stats": { "properties": { "volume": { "type": "number", "description": "Volume during last 24h in base currency" }, "low": { "type": "number", "description": "Lowest price during 24h" }, "high": { "type": "number", "description": "Highest price during 24h" }, "price_change": { "example": 10.23, "type": "number", "description": "24-hour price change expressed as a percentage, `null` if there weren't any trades" }, "volume_usd": { "$ref": "#/components/schemas/volume_usd" } }, "required": [ "volume", "high", "low" ], "type": "object" }, "continuation": { "example": "xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT", "type": "string", "description": "Continuation token for pagination." }, "continuation_with_null": { "example": 429946, "type": "integer", "description": "Continuation token for pagination. `NULL` when no continuation." }, "block_rfq_trade_tape_continuation": { "example": "1738050297271:103", "type": "string", "description": "Continuation token for pagination. `NULL` when no continuation. Consists of `timestamp` and `block_rfq_id`." }, "kind": { "enum": [ "future", "option", "spot", "future_combo", "option_combo" ], "type": "string", "description": "Instrument kind: `\"future\"`, `\"option\"`, `\"spot\"`, `\"future_combo\"`, `\"option_combo\"`" }, "kind_with_any": { "enum": [ "future", "option", "spot", "future_combo", "option_combo", "any" ], "type": "string", "description": "Instrument kind: `\"future\"`, `\"option\"`, `\"spot\"`, `\"future_combo\"`, `\"option_combo\"` or `\"any\"` for all" }, "kind_without_spot": { "enum": [ "future", "option", "future_combo", "option_combo" ], "type": "string", "description": "Instrument kind: `\"future\"`, `\"option\"`, `\"future_combo\"`, `\"option_combo\"` (spot is excluded as spot trades are settled immediately and have no open positions)" }, "kind_future_or_option_with_any": { "enum": [ "future", "option", "any" ], "type": "string", "description": "Instrument kind: `\"future\"`, `\"option\"` or `\"any\"` for all" }, "kind_with_combo_all": { "enum": [ "future", "option", "spot", "future_combo", "option_combo", "combo", "any" ], "type": "string", "description": "Instrument kind: `\"future\"`, `\"option\"`, `\"spot\"`, `\"future_combo\"`, `\"option_combo\"`, `\"combo\"` for any combo or `\"any\"` for all" }, "only_combo_kind": { "enum": [ "future_combo", "option_combo", "combo" ], "type": "string", "description": "Instrument kind: `\"future_combo\"`, `\"option_combo\"` or `\"combo\"` for any combo" }, "block_rfq_currency": { "enum": [ "BTC", "ETH", "USDC", "USDT", "any" ], "type": "string", "description": "Currency, i.e `\"BTC\"`, `\"ETH\"`, `\"USDC\"`" }, "wallet_currency": { "enum": [ "BTC", "ETH", "STETH", "ETHW", "USDC", "USDT", "EURR", "SOL", "XRP", "USYC", "PAXG", "BNB", "USDE" ], "type": "string", "description": "Currency, i.e `\"BTC\"`, `\"ETH\"`, `\"USDC\"`" }, "pme_currency": { "enum": [ "BTC", "ETH", "USDC", "USDT", "CROSS" ], "type": "string", "description": "The currency for which the Extended Risk Matrix will be calculated. Use `CROSS` for Cross Collateral simulation." }, "currency_with_any": { "enum": [ "BTC", "ETH", "USDC", "USDT", "EURR", "any" ], "type": "string", "description": "Currency name or `\"any\"` if don't care" }, "currency_with_any_and_list": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "description": "The currency symbol, list of currency symbols or `\"any\"` for all" }, "currency_with_any_and_grouped": { "enum": [ "BTC", "ETH", "USDC", "SOL", "USDT", "EURR", "XRP", "STETH", "USYC", "PAXG", "BNB", "USDE", "any", "grouped" ], "type": "string", "description": "Currency name or `\"any\"` if don't care or `\"grouped\"` if grouped by currencies" }, "settlement_currency_with_any_and_grouped": { "enum": [ "BTC", "ETH", "USDC", "USDT", "any", "grouped" ], "type": "string", "description": "Currency name or `\"any\"` if don't care or `\"grouped\"` if grouped by currencies" }, "currency_pair": { "enum": [ "btc_usd", "eth_usd" ], "type": "string", "description": "Currency pair: `\"btc_usd\"` or `\"eth_usd\"`" }, "instrument_name": { "example": "BTC-PERPETUAL", "type": "string", "description": "Unique instrument identifier" }, "instrument_id": { "type": "integer", "description": "Instrument ID" }, "combo_id": { "example": "BTC-FS-31DEC21-PERP", "type": "string", "description": "Unique combo identifier" }, "combo_state": { "enum": [ "active", "inactive" ], "type": "string", "description": "Combo state: `\"active\"`, \"`inactive`\"" }, "combo_leg_amount": { "example": -1, "type": "integer", "description": "Size multiplier of a leg. A negative value indicates that the trades on given leg are in opposite direction to the combo trades they originate from" }, "trade_timestamp": { "example": 1517329113791, "type": "integer", "description": "The timestamp of the trade (milliseconds since the UNIX epoch)" }, "order_id": { "example": "ETH-100234", "type": "string", "description": "Unique order identifier" }, "block_trade_id": { "example": "154", "type": "string", "description": "Block trade id" }, "block_trade_id_in_result": { "example": "154", "type": "string", "description": "Block trade id - when trade was part of a block trade" }, "block_trade_leg_count": { "example": 3, "type": "integer", "description": "Block trade leg count - when trade was part of a block trade" }, "block_trade_order": { "example": true, "type": "boolean", "description": "`true` if order made from block_trade trade, added only in that case." }, "block_trade_signature": { "example": "1565173369982.1M9tO0Q-.z9n9WyZUU5op9pEz6Jtd2CI71QxQMMsCZAexnIfK9HQRT1pKH3clxeIbY7Bqm-yMcWIoE3IfCDPW5VEdiN-6oS0YkKUyXPD500MUf3ULKhfkmH81EZs", "type": "string", "description": "Signature of block trade
It is valid only for 5 minutes around given timestamp" }, "settlement_type": { "enum": [ "settlement", "delivery", "bankruptcy" ], "type": "string", "description": "The type of settlement. `settlement`, `delivery` or `bankruptcy`." }, "trade_id": { "type": "string", "description": "Unique (per currency) trade identifier" }, "date": { "example": "2019-11-24", "type": "string", "description": "The event date with year, month and day" }, "timestamp": { "example": 1536569522277, "type": "integer", "description": "The timestamp (milliseconds since the Unix epoch)" }, "timestamp_for_book_notifications": { "example": 1536569522277, "type": "integer", "description": "The timestamp of last change (milliseconds since the Unix epoch)" }, "last_rfq_timestamp": { "example": 1536569522277, "type": "integer", "description": "The timestamp of last RFQ (milliseconds since the Unix epoch)" }, "direction": { "enum": [ "buy", "sell" ], "type": "string", "description": "Direction: `buy`, or `sell`" }, "quote_direction": { "enum": [ "buy", "sell" ], "type": "string", "description": "Direction of trade from the maker perspective" }, "position_direction": { "enum": [ "buy", "sell", "zero" ], "type": "string", "description": "Direction: `buy`, `sell` or `zero`" }, "tick_direction": { "enum": [ 0, 1, 2, 3 ], "type": "integer", "description": "Direction of the \"tick\" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick)." }, "order_type": { "enum": [ "market", "limit", "stop_market", "stop_limit", "take_market", "take_limit", "trailing_stop" ], "type": "string", "description": "Order type: `\"limit\"`, `\"market\"`, `\"stop_limit\"`, `\"stop_market\"`, `\"take_limit\"`, `\"take_market\"`, `\"trailing_stop\"`" }, "original_order_type": { "enum": [ "market", "market_limit" ], "type": "string", "description": "Original order type. Optional field" }, "order_type2": { "enum": [ "all", "limit", "trigger_all", "stop_all", "stop_limit", "stop_market", "take_all", "take_limit", "take_market", "trailing_all", "trailing_stop" ], "type": "string", "description": "Order type: `\"all\"`, `\"limit\"`, `\"trigger_all\"`, `\"stop_all\"`, `\"stop_limit\"`, `\"stop_market\"`, `\"take_all\"`, `\"take_limit\"`, `\"take_market\"`, `\"trailing_all\"`, `\"trailing_stop\"`" }, "simple_order_type": { "enum": [ "all", "limit", "trigger_all", "stop", "take", "trailing_stop" ], "type": "string", "description": "Order type: `\"all\"`, `\"limit\"`, `\"stop\"`, `\"take\"`, `\"trailing_stop\"`, `\"trailing_take\"`" }, "order_state_in_user_trade": { "enum": [ "open", "filled", "rejected", "cancelled", "untriggered", "archive" ], "type": "string", "description": "Order state: `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"` or `\"archive\"` (if order was archived)" }, "order_state": { "enum": [ "open", "filled", "rejected", "cancelled", "untriggered", "triggered" ], "type": "string", "description": "Order state: `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"`" }, "cancel_reason": { "enum": [ "user_request", "autoliquidation", "cancel_on_disconnect", "risk_mitigation", "pme_risk_reduction", "pme_account_locked", "position_locked", "mmp_trigger", "mmp_config_curtailment", "edit_post_only_reject", "oco_other_closed", "oto_primary_closed", "settlement" ], "type": "string", "description": "Enumerated reason behind cancel `\"user_request\"`, `\"autoliquidation\"`, `\"cancel_on_disconnect\"`, `\"risk_mitigation\"`, `\"pme_risk_reduction\"` (portfolio margining risk reduction), `\"pme_account_locked\"` (portfolio margining account locked per currency), `\"position_locked\"`, `\"mmp_trigger\"` (market maker protection), `\"mmp_config_curtailment\"` (market maker configured quantity decreased), `\"edit_post_only_reject\"` (cancelled on edit because of `reject_post_only` setting), `\"oco_other_closed\"` (the oco order linked to this order was closed), `\"oto_primary_closed\"` (the oto primary order that was going to trigger this order was cancelled), `\"settlement\"` (closed because of a settlement)" }, "order_state_stop": { "type": "string", "description": "Order state: `\"triggered\"`, `\"cancelled\"`, or `\"rejected\"` with rejection reason (e.g. `\"rejected:reduce_direction\"`)." }, "time_in_force": { "enum": [ "good_til_cancelled", "good_til_day", "fill_or_kill", "immediate_or_cancel" ], "type": "string", "description": "Order time in force: `\"good_til_cancelled\"`, `\"good_til_day\"`, `\"fill_or_kill\"` or `\"immediate_or_cancel\"`" }, "block_rfq_time_in_force": { "enum": [ "fill_or_kill", "good_til_cancelled" ], "type": "string", "description": "Block RFQ time in force: `\"fill_or_kill\"` or `\"good_til_cancelled\"`" }, "trade_trigger_state": { "enum": [ "triggered", "untriggered", "cancelled" ], "type": "string", "description": "Trade trigger state: `\"untriggered\"` or `\"cancelled\"`" }, "trade_trigger": { "properties": { "state": { "$ref": "#/components/schemas/trade_trigger_state" }, "price": { "type": "number", "description": "Price of the trade trigger" }, "direction": { "type": "string", "enum": [ "buy", "sell" ], "description": "Direction of the trade trigger" }, "cancel_reason": { "type": "string", "description": "Reason for cancellation, present only when state is cancelled" } }, "required": [ "state", "price", "direction" ], "type": "object", "description": "Contains information about the trade trigger state" }, "price": { "type": "number", "description": "Price in base currency" }, "open_order_price": { "oneOf": [ { "type": "number" }, { "enum": [ "market_price" ], "type": "string" } ], "description": "Price in base currency or \"market_price\" in case of open trigger market orders" }, "quote_price": { "type": "number", "description": "Price in quote currency" }, "label": { "type": "string", "description": "User defined label (up to 64 characters)" }, "label_presentation": { "type": "string", "description": "User defined label (presented only when previously set for order by user)" }, "post_only": { "type": "boolean", "description": "`true` for post-only orders only" }, "reject_post_only": { "type": "boolean", "description": "`true` if order has `reject_post_only` flag (field is present only when `post_only` is `true`)" }, "reduce_only": { "type": "boolean", "description": "Optional (not added for spot). '`true` for reduce-only orders only'" }, "api": { "type": "boolean", "description": "`true` if created with API" }, "mobile": { "type": "boolean", "description": "Optional field with value `true` added only when created with Mobile Application" }, "web": { "type": "boolean", "description": "`true` if created via Deribit frontend (optional)" }, "max_show": { "type": "number", "description": "Deprecated. Maximum amount within an order to be shown to other traders, 0 for invisible order." }, "display_amount": { "type": "number", "description": "The actual display amount of iceberg order. Absent for other types of orders." }, "refresh_amount": { "type": "number", "description": "The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders" }, "amount": { "type": "number", "description": "It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "contracts": { "type": "number", "description": "It represents the order size in contract units. (Optional, may be absent in historical data)." }, "log_amount": { "type": "number", "description": "For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "currency_amount": { "example": 1, "type": "number", "description": "Amount of funds in given currency" }, "filled_amount": { "type": "number", "description": "Filled amount of the order. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH." }, "filled_amount_quote": { "type": "number", "description": "Filled amount of the quote. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH." }, "profit_loss": { "type": "number", "description": "Profit and loss in base currency." }, "quantity": { "type": "number", "description": "The number of contracts to be traded." }, "average_price": { "type": "number", "description": "Average fill price of the order" }, "commission": { "type": "number", "description": "Commission paid so far (in base currency)" }, "advanced": { "enum": [ "usd", "implv" ], "type": "string", "description": "advanced type: `\"usd\"` or `\"implv\"` (Only for options; field is omitted if not applicable).\n" }, "implv": { "type": "number", "description": "Implied volatility in percent. (Only if `advanced=\"implv\"`)" }, "usd": { "type": "number", "description": "Option price in USD (Only if `advanced=\"usd\"`)" }, "triggered": { "type": "boolean", "description": "Whether the trigger order has been triggered" }, "trigger": { "enum": [ "index_price", "mark_price", "last_price" ], "type": "string", "description": "Trigger type (only for trigger orders). Allowed values: `\"index_price\"`, `\"mark_price\"`, `\"last_price\"`." }, "trigger_price": { "type": "number", "description": "Trigger price (Only for future trigger orders)" }, "trigger_offset": { "type": "number", "description": "The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)" }, "trigger_reference_price": { "type": "number", "description": "The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)" }, "sorting": { "enum": [ "asc", "desc", "default" ], "type": "string" }, "contract_size": { "example": 10, "type": "integer", "description": "Contract size, for futures in USD, for options in base currency of the instrument (BTC, ETH, ...)" }, "currency_address": { "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "type": "string", "description": "Address in proper format for currency" }, "currency_address_type": { "enum": [ "HOSTED", "UNHOSTED", "UNKNOWN" ], "example": "HOSTED", "type": "string", "description": "Address type acording to Notabene" }, "address_book_type": { "enum": [ "transfer", "withdrawal", "deposit_source" ], "type": "string", "description": "Address book type" }, "address_book_type_without_deposit_source": { "enum": [ "transfer", "withdrawal" ], "type": "string", "description": "Address book type" }, "address_label": { "example": "Main address", "type": "string", "description": "Label of the address book entry" }, "beneficiary_vasp_name": { "example": "Money's Gone", "type": "string", "description": "Name of beneficiary VASP" }, "beneficiary_vasp_did": { "example": "did:example:123456789abcdefghi", "type": "string", "description": "DID of beneficiary VASP" }, "beneficiary_first_name": { "example": "John", "type": "string", "description": "First name of the beneficiary (if beneficiary is a person)" }, "beneficiary_last_name": { "example": "Doe", "type": "string", "description": "Last name of the beneficiary (if beneficiary is a person)" }, "beneficiary_company_name": { "example": "Company Name", "type": "string", "description": "Company name of the beneficiary (if beneficiary is a company)" }, "beneficiary_address": { "example": "NL, Amsterdam, Street, 1", "type": "string", "description": "Geographical address of the beneficiary" }, "beneficiary_vasp_website": { "type": "string", "description": "Website of the beneficiary VASP" }, "agree_to_share_with_3rd_party": { "example": true, "type": "boolean", "description": "Indicates that the user agreed to shared provided information with 3rd parties" }, "personal_wallet": { "example": true, "type": "boolean", "description": "The user confirms that he provided address belongs to him and he has access to it via an un-hosted wallet software" }, "extra_currencies": { "items": { "type": "string", "description": "Name of the currency" }, "example": [ "USDC" ], "type": "array", "description": "The user can pass a list of currencies to add the address for. It is currently available ONLY for ERC20 currencies. Without passing this paramater for an ERC20 currency, the address will be added to ALL of the ERC20 currencies." }, "address_info_required": { "example": true, "type": "boolean", "description": "Signalises that addition information regarding the beneficiary of the address is required" }, "status": { "enum": [ "admin_locked", "waiting", "confirmed", "ready" ], "type": "string", "description": "Wallet address status, values: [`admin_locked`, `waiting`, `confirmed`, `ready`]" }, "waiting_timestamp": { "example": true, "type": "boolean", "description": "Timestamp when the address will be ready" }, "requires_confirmation": { "example": true, "type": "boolean", "description": "If address requires email confirmation for withdrawals" }, "requires_confirmation_change": { "example": true, "type": "boolean", "description": "If email confirmation change is in progress" }, "deposit_state": { "enum": [ "pending", "completed", "rejected", "replaced" ], "type": "string", "description": "Deposit state. Allowed values:
  • pending: deposit detected on blockchain/system, compliance not yet finished
  • completed: compliance check finished successfully
  • rejected: deposit failed compliance and must be handled manually
  • replaced: deposit transaction was replaced on the blockchain and should have a new transaction hash
  • " }, "withdrawal_state": { "enum": [ "unconfirmed", "confirmed", "cancelled", "completed", "interrupted", "rejected" ], "type": "string", "description": "Withdrawal state, allowed values : `unconfirmed`, `confirmed`, `cancelled`, `completed`, `interrupted`, `rejected`" }, "clearance_state": { "enum": [ "in_progress", "pending_admin_decision", "pending_user_input", "success", "failed", "cancelled", "refund_initiated", "refunded" ], "type": "string", "description": "Clearance state indicating the current status of the transaction clearance process. Allowed values:
  • in_progress: clearance process is in progress
  • pending_admin_decision: transaction is under manual review by Deribit admin
  • pending_user_input: user should provide additional information regarding the transaction
  • success: clearance process completed successfully
  • failed: clearance process failed, transaction is rejected
  • cancelled: transaction is cancelled (currently used only for withdrawals, meaning the withdrawal is cancelled)
  • refund_initiated: clearance process failed, transaction refund is initiated, funds are removed from Deribit balance (valid for deposits only)
  • refunded: clearance process failed, deposit amount is refunded back to the client (valid for deposits only)
  • " }, "fee": { "example": 0.000023, "type": "number", "description": "Fee in currency" }, "currency_transaction_id": { "nullable": true, "example": "1b1fb5568515e2b79503501e3d3680b2d0838d5dfc2d15a04eb8cd9fbbe0b572", "type": "string", "description": "Transaction id in proper format for currency, `null` if id is not available" }, "result_count": { "example": 101, "type": "integer", "description": "Total number of results available" }, "transfer_id": { "example": 12, "type": "integer", "description": "Id of transfer" }, "transfer_type": { "enum": [ "user", "subaccount" ], "type": "string", "description": "Type of transfer: `user` - sent to user, `subaccount` - sent to subaccount" }, "transfer_direction": { "enum": [ "payment", "income" ], "type": "string", "description": "Transfer direction" }, "transfer_state": { "type": "string", "description": "Transfer state, allowed values : `prepared`, `confirmed`, `cancelled`, `waiting_for_admin`, `insufficient_funds`, `withdrawal_limit` otherwise rejection reason" }, "transfer_other_side": { "example": "Smith", "type": "string", "description": "For transfer from/to subaccount returns this subaccount name, for transfer to other account returns address, for transfer from other account returns that accounts username." }, "trade_seq": { "type": "integer", "description": "The sequence number of the trade within instrument" }, "wallet_address_type": { "type": "string", "description": "Address type/purpose, allowed values : `deposit`" }, "best_bid_price": { "nullable": true, "type": "number", "description": "The current best bid price, `null` if there aren't any bids" }, "best_bid_amount": { "nullable": true, "type": "number", "description": "It represents the requested order size of all best bids" }, "best_ask_price": { "nullable": true, "type": "number", "description": "The current best ask price, `null` if there aren't any asks" }, "best_ask_amount": { "nullable": true, "type": "number", "description": "It represents the requested order size of all best asks" }, "min_price": { "type": "number", "description": "The minimum price for the future. Any sell orders you submit lower than this price will be clamped to this minimum." }, "max_price": { "type": "number", "description": "The maximum price for the future. Any buy orders you submit higher than this price, will be clamped to this maximum." }, "mark_price": { "type": "number", "description": "The mark price for the instrument" }, "last_price": { "nullable": true, "type": "number", "description": "The price for the last trade" }, "underlying_price": { "type": "number", "description": "Underlying price for implied volatility calculations (options only)" }, "underlying_index": { "type": "number", "description": "Name of the underlying future, or `index_price` (options only)" }, "interest_rate": { "type": "number", "description": "Interest rate used in implied volatility calculations (options only)" }, "bid_iv": { "type": "number", "description": "(Only for option) implied volatility for best bid" }, "ask_iv": { "type": "number", "description": "(Only for option) implied volatility for best ask" }, "mark_iv": { "type": "number", "description": "(Only for option) implied volatility for mark price" }, "funding_8h": { "type": "number", "description": "Funding 8h (perpetual only)" }, "interest_value": { "type": "number", "description": "Value used to calculate `realized_funding` in positions (perpetual only)" }, "current_funding": { "type": "number", "description": "Current funding (perpetual only)" }, "delivery_price": { "type": "number", "description": "The settlement price for the instrument. Only when `state = closed`" }, "settlement_price": { "type": "number", "description": "Optional (not added for spot). The settlement price for the instrument. Only when `state = open`" }, "volume_usd": { "type": "number", "description": "Volume in usd (futures only)" }, "estimated_delivery_price": { "example": 11628.81, "type": "number", "description": "Estimated delivery price for the market. For more details, see Contract Specification > General Documentation > Expiration Price" }, "open_interest": { "type": "number", "description": "The total amount of outstanding contracts in the corresponding amount units. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "index_price": { "example": 8247.27, "type": "number", "description": "Current index price" }, "index_name": { "enum": [ "btc_usd", "eth_usd", "ada_usdc", "algo_usdc", "avax_usdc", "bch_usdc", "bnb_usdc", "btc_usdc", "btcdvol_usdc", "buidl_usdc", "doge_usdc", "dot_usdc", "eurr_usdc", "eth_usdc", "ethdvol_usdc", "link_usdc", "ltc_usdc", "near_usdc", "paxg_usdc", "shib_usdc", "sol_usdc", "steth_usdc", "ton_usdc", "trump_usdc", "trx_usdc", "uni_usdc", "usde_usdc", "usyc_usdc", "xrp_usdc", "btc_usdt", "eth_usdt", "eurr_usdt", "sol_usdt", "steth_usdt", "usdc_usdt", "usde_usdt", "btc_eurr", "btc_usde", "btc_usyc", "eth_btc", "eth_eurr", "eth_usde", "eth_usyc", "steth_eth", "paxg_btc", "drbfix-btc_usdc", "drbfix-eth_usdc" ], "type": "string", "description": "Index identifier, matches (base) cryptocurrency with quote currency" }, "index_name_for_dvol": { "enum": [ "btc_usd", "eth_usd" ], "type": "string", "description": "Index identifier supported for DVOL" }, "index_name_derivative": { "enum": [ "btc_usd", "eth_usd", "btc_usdc", "eth_usdc", "ada_usdc", "algo_usdc", "avax_usdc", "bch_usdc", "bnb_usdc", "doge_usdc", "dot_usdc", "link_usdc", "ltc_usdc", "near_usdc", "paxg_usdc", "shib_usdc", "sol_usdc", "ton_usdc", "trx_usdc", "trump_usdc", "uni_usdc", "xrp_usdc", "usde_usdc", "buidl_usdc", "btcdvol_usdc", "ethdvol_usdc", "btc_usdt", "eth_usdt", "all" ], "type": "string", "description": "Index identifier of derivative instrument on the platform" }, "volatility": { "type": "number", "description": "Value of the corresponding volatility" }, "implied_volatility": { "type": "number", "description": "Value of the volatility of the underlying instrument" }, "chart_volume": { "type": "number", "description": "// todo" }, "key_id": { "example": 1, "type": "integer", "description": "Key identifier" }, "security_key_id": { "example": 12, "type": "integer", "description": "Security Key Identifier" }, "security_key_name": { "type": "string", "description": "Security Key name" }, "security_key_type": { "enum": [ "tfa", "u2f" ], "type": "string", "description": "Security Key type" }, "security_key_assignments": { "items": { "properties": { "assignment": { "type": "string", "enum": [ "login", "wallet", "admin", "account" ], "description": "Assignment name" }, "timestamp": { "type": "integer", "description": "Timestamp when assignment was created (milliseconds since the UNIX epoch)" } }, "required": [ "type", "assignment", "timestamp" ], "type": "object" }, "type": "array" }, "security_key_timestamp": { "type": "integer", "description": "Timestamp when Security Key was created (milliseconds since the UNIX epoch)" }, "security_key_last_used": { "type": "integer", "description": "Timestamp when Security Key was last used (milliseconds since the UNIX epoch)" }, "client_id": { "example": "IY2D68DS", "type": "string", "description": "Client identifier used for authentication" }, "public_key": { "example": "-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEApajFN0CSwIaaiIRPiFbiYYvpsLQLSccSLLsKPe984sc= -----END PUBLIC KEY-----", "type": "string", "description": "PEM encoded public key (Ed25519/RSA) used for asymmetric signatures (optional)" }, "client_secret": { "example": "P9Z_c73KaBPwpoTVfsXzehAhjhdJn5kM7Zlz_hhDhE8", "type": "string", "description": "Client secret or MD5 fingerprint of public key used for authentication" }, "api_key_default": { "example": false, "type": "boolean", "description": "Informs whether this api key is default (field is deprecated and will be removed in the future)" }, "api_key_name": { "example": "TestName", "type": "string", "description": "Api key name that can be displayed in transaction log" }, "api_key_features": { "items": { "type": "string" }, "type": "array", "description": "List of enabled advanced on-key features.

    Available options:
    - restricted_block_trades: Limit the block_trade read the scope of the API key to block trades that have been made using this specific API key
    - block_trade_approval: Block trades created using this API key require additional user approval. Methods that use block_rfq scope are not affected by Block Trade approval feature" }, "max_scope": { "items": { "type": "string" }, "example": [ "account:read", "trade:read", "block_trade:read_write", "wallet:none" ], "type": "array", "description": "Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.\n\n**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)\n" }, "api_key_enabled": { "example": true, "type": "boolean", "description": "Informs whether api key is enabled and can be used for authentication" }, "enabled_field": { "example": true, "type": "boolean", "description": "Current configuration status" }, "cod_scope": { "enum": [ "connection", "account" ], "type": "string", "description": "Informs if Cancel on Disconnect was checked for the current connection or the account" }, "nonce": { "example": "bF1_gfgcsd", "type": "string", "description": "Nonce" }, "role": { "enum": [ "maker", "taker" ], "type": "string", "description": "Trade role of the user: `maker` or `taker`" }, "fee_role": { "enum": [ "maker", "taker" ], "type": "string", "description": "Fee role of the user: `maker` or `taker`. Can be different from trade role of the user when iceberg order was involved in matching." }, "user_id": { "example": 57874, "type": "integer", "description": "Unique user identifier" }, "username": { "example": "MrTrader", "type": "string", "description": "System name or user defined subaccount alias" }, "custody_name": { "enum": [ "copper", "cobo" ], "type": "string", "description": "Custody name" }, "delta_total": { "example": 0.1334, "type": "number", "description": "The sum of position deltas. \n\n**DeltaTotal = Net Transaction Delta of options + BTC Position of Futures**\n\nThe DeltaTotal uses the Net Transaction Delta (or price adjusted Delta) of the options, where Net Transaction Delta = Black Scholes Delta - Mark Price of Options.\n\nThis is because, from a risk perspective, we are interested in the change in Bitcoin price as the underlying changes.\n\nYou should actually treat your delta as **Equity + Delta Total** if you want to have less risk for your USD PnL.\n\n⚠️ **During the 30 minute settlement period we decay your Delta.** See [Delta decay during settlement](https://support.deribit.com/hc/en-us/articles/25944751433757-Delta-decay-during-settlement) for more details.\n" }, "projected_delta_total": { "example": 0.1334, "type": "number", "description": "The sum of position deltas without positions that will expire during closest expiration" }, "projected_maintenance_margin": { "example": 1, "type": "number", "description": "Projected maintenance margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "estimated_liquidation_ratio": { "example": 0.0000234, "type": "number", "description": "Estimated Liquidation Ratio is returned only for users without portfolio margining enabled. Multiplying it by future position's market price returns its estimated liquidation price. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "projected_initial_margin": { "example": 1, "type": "number", "description": "Projected initial margin. When cross collateral is enabled, this aggregated value is calculated by converting the sum of each cross collateral currency's value to the given currency, using each cross collateral currency's index." }, "additional_reserve": { "example": 0.3, "type": "number", "description": "The account's balance reserved in other orders" }, "rate_and_burst": { "required": [ "rate", "burst" ], "properties": { "rate": { "type": "integer", "description": "Number of requests per second allowed for user" }, "burst": { "type": "integer", "description": "Maximal number of requests allowed for user in burst mode" } }, "type": "object" }, "group_rate_and_burst": { "properties": { "total": { "type": "object", "properties": { "rate": { "type": "integer", "description": "Number of all requests per second in perpetuals allowed for user" }, "burst": { "type": "integer", "description": "Maximal number of all requests allowed for user in burst mode" } } }, "perpetuals": { "type": "object", "properties": { "rate": { "type": "integer", "description": "Number of perpetual requests per second allowed for user" }, "burst": { "type": "integer", "description": "Maximal number of perpetuals requests allowed for user in burst mode" } } }, "futures": { "type": "object", "properties": { "rate": { "type": "integer", "description": "Number of futures requests per second allowed for user" }, "burst": { "type": "integer", "description": "Maximal number of futures requests allowed for user in burst mode" } } }, "options": { "type": "object", "properties": { "rate": { "type": "integer", "description": "Number of option requests per second allowed for user" }, "burst": { "type": "integer", "description": "Maximal number of option requests allowed for user in burst mode" } } } }, "type": "object" }, "api_limits": { "type": "object", "description": "Returned object is described in [separate document](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits)." }, "scale_down": { "properties": { "mm_multiplier": { "type": "number", "description": "Maintenance Margin multiplier" }, "im_multiplier": { "type": "number", "description": "Initial Margin multiplier" } }, "required": [ "im_multiplier", "mm_multiplier" ], "type": "object", "description": "The field is only added if the user has it set" }, "rpl": { "example": 0.1, "type": "number", "description": "Session realized profit and loss" }, "upl": { "example": 0.846863, "type": "number", "description": "Session unrealized profit and loss" }, "side": { "example": "`buy`", "enum": [ "buy", "sell" ], "type": "string", "description": "Side - `buy` or `sell`" }, "fee_balance": { "type": "number", "description": "The account's fee balance (it can be used to pay for fees)" }, "did": { "type": "string", "description": "Distributed ID" }, "jurisdictions": { "items": { "type": "string", "description": "Jurisdiction name" }, "type": "array", "description": "Jurisdictions a VASP belongs to" }, "vasp_name": { "type": "string", "description": "VASP name" }, "source": { "type": "string", "description": "Blockchain address source" }, "jwt": { "type": "string", "description": "JSON web token" }, "external_id": { "example": "4b4cee3d-2dfc-4402-a9ae-f8f9785fa966", "type": "string", "description": "User ID in external systems" }, "business_registration_number": { "example": "2021/135466541/07", "type": "string", "description": "Registration number of the company" }, "trigger_fill_condition": { "enum": [ "first_hit", "complete_fill", "incremental" ], "type": "string", "description": "

    The fill condition of the linked order (Only for linked order types), default: `first_hit`.

    " }, "withdrawal_policy_limit_bucket": { "enum": [ "h24" ], "type": "string", "description": "Withdrawal Policy limit bucket, i.e. `\"h24\"`" }, "withdrawal_policy_category": { "enum": [ "small", "secure" ], "type": "string", "description": "Withdrawal Policy category, i.e. `\"small\"`, `\"secure\"`" }, "withdrawal_policy_limit_buckets": { "properties": { "small": { "$ref": "#/components/schemas/amount" }, "secure": { "$ref": "#/components/schemas/amount" } }, "type": "object", "description": "Withdrawal Policy limit bucket" }, "withdrawal_policy_amount": { "type": "number", "description": "A positive float as limit" }, "oco_ref": { "type": "string", "description": "Unique reference that identifies a one_cancels_others (OCO) pair." }, "is_secondary_oto": { "type": "boolean", "description": "`true` if the order is an order that can be triggered by another order, otherwise not present." }, "block_rfq_legs": { "items": { "properties": { "ratio": { "type": "integer", "description": "Ratio of amount between legs" }, "instrument_name": { "type": "string", "example": "BTC-PERPETUAL", "description": "Unique instrument identifier" }, "direction": { "type": "string", "enum": [ "buy", "sell" ], "description": "Direction: `buy`, or `sell`" } }, "type": "object" }, "type": "array" }, "leg_structure": { "items": { "properties": { "ratio": { "type": "integer", "description": "Ratio of amount between legs" }, "instrument_name": { "type": "string", "example": "BTC-PERPETUAL", "description": "Unique instrument identifier" }, "direction": { "type": "string", "enum": [ "buy", "sell" ], "description": "Direction: `buy`, or `sell`" }, "price": { "type": "number", "description": "Price for a leg" } }, "type": "object" }, "type": "array" }, "block_rfq_hedge_leg": { "properties": { "amount": { "type": "integer", "description": "It represents the requested hedge leg size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin." }, "instrument_name": { "type": "string", "example": "BTC-PERPETUAL", "description": "Unique instrument identifier" }, "direction": { "type": "string", "enum": [ "buy", "sell" ], "description": "Direction: `buy`, or `sell`" }, "price": { "type": "number", "description": "Price for a hedge leg" } }, "type": "object" }, "replaced_quote": { "type": "boolean", "description": "`true` if the quote was edited, otherwise `false`." }, "block_rfq": { "properties": { "creation_timestamp": { "type": "integer", "example": 1536569522277, "description": "The timestamp when Block RFQ was created (milliseconds since the Unix epoch)" }, "expiration_timestamp": { "type": "integer", "example": 1536569522277, "description": "The timestamp when the Block RFQ will expire (milliseconds since the UNIX epoch)" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ" }, "role": { "type": "string", "enum": [ "taker", "maker" ], "description": "Role of the user in Block RFQ" }, "state": { "type": "string", "enum": [ "open", "filled", "cancelled", "expired" ], "description": "State of the Block RFQ" }, "taker_rating": { "type": "string", "description": "Rating of the taker" }, "makers": { "type": "array", "items": { "type": "string", "description": "List of targeted Block RFQ makers" } }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "min_trade_amount": { "type": "number", "description": "Minimum amount for trading" }, "asks": { "$ref": "#/components/schemas/quote_asks" }, "bids": { "$ref": "#/components/schemas/quote_bids" }, "legs": { "$ref": "#/components/schemas/block_rfq_legs" }, "hedge": { "$ref": "#/components/schemas/block_rfq_hedge_leg" }, "combo_id": { "$ref": "#/components/schemas/combo_id" }, "label": { "type": "string", "description": "User defined label for the Block RFQ (maximum 64 characters)" }, "app_name": { "type": "string", "example": "Example Application", "description": "The name of the application that created the Block RFQ on behalf of the user (optional, visible only to taker)." }, "mark_price": { "$ref": "#/components/schemas/mark_price" }, "disclosed": { "type": "boolean", "description": "Indicates whether the RFQ was created as non-anonymous, meaning taker and maker aliases are visible to counterparties." }, "taker": { "type": "string", "example": "TAKER1", "description": "Taker alias. Present only when `disclosed` is `true`." }, "index_prices": { "type": "array", "items": { "type": "number", "description": "A list of index prices for the underlying instrument(s) at the time of trade execution." } }, "included_in_taker_rating": { "type": "boolean", "description": "Indicates whether the RFQ is included in the taker's rating calculation. Present only for closed RFQs created by the requesting taker." }, "trades": { "type": "array", "items": { "type": "object", "properties": { "direction": { "$ref": "#/components/schemas/direction" }, "price": { "$ref": "#/components/schemas/price" }, "amount": { "type": "number", "description": "Trade amount. For options, linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." }, "maker": { "type": "string", "description": "Alias of the maker (optional)" }, "hedge_amount": { "type": "number", "description": "Amount of the hedge leg. For linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." } } } }, "trade_trigger": { "$ref": "#/components/schemas/trade_trigger", "description": "Present only if a trade trigger was placed by the taker and only visible to taker. Only for cases: `cancelled` (contains the reason for cancellation) and `untriggered` (contains the information about the trade trigger)." }, "trade_allocations": { "$ref": "#/components/schemas/trade_allocations", "description": "List of allocations for Block RFQ pre-allocation. Allows to split amount between different (sub)accounts. The taker can also allocate to himself. Visible only to the taker." } }, "type": "object" }, "block_rfq_for_maker": { "properties": { "creation_timestamp": { "type": "integer", "example": 1536569522277, "description": "The timestamp when Block RFQ was created (milliseconds since the Unix epoch)" }, "expiration_timestamp": { "type": "integer", "example": 1536569522277, "description": "The timestamp when the Block RFQ will expire (milliseconds since the UNIX epoch)" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ" }, "role": { "type": "string", "enum": [ "taker", "maker" ], "description": "Role of the user in Block RFQ" }, "state": { "type": "string", "enum": [ "open", "filled", "cancelled", "expired" ], "description": "State of the Block RFQ" }, "taker_rating": { "type": "string", "description": "Rating of the taker" }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "min_trade_amount": { "type": "number", "description": "Minimum amount for trading" }, "legs": { "$ref": "#/components/schemas/block_rfq_legs" }, "hedge": { "$ref": "#/components/schemas/block_rfq_hedge_leg" }, "combo_id": { "$ref": "#/components/schemas/combo_id" }, "disclosed": { "type": "boolean", "description": "Indicates whether the RFQ was created as non-anonymous, meaning taker and maker aliases are visible to counterparties." }, "taker": { "type": "string", "example": "TAKER1", "description": "Taker alias. Present only when `disclosed` is `true`." }, "index_prices": { "type": "array", "items": { "type": "number", "description": "A list of index prices for the underlying instrument(s) at the time of trade execution." } }, "included_in_taker_rating": { "type": "boolean", "description": "Indicates whether the RFQ is included in the taker's rating calculation. Present only for closed RFQs created by the requesting taker." }, "trades": { "type": "array", "items": { "type": "object", "properties": { "direction": { "$ref": "#/components/schemas/direction" }, "price": { "$ref": "#/components/schemas/price" }, "amount": { "type": "number", "description": "Trade amount. For options, linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." }, "maker": { "type": "string", "description": "Alias of the maker (optional)" }, "hedge_amount": { "type": "number", "description": "Amount of the hedge leg. For linear futures, linear perpetuals and spots the amount is denominated in the underlying base currency coin. The inverse perpetuals and inverse futures are denominated in USD units." } } } } }, "type": "object" }, "block_rfq_quote": { "properties": { "creation_timestamp": { "type": "integer", "example": 1536569522277, "description": "The timestamp when quote was created (milliseconds since the Unix epoch)" }, "last_update_timestamp": { "type": "integer", "example": 1536569522277, "description": "Timestamp of the last update of the quote (milliseconds since the UNIX epoch)" }, "block_rfq_id": { "type": "integer", "description": "ID of the Block RFQ" }, "block_rfq_quote_id": { "type": "integer", "description": "ID of the Block RFQ quote" }, "quote_state": { "type": "string", "description": "State of the quote" }, "execution_instruction": { "type": "string", "enum": [ "any_part_of", "all_or_none" ], "description": "Execution instruction of the quote. Default - `any_part_of`\n\n- `\"all_or_none (AON)\"` - The quote can only be filled entirely or not at all, ensuring that its amount matches the amount specified in the Block RFQ. Additionally, 'all_or_none' quotes have priority over 'any_part_of' quotes at the same price level.\n- `\"any_part_of (APO)\"` - The quote can be filled either partially or fully, with the filled amount potentially being less than the Block RFQ amount." }, "price": { "type": "number", "description": "Price of a quote" }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "direction": { "$ref": "#/components/schemas/quote_direction" }, "filled_amount": { "$ref": "#/components/schemas/filled_amount_quote" }, "legs": { "$ref": "#/components/schemas/leg_structure" }, "hedge": { "$ref": "#/components/schemas/block_rfq_hedge_leg" }, "replaced": { "$ref": "#/components/schemas/replaced_quote" }, "label": { "type": "string", "description": "User defined label for the quote (maximum 64 characters)" }, "app_name": { "type": "string", "example": "Example Application", "description": "The name of the application that placed the quote on behalf of the user (optional)." }, "quote_state_reason": { "type": "string", "description": "Reason of quote cancellation" } }, "type": "object" }, "quote_bids": { "items": { "properties": { "makers": { "type": "array", "items": { "type": "string", "description": "Maker of the quote" } }, "price": { "type": "number", "description": "Price of a quote" }, "last_update_timestamp": { "type": "integer", "example": 1536569522277, "description": "Timestamp of the last update of the quote (milliseconds since the UNIX epoch)" }, "execution_instruction": { "type": "string", "enum": [ "any_part_of", "all_or_none" ], "description": "Execution instruction of the quote. Default - `any_part_of`\n\n- `\"all_or_none (AON)\"` - The quote can only be filled entirely or not at all, ensuring that its amount matches the amount specified in the Block RFQ. Additionally, 'all_or_none' quotes have priority over 'any_part_of' quotes at the same price level.\n- `\"any_part_of (APO)\"` - The quote can be filled either partially or fully, with the filled amount potentially being less than the Block RFQ amount." }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "expires_at": { "type": "integer", "example": 1745312540321, "description": "The timestamp when the quote expires (milliseconds since the Unix epoch), equal to the earliest expiry of placed quotes" } }, "type": "object" }, "type": "array" }, "quote_asks": { "items": { "properties": { "makers": { "type": "array", "items": { "type": "string", "description": "Maker of the quote" } }, "price": { "type": "number", "description": "Price of a quote" }, "last_update_timestamp": { "type": "integer", "example": 1536569522277, "description": "Timestamp of the last update of the quote (milliseconds since the UNIX epoch)" }, "execution_instruction": { "type": "string", "enum": [ "any_part_of", "all_or_none" ], "description": "Execution instruction of the quote. Default - `any_part_of`\n\n- `\"all_or_none (AON)\"` - The quote can only be filled entirely or not at all, ensuring that its amount matches the amount specified in the Block RFQ. Additionally, 'all_or_none' quotes have priority over 'any_part_of' quotes at the same price level.\n- `\"any_part_of (APO)\"` - The quote can be filled either partially or fully, with the filled amount potentially being less than the Block RFQ amount." }, "amount": { "type": "number", "description": "This value multiplied by the ratio of a leg gives trade size on that leg." }, "expires_at": { "type": "integer", "example": 1745312540321, "description": "The timestamp when the quote expires (milliseconds since the Unix epoch), equal to the earliest expiry of placed quotes" } }, "type": "object" }, "type": "array" }, "execution_instruction": { "enum": [ "any_part_of", "all_or_none" ], "type": "string", "description": "Execution instruction of the quote. Default - `any_part_of`\n\n- `\"all_or_none (AON)\"` - The quote can only be filled entirely or not at all, ensuring that its amount matches the amount specified in the Block RFQ. Additionally, 'all_or_none' quotes have priority over 'any_part_of' quotes at the same price level.\n- `\"any_part_of (APO)\"` - The quote can be filled either partially or fully, with the filled amount potentially being less than the Block RFQ amount." }, "custody_settlement": { "properties": { "id": { "type": "string", "description": "Unique identifier of the settlement instance" }, "status": { "type": "string", "enum": [ "completed", "completed_partially", "failed", "in_progress" ], "example": "completed", "description": "Status of the settlement" }, "created_at": { "type": "integer", "example": 1736712919000, "description": "The timestamp when the settlement was created (milliseconds since the Unix epoch)" }, "updated_at": { "type": "integer", "example": 1736713920000, "description": "Timestamp of the last update of the settlement (milliseconds since the Unix epoch)" }, "failed_at": { "type": "integer", "example": 1736713950000, "description": "Timestamp (in milliseconds since the Unix epoch) when the settlement or settlement instruction failed. Present only if the status is `failed`." }, "completed_at": { "type": "integer", "example": 1736714000000, "description": "Timestamp of when the settlement was completed (if applicable)" }, "instructions": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "description": "The currency supported by custodian and exchange" }, "amount": { "type": "number", "example": 1.3141, "description": "