curl --request GET \
--url https://test.deribit.com/api/v2/private/get_position \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 404,
"method": "private/get_position",
"params": {
"instrument_name": "BTC-PERPETUAL"
}
}
'{
"jsonrpc": "2.0",
"id": 404,
"result": {
"average_price": 0,
"delta": 0,
"direction": "buy",
"estimated_liquidation_price": 0,
"floating_profit_loss": 0,
"index_price": 3555.86,
"initial_margin": 0,
"instrument_name": "BTC-PERPETUAL",
"interest_value": 1.7362511643080387,
"leverage": 100,
"kind": "future",
"maintenance_margin": 0,
"mark_price": 3556.62,
"open_orders_margin": 0.000165889,
"realized_profit_loss": 0,
"settlement_price": 3555.44,
"size": 0,
"size_currency": 0,
"total_profit_loss": 0
}
}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
curl --request GET \
--url https://test.deribit.com/api/v2/private/get_position \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 404,
"method": "private/get_position",
"params": {
"instrument_name": "BTC-PERPETUAL"
}
}
'{
"jsonrpc": "2.0",
"id": 404,
"result": {
"average_price": 0,
"delta": 0,
"direction": "buy",
"estimated_liquidation_price": 0,
"floating_profit_loss": 0,
"index_price": 3555.86,
"initial_margin": 0,
"instrument_name": "BTC-PERPETUAL",
"interest_value": 1.7362511643080387,
"leverage": 100,
"kind": "future",
"maintenance_margin": 0,
"mark_price": 3556.62,
"open_orders_margin": 0.000165889,
"realized_profit_loss": 0,
"settlement_price": 3555.44,
"size": 0,
"size_currency": 0,
"total_profit_loss": 0
}
}Instrument name Unique instrument identifier
"BTC-PERPETUAL"
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Unique instrument identifier
"BTC-PERPETUAL"
Instrument kind: "future", "option", "spot", "future_combo", "option_combo"
future, option, spot, future_combo, option_combo Average price of trades that built this position
Direction: buy, sell or zero
buy, sell, zero Current mark price for position's instrument
Delta parameter
Current index price
Initial margin
Maintenance margin
Optional (not added for spot). Last settlement price for position's instrument 0 if instrument wasn't settled yet
Profit or loss from position
Floating profit or loss
Realized profit or loss
Position size for futures size in quote currency (e.g. USD), for options size is in base currency (e.g. BTC)
Estimated liquidation price, added only for futures, for users with segregated_sm margin model
Open orders margin
Only for options, Gamma parameter
Only for options, Vega parameter
Only for options, Theta parameter
Only for futures, position size in base currency
Only for options, average price in USD
Only for options, floating profit or loss in USD
Current available leverage for future position
Realized Funding in current session included in session realized profit or loss, only for positions of perpetual instruments
Value used to calculate realized_funding (perpetual only)
The id that was sent in the request
Was this page helpful?