openapi: 3.0.0
info:
title: Deribit Account Management API
version: 2.1.1
servers:
- url: https://test.deribit.com/api/v2
tags:
- name: Account Management
paths:
/private/get_positions:
get:
tags:
- Account Management
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.
Results can be filtered by currency and instrument kind (future, option, etc.). To retrieve positions for a specific subaccount, use the `subaccount_id` parameter.
**Scope:** `trade:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_positions)
'
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
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.
If no position exists for the specified instrument, the response will indicate a zero position.
**Scope:** `trade:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_position)
'
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
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.
To 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.
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_account_summary)
'
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
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.
To 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.
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_account_summaries)
'
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
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.
You 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.
Use this method to understand margin requirements and risk exposure before making trading decisions in a Portfolio Margin account.
**📖 Related Article:** [Portfolio Margin](https://support.deribit.com/hc/en-us/articles/25944756247837-Portfolio-Margin)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fpme%2Fsimulate)
'
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
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.
You 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.
**Note:** This method has a restricted rate limit of not more than once per second due to the computational complexity of portfolio margin calculations.
**📖 Related Article:** [Portfolio Margin](https://support.deribit.com/hc/en-us/articles/25944756247837-Portfolio-Margin)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsimulate_portfolio)
'
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
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.
Use 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.
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_access_log)
'
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
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.
Use this method to track your affiliate program performance and earnings.
**📖 Related Support Article:** [Affiliate Program](https://support.deribit.com/hc/en-us/articles/25944777728797-Affiliate-Program)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_affiliate_program_info)
'
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
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.
After 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.
**📖 Related Support Article:** [Affiliate Program](https://support.deribit.com/hc/en-us/articles/25944777728797-Affiliate-Program)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fenable_affiliate_program)
'
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
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).
Changing 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.
**📖 Related Article:** [Margin types and usage](https://support.deribit.com/hc/en-us/articles/25944811317149-Margin-types-and-usage)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_margin_model)
'
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
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.
The response includes details about the type of lock, reason, and duration (if applicable). Some locks may prevent trading, withdrawals, or other account operations.
**📖 Related Support Article:** [Emergency locking an account](https://support.deribit.com/hc/en-us/articles/25944602715805-Emergency-locking-an-account)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_locks)
'
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
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.
You 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.
**📖 Related Support Article:** [Account settings page](https://support.deribit.com/hc/en-us/articles/25944634289693-Account-settings-page#heading-4)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_self_trading_config)
'
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
'
style: form
explode: true
responses:
'200':
$ref: '#/components/responses/OkResponse'
tags:
- Account Management
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.
This is useful for risk management and compliance purposes. Only the main account owner can modify trading product restrictions for subaccounts.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_disabled_trading_products)
'
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
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.
This is useful for temporarily suspending access without permanently deleting the key. All requests using this key will be rejected until it is enabled again.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fdisable_api_key)
'
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
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.
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fenable_api_key)
'
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.
**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)
'
- 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-----
MCowBQYDK2VwAyEAM7FWhKquNqLmTOV4hfYT5r3AjrYiORTT6Tn5HIfFNV8=
-----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
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-----
MCowBQYDK2VwAyEAM7FWhKquNqLmTOV4hfYT5r3AjrYiORTT6Tn5HIfFNV8=
-----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**\U0001F4D6 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.
**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)
'
- name: id
in: query
required: true
schema:
type: integer
example: 1
description: API key ID
responses:
'200':
$ref: '#/components/responses/PrivateApiKeyResponse'
tags:
- Account Management
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**\U0001F4D6 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
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.
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_api_key_name)
'
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
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.
Use this method to review and manage your API keys, check their permissions, and monitor their usage.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flist_api_keys)
'
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
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.
The 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.
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Freset_api_key)
'
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
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.
Consider disabling the key first if you want to temporarily suspend access, as disabled keys can be re-enabled later.
**📖 Related Article:** [Creating new API key on Deribit](https://docs.deribit.com/articles/creating-api-key)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fremove_api_key)
'
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.
**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)
'
- 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
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**\U0001F4D6 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
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.
Results 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).
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_announcements)
'
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
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.
This method is useful for displaying notification badges or highlighting new announcements that require the user''s attention.
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_new_announcements)
'
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
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`.
This helps track which announcements have been viewed and reduces notification clutter.
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_announcement_as_read)
'
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
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.
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_email_language)
'
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
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.
This method takes no parameters. The new subaccount will be created with default settings and can be configured using other subaccount management methods.
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write` and mainaccount
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_subaccount)
'
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
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.
Only the main account owner can change subaccount names.
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write` and mainaccount
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fchange_subaccount_name)
'
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
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`).
All future email notifications will be sent in the selected language. This setting does not affect the language of the web interface or API responses.
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_email_language)
'
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
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.
The 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.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_email_for_subaccount)
'
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
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.
If login is disabled while an active session exists for the subaccount, that session will be immediately terminated.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Ftoggle_subaccount_login)
'
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
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.
This setting only affects notifications sent to the subaccount''s email address. Notifications sent to the main account are not affected.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Ftoggle_notifications_from_subaccount)
'
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
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.
When called from a subaccount, the response includes limited details for the main account and full details for the subaccount initiating the request.
Set the `with_portfolio` parameter to `true` to include portfolio information (balances, positions, etc.) in the response. By default, only subaccount metadata is returned.
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts)
'
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
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.
Optionally include open orders for each subaccount by setting the `with_open_orders` parameter to `true`.
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts_details)
'
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
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.
This operation cannot be undone. All subaccount data will be permanently deleted.
**[TFA required](https://docs.deribit.com/articles/security-keys)**
**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)
**Scope:** `account:read_write`
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fremove_subaccount)
'
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
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**\U0001F4D6 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
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.
The response includes custody account details such as account name, status, balances, and configuration settings.
**📖 Related Support Article:** [Custody Options](https://support.deribit.com/hc/en-us/articles/26533163120413-Custody-Options)
[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Flist_custody_accounts)
'
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
components:
schemas:
fee_balance:
type: number
description: The account's fee balance (it can be used to pay for fees)
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
currency_amount:
example: 1
type: number
description: Amount of funds in given currency
trigger_offset:
type: number
description: The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)
api:
type: boolean
description: '`true` if created with API'
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"`.'
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)'
key_id:
example: 1
type: integer
description: Key identifier
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
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
contracts:
type: number
description: It represents the order size in contract units. (Optional, may be absent in historical data).
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'
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"`'
reduce_only:
type: boolean
description: Optional (not added for spot). '`true` for reduce-only orders only'
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:
- ``changed_email`` - email was changed
- ``changed_password`` - password was changed
- ``disabled_tfa`` - TFA was disabled
- ``enabled_tfa`` - TFA was enabled
- ``success`` - successful login
- ``failure`` - login failure
- ``enabled_subaccount_login`` - login was enabled for subaccount (in `data` - subaccount uid)
- ``disabled_subaccount_login`` - login was disabled for subaccount (in `data` - subaccount uid)
- ``new_api_key`` - API key was created (in `data` key client id)
- ``removed_api_key`` - API key was removed (in `data` key client id)
- ``changed_scope`` - scope of API key was changed (in `data` key client id)
- ``changed_whitelist`` - whitelist of API key was edited (in `data` key client id)
- ``disabled_api_key`` - API key was disabled (in `data` key client id)
- ``enabled_api_key`` - API key was enabled (in `data` key client id)
- ``reset_api_key`` - API key was reset (in `data` key client id)
'
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
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
additional_reserve:
example: 0.3
type: number
description: The account's balance reserved in other orders
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.'
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)
display_amount:
type: number
description: The actual display amount of iceberg order. Absent for other types of orders.
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
position_direction:
enum:
- buy
- sell
- zero
type: string
description: 'Direction: `buy`, `sell` or `zero`'
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
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
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.
is_secondary_oto:
type: boolean
description: '`true` if the order is an order that can be triggered by another order, otherwise not present.'
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
trade_id:
type: string
description: Unique (per currency) trade identifier
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)
timestamp:
example: 1536569522277
type: integer
description: The timestamp (milliseconds since the Unix epoch)
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
currency:
enum:
- BTC
- ETH
- USDC
- USDT
- EURR
type: string
description: Currency, i.e `"BTC"`, `"ETH"`, `"USDC"`
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
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
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.
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.
user_id:
example: 57874
type: integer
description: Unique user identifier
id:
example: 5967413
type: integer
description: Unique identifier
direction:
enum:
- buy
- sell
type: string
description: 'Direction: `buy`, or `sell`'
currency_with_any:
enum:
- BTC
- ETH
- USDC
- USDT
- EURR
- any
type: string
description: Currency name or `"any"` if don't care
advanced:
enum:
- usd
- implv
type: string
description: 'advanced type: `"usd"` or `"implv"` (Only for options; field is omitted if not applicable).
'
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"`
web:
type: boolean
description: '`true` if created via Deribit frontend (optional)'
instrument_name:
example: BTC-PERPETUAL
type: string
description: Unique instrument identifier
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
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
block_trade_order:
example: true
type: boolean
description: '`true` if order made from block_trade trade, added only in that case.'
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"
GetlistCustodyAccounts200response:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
- properties:
result:
type: array
items:
$ref: '#/components/schemas/custody_account'
public_key:
example: '-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEApajFN0CSwIaaiIRPiFbiYYvpsLQLSccSLLsKPe984sc= -----END PUBLIC KEY-----'
type: string
description: PEM encoded public key (Ed25519/RSA) used for asymmetric signatures (optional)
portfolio:
properties:
btc(example):
$ref: '#/components/schemas/currency_portfolio'
type: object
original_order_type:
enum:
- market
- market_limit
type: string
description: Original order type. Optional field
api_key_name:
example: TestName
type: string
description: Api key name that can be displayed in transaction log
api_limits:
type: object
description: Returned object is described in [separate document](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).
upl:
example: 0.846863
type: number
description: Session unrealized profit and loss
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
average_price:
type: number
description: Average fill price of the order
usd:
type: number
description: Option price in USD (Only if `advanced="usd"`)
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
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
implv:
type: number
description: Implied volatility in percent. (Only if `advanced="implv"`)
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
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.
**📖 Related Article:** [Access Scope](https://docs.deribit.com/articles/access-scope)
'
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
trigger_price:
type: number
description: Trigger price (Only for future trigger orders)
ErrorResponse:
type: object
properties:
jsonrpc:
type: string
enum:
- '2.0'
error:
type: object
properties:
code:
type: integer
description: Error code
message:
type: string
description: Error message
required:
- code
- message
required:
- jsonrpc
- error
description: Generic error response for broken references
reject_post_only:
type: boolean
description: '`true` if order has `reject_post_only` flag (field is present only when `post_only` is `true`)'
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
oco_ref:
type: string
description: Unique reference that identifies a one_cancels_others (OCO) pair.
projected_delta_total:
example: 0.1334
type: number
description: The sum of position deltas without positions that will expire during closest expiration
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
continuation_with_null:
example: 429946
type: integer
description: Continuation token for pagination. `NULL` when no continuation.
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)
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
mobile:
type: boolean
description: Optional field with value `true` added only when created with Mobile Application
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
order_id:
example: ETH-100234
type: string
description: Unique order identifier
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
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`.