Edit Orders

Edit Open Orders

PUT https://api.liquid.com/orders/{order_id} OR /orders/client:{client_order_id}

Edit the price and/or quantity of an open order.

Path Parameters

Name
Type
Description

client_order_id

string

Client order ID. Eg. /orders/client:reqcn1

order_id

string

System generated order ID.

Request Body

Name
Type
Description

price

string

Example: {"price": "5555"}

quantity

string

Example: {"quantity": "0.45"}

{
    "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"
}

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

Update Take Profit and/or Stop Loss

PUT 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.

Path Parameters

Name
Type
Description

client_order_id

string

Client order ID. /orders/client:{client_order_id}/update_tpsl

order_id

string

System generated order ID.

Request Body

Name
Type
Description

take_profit

string

Example: {"take_profit": "7111"}

stop_loss

string

Example: {"stop_loss": "6111"}

{
    "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
}

Last updated