curl --request GET \
--url https://test.deribit.com/api/v2/private/get_open_orders_by_label \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1953,
"method": "private/get_open_orders_by_label",
"params": {
"currency": "BTC",
"label": "fooBar"
}
}
'{
"jsonrpc": "2.0",
"id": 1953,
"result": [
{
"time_in_force": "good_til_cancelled",
"reduce_only": false,
"price": 0.0028,
"post_only": false,
"order_type": "limit",
"order_state": "open",
"order_id": "146062",
"max_show": 10,
"last_update_timestamp": 1550050597036,
"label": "fooBar",
"is_rebalance": false,
"is_liquidation": false,
"instrument_name": "BTC-15FEB19-3250-P",
"filled_amount": 0,
"direction": "buy",
"creation_timestamp": 1550050597036,
"average_price": 0,
"api": true,
"amount": 10
}
]
}Retrieves a list of all open orders that have a specific label within a given currency. This is useful for tracking and managing groups of related orders that share the same label.
Open orders are orders that have been placed but not yet filled or cancelled. The label helps organize and identify related orders.
Scope: trade:read
curl --request GET \
--url https://test.deribit.com/api/v2/private/get_open_orders_by_label \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1953,
"method": "private/get_open_orders_by_label",
"params": {
"currency": "BTC",
"label": "fooBar"
}
}
'{
"jsonrpc": "2.0",
"id": 1953,
"result": [
{
"time_in_force": "good_til_cancelled",
"reduce_only": false,
"price": 0.0028,
"post_only": false,
"order_type": "limit",
"order_state": "open",
"order_id": "146062",
"max_show": 10,
"last_update_timestamp": 1550050597036,
"label": "fooBar",
"is_rebalance": false,
"is_liquidation": false,
"instrument_name": "BTC-15FEB19-3250-P",
"filled_amount": 0,
"direction": "buy",
"creation_timestamp": 1550050597036,
"average_price": 0,
"api": true,
"amount": 10
}
]
}The currency symbol
Currency, i.e "BTC", "ETH", "USDC"
BTC, ETH, USDC, USDT, EURR user defined label for the order (maximum 64 characters)
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Unique order identifier
"ETH-100234"
Order state: "open", "filled", "rejected", "cancelled", "untriggered"
open, filled, rejected, cancelled, untriggered, triggered Order type: "limit", "market", "stop_limit", "stop_market"
market, limit, stop_market, stop_limit Order time in force: "good_til_cancelled", "good_til_day", "fill_or_kill" or "immediate_or_cancel"
good_til_cancelled, good_til_day, fill_or_kill, immediate_or_cancel Unique instrument identifier
"BTC-PERPETUAL"
The timestamp (milliseconds since the Unix epoch)
1536569522277
The timestamp (milliseconds since the Unix epoch)
1536569522277
Direction: buy, or sell
buy, sell Price in base currency or "market_price" in case of open trigger market orders
User defined label (up to 64 characters)
true for post-only orders only
true if created with API
Original order type. Optional field
market, market_limit Optional (only for spot). true if order was automatically created during cross-collateral balance restoration
Optional (not added for spot). true if order was automatically created during liquidation
true if order has reject_post_only flag (field is present only when post_only is true)
Optional (not added for spot). 'true for reduce-only orders only'
true if created via Deribit frontend (optional)
Optional field with value true added only when created with Mobile Application
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
The actual display amount of iceberg order. Absent for other types of orders.
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.
It represents the order size in contract units. (Optional, may be absent in historical data).
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.
Average fill price of the order
advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).
usd, implv Implied volatility in percent. (Only if advanced="implv")
Option price in USD (Only if advanced="usd")
Whether the trigger order has been triggered
Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".
index_price, mark_price, last_price Trigger price (Only for future trigger orders)
The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)
The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)
true if order made from block_trade trade, added only in that case.
true
true if the order is a MMP order, otherwise false.
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.
true if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise false.
Options, advanced orders only - true if last modification of the order was performed by the pricing engine, otherwise false.
If order is a quote. Present only if true.
Name of the MMP group supplied in the private/mass_quote request. Only present for quote orders.
Identifier of the QuoteSet supplied in the private/mass_quote request. Only present for quote orders.
The same QuoteID as supplied in the private/mass_quote request. Only present for quote orders.
Id of the trigger order that created the order (Only for orders that were created by triggered orders).
"SLIB-370"
The name of the application that placed the order on behalf of the user (optional).
"Example Application"
true if order was cancelled by mmp trigger (optional)
true
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)
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 The Ids of the orders that will be triggered if the order is filled
Order Id
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
first_hit, complete_fill, incremental Unique reference that identifies a one_cancels_others (OCO) pair.
ID of the order that triggered this order.
"ETH-100234"
true if the order is an order that can be triggered by another order, otherwise not present.
true if the order is an order that can trigger an OCO pair, otherwise not present.
The id that was sent in the request
Was this page helpful?