Order Lifecycle
If a financial instrument is to be purchased or sold (assuming it is already in the Security Deposit), a BUY or SELL order needs to be placed (created).
Starting from placing an order, the status of the order can change throughout its life.
Order Status
After an order is formed and sent to the OMS API, the status of the order may change to one of the following statuses:
- Waiting Send Create Message When the place order request is sent to the API, the order's correctness is checked, and a new order is successfully placed on OMS. However, order is NOT sent to market provider yet. The order will remain in this state until it is sent to the market provider. It will be queued if the market is closed.
- New: When OMS send the place order request to the market provider, the order will be in this status. NOTE THAT: Some trade providers (markets) set the order status as New, some as Pending "New" even if the order has been accepted to be processed. The order may still be in New status.
- Pending New: After the order is sent to the market provider (dealer) has accepted the order request, and it is now in the queue to be processed for BUY or SELL. NOTE THAT: Some trade providers (markets) do NOT set the order status to Pending New even if it accepts and puts it into the queue to be processed for BUY or SELL. The order may still be in New status.
- Partially filled: The order is filled partially.
- Filled: The entire order quantity is filled.
- Waiting Send Cancel Message When the cancel order request is sent to the API, the request correctness is checked, and order cancellation request queued on OMS. However, cancel request is NOT sent to market provider yet. The order will remain in this state until the cancel request is sent to the market provider. It will be queued if the market is closed.
- Pending Cancel: Order cancellation request is sent to the market provider; however, it is still waiting to be canceled.
- Canceled: Canceled either by the dealer or by the client.
- Waiting Send Modify Message When the modify/replace order request is sent to the API, the request correctness is checked, and order modify request queued on OMS. However, modify request is NOT sent to market provider yet. The order will remain in this state until the modify request is sent to the market provider. It will be queued if the market is closed.
- Pending Replace: Order modify request is sent to the market provider; however, it is still waiting to be modified.
- Deleted/Stopped: Deleted or stopped by the market provider (dealer) due to reasons such as unsatisfactory market dynamics for your specifications of the order.
- Rejected: Rejected by the market provider (dealer).
- Suspended: Suspended by the market provider (dealer).
- Expired: Expired due to its expiration without any successful market deal.
- Pending Replace: Order replacement/change is requested by the client; however, it is still waiting to be replaced/changed.