Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/private/edit \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 3725,
  "method": "private/edit",
  "params": {
    "order_id": "438994",
    "amount": 4,
    "price": 222,
    "advanced": "implv"
  }
}
'
{
  "jsonrpc": "2.0",
  "id": 9,
  "result": {
    "trades": [],
    "order": {
      "web": false,
      "time_in_force": "good_til_cancelled",
      "replaced": true,
      "reduce_only": false,
      "price": 50111,
      "post_only": false,
      "order_type": "limit",
      "order_state": "open",
      "order_id": "94166",
      "max_show": 150,
      "last_update_timestamp": 1616155550773,
      "label": "i_love_deribit",
      "is_rebalance": false,
      "is_liquidation": false,
      "instrument_name": "BTC-PERPETUAL",
      "filled_amount": 0,
      "direction": "buy",
      "creation_timestamp": 1616155547764,
      "average_price": 0,
      "api": true,
      "amount": 150
    }
  }
}

Query Parameters

order_id
string
required

The order id Unique order identifier

Example:

"ETH-100234"

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. The amount is a mandatory parameter if contracts parameter is missing. If both contracts and amount parameter are passed they must match each other otherwise error is returned.

contracts
number

It represents the requested order size in contract units and can be passed instead of amount. The contracts is a mandatory parameter if amount parameter is missing. If both contracts and amount parameter are passed they must match each other otherwise error is returned.

price
number

The order price in base currency.

When editing an option order with advanced=usd, the field price should be the option price value in USD.

When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%

post_only
boolean
default:true

If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).

Only valid in combination with time_in_force="good_til_cancelled"

reduce_only
boolean
default:false

If true, the order is considered reduce-only which is intended to only reduce a current position

reject_post_only
boolean
default:false

If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.

Only valid in combination with "post_only" set to true

advanced
enum<string>

Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options) advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).

Available options:
usd,
implv
trigger_price
number

Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)

trigger_offset
number

The maximum deviation from the price peak beyond which the order will be triggered

mmp
boolean
default:false

Order MMP flag, only for order_type 'limit'

valid_until
integer

Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases timed_out error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time.

display_amount
number
default:1

Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well.

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object
required
id
integer

The id that was sent in the request