Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.
You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.
Regular, trigger and OTO/OTOCO results contain order and trades.
When a one_cancels_other request places two orders, the result contains
oco_orders and trades instead. A single regular-order result still uses order.
Hide child attributes
result.trades
object[]
required
Hide child attributes
result.trades.trade_id
string
required
Unique (per currency) trade identifier
result.trades.trade_seq
integer
required
The sequence number of the trade within instrument
result.trades.instrument_name
string
required
Unique instrument identifier
Example:
"BTC-PERPETUAL"
result.trades.timestamp
integer
required
The timestamp of the trade (milliseconds since the UNIX epoch)
Example:
1517329113791
result.trades.order_id
string | null
required
Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
result.trades.matching_id
string | null
required
Matched order id for self-trades; null otherwise.
result.trades.direction
enum<string>
required
Trade direction of the user
Available options:
buy,
sell
result.trades.tick_direction
enum<integer>
required
Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick).
Available options:
0,
1,
2,
3
result.trades.index_price
number
required
Index Price at the moment of trade
result.trades.price
number
required
The price of the trade
result.trades.amount
number
required
Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
result.trades.fee
number
required
User's fee in units of the specified fee_currency
result.trades.fee_currency
enum<string>
required
Currency, i.e "BTC", "ETH", "USDC"
Available options:
BTC,
ETH,
USDC,
USDT,
EURR
result.trades.state
enum<string>
required
Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived)
Available options:
open,
filled,
rejected,
cancelled,
untriggered,
archive
result.trades.mark_price
number | null
required
Mark Price at the moment of trade
result.trades.starbase_timestamp
integer
Optional field: the Starbase causal timestamp of the trade, in nanoseconds since the UNIX epoch (present only for trades matched in Starbase)
Example:
1536569522277000000
result.trades.starbase_order_id
integer
Raw Starbase order id of the user's order, in Starbase's own (non currency-prefixed) id namespace (present only for trades matched in Starbase)
Example:
103148386170
result.trades.starbase_client_order_id
string
Client order id of the user's own order (maker or taker side) submitted directly to Starbase via direct access; not returned for orders placed through the Deribit API; for self-trades this is the taker order's client order id
result.trades.order_type
enum<string>
Order type: "limit", "market", or "liquidation"
Available options:
limit,
market,
liquidation
result.trades.original_order_type
enum<string>
Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use "limit" as order_type with "market" in this optional field.
Available options:
market,
market_limit
result.trades.advanced
enum<string>
Advanced type of user order: "usd" or "implv" (only for options; omitted if not applicable)
Available options:
usd,
implv
result.trades.contracts
number
Trade size in contract units (optional, may be absent in historical trades)
result.trades.iv
number
Option implied volatility for the price (Option only)
result.trades.underlying_price
number
Underlying price for implied volatility calculations (Options only)
result.trades.liquidation
enum<string>
Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation
Available options:
M,
T,
MT
result.trades.liquidity
enum<string>
Describes what was role of users order: "M" when it was maker order, "T" when it was taker order
Available options:
M,
T
result.trades.label
string
User defined label (presented only when previously set for order by user)
result.trades.block_trade_id
string
ID of the Block Trade or Block RFQ trade, when the trade was part of one
Example:
"154"
result.trades.block_trade_leg_count
integer
Number of legs in the Block Trade or Block RFQ trade, when the trade was part of one
Example:
3
result.trades.block_delayed
integer
Optional field (only for Block RFQ trades with delayed publication): the time the trade is published to public data feeds, in milliseconds since the UNIX epoch. Until then, the trade is returned only to its counterparties and is not included in public trades or the Block RFQ trade tape. The trade never updates the ticker last_price or tick direction, or the 24-hour high, low and price_change; its volume is reported in volume_delayed.
Example:
1730827181502
result.trades.block_rfq_id
integer
ID of the Block RFQ - when trade was part of the Block RFQ
result.trades.block_rfq_quote_id
integer
ID of the Block RFQ quote - when trade was part of the Block RFQ
result.trades.reduce_only
boolean
true if user order is reduce-only; omitted for spot trades.
result.trades.post_only
boolean
true if user order is post-only
result.trades.mmp
boolean
true if user order is MMP
result.trades.risk_reducing
boolean
true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)
result.trades.api
boolean
true if user order was created with API
result.trades.profit_loss
number
Profit and loss in base currency.
result.trades.legs
array
Optional field containing leg trades if trade is a combo trade (present when querying for only combo trades and in combo_trades events). Each leg trade has the same fields as a top-level user trade, including starbase_match_id, starbase_order_id, and starbase_timestamp when matched in Starbase, and starbase_client_order_id for orders submitted via Starbase direct access.
result.trades.combo_id
string
Optional field containing combo instrument name if the trade is a combo trade
result.trades.combo_trade_id
string
Optional field containing combo trade identifier if the trade is a combo trade
result.trades.starbase_match_id
integer
Optional field containing the Starbase match identifier (present only for trades matched via Starbase)
result.trades.quote_set_id
string
QuoteSet of the user order (optional, present only for orders placed with private/mass_quote)
result.trades.quote_id
string
QuoteID of the user order (optional, present only for orders placed with private/mass_quote)
result.trades.trade_allocations
object[]
List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included.
Hide child attributes
result.trades.trade_allocations.amount
number
required
Amount allocated to this user.
result.trades.trade_allocations.fee
number
required
Fee for the allocated part of the trade.
result.trades.trade_allocations.user_id
integer
User ID to which part of the trade is allocated. For brokers the User ID is obstructed.
ID assigned to a single user in a client; available to broker.
result.trades.trade_allocations.client_info.name
string
Name of the linked user within the client; available to broker.
result.order
object
Hide child attributes
result.order.order_id
string
required
Unique order identifier
Example:
"ETH-100234"
result.order.order_state
enum<string>
required
Order state: "open", "filled", "rejected", "cancelled", "untriggered"
Available options:
open,
filled,
rejected,
cancelled,
untriggered,
triggered
result.order.order_type
enum<string>
required
Order type: "limit", "market", "stop_limit", "stop_market", "take_limit", "take_market", "trailing_stop"
Available options:
market,
limit,
stop_market,
stop_limit,
take_market,
take_limit,
trailing_stop
result.order.time_in_force
enum<string>
required
Order time in force: "good_til_cancelled", "good_til_day", "fill_or_kill" or "immediate_or_cancel"
Available options:
good_til_cancelled,
good_til_day,
fill_or_kill,
immediate_or_cancel
result.order.instrument_name
string
required
Unique instrument identifier
Example:
"BTC-PERPETUAL"
result.order.creation_timestamp
integer
required
The timestamp (milliseconds since the Unix epoch)
Example:
1536569522277
result.order.last_update_timestamp
integer
required
The timestamp (milliseconds since the Unix epoch)
Example:
1536569522277
result.order.direction
enum<string>
required
Direction: buy, or sell
Available options:
buy,
sell
result.order.price
numberenum<string>
required
Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.
result.order.label
string
required
User defined label (up to 64 characters)
result.order.post_only
boolean
required
true for post-only orders only
result.order.api
boolean
required
true if created with API
result.order.original_order_type
enum<string>
Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use "limit" as order_type with "market" in this optional field.
Available options:
market,
market_limit
result.order.is_rebalance
boolean
Optional (only for spot). true if order was automatically created during cross-collateral balance restoration
result.order.is_liquidation
boolean
Optional (not added for spot). true if order was automatically created during liquidation
result.order.starbase_last_update_timestamp
integer
The Starbase causal timestamp (nanoseconds since the Unix epoch) of the last book update that affected this order. Present only for orders placed in Starbase, including combo leg order updates; not always available for direct access orders
Example:
1536569522277000000
result.order.starbase_client_order_id
string
Client order id of an order submitted directly to Starbase via direct access; not returned for orders placed through the Deribit API (combo legs inherit the parent combo order's client order id)
result.order.reject_post_only
boolean
true if order has reject_post_only flag (field is present only when post_only is true)
result.order.reduce_only
boolean
Optional (not added for spot). 'true for reduce-only orders only'
result.order.web
boolean
true if created via Deribit frontend (optional)
result.order.mobile
boolean
Optional field with value true added only when created with Mobile Application
result.order.refresh_amount
number
The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders
result.order.display_amount
number
The actual display amount of iceberg order. Absent for other types of orders.
result.order.amount
number
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.
result.order.contracts
number
It represents the order size in contract units. (Optional, may be absent in historical data).
result.order.filled_amount
number
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.
result.order.average_price
number
Average fill price of the order
result.order.advanced
enum<string>
advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).
Available options:
usd,
implv
result.order.implv
number
Implied volatility in percent. (Only if advanced="implv")
result.order.usd
number
Option price in USD (Only if advanced="usd")
result.order.triggered
boolean
Whether the trigger order has been triggered
result.order.trigger
enum<string>
Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".
Available options:
index_price,
mark_price,
last_price
result.order.trigger_price
number
Trigger price (Only for future trigger orders)
result.order.trigger_offset
number
The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)
result.order.trigger_reference_price
number
The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)
result.order.block_trade
boolean
true if order made from block_trade trade, added only in that case.
Example:
true
result.order.mmp
boolean
true if the order is a MMP order, otherwise false.
result.order.risk_reducing
boolean
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.
result.order.replaced
boolean
true if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise false.
result.order.auto_replaced
boolean
Options, advanced orders only - true if last modification of the order was performed by the pricing engine, otherwise false.
result.order.quote
boolean
If order is a quote. Present only if true.
result.order.mmp_group
string
Name of the MMP group supplied in the private/mass_quote request. Only present for quote orders.
result.order.quote_set_id
string
Identifier of the QuoteSet supplied in the private/mass_quote request. Only present for quote orders.
result.order.quote_id
string
The same QuoteID as supplied in the private/mass_quote request. Only present for quote orders.
result.order.trigger_order_id
string
Id of the trigger order that created the order (Only for orders that were created by triggered orders).
Example:
"SLIB-370"
result.order.combo_order_id
string
Id of the combo order that created this order (only present for orders that were created as legs of a combo order).
Example:
"103148386169"
result.order.starbase_order_id
integer
Raw Starbase order id, in Starbase's own (non currency-prefixed) id namespace. Only present for orders placed in Starbase. Combo leg orders expose the parent combo order's Starbase order id.
Example:
103148386170
result.order.app_name
string
The name of the application that placed the order on behalf of the user (optional).
Example:
"Example Application"
result.order.mmp_cancelled
boolean
true if order was cancelled by mmp trigger (optional)
Example:
true
result.order.cancel_reason
enum<string>
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 event, e.g. good-til-day orders are cancelled when an instrument enters the daily settlement). Note: orders cancelled because an instrument expired (delivery) currently do not include a cancel_reason field.
Available options:
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
result.order.oto_order_ids
string[]
The Ids of the orders that will be triggered if the order is filled
Order Id
result.order.trigger_fill_condition
enum<string>
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
`"first_hit"` - any execution of the primary order will fully cancel/place all secondary orders.
`"complete_fill"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.
`"incremental"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.
Available options:
first_hit,
complete_fill,
incremental
result.order.oco_ref
string
Unique reference that identifies a one_cancels_others (OCO) pair.
result.order.primary_order_id
string
ID of the order that triggered this order.
Example:
"ETH-100234"
result.order.is_secondary_oto
boolean
true if the order is an order that can be triggered by another order, otherwise not present.
result.order.is_primary_otoco
boolean
true if the order is an order that can trigger an OCO pair, otherwise not present.
result.oco_orders
object[]
The two orders placed by an OCO request; returned instead of order.
Hide child attributes
result.oco_orders.order_id
string
required
Unique order identifier
Example:
"ETH-100234"
result.oco_orders.order_state
enum<string>
required
Order state: "open", "filled", "rejected", "cancelled", "untriggered"
Available options:
open,
filled,
rejected,
cancelled,
untriggered,
triggered
result.oco_orders.order_type
enum<string>
required
Order type: "limit", "market", "stop_limit", "stop_market", "take_limit", "take_market", "trailing_stop"
Available options:
market,
limit,
stop_market,
stop_limit,
take_market,
take_limit,
trailing_stop
result.oco_orders.time_in_force
enum<string>
required
Order time in force: "good_til_cancelled", "good_til_day", "fill_or_kill" or "immediate_or_cancel"
Available options:
good_til_cancelled,
good_til_day,
fill_or_kill,
immediate_or_cancel
result.oco_orders.instrument_name
string
required
Unique instrument identifier
Example:
"BTC-PERPETUAL"
result.oco_orders.creation_timestamp
integer
required
The timestamp (milliseconds since the Unix epoch)
Example:
1536569522277
result.oco_orders.last_update_timestamp
integer
required
The timestamp (milliseconds since the Unix epoch)
Example:
1536569522277
result.oco_orders.direction
enum<string>
required
Direction: buy, or sell
Available options:
buy,
sell
result.oco_orders.price
numberenum<string>
required
Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.
result.oco_orders.label
string
required
User defined label (up to 64 characters)
result.oco_orders.post_only
boolean
required
true for post-only orders only
result.oco_orders.api
boolean
required
true if created with API
result.oco_orders.original_order_type
enum<string>
Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use "limit" as order_type with "market" in this optional field.
Available options:
market,
market_limit
result.oco_orders.is_rebalance
boolean
Optional (only for spot). true if order was automatically created during cross-collateral balance restoration
result.oco_orders.is_liquidation
boolean
Optional (not added for spot). true if order was automatically created during liquidation
result.oco_orders.starbase_last_update_timestamp
integer
The Starbase causal timestamp (nanoseconds since the Unix epoch) of the last book update that affected this order. Present only for orders placed in Starbase, including combo leg order updates; not always available for direct access orders
Example:
1536569522277000000
result.oco_orders.starbase_client_order_id
string
Client order id of an order submitted directly to Starbase via direct access; not returned for orders placed through the Deribit API (combo legs inherit the parent combo order's client order id)
result.oco_orders.reject_post_only
boolean
true if order has reject_post_only flag (field is present only when post_only is true)
result.oco_orders.reduce_only
boolean
Optional (not added for spot). 'true for reduce-only orders only'
result.oco_orders.web
boolean
true if created via Deribit frontend (optional)
result.oco_orders.mobile
boolean
Optional field with value true added only when created with Mobile Application
result.oco_orders.refresh_amount
number
The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders
result.oco_orders.display_amount
number
The actual display amount of iceberg order. Absent for other types of orders.
result.oco_orders.amount
number
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.
result.oco_orders.contracts
number
It represents the order size in contract units. (Optional, may be absent in historical data).
result.oco_orders.filled_amount
number
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.
result.oco_orders.average_price
number
Average fill price of the order
result.oco_orders.advanced
enum<string>
advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).
Available options:
usd,
implv
result.oco_orders.implv
number
Implied volatility in percent. (Only if advanced="implv")
result.oco_orders.usd
number
Option price in USD (Only if advanced="usd")
result.oco_orders.triggered
boolean
Whether the trigger order has been triggered
result.oco_orders.trigger
enum<string>
Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".
Available options:
index_price,
mark_price,
last_price
result.oco_orders.trigger_price
number
Trigger price (Only for future trigger orders)
result.oco_orders.trigger_offset
number
The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)
result.oco_orders.trigger_reference_price
number
The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)
result.oco_orders.block_trade
boolean
true if order made from block_trade trade, added only in that case.
Example:
true
result.oco_orders.mmp
boolean
true if the order is a MMP order, otherwise false.
result.oco_orders.risk_reducing
boolean
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.
result.oco_orders.replaced
boolean
true if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise false.
result.oco_orders.auto_replaced
boolean
Options, advanced orders only - true if last modification of the order was performed by the pricing engine, otherwise false.
result.oco_orders.quote
boolean
If order is a quote. Present only if true.
result.oco_orders.mmp_group
string
Name of the MMP group supplied in the private/mass_quote request. Only present for quote orders.
result.oco_orders.quote_set_id
string
Identifier of the QuoteSet supplied in the private/mass_quote request. Only present for quote orders.
result.oco_orders.quote_id
string
The same QuoteID as supplied in the private/mass_quote request. Only present for quote orders.
result.oco_orders.trigger_order_id
string
Id of the trigger order that created the order (Only for orders that were created by triggered orders).
Example:
"SLIB-370"
result.oco_orders.combo_order_id
string
Id of the combo order that created this order (only present for orders that were created as legs of a combo order).
Example:
"103148386169"
result.oco_orders.starbase_order_id
integer
Raw Starbase order id, in Starbase's own (non currency-prefixed) id namespace. Only present for orders placed in Starbase. Combo leg orders expose the parent combo order's Starbase order id.
Example:
103148386170
result.oco_orders.app_name
string
The name of the application that placed the order on behalf of the user (optional).
Example:
"Example Application"
result.oco_orders.mmp_cancelled
boolean
true if order was cancelled by mmp trigger (optional)
Example:
true
result.oco_orders.cancel_reason
enum<string>
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 event, e.g. good-til-day orders are cancelled when an instrument enters the daily settlement). Note: orders cancelled because an instrument expired (delivery) currently do not include a cancel_reason field.
Available options:
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
result.oco_orders.oto_order_ids
string[]
The Ids of the orders that will be triggered if the order is filled
Order Id
result.oco_orders.trigger_fill_condition
enum<string>
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
`"first_hit"` - any execution of the primary order will fully cancel/place all secondary orders.
`"complete_fill"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.
`"incremental"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.
Available options:
first_hit,
complete_fill,
incremental
result.oco_orders.oco_ref
string
Unique reference that identifies a one_cancels_others (OCO) pair.
result.oco_orders.primary_order_id
string
ID of the order that triggered this order.
Example:
"ETH-100234"
result.oco_orders.is_secondary_oto
boolean
true if the order is an order that can be triggered by another order, otherwise not present.
result.oco_orders.is_primary_otoco
boolean
true if the order is an order that can trigger an OCO pair, otherwise not present.
id
integer
The id that was sent in the request
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Deribit API Documentation","colors":{"primary":"#0052FF","light":"#FFFFFF","dark":"#0A0B0D"},"logo":{"light":"https://mintcdn.com/deribit/jU8dKQ0mWmFd1NVE/images/deribit_cb_logo_main_black_rgb.svg?fit=max\u0026auto=format\u0026n=jU8dKQ0mWmFd1NVE\u0026q=85\u0026s=f6995f51656093856017582bb557e0ff","dark":"https://mintcdn.com/deribit/jU8dKQ0mWmFd1NVE/images/deribit_cb_logo_main_white_rgb.svg?fit=max\u0026auto=format\u0026n=jU8dKQ0mWmFd1NVE\u0026q=85\u0026s=54d8347f0cac32c775a460a4d7e569f4"},"favicon":{"light":"https://mintcdn.com/deribit/WDohEFxcHZWhzVUu/images/deribit_cb_emblem_blue_rgb@2x.png?fit=max\u0026auto=format\u0026n=WDohEFxcHZWhzVUu\u0026q=85\u0026s=0a53f4ec20c46d3d11d95a63fb1758aa","dark":"https://mintcdn.com/deribit/WDohEFxcHZWhzVUu/images/deribit_cb_emblem_blue_rgb@2x.png?fit=max\u0026auto=format\u0026n=WDohEFxcHZWhzVUu\u0026q=85\u0026s=0a53f4ec20c46d3d11d95a63fb1758aa"},"api":{"params":{"expanded":"all"},"playground":{"display":"none"},"examples":{"autogenerate":false}},"footer":{"socials":{"x":"https://x.com/DeribitOfficial","linkedin":"https://www.linkedin.com/company/deribit"}},"seo":{"metatags":{"canonical":"https://docs.deribit.com/","description":"Complete API documentation for Deribit cryptocurrency derivatives exchange. Learn how to integrate with our JSON-RPC, WebSocket, and FIX APIs for trading futures, perpetuals, and options.","keywords":"Deribit API, cryptocurrency API, derivatives API, trading API, WebSocket API, FIX API, Bitcoin futures, options trading, API documentation","author":"Deribit","robots":"index, follow","og:type":"website","og:site_name":"Deribit API Documentation","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@DeribitOfficial","application-name":"Deribit API Documentation","theme-color":"#0052FF","color-scheme":"light dark"}},"integrations":{"ga4":{"measurementId":"G-3TPTYKFQQ7"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deribit","hasAudioNarration":false,"actualSubdomain":"deribit","customDomains":["docs.deribit.com"],"gitSource":{"type":"github","owner":"deribit","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"contextualFeedback":{"allowEmail":true},"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0072fede75caffbb0284e0","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":606},{"language":"default","tag":"JSON-RPC API","count":376},{"language":"default","tag":"Methods","count":373},{"language":"default","tag":"Market Data","count":103},{"language":"default","tag":"Subscription Channels","count":87},{"language":"default","tag":"Websockets","count":86},{"language":"default","tag":"Account Management","count":82},{"language":"default","tag":"FIX API","count":78},{"language":"default","tag":"Trading","count":74},{"language":"default","tag":"Wallet","count":50}],"searchSettings":{"maxResults":10}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"dev@deribit.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"public/style.css","content":".method-pill,.method-nav-pill{display:none!important}.tryit-button{display:none!important}.api-section-heading-subtitle{display:none!important}.api-section[data-section=\"body\"]{display:none!important}li[data-title] button.group>div{font-weight:700!important}body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table th:nth-child(1),body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table td:nth-child(1){width:6%!important;min-width:50px}body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table th:nth-child(2),body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table td:nth-child(2){width:12%!important;min-width:90px}body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table th:nth-child(3),body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table td:nth-child(3){width:8%!important;min-width:70px}body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table th:nth-child(4),body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table td:nth-child(4){width:8%!important;min-width:70px}body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table th:nth-child(5),body:has(a[aria-current=\"page\"][href*=\"/fix-api/\"]) table td:nth-child(5){width:66%!important;min-width:350px}.rate-limit-methods{margin-top:0.75rem}.rate-limit-method-labels,.rate-limit-method-values{display:grid;grid-template-columns:minmax(4.5rem, 0.7fr) minmax(5rem, 0.9fr) minmax(8rem, 1.4fr) minmax(6rem, 1fr);column-gap:1rem;align-items:baseline}.rate-limit-method-labels{padding-bottom:0.35rem;border-bottom:1px solid color-mix(in srgb, currentColor 16%, transparent);font-size:0.8125rem;font-weight:600}.rate-limit-method{padding:0.7rem 0;border-bottom:1px solid color-mix(in srgb, currentColor 12%, transparent)}.rate-limit-method:last-child{border-bottom:none;padding-bottom:0.15rem}.rate-limit-method-name{margin-bottom:0.3rem}.rate-limit-method-name code{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}.rate-limit-metric-label{display:none}.rate-limit-tiers table{table-layout:fixed;width:100%}.rate-limit-tiers th,.rate-limit-tiers td{min-width:0!important;width:auto!important}.rate-limit-tiers th:nth-child(1),.rate-limit-tiers td:nth-child(1){width:11%!important}.rate-limit-tiers th:nth-child(2),.rate-limit-tiers td:nth-child(2){width:18%!important}.rate-limit-tiers th:nth-child(3),.rate-limit-tiers td:nth-child(3){width:18%!important}.rate-limit-tiers th:nth-child(4),.rate-limit-tiers td:nth-child(4){width:16%!important}.rate-limit-tiers th:nth-child(5),.rate-limit-tiers td:nth-child(5){width:37%!important}@media (max-width: 640px){.rate-limit-method-labels{display:none}.rate-limit-method-values{grid-template-columns:1fr 1fr;row-gap:0.45rem}.rate-limit-metric-label{display:block;font-size:0.75rem;font-weight:600;opacity:0.7}}"}]}
{"page":{"pagePath":"api-reference/upcoming/trading/private-close_position","slug":"/api-reference/upcoming/trading/private-close_position","pageMetadata":{"title":"private/close_position","description":"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.\n\nYou can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position)\n\n","deprecated":null,"version":null,"og:title":"private/close_position","keywords":["private/close_position","instrument_name","type","price"],"openapi":"/specifications/deribit_upcoming_openapi.json get /private/close_position","href":"/api-reference/upcoming/trading/private-close_position","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Scope:\"\n }), \" \", _jsx(_components.code, {\n children: \"trade:read_write\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.a, {\n href: \"https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position\",\n children: \"Try in API console\"\n })\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"private/close_position","description":"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.\n\nYou can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position)\n\n","deprecated":null,"version":null,"og:title":"private/close_position","keywords":["private/close_position","instrument_name","type","price"],"openapi":"/specifications/deribit_upcoming_openapi.json get /private/close_position","href":"/api-reference/upcoming/trading/private-close_position","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/deribit/a355478acb7a8697/public/replace-query-params.js"],"openApiReferenceData":{"operation":{"tags":["Trading","Matching Engine","Private"],"parameters":["a0106ae2-eb8a-4894-b2c8-32243b1e3825","371ce0af-d5ed-42b4-a8e4-2be4ddb2425f","4330d104-fa34-428a-b2dd-91c7cae3010e"],"responses":{"200":"5ec34912-8859-480e-bf78-efa0b346bd4a"},"requestBody":"6c76d1cb-3e77-4906-b483-36dd42ccaf2a","description":"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.\n\nYou can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position)\n\n","x-mint":{"metadata":{"title":"private/close_position","og:title":"private/close_position","keywords":["private/close_position","instrument_name","type","price"]},"href":"/api-reference/upcoming/trading/private-close_position"},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl --request POST \\\n --url https://test.deribit.com/api/v2/private/close_position \\\n --header 'Authorization: Bearer \u003cACCESS_TOKEN>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"jsonrpc\": \"2.0\",\n \"id\": 6130,\n \"method\": \"private/close_position\",\n \"params\": {\n \"instrument_name\": \"ETH-PERPETUAL\",\n \"type\": \"limit\",\n \"price\": 145.17\n }\n}'"}],"method":"get","type":"path","servers":["664f4fbb-b57f-4e03-8c19-f187cd931be6"],"security":[],"path":"/private/close_position","baseUrlOptions":["https://test.deribit.com/api/v2"],"title":"","codeSamples":[{"label":"cURL","lang":"bash","source":"curl --request POST \\\n --url https://test.deribit.com/api/v2/private/close_position \\\n --header 'Authorization: Bearer \u003cACCESS_TOKEN>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"jsonrpc\": \"2.0\",\n \"id\": 6130,\n \"method\": \"private/close_position\",\n \"params\": {\n \"instrument_name\": \"ETH-PERPETUAL\",\n \"type\": \"limit\",\n \"price\": 145.17\n }\n}'"}],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"a0106ae2-eb8a-4894-b2c8-32243b1e3825":{"name":"instrument_name","required":true,"in":"query","schema":{"example":"BTC-PERPETUAL","type":"string","description":"Instrument name\nUnique instrument identifier","isRequired":true,"uniqueKey":"","typeLabel":"string"},"description":"Instrument name"},"371ce0af-d5ed-42b4-a8e4-2be4ddb2425f":{"name":"type","in":"query","schema":{"type":"string","enum":["limit","market"],"isRequired":true,"description":"The order type","uniqueKey":"","typeLabel":"enum\u003cstring>"},"required":true,"description":"The order type"},"4330d104-fa34-428a-b2dd-91c7cae3010e":{"name":"price","in":"query","schema":{"type":"number","isRequired":false,"description":"Optional price for limit order.","uniqueKey":"","typeLabel":"number"},"required":false,"description":"Optional price for limit order."}},"requestBody":{"content":{"application/json":{"examples":{"request":{"title":"request","summary":"JSON-RPC Request Example","value":{"jsonrpc":"2.0","id":6130,"method":"private/close_position","params":{"instrument_name":"ETH-PERPETUAL","type":"limit","price":145.17}}}},"exampleType":"examples"}},"description":"JSON-RPC request body","exampleType":"examples"},"responses":{"5ec34912-8859-480e-bf78-efa0b346bd4a":{"content":{"application/json":{"schema":{"properties":{"jsonrpc":{"type":"string","enum":["2.0"],"description":"The JSON-RPC version (2.0)","isRequired":true,"uniqueKey":"jsonrpc","typeLabel":"enum\u003cstring>"},"result":{"type":"object","properties":{"trades":{"type":"array","items":{"properties":{"trade_id":{"type":"string","description":"Unique (per currency) trade identifier","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].trade_id","typeLabel":"string"},"trade_seq":{"type":"integer","description":"The sequence number of the trade within instrument","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].trade_seq","typeLabel":"integer"},"instrument_name":{"example":"BTC-PERPETUAL","type":"string","description":"Unique instrument identifier","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].instrument_name","typeLabel":"string"},"timestamp":{"example":1517329113791,"type":"integer","description":"The timestamp of the trade (milliseconds since the UNIX epoch)","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].timestamp","typeLabel":"integer"},"order_id":{"oneOf":[{"type":"string","description":"Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].order_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].order_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"result.trades.items.[INDEX].order_id","typeLabel":"string | null"},"matching_id":{"oneOf":[{"type":"string","description":"Matched order id for self-trades; null otherwise.","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].matching_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Matched order id for self-trades; null otherwise.","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].matching_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"result.trades.items.[INDEX].matching_id","typeLabel":"string | null"},"direction":{"enum":["buy","sell"],"type":"string","description":"Trade direction of the user","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].direction","typeLabel":"enum\u003cstring>"},"tick_direction":{"enum":[0,1,2,3],"type":"integer","description":"Direction of the \"tick\" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick).","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].tick_direction","typeLabel":"enum\u003cinteger>"},"index_price":{"type":"number","description":"Index Price at the moment of trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].index_price","typeLabel":"number"},"price":{"type":"number","description":"The price of the trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].price","typeLabel":"number"},"amount":{"type":"number","description":"Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].amount","typeLabel":"number"},"fee":{"type":"number","description":"User's fee in units of the specified `fee_currency`","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].fee","typeLabel":"number"},"fee_currency":{"enum":["BTC","ETH","USDC","USDT","EURR"],"type":"string","description":"Currency, i.e `\"BTC\"`, `\"ETH\"`, `\"USDC\"`","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].fee_currency","typeLabel":"enum\u003cstring>"},"state":{"enum":["open","filled","rejected","cancelled","untriggered","archive"],"type":"string","description":"Order state: `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"` or `\"archive\"` (if order was archived)","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].state","typeLabel":"enum\u003cstring>"},"mark_price":{"oneOf":[{"type":"number","description":"Mark Price at the moment of trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].mark_price.oneOf.0","typeLabel":"number"},{"type":"null","description":"Mark Price at the moment of trade","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].mark_price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"result.trades.items.[INDEX].mark_price","typeLabel":"number | null"},"starbase_timestamp":{"example":1536569522277000000,"type":"integer","description":"Optional field: the Starbase causal timestamp of the trade, in nanoseconds since the UNIX epoch (present only for trades matched in Starbase)","uniqueKey":"result.trades.items.[INDEX].starbase_timestamp","typeLabel":"integer"},"starbase_order_id":{"type":"integer","example":103148386170,"description":"Raw Starbase order id of the user's order, in Starbase's own (non currency-prefixed) id namespace (present only for trades matched in Starbase)","uniqueKey":"result.trades.items.[INDEX].starbase_order_id","typeLabel":"integer"},"starbase_client_order_id":{"type":"string","description":"Client order id of the user's own order (maker or taker side) submitted directly to [Starbase](https://docs.deribit.com/starbase/overview) via direct access; not returned for orders placed through the Deribit API; for self-trades this is the taker order's client order id","uniqueKey":"result.trades.items.[INDEX].starbase_client_order_id","typeLabel":"string"},"order_type":{"type":"string","enum":["limit","market","liquidation"],"description":"Order type: `\"limit\"`, `\"market\"`, or `\"liquidation\"`","uniqueKey":"result.trades.items.[INDEX].order_type","typeLabel":"enum\u003cstring>"},"original_order_type":{"enum":["market","market_limit"],"type":"string","description":"Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use `\"limit\"` as `order_type` with `\"market\"` in this optional field.","uniqueKey":"result.trades.items.[INDEX].original_order_type","typeLabel":"enum\u003cstring>"},"advanced":{"type":"string","enum":["usd","implv"],"description":"Advanced type of user order: `\"usd\"` or `\"implv\"` (only for options; omitted if not applicable)","uniqueKey":"result.trades.items.[INDEX].advanced","typeLabel":"enum\u003cstring>"},"contracts":{"type":"number","description":"Trade size in contract units (optional, may be absent in historical trades)","uniqueKey":"result.trades.items.[INDEX].contracts","typeLabel":"number"},"iv":{"type":"number","description":"Option implied volatility for the price (Option only)","uniqueKey":"result.trades.items.[INDEX].iv","typeLabel":"number"},"underlying_price":{"type":"number","description":"Underlying price for implied volatility calculations (Options only)","uniqueKey":"result.trades.items.[INDEX].underlying_price","typeLabel":"number"},"liquidation":{"type":"string","enum":["M","T","MT"],"description":"Optional field (only for trades caused by liquidation): `\"M\"` when maker side of trade was under liquidation, `\"T\"` when taker side was under liquidation, `\"MT\"` when both sides of trade were under liquidation","uniqueKey":"result.trades.items.[INDEX].liquidation","typeLabel":"enum\u003cstring>"},"liquidity":{"type":"string","enum":["M","T"],"description":"Describes what was role of users order: `\"M\"` when it was maker order, `\"T\"` when it was taker order","uniqueKey":"result.trades.items.[INDEX].liquidity","typeLabel":"enum\u003cstring>"},"label":{"type":"string","description":"User defined label (presented only when previously set for order by user)","uniqueKey":"result.trades.items.[INDEX].label","typeLabel":"string"},"block_trade_id":{"example":"154","type":"string","description":"ID of the Block Trade or Block RFQ trade, when the trade was part of one","uniqueKey":"result.trades.items.[INDEX].block_trade_id","typeLabel":"string"},"block_trade_leg_count":{"example":3,"type":"integer","description":"Number of legs in the Block Trade or Block RFQ trade, when the trade was part of one","uniqueKey":"result.trades.items.[INDEX].block_trade_leg_count","typeLabel":"integer"},"block_delayed":{"example":1730827181502,"type":"integer","description":"Optional field (only for Block RFQ trades with delayed publication): the time the trade is published to public data feeds, in milliseconds since the UNIX epoch. Until then, the trade is returned only to its counterparties and is not included in public trades or the Block RFQ trade tape. The trade never updates the ticker `last_price` or tick direction, or the 24-hour `high`, `low` and `price_change`; its volume is reported in `volume_delayed`.","uniqueKey":"result.trades.items.[INDEX].block_delayed","typeLabel":"integer"},"block_rfq_id":{"type":"integer","description":"ID of the Block RFQ - when trade was part of the Block RFQ","uniqueKey":"result.trades.items.[INDEX].block_rfq_id","typeLabel":"integer"},"block_rfq_quote_id":{"type":"integer","description":"ID of the Block RFQ quote - when trade was part of the Block RFQ","uniqueKey":"result.trades.items.[INDEX].block_rfq_quote_id","typeLabel":"integer"},"reduce_only":{"type":"boolean","description":"`true` if user order is reduce-only; omitted for spot trades.","uniqueKey":"result.trades.items.[INDEX].reduce_only","typeLabel":"boolean"},"post_only":{"type":"boolean","description":"`true` if user order is post-only","uniqueKey":"result.trades.items.[INDEX].post_only","typeLabel":"boolean"},"mmp":{"type":"boolean","description":"`true` if user order is MMP","uniqueKey":"result.trades.items.[INDEX].mmp","typeLabel":"boolean"},"risk_reducing":{"type":"boolean","description":"`true` if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)","uniqueKey":"result.trades.items.[INDEX].risk_reducing","typeLabel":"boolean"},"api":{"type":"boolean","description":"`true` if user order was created with API","uniqueKey":"result.trades.items.[INDEX].api","typeLabel":"boolean"},"profit_loss":{"type":"number","description":"Profit and loss in base currency.","uniqueKey":"result.trades.items.[INDEX].profit_loss","typeLabel":"number"},"legs":{"type":"array","description":"Optional field containing leg trades if trade is a combo trade (present when querying for **only** combo trades and in `combo_trades` events). Each leg trade has the same fields as a top-level user trade, including `starbase_match_id`, `starbase_order_id`, and `starbase_timestamp` when matched in Starbase, and `starbase_client_order_id` for orders submitted via [Starbase](https://docs.deribit.com/starbase/overview) direct access.","uniqueKey":"result.trades.items.[INDEX].legs","typeLabel":"array"},"combo_id":{"type":"string","description":"Optional field containing combo instrument name if the trade is a combo trade","uniqueKey":"result.trades.items.[INDEX].combo_id","typeLabel":"string"},"combo_trade_id":{"type":"string","description":"Optional field containing combo trade identifier if the trade is a combo trade","uniqueKey":"result.trades.items.[INDEX].combo_trade_id","typeLabel":"string"},"starbase_match_id":{"type":"integer","description":"Optional field containing the Starbase match identifier (present only for trades matched via Starbase)","uniqueKey":"result.trades.items.[INDEX].starbase_match_id","typeLabel":"integer"},"quote_set_id":{"type":"string","description":"QuoteSet of the user order (optional, present only for orders placed with `private/mass_quote`)","uniqueKey":"result.trades.items.[INDEX].quote_set_id","typeLabel":"string"},"quote_id":{"type":"string","description":"QuoteID of the user order (optional, present only for orders placed with `private/mass_quote`)","uniqueKey":"result.trades.items.[INDEX].quote_id","typeLabel":"string"},"trade_allocations":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","description":"Amount allocated to this user.","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].amount","typeLabel":"number"},"fee":{"type":"number","description":"Fee for the allocated part of the trade.","isRequired":true,"uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].fee","typeLabel":"number"},"user_id":{"type":"integer","description":"User ID to which part of the trade is allocated. For brokers the User ID is obstructed.","uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].user_id","typeLabel":"integer"},"client_info":{"type":"object","properties":{"client_id":{"type":"integer","description":"ID of a client; available to broker. Represents a group of users under a common name.","uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].client_info.client_id","typeLabel":"integer"},"client_link_id":{"type":"integer","description":"ID assigned to a single user in a client; available to broker.","uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].client_info.client_link_id","typeLabel":"integer"},"name":{"type":"string","description":"Name of the linked user within the client; available to broker.","uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].client_info.name","typeLabel":"string"}},"description":"Optional client allocation info for brokers.","uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX].client_info","typeLabel":"object"}},"required":["amount","fee"],"uniqueKey":"result.trades.items.[INDEX].trade_allocations.items.[INDEX]","typeLabel":"object"},"description":"List of allocations for Block RFQ pre-allocation. Each allocation specifies `user_id`, `amount`, and `fee` for the allocated part of the trade. For broker client allocations, a `client_info` object will be included.","uniqueKey":"result.trades.items.[INDEX].trade_allocations","typeLabel":"object[]"}},"required":["trade_id","trade_seq","instrument_name","timestamp","order_id","matching_id","direction","tick_direction","index_price","price","amount","fee","fee_currency","state","mark_price"],"type":"object","uniqueKey":"result.trades.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"result.trades","typeLabel":"object[]"},"order":{"properties":{"order_id":{"example":"ETH-100234","type":"string","description":"Unique order identifier","isRequired":true,"uniqueKey":"result.order.order_id","typeLabel":"string"},"order_state":{"enum":["open","filled","rejected","cancelled","untriggered","triggered"],"type":"string","description":"Order state: `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"`","isRequired":true,"uniqueKey":"result.order.order_state","typeLabel":"enum\u003cstring>"},"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\"`","isRequired":true,"uniqueKey":"result.order.order_type","typeLabel":"enum\u003cstring>"},"time_in_force":{"enum":["good_til_cancelled","good_til_day","fill_or_kill","immediate_or_cancel"],"type":"string","description":"Order time in force: `\"good_til_cancelled\"`, `\"good_til_day\"`, `\"fill_or_kill\"` or `\"immediate_or_cancel\"`","isRequired":true,"uniqueKey":"result.order.time_in_force","typeLabel":"enum\u003cstring>"},"instrument_name":{"example":"BTC-PERPETUAL","type":"string","description":"Unique instrument identifier","isRequired":true,"uniqueKey":"result.order.instrument_name","typeLabel":"string"},"creation_timestamp":{"example":1536569522277,"type":"integer","description":"The timestamp (milliseconds since the Unix epoch)","isRequired":true,"uniqueKey":"result.order.creation_timestamp","typeLabel":"integer"},"last_update_timestamp":{"example":1536569522277,"type":"integer","description":"The timestamp (milliseconds since the Unix epoch)","isRequired":true,"uniqueKey":"result.order.last_update_timestamp","typeLabel":"integer"},"direction":{"enum":["buy","sell"],"type":"string","description":"Direction: `buy`, or `sell`","isRequired":true,"uniqueKey":"result.order.direction","typeLabel":"enum\u003cstring>"},"price":{"oneOf":[{"type":"number","description":"Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.","isRequired":true,"uniqueKey":"result.order.price.oneOf.0","typeLabel":"number"},{"type":"string","description":"Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.","enum":["market_price"],"isRequired":true,"uniqueKey":"result.order.price.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"result.order.price","typeLabel":"number | enum\u003cstring>"},"label":{"type":"string","description":"User defined label (up to 64 characters)","isRequired":true,"uniqueKey":"result.order.label","typeLabel":"string"},"post_only":{"type":"boolean","description":"`true` for post-only orders only","isRequired":true,"uniqueKey":"result.order.post_only","typeLabel":"boolean"},"api":{"type":"boolean","description":"`true` if created with API","isRequired":true,"uniqueKey":"result.order.api","typeLabel":"boolean"},"original_order_type":{"enum":["market","market_limit"],"type":"string","description":"Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use `\"limit\"` as `order_type` with `\"market\"` in this optional field.","uniqueKey":"result.order.original_order_type","typeLabel":"enum\u003cstring>"},"is_rebalance":{"type":"boolean","description":"Optional (only for spot). `true` if order was automatically created during cross-collateral balance restoration","uniqueKey":"result.order.is_rebalance","typeLabel":"boolean"},"is_liquidation":{"type":"boolean","description":"Optional (not added for spot). `true` if order was automatically created during liquidation","uniqueKey":"result.order.is_liquidation","typeLabel":"boolean"},"starbase_last_update_timestamp":{"example":1536569522277000000,"type":"integer","description":"The Starbase causal timestamp (nanoseconds since the Unix epoch) of the last book update that affected this order. Present only for orders placed in Starbase, including combo leg order updates; not always available for direct access orders","uniqueKey":"result.order.starbase_last_update_timestamp","typeLabel":"integer"},"starbase_client_order_id":{"type":"string","description":"Client order id of an order submitted directly to [Starbase](https://docs.deribit.com/starbase/overview) via direct access; not returned for orders placed through the Deribit API (combo legs inherit the parent combo order's client order id)","uniqueKey":"result.order.starbase_client_order_id","typeLabel":"string"},"reject_post_only":{"type":"boolean","description":"`true` if order has `reject_post_only` flag (field is present only when `post_only` is `true`)","uniqueKey":"result.order.reject_post_only","typeLabel":"boolean"},"reduce_only":{"type":"boolean","description":"Optional (not added for spot). '`true` for reduce-only orders only'","uniqueKey":"result.order.reduce_only","typeLabel":"boolean"},"web":{"type":"boolean","description":"`true` if created via Deribit frontend (optional)","uniqueKey":"result.order.web","typeLabel":"boolean"},"mobile":{"type":"boolean","description":"Optional field with value `true` added only when created with Mobile Application","uniqueKey":"result.order.mobile","typeLabel":"boolean"},"refresh_amount":{"type":"number","description":"The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders","uniqueKey":"result.order.refresh_amount","typeLabel":"number"},"display_amount":{"type":"number","description":"The actual display amount of iceberg order. Absent for other types of orders.","uniqueKey":"result.order.display_amount","typeLabel":"number"},"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.","uniqueKey":"result.order.amount","typeLabel":"number"},"contracts":{"type":"number","description":"It represents the order size in contract units. (Optional, may be absent in historical data).","uniqueKey":"result.order.contracts","typeLabel":"number"},"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.","uniqueKey":"result.order.filled_amount","typeLabel":"number"},"average_price":{"type":"number","description":"Average fill price of the order","uniqueKey":"result.order.average_price","typeLabel":"number"},"advanced":{"enum":["usd","implv"],"type":"string","description":"advanced type: `\"usd\"` or `\"implv\"` (Only for options; field is omitted if not applicable).\n","uniqueKey":"result.order.advanced","typeLabel":"enum\u003cstring>"},"implv":{"type":"number","description":"Implied volatility in percent. (Only if `advanced=\"implv\"`)","uniqueKey":"result.order.implv","typeLabel":"number"},"usd":{"type":"number","description":"Option price in USD (Only if `advanced=\"usd\"`)","uniqueKey":"result.order.usd","typeLabel":"number"},"triggered":{"type":"boolean","description":"Whether the trigger order has been triggered","uniqueKey":"result.order.triggered","typeLabel":"boolean"},"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\"`.","uniqueKey":"result.order.trigger","typeLabel":"enum\u003cstring>"},"trigger_price":{"type":"number","description":"Trigger price (Only for future trigger orders)","uniqueKey":"result.order.trigger_price","typeLabel":"number"},"trigger_offset":{"type":"number","description":"The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)","uniqueKey":"result.order.trigger_offset","typeLabel":"number"},"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)","uniqueKey":"result.order.trigger_reference_price","typeLabel":"number"},"block_trade":{"example":true,"type":"boolean","description":"`true` if order made from block_trade trade, added only in that case.","uniqueKey":"result.order.block_trade","typeLabel":"boolean"},"mmp":{"type":"boolean","description":"`true` if the order is a MMP order, otherwise `false`.","uniqueKey":"result.order.mmp","typeLabel":"boolean"},"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`.","uniqueKey":"result.order.risk_reducing","typeLabel":"boolean"},"replaced":{"type":"boolean","description":"`true` if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise `false`.","uniqueKey":"result.order.replaced","typeLabel":"boolean"},"auto_replaced":{"type":"boolean","description":"Options, advanced orders only - `true` if last modification of the order was performed by the pricing engine, otherwise `false`.","uniqueKey":"result.order.auto_replaced","typeLabel":"boolean"},"quote":{"type":"boolean","description":"If order is a quote. Present only if true.","uniqueKey":"result.order.quote","typeLabel":"boolean"},"mmp_group":{"type":"string","description":"Name of the MMP group supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.order.mmp_group","typeLabel":"string"},"quote_set_id":{"type":"string","description":"Identifier of the QuoteSet supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.order.quote_set_id","typeLabel":"string"},"quote_id":{"type":"string","description":"The same QuoteID as supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.order.quote_id","typeLabel":"string"},"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).","uniqueKey":"result.order.trigger_order_id","typeLabel":"string"},"combo_order_id":{"type":"string","example":"103148386169","description":"Id of the combo order that created this order (only present for orders that were created as legs of a combo order).","uniqueKey":"result.order.combo_order_id","typeLabel":"string"},"starbase_order_id":{"type":"integer","example":103148386170,"description":"Raw Starbase order id, in Starbase's own (non currency-prefixed) id namespace. Only present for orders placed in Starbase. Combo leg orders expose the parent combo order's Starbase order id.","uniqueKey":"result.order.starbase_order_id","typeLabel":"integer"},"app_name":{"type":"string","example":"Example Application","description":"The name of the application that placed the order on behalf of the user (optional).","uniqueKey":"result.order.app_name","typeLabel":"string"},"mmp_cancelled":{"type":"boolean","example":true,"description":"`true` if order was cancelled by mmp trigger (optional)","uniqueKey":"result.order.mmp_cancelled","typeLabel":"boolean"},"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 event, e.g. good-til-day orders are cancelled when an instrument enters the daily settlement). Note: orders cancelled because an instrument expired (delivery) currently do not include a `cancel_reason` field.","uniqueKey":"result.order.cancel_reason","typeLabel":"enum\u003cstring>"},"oto_order_ids":{"type":"array","items":{"example":"ETH-100234","type":"string","description":"Order Id","uniqueKey":"result.order.oto_order_ids.items.[INDEX]","typeLabel":"string"},"description":"The Ids of the orders that will be triggered if the order is filled","uniqueKey":"result.order.oto_order_ids","typeLabel":"string[]"},"trigger_fill_condition":{"enum":["first_hit","complete_fill","incremental"],"type":"string","description":"\u003cp>The fill condition of the linked order (Only for linked order types), default: `first_hit`.\u003c/p> \u003cul> \u003cli>`\"first_hit\"` - any execution of the primary order will fully cancel/place all secondary orders.\u003c/li> \u003cli>`\"complete_fill\"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.\u003c/li> \u003cli>`\"incremental\"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.\u003c/li> \u003c/ul>","uniqueKey":"result.order.trigger_fill_condition","typeLabel":"enum\u003cstring>"},"oco_ref":{"type":"string","description":"Unique reference that identifies a one_cancels_others (OCO) pair.","uniqueKey":"result.order.oco_ref","typeLabel":"string"},"primary_order_id":{"example":"ETH-100234","type":"string","description":"ID of the order that triggered this order.","uniqueKey":"result.order.primary_order_id","typeLabel":"string"},"is_secondary_oto":{"type":"boolean","description":"`true` if the order is an order that can be triggered by another order, otherwise not present.","uniqueKey":"result.order.is_secondary_oto","typeLabel":"boolean"},"is_primary_otoco":{"type":"boolean","description":"`true` if the order is an order that can trigger an OCO pair, otherwise not present.","uniqueKey":"result.order.is_primary_otoco","typeLabel":"boolean"}},"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","uniqueKey":"result.order","typeLabel":"object"},"oco_orders":{"type":"array","items":{"properties":{"order_id":{"example":"ETH-100234","type":"string","description":"Unique order identifier","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].order_id","typeLabel":"string"},"order_state":{"enum":["open","filled","rejected","cancelled","untriggered","triggered"],"type":"string","description":"Order state: `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"`","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].order_state","typeLabel":"enum\u003cstring>"},"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\"`","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].order_type","typeLabel":"enum\u003cstring>"},"time_in_force":{"enum":["good_til_cancelled","good_til_day","fill_or_kill","immediate_or_cancel"],"type":"string","description":"Order time in force: `\"good_til_cancelled\"`, `\"good_til_day\"`, `\"fill_or_kill\"` or `\"immediate_or_cancel\"`","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].time_in_force","typeLabel":"enum\u003cstring>"},"instrument_name":{"example":"BTC-PERPETUAL","type":"string","description":"Unique instrument identifier","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].instrument_name","typeLabel":"string"},"creation_timestamp":{"example":1536569522277,"type":"integer","description":"The timestamp (milliseconds since the Unix epoch)","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].creation_timestamp","typeLabel":"integer"},"last_update_timestamp":{"example":1536569522277,"type":"integer","description":"The timestamp (milliseconds since the Unix epoch)","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].last_update_timestamp","typeLabel":"integer"},"direction":{"enum":["buy","sell"],"type":"string","description":"Direction: `buy`, or `sell`","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].direction","typeLabel":"enum\u003cstring>"},"price":{"oneOf":[{"type":"number","description":"Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].price.oneOf.0","typeLabel":"number"},{"type":"string","description":"Price in the instrument's price units (quote currency for futures and spot), or market_price for open trigger market orders.","enum":["market_price"],"isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].price.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].price","typeLabel":"number | enum\u003cstring>"},"label":{"type":"string","description":"User defined label (up to 64 characters)","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].label","typeLabel":"string"},"post_only":{"type":"boolean","description":"`true` for post-only orders only","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].post_only","typeLabel":"boolean"},"api":{"type":"boolean","description":"`true` if created with API","isRequired":true,"uniqueKey":"result.oco_orders.items.[INDEX].api","typeLabel":"boolean"},"original_order_type":{"enum":["market","market_limit"],"type":"string","description":"Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use `\"limit\"` as `order_type` with `\"market\"` in this optional field.","uniqueKey":"result.oco_orders.items.[INDEX].original_order_type","typeLabel":"enum\u003cstring>"},"is_rebalance":{"type":"boolean","description":"Optional (only for spot). `true` if order was automatically created during cross-collateral balance restoration","uniqueKey":"result.oco_orders.items.[INDEX].is_rebalance","typeLabel":"boolean"},"is_liquidation":{"type":"boolean","description":"Optional (not added for spot). `true` if order was automatically created during liquidation","uniqueKey":"result.oco_orders.items.[INDEX].is_liquidation","typeLabel":"boolean"},"starbase_last_update_timestamp":{"example":1536569522277000000,"type":"integer","description":"The Starbase causal timestamp (nanoseconds since the Unix epoch) of the last book update that affected this order. Present only for orders placed in Starbase, including combo leg order updates; not always available for direct access orders","uniqueKey":"result.oco_orders.items.[INDEX].starbase_last_update_timestamp","typeLabel":"integer"},"starbase_client_order_id":{"type":"string","description":"Client order id of an order submitted directly to [Starbase](https://docs.deribit.com/starbase/overview) via direct access; not returned for orders placed through the Deribit API (combo legs inherit the parent combo order's client order id)","uniqueKey":"result.oco_orders.items.[INDEX].starbase_client_order_id","typeLabel":"string"},"reject_post_only":{"type":"boolean","description":"`true` if order has `reject_post_only` flag (field is present only when `post_only` is `true`)","uniqueKey":"result.oco_orders.items.[INDEX].reject_post_only","typeLabel":"boolean"},"reduce_only":{"type":"boolean","description":"Optional (not added for spot). '`true` for reduce-only orders only'","uniqueKey":"result.oco_orders.items.[INDEX].reduce_only","typeLabel":"boolean"},"web":{"type":"boolean","description":"`true` if created via Deribit frontend (optional)","uniqueKey":"result.oco_orders.items.[INDEX].web","typeLabel":"boolean"},"mobile":{"type":"boolean","description":"Optional field with value `true` added only when created with Mobile Application","uniqueKey":"result.oco_orders.items.[INDEX].mobile","typeLabel":"boolean"},"refresh_amount":{"type":"number","description":"The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders","uniqueKey":"result.oco_orders.items.[INDEX].refresh_amount","typeLabel":"number"},"display_amount":{"type":"number","description":"The actual display amount of iceberg order. Absent for other types of orders.","uniqueKey":"result.oco_orders.items.[INDEX].display_amount","typeLabel":"number"},"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.","uniqueKey":"result.oco_orders.items.[INDEX].amount","typeLabel":"number"},"contracts":{"type":"number","description":"It represents the order size in contract units. (Optional, may be absent in historical data).","uniqueKey":"result.oco_orders.items.[INDEX].contracts","typeLabel":"number"},"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.","uniqueKey":"result.oco_orders.items.[INDEX].filled_amount","typeLabel":"number"},"average_price":{"type":"number","description":"Average fill price of the order","uniqueKey":"result.oco_orders.items.[INDEX].average_price","typeLabel":"number"},"advanced":{"enum":["usd","implv"],"type":"string","description":"advanced type: `\"usd\"` or `\"implv\"` (Only for options; field is omitted if not applicable).\n","uniqueKey":"result.oco_orders.items.[INDEX].advanced","typeLabel":"enum\u003cstring>"},"implv":{"type":"number","description":"Implied volatility in percent. (Only if `advanced=\"implv\"`)","uniqueKey":"result.oco_orders.items.[INDEX].implv","typeLabel":"number"},"usd":{"type":"number","description":"Option price in USD (Only if `advanced=\"usd\"`)","uniqueKey":"result.oco_orders.items.[INDEX].usd","typeLabel":"number"},"triggered":{"type":"boolean","description":"Whether the trigger order has been triggered","uniqueKey":"result.oco_orders.items.[INDEX].triggered","typeLabel":"boolean"},"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\"`.","uniqueKey":"result.oco_orders.items.[INDEX].trigger","typeLabel":"enum\u003cstring>"},"trigger_price":{"type":"number","description":"Trigger price (Only for future trigger orders)","uniqueKey":"result.oco_orders.items.[INDEX].trigger_price","typeLabel":"number"},"trigger_offset":{"type":"number","description":"The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)","uniqueKey":"result.oco_orders.items.[INDEX].trigger_offset","typeLabel":"number"},"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)","uniqueKey":"result.oco_orders.items.[INDEX].trigger_reference_price","typeLabel":"number"},"block_trade":{"example":true,"type":"boolean","description":"`true` if order made from block_trade trade, added only in that case.","uniqueKey":"result.oco_orders.items.[INDEX].block_trade","typeLabel":"boolean"},"mmp":{"type":"boolean","description":"`true` if the order is a MMP order, otherwise `false`.","uniqueKey":"result.oco_orders.items.[INDEX].mmp","typeLabel":"boolean"},"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`.","uniqueKey":"result.oco_orders.items.[INDEX].risk_reducing","typeLabel":"boolean"},"replaced":{"type":"boolean","description":"`true` if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise `false`.","uniqueKey":"result.oco_orders.items.[INDEX].replaced","typeLabel":"boolean"},"auto_replaced":{"type":"boolean","description":"Options, advanced orders only - `true` if last modification of the order was performed by the pricing engine, otherwise `false`.","uniqueKey":"result.oco_orders.items.[INDEX].auto_replaced","typeLabel":"boolean"},"quote":{"type":"boolean","description":"If order is a quote. Present only if true.","uniqueKey":"result.oco_orders.items.[INDEX].quote","typeLabel":"boolean"},"mmp_group":{"type":"string","description":"Name of the MMP group supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.oco_orders.items.[INDEX].mmp_group","typeLabel":"string"},"quote_set_id":{"type":"string","description":"Identifier of the QuoteSet supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.oco_orders.items.[INDEX].quote_set_id","typeLabel":"string"},"quote_id":{"type":"string","description":"The same QuoteID as supplied in the `private/mass_quote` request. Only present for quote orders.","uniqueKey":"result.oco_orders.items.[INDEX].quote_id","typeLabel":"string"},"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).","uniqueKey":"result.oco_orders.items.[INDEX].trigger_order_id","typeLabel":"string"},"combo_order_id":{"type":"string","example":"103148386169","description":"Id of the combo order that created this order (only present for orders that were created as legs of a combo order).","uniqueKey":"result.oco_orders.items.[INDEX].combo_order_id","typeLabel":"string"},"starbase_order_id":{"type":"integer","example":103148386170,"description":"Raw Starbase order id, in Starbase's own (non currency-prefixed) id namespace. Only present for orders placed in Starbase. Combo leg orders expose the parent combo order's Starbase order id.","uniqueKey":"result.oco_orders.items.[INDEX].starbase_order_id","typeLabel":"integer"},"app_name":{"type":"string","example":"Example Application","description":"The name of the application that placed the order on behalf of the user (optional).","uniqueKey":"result.oco_orders.items.[INDEX].app_name","typeLabel":"string"},"mmp_cancelled":{"type":"boolean","example":true,"description":"`true` if order was cancelled by mmp trigger (optional)","uniqueKey":"result.oco_orders.items.[INDEX].mmp_cancelled","typeLabel":"boolean"},"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 event, e.g. good-til-day orders are cancelled when an instrument enters the daily settlement). Note: orders cancelled because an instrument expired (delivery) currently do not include a `cancel_reason` field.","uniqueKey":"result.oco_orders.items.[INDEX].cancel_reason","typeLabel":"enum\u003cstring>"},"oto_order_ids":{"type":"array","items":{"example":"ETH-100234","type":"string","description":"Order Id","uniqueKey":"result.oco_orders.items.[INDEX].oto_order_ids.items.[INDEX]","typeLabel":"string"},"description":"The Ids of the orders that will be triggered if the order is filled","uniqueKey":"result.oco_orders.items.[INDEX].oto_order_ids","typeLabel":"string[]"},"trigger_fill_condition":{"enum":["first_hit","complete_fill","incremental"],"type":"string","description":"\u003cp>The fill condition of the linked order (Only for linked order types), default: `first_hit`.\u003c/p> \u003cul> \u003cli>`\"first_hit\"` - any execution of the primary order will fully cancel/place all secondary orders.\u003c/li> \u003cli>`\"complete_fill\"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.\u003c/li> \u003cli>`\"incremental\"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.\u003c/li> \u003c/ul>","uniqueKey":"result.oco_orders.items.[INDEX].trigger_fill_condition","typeLabel":"enum\u003cstring>"},"oco_ref":{"type":"string","description":"Unique reference that identifies a one_cancels_others (OCO) pair.","uniqueKey":"result.oco_orders.items.[INDEX].oco_ref","typeLabel":"string"},"primary_order_id":{"example":"ETH-100234","type":"string","description":"ID of the order that triggered this order.","uniqueKey":"result.oco_orders.items.[INDEX].primary_order_id","typeLabel":"string"},"is_secondary_oto":{"type":"boolean","description":"`true` if the order is an order that can be triggered by another order, otherwise not present.","uniqueKey":"result.oco_orders.items.[INDEX].is_secondary_oto","typeLabel":"boolean"},"is_primary_otoco":{"type":"boolean","description":"`true` if the order is an order that can trigger an OCO pair, otherwise not present.","uniqueKey":"result.oco_orders.items.[INDEX].is_primary_otoco","typeLabel":"boolean"}},"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","uniqueKey":"result.oco_orders.items.[INDEX]","typeLabel":"object"},"description":"The two orders placed by an OCO request; returned instead of order.","uniqueKey":"result.oco_orders","typeLabel":"object[]"}},"required":["trades"],"description":"Regular, trigger and OTO/OTOCO results contain `order` and `trades`.\nWhen a `one_cancels_other` request places two orders, the result contains\n`oco_orders` and `trades` instead. A single regular-order result still uses `order`.\n","isRequired":true,"uniqueKey":"result","typeLabel":"object"},"id":{"type":"integer","description":"The id that was sent in the request","uniqueKey":"id","typeLabel":"integer"}},"required":["result","jsonrpc"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"response":{"title":"response","summary":"Response example","value":{"jsonrpc":"2.0","id":6130,"result":{"trades":[{"trade_seq":1966068,"trade_id":"ETH-2696097","timestamp":1590486335742,"tick_direction":0,"state":"filled","reduce_only":true,"price":202.8,"post_only":false,"order_type":"limit","order_id":"ETH-584864807","matching_id":null,"mark_price":202.79,"liquidity":"T","instrument_name":"ETH-PERPETUAL","index_price":202.86,"fee_currency":"ETH","fee":0.00007766,"direction":"sell","amount":21}],"order":{"web":false,"time_in_force":"good_til_cancelled","replaced":false,"reduce_only":true,"price":198.75,"post_only":false,"order_type":"limit","order_state":"filled","order_id":"ETH-584864807","max_show":21,"last_update_timestamp":1590486335742,"label":"","is_rebalance":false,"is_liquidation":false,"instrument_name":"ETH-PERPETUAL","filled_amount":21,"direction":"sell","creation_timestamp":1590486335742,"average_price":202.8,"api":true,"amount":21}}}}},"exampleType":"examples"}},"description":"Success response","exampleType":"examples"}},"security":{},"servers":{"664f4fbb-b57f-4e03-8c19-f187cd931be6":{"url":"https://test.deribit.com/api/v2"}}},"originalFileLocation":"specifications/deribit_upcoming_openapi.json"},"subdomain":"deribit","siteName":"Deribit API Documentation","title":"private/close_position","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{"Production":{"href":"/","matchLevel":4},"Upcoming":{"href":"/api-reference/upcoming/trading/private-close_position","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T14:42:30.838Z","originalFileLocation":"api-reference/upcoming/trading/private-close_position.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. Scope: trade:read_write Try in API console\">\u003cmeta data-mint-head name=\"keywords\" content=\"Deribit API, cryptocurrency API, derivatives API, trading API, WebSocket API, FIX API, Bitcoin futures, options trading, API documentation\">\u003cmeta data-mint-head name=\"application-name\" content=\"Deribit API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"private/close_position\">\u003cmeta data-mint-head property=\"og:description\" content=\"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. Scope: trade:read_write Try in API console\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Deribit API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deribit.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=private%2Fclose_position\u0026amp;description=Places+a+reduce-only+order+to+close+an+existing+position.+Reduce-only+orders+can+only+reduce+or+close+a+position%3B+they+cannot+open+a+new+position+or+increase+an\u0026amp;theme=ac8885f98fec5a1d80cab062\u0026amp;signature=f752087f949bde3c16e65f7845c3f204d158113578aff07564345f0a1642fb69\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"private/close_position\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. Scope: trade:read_write Try in API console\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deribit.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=private%2Fclose_position\u0026amp;description=Places+a+reduce-only+order+to+close+an+existing+position.+Reduce-only+orders+can+only+reduce+or+close+a+position%3B+they+cannot+open+a+new+position+or+increase+an\u0026amp;theme=ac8885f98fec5a1d80cab062\u0026amp;signature=f752087f949bde3c16e65f7845c3f204d158113578aff07564345f0a1642fb69\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/deribit/pu9BhCQUYFueUXtn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Deribit API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0052FF\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"Deribit\">\u003cmeta data-mint-head name=\"application-name\" content=\"Deribit API Documentation\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#0052FF\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/upcoming/trading/private-close_position.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.deribit.com/#organization\",\"name\":\"Deribit API Documentation\",\"url\":\"https://docs.deribit.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deribit/jU8dKQ0mWmFd1NVE/images/deribit_cb_logo_main_black_rgb.svg?fit=max\u0026auto=format\u0026n=jU8dKQ0mWmFd1NVE\u0026q=85\u0026s=f6995f51656093856017582bb557e0ff\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.deribit.com#website\",\"name\":\"Deribit API Documentation\",\"url\":\"https://docs.deribit.com\",\"publisher\":{\"@id\":\"https://docs.deribit.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position#webpage\",\"url\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position\",\"name\":\"private/close_position\",\"description\":\"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. Scope: trade:read_write Try in API console\",\"dateModified\":\"2026-11-19T14:42:30.838Z\",\"isPartOf\":{\"@id\":\"https://docs.deribit.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Methods\",\"item\":\"https://docs.deribit.com/api-reference/upcoming/authentication/public-auth\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trading\",\"item\":\"https://docs.deribit.com/api-reference/upcoming/trading/private-buy\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"private/close_position\",\"item\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position#apireference\",\"headline\":\"private/close_position\",\"name\":\"private/close_position\",\"description\":\"Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. Scope: trade:read_write Try in API console\",\"url\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position\",\"mainEntityOfPage\":{\"@id\":\"https://docs.deribit.com//api-reference/upcoming/trading/private-close_position#webpage\"},\"dateModified\":\"2026-11-19T14:42:30.838Z\",\"keywords\":\"private/close_position, instrument_name, type, price\",\"publisher\":{\"@id\":\"https://docs.deribit.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.deribit.com#website\"}}]}\u003c/script>","agentPointerHref":"/api-reference/upcoming/trading/private-close_position.md","siteName":"Deribit API Documentation","nav":{"global":null,"versions":[{"version":"Production","pages":[{"title":"Production","href":"/"}]},{"version":"Upcoming","tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":""}]},{"tab":"API Reference","dropdowns":[{"dropdown":"JSON-RPC API","icon":"code","pages":[{"group":"Methods overview","pages":[{"title":"JSON-RPC 2.0 Protocol","href":"/articles/json-rpc-overview"},{"title":"Error Codes","href":"/articles/errors"},{"title":"Using the currency Parameter","href":"/articles/currency-parameter"}]},{"group":"Methods","pages":[{"group":"Authentication","pages":[{"title":"public/auth","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/auth","href":"/api-reference/upcoming/authentication/public-auth"},{"title":"public/exchange_token","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/exchange_token","href":"/api-reference/upcoming/authentication/public-exchange_token"},{"title":"public/fork_token","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/fork_token","href":"/api-reference/upcoming/authentication/public-fork_token"},{"title":"private/logout","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/logout","href":"/api-reference/upcoming/authentication/private-logout"}]},{"group":"Account Management","pages":[{"title":"private/change_api_key_name","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/change_api_key_name","href":"/api-reference/upcoming/account-management/private-change_api_key_name"},{"title":"private/change_margin_model","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/change_margin_model","href":"/api-reference/upcoming/account-management/private-change_margin_model"},{"title":"private/change_scope_in_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/change_scope_in_api_key","href":"/api-reference/upcoming/account-management/private-change_scope_in_api_key"},{"title":"private/change_subaccount_name","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/change_subaccount_name","href":"/api-reference/upcoming/account-management/private-change_subaccount_name"},{"title":"private/create_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/create_api_key","href":"/api-reference/upcoming/account-management/private-create_api_key"},{"title":"private/create_subaccount","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/create_subaccount","href":"/api-reference/upcoming/account-management/private-create_subaccount"},{"title":"private/delete_member","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/delete_member","href":"/api-reference/upcoming/account-management/private-delete_member"},{"title":"private/disable_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/disable_api_key","href":"/api-reference/upcoming/account-management/private-disable_api_key"},{"title":"private/edit_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/edit_api_key","href":"/api-reference/upcoming/account-management/private-edit_api_key"},{"title":"private/enable_affiliate_program","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/enable_affiliate_program","href":"/api-reference/upcoming/account-management/private-enable_affiliate_program"},{"title":"private/enable_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/enable_api_key","href":"/api-reference/upcoming/account-management/private-enable_api_key"},{"title":"private/get_access_log","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_access_log","href":"/api-reference/upcoming/account-management/private-get_access_log"},{"title":"private/get_account_summaries","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_account_summaries","href":"/api-reference/upcoming/account-management/private-get_account_summaries"},{"title":"private/get_account_summary","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_account_summary","href":"/api-reference/upcoming/account-management/private-get_account_summary"},{"title":"private/get_affiliate_program_info","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_affiliate_program_info","href":"/api-reference/upcoming/account-management/private-get_affiliate_program_info"},{"title":"private/get_currencies","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_currencies","href":"/api-reference/upcoming/account-management/private-get_currencies"},{"title":"private/get_email_language","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_email_language","href":"/api-reference/upcoming/account-management/private-get_email_language"},{"title":"private/get_members","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_members","href":"/api-reference/upcoming/account-management/private-get_members"},{"title":"private/get_new_announcements","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_new_announcements","href":"/api-reference/upcoming/account-management/private-get_new_announcements"},{"title":"private/get_position","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_position","href":"/api-reference/upcoming/account-management/private-get_position"},{"title":"private/get_positions","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_positions","href":"/api-reference/upcoming/account-management/private-get_positions"},{"title":"private/get_subaccounts","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_subaccounts","href":"/api-reference/upcoming/account-management/private-get_subaccounts"},{"title":"private/get_subaccounts_details","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_subaccounts_details","href":"/api-reference/upcoming/account-management/private-get_subaccounts_details"},{"title":"private/get_transaction_log","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_transaction_log","href":"/api-reference/upcoming/account-management/private-get_transaction_log"},{"title":"private/get_user_locks","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_locks","href":"/api-reference/upcoming/account-management/private-get_user_locks"},{"title":"private/list_api_keys","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/list_api_keys","href":"/api-reference/upcoming/account-management/private-list_api_keys"},{"title":"private/list_custody_accounts","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/list_custody_accounts","href":"/api-reference/upcoming/account-management/private-list_custody_accounts"},{"title":"private/pme/simulate","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/pme/simulate","href":"/api-reference/upcoming/account-management/private-simulate"},{"title":"private/remove_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/remove_api_key","href":"/api-reference/upcoming/account-management/private-remove_api_key"},{"title":"private/remove_subaccount","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/remove_subaccount","href":"/api-reference/upcoming/account-management/private-remove_subaccount"},{"title":"private/reset_api_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/reset_api_key","href":"/api-reference/upcoming/account-management/private-reset_api_key"},{"title":"private/set_announcement_as_read","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_announcement_as_read","href":"/api-reference/upcoming/account-management/private-set_announcement_as_read"},{"title":"private/set_disabled_trading_products","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_disabled_trading_products","href":"/api-reference/upcoming/account-management/private-set_disabled_trading_products"},{"title":"private/set_email_for_subaccount","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_email_for_subaccount","href":"/api-reference/upcoming/account-management/private-set_email_for_subaccount"},{"title":"private/set_email_language","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_email_language","href":"/api-reference/upcoming/account-management/private-set_email_language"},{"title":"private/set_member","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_member","href":"/api-reference/upcoming/account-management/private-set_member"},{"title":"private/set_self_trading_config","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_self_trading_config","href":"/api-reference/upcoming/account-management/private-set_self_trading_config"},{"title":"private/simulate_portfolio","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/simulate_portfolio","href":"/api-reference/upcoming/account-management/private-simulate_portfolio"},{"title":"private/toggle_notifications_from_subaccount","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/toggle_notifications_from_subaccount","href":"/api-reference/upcoming/account-management/private-toggle_notifications_from_subaccount"},{"title":"private/toggle_subaccount_login","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/toggle_subaccount_login","href":"/api-reference/upcoming/account-management/private-toggle_subaccount_login"},{"title":"public/get_announcements","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_announcements","href":"/api-reference/upcoming/account-management/public-get_announcements"}]},{"group":"Block RFQ","pages":[{"title":"private/accept_block_rfq","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/accept_block_rfq","href":"/api-reference/upcoming/block-rfq/private-accept_block_rfq"},{"title":"private/add_block_rfq_quote","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/add_block_rfq_quote","href":"/api-reference/upcoming/block-rfq/private-add_block_rfq_quote"},{"title":"private/cancel_all_block_rfq_quotes","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all_block_rfq_quotes","href":"/api-reference/upcoming/block-rfq/private-cancel_all_block_rfq_quotes"},{"title":"private/cancel_block_rfq","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_block_rfq","href":"/api-reference/upcoming/block-rfq/private-cancel_block_rfq"},{"title":"private/cancel_block_rfq_quote","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_block_rfq_quote","href":"/api-reference/upcoming/block-rfq/private-cancel_block_rfq_quote"},{"title":"private/cancel_block_rfq_trigger","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_block_rfq_trigger","href":"/api-reference/upcoming/block-rfq/private-cancel_block_rfq_trigger"},{"title":"private/create_block_rfq","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/create_block_rfq","href":"/api-reference/upcoming/block-rfq/private-create_block_rfq"},{"title":"private/edit_block_rfq_quote","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/edit_block_rfq_quote","href":"/api-reference/upcoming/block-rfq/private-edit_block_rfq_quote"},{"title":"private/get_block_rfq_makers","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_rfq_makers","href":"/api-reference/upcoming/block-rfq/private-get_block_rfq_makers"},{"title":"private/get_block_rfq_quotes","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_rfq_quotes","href":"/api-reference/upcoming/block-rfq/private-get_block_rfq_quotes"},{"title":"private/get_block_rfq_user_info","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_rfq_user_info","href":"/api-reference/upcoming/block-rfq/private-get_block_rfq_user_info"},{"title":"private/get_block_rfqs","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_rfqs","href":"/api-reference/upcoming/block-rfq/private-get_block_rfqs"},{"title":"public/get_block_rfq_trades","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_block_rfq_trades","href":"/api-reference/upcoming/block-rfq/public-get_block_rfq_trades"}]},{"group":"Block Trade","pages":[{"title":"private/approve_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/approve_block_trade","href":"/api-reference/upcoming/block-trade/private-approve_block_trade"},{"title":"private/execute_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/execute_block_trade","href":"/api-reference/upcoming/block-trade/private-execute_block_trade"},{"title":"private/get_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_trade","href":"/api-reference/upcoming/block-trade/private-get_block_trade"},{"title":"private/get_block_trade_requests","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_trade_requests","href":"/api-reference/upcoming/block-trade/private-get_block_trade_requests"},{"title":"private/get_block_trades","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_block_trades","href":"/api-reference/upcoming/block-trade/private-get_block_trades"},{"title":"private/get_broker_clients","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_broker_clients","href":"/api-reference/upcoming/block-trade/private-get_broker_clients"},{"title":"private/get_broker_trade_requests","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_broker_trade_requests","href":"/api-reference/upcoming/block-trade/private-get_broker_trade_requests"},{"title":"private/get_broker_trades","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_broker_trades","href":"/api-reference/upcoming/block-trade/private-get_broker_trades"},{"title":"private/invalidate_block_trade_signature","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/invalidate_block_trade_signature","href":"/api-reference/upcoming/block-trade/private-invalidate_block_trade_signature"},{"title":"private/reject_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/reject_block_trade","href":"/api-reference/upcoming/block-trade/private-reject_block_trade"},{"title":"private/simulate_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/simulate_block_trade","href":"/api-reference/upcoming/block-trade/private-simulate_block_trade"},{"title":"private/verify_block_trade","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/verify_block_trade","href":"/api-reference/upcoming/block-trade/private-verify_block_trade"}]},{"group":"Combo Books","pages":[{"title":"private/create_combo","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/create_combo","href":"/api-reference/upcoming/combo-books/private-create_combo"},{"title":"private/get_leg_prices","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_leg_prices","href":"/api-reference/upcoming/combo-books/private-get_leg_prices"},{"title":"public/get_combo_details","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_combo_details","href":"/api-reference/upcoming/combo-books/public-get_combo_details"},{"title":"public/get_combo_ids","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_combo_ids","href":"/api-reference/upcoming/combo-books/public-get_combo_ids"},{"title":"public/get_combos","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_combos","href":"/api-reference/upcoming/combo-books/public-get_combos"}]},{"group":"LSP","pages":[{"title":"private/get_lsp_participant_config","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_lsp_participant_config","href":"/api-reference/upcoming/lsp/private-get_lsp_participant_config"},{"title":"private/get_lsp_participants","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_lsp_participants","href":"/api-reference/upcoming/lsp/private-get_lsp_participants"},{"title":"private/get_lsp_participants_usage","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_lsp_participants_usage","href":"/api-reference/upcoming/lsp/private-get_lsp_participants_usage"},{"title":"private/get_lsp_usage","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_lsp_usage","href":"/api-reference/upcoming/lsp/private-get_lsp_usage"}]},{"group":"Market Data","pages":[{"title":"public/get_apr_history","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_apr_history","href":"/api-reference/upcoming/market-data/public-get_apr_history"},{"title":"public/get_basket_index_composition","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_basket_index_composition","href":"/api-reference/upcoming/market-data/public-get_basket_index_composition"},{"title":"public/get_book_summary_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_book_summary_by_currency","href":"/api-reference/upcoming/market-data/public-get_book_summary_by_currency"},{"title":"public/get_book_summary_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_book_summary_by_instrument","href":"/api-reference/upcoming/market-data/public-get_book_summary_by_instrument"},{"title":"public/get_contract_size","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_contract_size","href":"/api-reference/upcoming/market-data/public-get_contract_size"},{"title":"public/get_currencies","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_currencies","href":"/api-reference/upcoming/market-data/public-get_currencies"},{"title":"public/get_delivery_prices","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_delivery_prices","href":"/api-reference/upcoming/market-data/public-get_delivery_prices"},{"title":"public/get_expirations","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_expirations","href":"/api-reference/upcoming/market-data/public-get_expirations"},{"title":"public/get_funding_chart_data","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_funding_chart_data","href":"/api-reference/upcoming/market-data/public-get_funding_chart_data"},{"title":"public/get_funding_rate_history","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_funding_rate_history","href":"/api-reference/upcoming/market-data/public-get_funding_rate_history"},{"title":"public/get_funding_rate_value","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_funding_rate_value","href":"/api-reference/upcoming/market-data/public-get_funding_rate_value"},{"title":"public/get_historical_volatility","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_historical_volatility","href":"/api-reference/upcoming/market-data/public-get_historical_volatility"},{"title":"public/get_index_price","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_index_price","href":"/api-reference/upcoming/market-data/public-get_index_price"},{"title":"public/get_index_price_names","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_index_price_names","href":"/api-reference/upcoming/market-data/public-get_index_price_names"},{"title":"public/get_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_instrument","href":"/api-reference/upcoming/market-data/public-get_instrument"},{"title":"public/get_instruments","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_instruments","href":"/api-reference/upcoming/market-data/public-get_instruments"},{"title":"public/get_last_settlements_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_settlements_by_currency","href":"/api-reference/upcoming/market-data/public-get_last_settlements_by_currency"},{"title":"public/get_last_settlements_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_settlements_by_instrument","href":"/api-reference/upcoming/market-data/public-get_last_settlements_by_instrument"},{"title":"public/get_last_trades_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_trades_by_currency","href":"/api-reference/upcoming/market-data/public-get_last_trades_by_currency"},{"title":"public/get_last_trades_by_currency_and_time","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_trades_by_currency_and_time","href":"/api-reference/upcoming/market-data/public-get_last_trades_by_currency_and_time"},{"title":"public/get_last_trades_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_trades_by_instrument","href":"/api-reference/upcoming/market-data/public-get_last_trades_by_instrument"},{"title":"public/get_last_trades_by_instrument_and_time","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_last_trades_by_instrument_and_time","href":"/api-reference/upcoming/market-data/public-get_last_trades_by_instrument_and_time"},{"title":"public/get_mark_price_history","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_mark_price_history","href":"/api-reference/upcoming/market-data/public-get_mark_price_history"},{"title":"public/get_order_book","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_order_book","href":"/api-reference/upcoming/market-data/public-get_order_book"},{"title":"public/get_order_book_by_instrument_id","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_order_book_by_instrument_id","href":"/api-reference/upcoming/market-data/public-get_order_book_by_instrument_id"},{"title":"public/get_supported_index_names","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_supported_index_names","href":"/api-reference/upcoming/market-data/public-get_supported_index_names"},{"title":"public/get_trade_volumes","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_trade_volumes","href":"/api-reference/upcoming/market-data/public-get_trade_volumes"},{"title":"public/get_tradingview_chart_data","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_tradingview_chart_data","href":"/api-reference/upcoming/market-data/public-get_tradingview_chart_data"},{"title":"public/get_volatility_index_data","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_volatility_index_data","href":"/api-reference/upcoming/market-data/public-get_volatility_index_data"},{"title":"public/ticker","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/ticker","href":"/api-reference/upcoming/market-data/public-ticker"},{"title":"public/get_index_chart_data","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_index_chart_data","href":"/api-reference/upcoming/market-data/public-get_index_chart_data"}]},{"group":"Session Management","pages":[{"title":"private/disable_cancel_on_disconnect","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/disable_cancel_on_disconnect","href":"/api-reference/upcoming/session-management/private-disable_cancel_on_disconnect"},{"title":"private/enable_cancel_on_disconnect","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/enable_cancel_on_disconnect","href":"/api-reference/upcoming/session-management/private-enable_cancel_on_disconnect"},{"title":"private/get_cancel_on_disconnect","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_cancel_on_disconnect","href":"/api-reference/upcoming/session-management/private-get_cancel_on_disconnect"},{"title":"public/disable_heartbeat","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/disable_heartbeat","href":"/api-reference/upcoming/session-management/public-disable_heartbeat"},{"title":"public/set_heartbeat","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/set_heartbeat","href":"/api-reference/upcoming/session-management/public-set_heartbeat"}]},{"group":"Subscription Management","pages":[{"title":"private/subscribe","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/subscribe","href":"/api-reference/upcoming/subscription-management/private-subscribe"},{"title":"private/unsubscribe","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/unsubscribe","href":"/api-reference/upcoming/subscription-management/private-unsubscribe"},{"title":"private/unsubscribe_all","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/unsubscribe_all","href":"/api-reference/upcoming/subscription-management/private-unsubscribe_all"},{"title":"public/subscribe","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/subscribe","href":"/api-reference/upcoming/subscription-management/public-subscribe"},{"title":"public/unsubscribe","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/unsubscribe","href":"/api-reference/upcoming/subscription-management/public-unsubscribe"},{"title":"public/unsubscribe_all","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/unsubscribe_all","href":"/api-reference/upcoming/subscription-management/public-unsubscribe_all"}]},{"group":"Supporting","pages":[{"title":"public/get_time","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/get_time","href":"/api-reference/upcoming/supporting/public-get_time"},{"title":"public/hello","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/hello","href":"/api-reference/upcoming/supporting/public-hello"},{"title":"public/status","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/status","href":"/api-reference/upcoming/supporting/public-status"},{"title":"public/test","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /public/test","href":"/api-reference/upcoming/supporting/public-test"}]},{"group":"Trading","pages":[{"title":"private/buy","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/buy","href":"/api-reference/upcoming/trading/private-buy"},{"title":"private/cancel","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel","href":"/api-reference/upcoming/trading/private-cancel"},{"title":"private/cancel_all","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all","href":"/api-reference/upcoming/trading/private-cancel_all"},{"title":"private/cancel_all_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all_by_currency","href":"/api-reference/upcoming/trading/private-cancel_all_by_currency"},{"title":"private/cancel_all_by_currency_pair","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all_by_currency_pair","href":"/api-reference/upcoming/trading/private-cancel_all_by_currency_pair"},{"title":"private/cancel_all_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all_by_instrument","href":"/api-reference/upcoming/trading/private-cancel_all_by_instrument"},{"title":"private/cancel_all_by_kind_or_type","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_all_by_kind_or_type","href":"/api-reference/upcoming/trading/private-cancel_all_by_kind_or_type"},{"title":"private/cancel_by_label","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_by_label","href":"/api-reference/upcoming/trading/private-cancel_by_label"},{"title":"private/cancel_quotes","description":"Cancels quotes (mass quote orders) based on various criteria. This method provides flexible options for cancelling quotes:\n\n- `delta`: Cancels quotes within a delta range defined by `min_delta` and `max_delta`\n- `quote_set_id`: Cancels quotes by a specific Quote Set identifier\n- `instrument`: Cancels all quotes associated with a particular instrument\n- `kind`: Cancels all quotes for a certain instrument kind\n- `currency`: Cancels all quotes in a specified currency\n- `currency_pair`: Cancels all quotes in a specified currency pair\n- `all`: Cancels all quotes\n\nUse the `detailed` parameter to receive a list of all cancelled quotes.\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_quotes)\n\n","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_quotes","href":"/api-reference/upcoming/trading/private-cancel_quotes"},{"title":"private/close_position","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/close_position","href":"/api-reference/upcoming/trading/private-close_position"},{"title":"private/edit","description":"Modifies an existing order by changing its price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type.\n\nThe order is identified by its order ID. Only open orders can be edited. Changes take effect immediately and may result in the order being filled if the new price matches the market.\n\n**Note:** For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the `user.trades` channel.\n\n**📖 Related Articles:** \n- [Order Management Best Practices](https://docs.deribit.com/articles/order-management-best-practices)\n- [Spot Trading: Deribit and Coinbase-Routed Instruments](https://docs.deribit.com/articles/spot-trading-venues)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit)\n\n","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/edit","href":"/api-reference/upcoming/trading/private-edit"},{"title":"private/edit_by_label","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/edit_by_label","href":"/api-reference/upcoming/trading/private-edit_by_label"},{"title":"private/get_margins","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_margins","href":"/api-reference/upcoming/trading/private-get_margins"},{"title":"private/get_mmp_config","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_mmp_config","href":"/api-reference/upcoming/trading/private-get_mmp_config"},{"title":"private/get_mmp_status","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_mmp_status","href":"/api-reference/upcoming/trading/private-get_mmp_status"},{"title":"private/get_open_orders","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_open_orders","href":"/api-reference/upcoming/trading/private-get_open_orders"},{"title":"private/get_open_orders_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_open_orders_by_currency","href":"/api-reference/upcoming/trading/private-get_open_orders_by_currency"},{"title":"private/get_open_orders_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_open_orders_by_instrument","href":"/api-reference/upcoming/trading/private-get_open_orders_by_instrument"},{"title":"private/get_open_orders_by_label","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_open_orders_by_label","href":"/api-reference/upcoming/trading/private-get_open_orders_by_label"},{"title":"private/get_order_history_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_order_history_by_currency","href":"/api-reference/upcoming/trading/private-get_order_history_by_currency"},{"title":"private/get_order_history_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_order_history_by_instrument","href":"/api-reference/upcoming/trading/private-get_order_history_by_instrument"},{"title":"private/get_order_margin_by_ids","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_order_margin_by_ids","href":"/api-reference/upcoming/trading/private-get_order_margin_by_ids"},{"title":"private/get_order_state","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_order_state","href":"/api-reference/upcoming/trading/private-get_order_state"},{"title":"private/get_order_state_by_label","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_order_state_by_label","href":"/api-reference/upcoming/trading/private-get_order_state_by_label"},{"title":"private/get_settlement_history_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_settlement_history_by_currency","href":"/api-reference/upcoming/trading/private-get_settlement_history_by_currency"},{"title":"private/get_settlement_history_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_settlement_history_by_instrument","href":"/api-reference/upcoming/trading/private-get_settlement_history_by_instrument"},{"title":"private/get_trigger_order_history","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_trigger_order_history","href":"/api-reference/upcoming/trading/private-get_trigger_order_history"},{"title":"private/get_user_trades_by_currency","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_trades_by_currency","href":"/api-reference/upcoming/trading/private-get_user_trades_by_currency"},{"title":"private/get_user_trades_by_currency_and_time","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_trades_by_currency_and_time","href":"/api-reference/upcoming/trading/private-get_user_trades_by_currency_and_time"},{"title":"private/get_user_trades_by_instrument","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_trades_by_instrument","href":"/api-reference/upcoming/trading/private-get_user_trades_by_instrument"},{"title":"private/get_user_trades_by_instrument_and_time","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_trades_by_instrument_and_time","href":"/api-reference/upcoming/trading/private-get_user_trades_by_instrument_and_time"},{"title":"private/get_user_trades_by_order","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_user_trades_by_order","href":"/api-reference/upcoming/trading/private-get_user_trades_by_order"},{"title":"private/mass_quote","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/mass_quote","href":"/api-reference/upcoming/trading/private-mass_quote"},{"title":"private/move_positions","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/move_positions","href":"/api-reference/upcoming/trading/private-move_positions"},{"title":"private/reset_mmp","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/reset_mmp","href":"/api-reference/upcoming/trading/private-reset_mmp"},{"title":"private/sell","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/sell","href":"/api-reference/upcoming/trading/private-sell"},{"title":"private/set_mmp_config","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_mmp_config","href":"/api-reference/upcoming/trading/private-set_mmp_config"}]},{"group":"Wallet","pages":[{"title":"private/add_to_address_book","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/add_to_address_book","href":"/api-reference/upcoming/wallet/private-add_to_address_book"},{"title":"private/cancel_transfer_by_id","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_transfer_by_id","href":"/api-reference/upcoming/wallet/private-cancel_transfer_by_id"},{"title":"private/cancel_withdrawal","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/cancel_withdrawal","href":"/api-reference/upcoming/wallet/private-cancel_withdrawal"},{"title":"private/coinbase/estimate_withdrawal_fee","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/coinbase/estimate_withdrawal_fee","href":"/api-reference/upcoming/wallet/private-estimate_withdrawal_fee"},{"title":"private/create_deposit_address","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/create_deposit_address","href":"/api-reference/upcoming/wallet/private-create_deposit_address"},{"title":"private/delete_address_beneficiary","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/delete_address_beneficiary","href":"/api-reference/upcoming/wallet/private-delete_address_beneficiary"},{"title":"private/get_address_beneficiary","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_address_beneficiary","href":"/api-reference/upcoming/wallet/private-get_address_beneficiary"},{"title":"private/get_address_book","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_address_book","href":"/api-reference/upcoming/wallet/private-get_address_book"},{"title":"private/get_ctn_id","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_ctn_id","href":"/api-reference/upcoming/wallet/private-get_ctn_id"},{"title":"private/get_current_deposit_address","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_current_deposit_address","href":"/api-reference/upcoming/wallet/private-get_current_deposit_address"},{"title":"private/get_deposits","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_deposits","href":"/api-reference/upcoming/wallet/private-get_deposits"},{"title":"private/get_reward_eligibility","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_reward_eligibility","href":"/api-reference/upcoming/wallet/private-get_reward_eligibility"},{"title":"private/get_transfers","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_transfers","href":"/api-reference/upcoming/wallet/private-get_transfers"},{"title":"private/get_withdrawals","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/get_withdrawals","href":"/api-reference/upcoming/wallet/private-get_withdrawals"},{"title":"private/list_address_beneficiaries","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/list_address_beneficiaries","href":"/api-reference/upcoming/wallet/private-list_address_beneficiaries"},{"title":"private/remove_from_address_book","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/remove_from_address_book","href":"/api-reference/upcoming/wallet/private-remove_from_address_book"},{"title":"private/save_address_beneficiary","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/save_address_beneficiary","href":"/api-reference/upcoming/wallet/private-save_address_beneficiary"},{"title":"private/set_address_requires_security_key","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_address_requires_security_key","href":"/api-reference/upcoming/wallet/private-set_address_requires_security_key"},{"title":"private/set_clearance_originator","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_clearance_originator","href":"/api-reference/upcoming/wallet/private-set_clearance_originator"},{"title":"private/set_coinbase_subaccount_withdrawals_allowed","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/set_coinbase_subaccount_withdrawals_allowed","href":"/api-reference/upcoming/wallet/private-set_coinbase_subaccount_withdrawals_allowed"},{"title":"private/submit_transfer_between_subaccounts","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/submit_transfer_between_subaccounts","href":"/api-reference/upcoming/wallet/private-submit_transfer_between_subaccounts"},{"title":"private/submit_transfer_to_subaccount","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/submit_transfer_to_subaccount","href":"/api-reference/upcoming/wallet/private-submit_transfer_to_subaccount"},{"title":"private/submit_transfer_to_user","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/submit_transfer_to_user","href":"/api-reference/upcoming/wallet/private-submit_transfer_to_user"},{"title":"private/update_in_address_book","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/update_in_address_book","href":"/api-reference/upcoming/wallet/private-update_in_address_book"},{"title":"private/withdraw","deprecated":null,"version":null,"openapi":"/specifications/deribit_upcoming_openapi.json get /private/withdraw","href":"/api-reference/upcoming/wallet/private-withdraw"}]}]}]},{"dropdown":"Subscription Channels","icon":"rss","groups":[{"group":"Introduction","pages":[{"title":"Notifications","href":"/articles/notifications"}]},{"group":"Websockets","pages":[{"group":"Platform","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json platform_state","href":"/subscriptions/upcoming/platform/platform_state","title":"platform_state ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json platform_state.public_methods_state","href":"/subscriptions/upcoming/platform/platform_statepublic_methods_state","title":"platform_state.public_methods_state ","version":null}]},{"group":"Announcements","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json announcements","href":"/subscriptions/upcoming/announcements/announcements","title":"announcements ","version":null}]},{"group":"Orderbook","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json book.(instrument_name).(interval)","href":"/subscriptions/upcoming/orderbook/bookinstrument_nameinterval","title":"book.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json book.(instrument_name).(group).(depth).(interval)","href":"/subscriptions/upcoming/orderbook/bookinstrument_namegroupdepthinterval","title":"book.(instrument_name).(group).(depth).(interval) ","version":null}]},{"group":"Market Data","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json ticker.(instrument_name).(interval)","href":"/subscriptions/upcoming/market-data/tickerinstrument_nameinterval","title":"ticker.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json incremental_ticker.(instrument_name)","href":"/subscriptions/upcoming/market-data/incremental_tickerinstrument_name","title":"incremental_ticker.(instrument_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json perpetual.(instrument_name).(interval)","href":"/subscriptions/upcoming/market-data/perpetualinstrument_nameinterval","title":"perpetual.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json quote.(instrument_name)","href":"/subscriptions/upcoming/market-data/quoteinstrument_name","title":"quote.(instrument_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json deribit_price_index.(index_name)","href":"/subscriptions/upcoming/market-data/deribit_price_indexindex_name","title":"deribit_price_index.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json deribit_price_ranking.(index_name)","href":"/subscriptions/upcoming/market-data/deribit_price_rankingindex_name","title":"deribit_price_ranking.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json deribit_price_statistics.(index_name)","href":"/subscriptions/upcoming/market-data/deribit_price_statisticsindex_name","title":"deribit_price_statistics.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json deribit_volatility_index.(index_name)","href":"/subscriptions/upcoming/market-data/deribit_volatility_indexindex_name","title":"deribit_volatility_index.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json markprice.options.(index_name)","href":"/subscriptions/upcoming/market-data/markpriceoptionsindex_name","title":"markprice.options.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json estimated_expiration_price.(index_name)","href":"/subscriptions/upcoming/market-data/estimated_expiration_priceindex_name","title":"estimated_expiration_price.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json chart.trades.(instrument_name).(resolution)","href":"/subscriptions/upcoming/market-data/charttradesinstrument_nameresolution","title":"chart.trades.(instrument_name).(resolution) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json instrument.creation.(kind).(currency)","href":"/subscriptions/upcoming/market-data/instrumentcreationkindcurrency","title":"instrument.creation.(kind).(currency) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json instrument.state.(kind).(currency)","href":"/subscriptions/upcoming/market-data/instrumentstatekindcurrency","title":"instrument.state.(kind).(currency) ","version":null}]},{"group":"Trades","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json trades.(instrument_name).(interval)","href":"/subscriptions/upcoming/trades/tradesinstrument_nameinterval","title":"trades.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json trades.(kind).(currency).(interval)","href":"/subscriptions/upcoming/trades/tradeskindcurrencyinterval","title":"trades.(kind).(currency).(interval) ","version":null}]},{"group":"Block Trade","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_trade_confirmations","href":"/subscriptions/upcoming/block-trade/block_trade_confirmations","title":"block_trade_confirmations ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_trade_confirmations.(currency)","href":"/subscriptions/upcoming/block-trade/block_trade_confirmationscurrency","title":"block_trade_confirmations.(currency) ","version":null}]},{"group":"User","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.mmp_trigger.(index_name)","href":"/subscriptions/upcoming/user/usermmp_triggerindex_name","title":"user.mmp_trigger.(index_name) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.portfolio.(currency)","href":"/subscriptions/upcoming/user/userportfoliocurrency","title":"user.portfolio.(currency) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.trades.(instrument_name).(interval)","href":"/subscriptions/upcoming/user/usertradesinstrument_nameinterval","title":"user.trades.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.trades.(kind).(currency).(interval)","href":"/subscriptions/upcoming/user/usertradeskindcurrencyinterval","title":"user.trades.(kind).(currency).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.combo_trades.(instrument_name).(interval)","href":"/subscriptions/upcoming/user/usercombo_tradesinstrument_nameinterval","title":"user.combo_trades.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.combo_trades.(kind).(currency).(interval)","href":"/subscriptions/upcoming/user/usercombo_tradeskindcurrencyinterval","title":"user.combo_trades.(kind).(currency).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.orders.(instrument_name).raw","href":"/subscriptions/upcoming/user/userordersinstrument_nameraw","title":"user.orders.(instrument_name).raw ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.orders.(instrument_name).(interval)","href":"/subscriptions/upcoming/user/userordersinstrument_nameinterval","title":"user.orders.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.orders.(kind).(currency).raw","href":"/subscriptions/upcoming/user/userorderskindcurrencyraw","title":"user.orders.(kind).(currency).raw ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.orders.(kind).(currency).(interval)","href":"/subscriptions/upcoming/user/userorderskindcurrencyinterval","title":"user.orders.(kind).(currency).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.changes.(instrument_name).(interval)","href":"/subscriptions/upcoming/user/userchangesinstrument_nameinterval","title":"user.changes.(instrument_name).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.changes.(kind).(currency).(interval)","href":"/subscriptions/upcoming/user/userchangeskindcurrencyinterval","title":"user.changes.(kind).(currency).(interval) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.access_log","href":"/subscriptions/upcoming/user/useraccess_log","title":"user.access_log ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.lock","href":"/subscriptions/upcoming/user/userlock","title":"user.lock ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.liquidation","href":"/subscriptions/upcoming/user/userliquidation","title":"user.liquidation ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.isolated.liquidation","href":"/subscriptions/upcoming/user/userisolatedliquidation","title":"user.isolated.liquidation ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json user.lsp","href":"/subscriptions/upcoming/user/userlsp","title":"user.lsp ","version":null}]},{"group":"Block RFQ","pages":[{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_rfq.maker.(currency)","href":"/subscriptions/upcoming/block-rfq/block_rfqmakercurrency","title":"block_rfq.maker.(currency) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_rfq.taker.(currency)","href":"/subscriptions/upcoming/block-rfq/block_rfqtakercurrency","title":"block_rfq.taker.(currency) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_rfq.maker.quotes.(currency)","href":"/subscriptions/upcoming/block-rfq/block_rfqmakerquotescurrency","title":"block_rfq.maker.quotes.(currency) ","version":null},{"asyncapi":"specifications/deribit_upcoming_asyncapi.json block_rfq.trades.(currency)","href":"/subscriptions/upcoming/block-rfq/block_rfqtradescurrency","title":"block_rfq.trades.(currency) ","version":null}]}]}]},{"dropdown":"FIX API","icon":"bolt","pages":[{"group":"Overview","pages":[{"title":"Deribit Upcoming FIX API Overview","mode":"wide","href":"/fix-api/upcoming/overview"}]},{"group":"Session Management","pages":[{"title":"Logon(A) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/logon"},{"title":"Logout(5) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/logout"},{"title":"Heartbeat(0) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/heartbeat"},{"title":"Test Request(1) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/test-request"},{"title":"Resend Request(2) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/resend-request"},{"title":"Reject(3) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/reject"},{"title":"Sequence Reset(4) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/sequence-reset"}]},{"group":"Market Data","pages":[{"title":"Security List Request(x) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-list-request"},{"title":"Security List(y) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-list"},{"title":"Market Data Request(V) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/market-data-request"},{"title":"Market Data Request Reject(Y) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/market-data-request-reject"},{"title":"Market Data Snapshot/Full Refresh(W) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/market-data-snapshot"},{"title":"Market Data Incremental Refresh(X) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/market-data-incremental"},{"title":"Security Status Request(e) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-status-request"},{"title":"Security Status(f) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-status"}]},{"group":"Order Management","pages":[{"title":"New Order Single(D) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/new-order-single"},{"title":"Order Cancel Request(F) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-cancel-request"},{"title":"Order Cancel Reject(9) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-cancel-reject"},{"title":"Order Cancel/Replace Request(G) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-cancel-replace"},{"title":"Order Mass Cancel Request(q) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-mass-cancel-request"},{"title":"Order Mass Cancel Report(r) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-mass-cancel-report"},{"title":"Order Mass Status Request(AF) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/order-mass-status-request"},{"title":"Execution Reports(8) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/execution-reports"}]},{"group":"Position Management","pages":[{"title":"Request For Positions(AN) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/request-for-positions"},{"title":"Position Report(AP) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/position-report"}]},{"group":"User Management","pages":[{"title":"User Request(BE) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/user-request"},{"title":"User Response(BF) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/user-response"}]},{"group":"Market Maker Protection","pages":[{"title":"MMProtection Limits (MM) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/mmprotection-limits"},{"title":"MMProtection Limits Result/Reject(MR) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/mmprotection-limits-result"},{"title":"MMProtection Reset(MZ) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/mmprotection-reset"}]},{"group":"Mass Quoting","pages":[{"title":"Mass Quote(i) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/mass-quote"},{"title":"Mass Quote Acknowledgement(b) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/mass-quote-acknowledgement"},{"title":"Quote Cancel(Z) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/quote-cancel"}]},{"group":"Trade Capture","pages":[{"title":"TradeCaptureReportRequest(AD) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/trade-capture-report-request"},{"title":"TradeCaptureReportRequestAck(AQ) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/trade-capture-report-request-ack"},{"title":"TradeCaptureReport(AE) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/trade-capture-report"}]},{"group":"Security Definition","pages":[{"title":"Security Definition Request(c) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-definition-request"},{"title":"Security Definition(d) (Upcoming FIX API)","mode":"wide","href":"/fix-api/upcoming/security-definition"}]}]},{"dropdown":"Starbase API","icon":"rocket","pages":[{"group":"Introduction","pages":[{"title":"Starbase API Overview","mode":"wide","href":"/starbase/overview"},{"title":"Starbase Connectivity Quickstart","mode":"wide","href":"/starbase/quickstart"},{"title":"Creating and Assigning a Member","mode":"wide","href":"/starbase/creating-member"},{"title":"Creating a Starbase API Key","mode":"wide","href":"/starbase/creating-api-key"},{"title":"Production Readiness Checklist","mode":"wide","href":"/starbase/production-readiness-checklist"},{"title":"Infrastructure, Connectivity \u0026 Best Practices","mode":"wide","href":"/starbase/connectivity-best-practices"}]},{"group":"API Reference","pages":[{"title":"Binary API Reference","mode":"wide","href":"/starbase/upcoming/binary-api-reference"},{"group":"Session Messages","expanded":false,"pages":[{"title":"Starbase Session Messages","mode":"wide","href":"/starbase/session-messages"}]},{"group":"Order Entry Messages","expanded":false,"pages":[{"title":"Placing a New Order","mode":"wide","href":"/starbase/placing-new-order"},{"title":"Amending an Order","mode":"wide","href":"/starbase/upcoming/amending-order"},{"title":"Cancelling an Order","mode":"wide","href":"/starbase/cancelling-order"},{"title":"Mass Quotes","mode":"wide","href":"/starbase/upcoming/mass-quotes"},{"title":"Starbase Mass Cancel Messages","mode":"wide","href":"/starbase/mass-cancel"}]},{"group":"Market Data Messages","expanded":false,"pages":[{"title":"Maintaining the order book","mode":"wide","href":"/starbase/order-book-maintenance"},{"title":"Trades","mode":"wide","href":"/starbase/trades"},{"title":"Starbase Reference Data and Instrument Definitions","mode":"wide","href":"/starbase/reference-data"}]},{"group":"Unsolicited Events","expanded":false,"pages":[{"title":"Starbase Unsolicited Events","mode":"wide","href":"/starbase/unsolicited-events"}]},{"group":"REST API","expanded":true,"pages":[{"title":"REST Order Gateway Authentication","mode":"wide","href":"/starbase/rest-authentication"},{"title":"Get Open Orders","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/private/get_open_orders","href":"/api-reference/trading/get-open-orders"},{"title":"Get Starbase Risk Limits","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/private/get_starbase_risk_limits","href":"/api-reference/portfolio-management/get-starbase-risk-limits"},{"title":"Mass Cancel","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/private/cancel_all","href":"/api-reference/portfolio-management/mass-cancel"},{"title":"Lock Portfolio","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/private/lock_portfolio","href":"/api-reference/portfolio-management/lock-portfolio"},{"title":"Unlock Portfolio","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/private/unlock_portfolio","href":"/api-reference/portfolio-management/unlock-portfolio"},{"title":"List Instruments","deprecated":null,"version":null,"openapi":"/specifications/starbase_rest_openapi.json get /api/v2/public/get_instruments","href":"/api-reference/market-data/list-instruments"}]},{"group":"FIX Drop Copy","expanded":false,"pages":[{"title":"Starbase FIX Drop Copy API","mode":"wide","href":"/starbase/fix-drop-copy-api"}]}]},{"group":"Core Concepts","pages":[{"title":"Market Model","mode":"wide","href":"/starbase/market-model"},{"title":"Account Model","mode":"wide","href":"/starbase/account-model"},{"title":"Underlying Tiers","mode":"wide","href":"/starbase/underlying-tiers"},{"title":"Speed Bumps","mode":"wide","href":"/starbase/upcoming/speed-bumps"},{"title":"Starbase Market Maker Protection (MMP)","mode":"wide","href":"/starbase/mmp"},{"title":"Self Match Prevention (SMP)","mode":"wide","href":"/starbase/smp"},{"title":"Portfolio Management","mode":"wide","href":"/starbase/portfolio-management"}]},{"group":"Technical Information","pages":[{"title":"Starbase API Rate Limits","href":"/starbase/api-rate-limits"},{"title":"Risk Bypass","mode":"wide","href":"/starbase/risk-bypass"},{"title":"Cancel on Disconnect","mode":"wide","href":"/starbase/cancel-on-disconnect"},{"title":"Gateway Connectivity","mode":"wide","href":"/starbase/gateway-connectivity"},{"title":"Multicast Channels","mode":"wide","href":"/starbase/multicast-channels"},{"title":"Multicast Subscription Guide","href":"/starbase/multicast-subscription-guide"},{"title":"Multicast Retransmit Gateway","href":"/starbase/retransmit-gateway"}]}]}]},{"tab":"Changelogs","pages":[{"title":"Changelogs","href":"/changelogs/jsonrpc"}]}]}]},"basePath":"","title":"private/close_position","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}