Skip to content

Modify order

PUT
/v1/orders/modify

Modify Open and Partially Filled Limit Orders.

The following values of an open or partially filled limit order can be modified: Price, Total Quantity, Remaining Quantity.

Parameter Description
orderId (required) Placed order Id provided by VALR
pair (required) Currency pair for the orderId.
modifyMatchStrategy (required) RETAIN_ORIGINAL which keeps the original order or CANCEL_ORIGINAL to cancel the original order or REPRICE which adjusts the order price to avoid immediate match
newRemainingQuantity (optional) New base quantity to be executed
newTotalQuantity (optional) New total base quantity for the order
newPrice (optional) Requested new price in base currency
customerOrderId (optional) Placed order ID provided by customer

Either newRemainingQuantity or newTotalQuantity can be specified in the same request, but not both. Modified orders retain their original orderId. When the response is 202 Accepted, this means that the Modify Order request has been submitted.

Important Notes

  • Only the original order account's API key can modify the order.

  • A 202 Accepted response means the modify order request has been submitted; use the Order Status REST API or WebSocket API to receive the final status.

  • Modified orders retain their original orderId.

  • The modify order request will fail if the new values are the same as the current values.

  • When using REPRICE, the system adjusts the order price to avoid an immediate match whilst keeping the order active.

  • modifyMatchStrategy:
    Controls what happens when the modified order would immediately match:

    • RETAIN_ORIGINAL: Keeps the original order unchanged if the modification would cause an immediate match.
    • CANCEL_ORIGINAL: Cancels the original order if the modification would cause an immediate match.
    • REPRICE: Adjusts the order price to avoid immediate match whilst keeping the order active.

Authorizations

apiKey

Your API key

Type
API Key (header: X-VALR-API-KEY)
+
apiSignature

HMAC SHA512 signature of the request (see Authentication section)

Type
API Key (header: X-VALR-SIGNATURE)
+
apiTimestamp

Request timestamp in milliseconds

Type
API Key (header: X-VALR-TIMESTAMP)

Request Body

application/json
JSON
{
"orderId": "0198510c-09fa-7f86-8ddb-b6b222b4e509",
"pair": "BTCUSDT",
"quantity": "0.020000",
"price": "62830"
}

Responses

Modify order request accepted

application/json
JSON
{
"id": "019817f6-da14-70f5-acc9-d7b4e71eadb2"
}

Playground

Authorization
Body

Samples