Edit Orders

put
Edit Open Orders

https://api.liquid.com/orders/{order_id} OR /orders/client:{client_order_id}
Edit the price and/or quantity of an open order.
Request
Response
Request
Path Parameters
client_order_id
optional
string
Client order ID. Eg. /orders/client:reqcn1
order_id
required
string
System generated order ID.
Body Parameters
price
required
string
Example: {"price": "5555"}
quantity
required
string
Example: {"quantity": "0.45"}
Response
200: OK
{
"id": "5000144155",
"order_type": "limit",
"quantity": 0.005,
"disc_quantity": 0.0,
"iceberg_total_quantity": 0.0,
"side": "buy",
"filled_quantity": 0.0,
"price": 25000.0,
"created_at": 1627903896,
"updated_at": 1628054340,
"status": "live",
"leverage_level": 25,
"source_exchange": "QUOINE",
"product_id": "1",
"margin_type": "cross",
"take_profit": 0.0,
"stop_loss": 1.0,
"trading_type": "margin",
"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": "manual",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": "reqcn1"
}
404: Not Found
{
"message": "live_order_not_found"
}

Update order requests for non-live orders will be responded with 404.

put
Update Take Profit and/or Stop Loss

https://api.liquid.com/orders/{order_id}/update_tpsl OR /orders/client:{client_order_id}/update_tpsl
Update the take_profit and/or stop_loss of an open order.
Request
Response
Request
Path Parameters
client_order_id
optional
string
Client order ID. /orders/client:{client_order_id}/update_tpsl
order_id
required
string
System generated order ID.
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
}

‚Äč