Skip to main content

Modify Order via WebSocket

To modify orders on Rails platform, use the WebSocket v2 API and subscribe to the Order Creation Stream. This new WebSocket API supports every request and notification from the legacy Order Creation WebSocket. The specifications and behavior remain the same.

Order Modification Workflow

Order modification is done by submitting a Modify Order request. You will receive three responses in sequence:
  • Acknowledgment: Confirms the request was received and validates basic parameters
  • Modification Confirmation: Confirms the original order was successfully cancelled and a new order was created with the updated parameters pending acceptance
  • Creation Confirmation: Confirms the new order was accepted and created in the order book
Key differences:
AcknowledgmentModification ConfirmationCreation Confirmation
Result TypemodifyOrdermodifyOrdercreateOrder
Bodymodifying orderorder modified, pending acceptanceorder accepted
Order Statusmodifyingpendingactive
Status Code202200200
API Quota UsedIncludedNot IncludedNot included
Note that a unique clientRequestId can be used to correlate acknowledgment, confirmation, and any error responses for a single request.

Comparison with Cancel and Create Workflow

The order modification workflow provides a more streamlined process with fewer steps and lower overall latency compared to cancelling an order and creating a new one separately. Despite modifying an existing order, the modified order is treated as a new order in the order book with a new order ID, and the original order is cancelled. Since it’s essentially a cancellation followed by a new order creation, it’s subject to the same Order Limits and Restrictions as a regular order creation.