Order workflow, timing, and edge cases
Order lifecycle
There are 3 statuses that DriveWealth considers immutable; CANCELLED
, REJECTED
, and FILLED
.
When an order is submitted it will be returned with a status of NEW
. From here the status can be updated to any of the following; PARTIAL_FILL
, CANCELLED
, `REJECTED
, FILLED
.
A PARTIAL_FILL
will ONLY transition to FILLED
or CANCELLED
.
On fractional orders that are < 1 share you should not expect to receive a PARTIAL_FILL
status. For orders that are fractional but > 1 shares (eg. 5.12580012) you will receive a PARTIAL_FILL
status for the whole share execution, and upon fractional share execution the status will be updated to FILLED
.
For PARTIAL_FILL
orders that wind up being CANCELLED
its possible to determine the executed amount prior to the order cancellation using the cumulativeQuantity
in the response. cumulativeQuantity
is the total amount that has been filled, where the quantity of an order is the amount that was requested.
Non-market hours orders
DriveWealth will accept market orders that are placed after 4:00 pm ET, and will hold them overnight to release on market open the following business day.
For partners that don't want their customer orders to be queued for market open we provide the preventQueuing
parameter when creating the order. By sending the order request with this parameter set to true the order will be rejected if submitted or received after 4:00pm ET.
To help determine whether a NEW
order will be executed immediately or queued for the next market session there is an orderExpires
attribute in the order status response. For example, an order submitted after hours will have an orderExpires
set to 4:00pm ET of the following market session.
Market orders that are submitted overnight are sent to DriveWealth's executing brokers at 9:05am ET and will generally be part of the opening auction. Orders cannot be cancelled after these times for the following exchanges:
NASDAQ Names - 9:28am ET
NYSE ARCA Names - 9:29am ET
NYSE American Names - 9:29am ET
BATS Names - 9:28am ET
IEX Names - 9:28am ET
NYSE Names - Open Time
Orders that are submitted after 9:28am ET will not be part of the opening auction and are sent directly to the street for execution.
Security halts
DriveWealth processes security halts differently for fractional and whole share orders.
- Whole Share orders that are submitted during a security halt are left in a
PENDING
state, and will be processed once the halt has been lifted. - Fractional Share orders, e.g. 0.555555 shares, that are submitted during a security halt are immediately
REJECTED
When a security halt does occur, Partners are provided an instrument updated event that would be structured as the following:
{
"id": "event_17913550-6db0-4086-9137-3fd728bd6821",
"type": "instruments.updated",
"timestamp": "2019-08-21T16:41:53.938331938Z",
"payload": {
"instrumentID": "26fa9515-d1c6-44ce-93b2-b94430451508",
"previous": {
"status": "ACTIVE"
},
"current": {
"status": "HALTED"
}
}
}
Updated about 3 years ago