Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/private/simulate_portfolio \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 22222,
  "method": "private/simulate_portfolio",
  "params": {
    "currency": "BTC",
    "add_positions": true,
    "simulated_positions": {
      "BTC-PERPETUAL": 1
    }
  }
}
'
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "projected_initial_margin": 37662472.03416069,
    "initial_margin": 37662472.03416069,
    "total_pl": 40419.10179263,
    "additional_reserve": 0,
    "available_withdrawal_funds": 115871741.76065847,
    "options_pl": 921.55562578,
    "delta_total_map": {
      "btc_usd": 68024.519462366
    },
    "available_subaccount_transfer_funds": 0,
    "projected_delta_total": 69080.932029,
    "projected_maintenance_margin": 30129215.84817124,
    "total_equity_usd": 13075634611389.318,
    "options_gamma": -0.03907,
    "currency": "BTC",
    "options_theta": 142583.29246,
    "spot_reserve": 0,
    "total_initial_margin_usd": 3139528603778.822,
    "options_vega": -39322.23046,
    "margin_balance": 153534213.79481918,
    "futures_session_rpl": 1.309136,
    "options_gamma_map": {
      "btc_usd": -0.03907
    },
    "available_funds": 115871741.76065847,
    "futures_pl": 39497.54616685,
    "cross_collateral_enabled": true,
    "delta_total": 69080.932029,
    "options_session_rpl": 0,
    "total_margin_balance_usd": 12798550648250.61,
    "options_value": -1056.41256672,
    "options_session_upl": -174.67960675,
    "maintenance_margin": 30129215.84817124,
    "total_maintenance_margin_usd": 2511559381417.215,
    "options_vega_map": {
      "btc_usd": -39322.23046
    },
    "session_rpl": 1.309136,
    "locked_balance": 0,
    "session_upl": -339.16214185,
    "margin_model": "cross_pm",
    "portfolio_margining_enabled": true,
    "equity": 150075253.91354558,
    "balance": 150076473.4995114,
    "total_delta_total_usd": 6157454218.3753195,
    "fee_balance": 0,
    "options_delta": 2883.38481,
    "options_theta_map": {
      "btc_usd": 142583.29246
    },
    "futures_session_upl": -164.48253509
  },
  "usIn": 1742210019774525,
  "usOut": 1742210019788175,
  "usDiff": 13650,
  "testnet": true
}

Query Parameters

currency
enum<string>
required

The currency symbol Currency, i.e "BTC", "ETH", "USDC"

Available options:
BTC,
ETH,
USDC,
USDT,
EURR
Example:

"BTC"

add_positions
boolean

If true, adds simulated positions to current positions, otherwise uses only simulated positions. By default true

simulated_positions
string

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. JSON string containing: object data

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object
required

Portfolio details

id
integer

The id that was sent in the request