Edit Orders

put
Edit Open Orders

https://api.liquid.com/orders/{order_id}
Edit the price and/or quantity of an open order.
Request
Response
Request
Path Parameters
order_id
required
string
Example of an order ID: 1587896163.
Body Parameters
price
required
string
Example: {"price": "5555"}
quantity
required
string
Example: {"quantity": "0.45"}
Response
200: OK
{
"id": 1587896163,
"order_type": "limit",
"quantity": "0.45",
"disc_quantity": "0.0",
"iceberg_total_quantity": "0.0",
"side": "buy",
"filled_quantity": "0.0",
"price": 5555.0,
"created_at": 1598948555,
"updated_at": 1598949626,
"status": "live",
"leverage_level": 1,
"source_exchange": "QUOINE",
"product_id": 1,
"margin_type": null,
"take_profit": null,
"stop_loss": null,
"trading_type": "spot",
"product_code": "CASH",
"funding_currency": "USD",
"crypto_account_id": null,
"currency_pair_code": "BTCUSD",
"average_price": 0.0,
"target": "spot",
"order_fee": 0.0,
"source_action": "manual",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": "1165241_1598948553438",
"margin_used": "0.0",
"margin_interest": "0.0",
"unwound_trade_leverage_level": null
}

put
Update Take Profit and/or Stop Loss

https://api.liquid.com/orders/{order_id}/update_tpsl
Update the take_profit and/or stop_loss of an open order.
Request
Response
Request
Path Parameters
order_id
required
string
Example of an order ID: 1587896701.
Body Parameters
take_profit
required
string
Example: {"take_profit": "7111"}
stop_loss
required
string
Example: {"stop_loss": "6111"}
Response
200: OK
{
"id": 1587896701,
"order_type": "limit",
"quantity": "2.34",
"disc_quantity": "0.0",
"iceberg_total_quantity": "0.0",
"side": "buy",
"filled_quantity": "0.0",
"price": 6500.0,
"created_at": 1598950076,
"updated_at": 1598950437,
"status": "live",
"leverage_level": 100,
"source_exchange": 0,
"product_id": 1,
"margin_type": "cross",
"take_profit": "7111.0",
"stop_loss": "6111.0",
"trading_type": "cfd",
"product_code": "CASH",
"funding_currency": "USD",
"crypto_account_id": null,
"currency_pair_code": "BTCUSD",
"average_price": 0.0,
"target": "open",
"order_fee": 0.0,
"source_action": "netout_open",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": "1165241_1598950075600",
"margin_used": "152.1",
"margin_interest": "0.1521",
"unwound_trade_leverage_level": null
}