Skip to main content

private/amend-order

POST 

/private/amend-order

Amend an existing order on the Exchange.

This call is asynchronous, so the response is simply a confirmation of the request.

The user.order subscription can be used to check when the order is successfully created.

Please note that amend order is designed as a convenience function such that it performs cancel and then create behind the scene. The new order will lose queue priority, except if the amend is only to amend down order quantity.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/amend-order"

    api_key stringrequired

    Your API key (only required for private REST)

    sig stringrequired

    HMAC-SHA256 signature in hex (only required for private REST)

    nonce int64required

    Current timestamp in milliseconds, e.g. "1771761038000".

    params objectrequired
    order_id int64

    Optional Order ID. Either order_id or orig_client_oid must be present.

    client_oid string

    Client Order ID (maximum 36 characters).

    orig_client_oid string

    Optional Original Client Order ID. Either order_id or orig_client_oid must be present. If both exist, order_id has higher priority.

    new_price decimalrequired

    The new amended price. If no change required, input original value.

    new_quantity decimalrequired

    The new amended quantity. If no change required, input original value.

Success.
Schema
    id int64

    Echoed request id

    method string

    Method invoked

    code int32

    0 = success; non-zero indicates error (reason code).

    result object
    Present when code === 0. client_oid, order_id.
    client_oid string

    Client order ID

    order_id int64

    Order ID

    message string

    Present when code !== 0.

    original string

    Present when code !== 0.