Order quantity and price were not validated against reference data.
There are several scenarios, all with unfortunate side-effects
Gateways would round quantity and price to match number of decimals implied by reference data. The user would never be notified that this happened. Example: price=43000.51 would be rounded to price=43000.5 with tick_size=0.5. The user would only find out from checking OrderUpdate.price.
Some exchanges may round quantity and/or price to match reference data. Example: price=43000.6 would be rounded by exchange to price=43000.5. The user would only find out from checking OrderUpdate.price.
Other exchanges may outright reject quantities or prices not sent with precision from reference data. Example: price=43000.6 matches on decimals (1 decimal required for tick_size=0.5). The user would find out from OrderAck (origin exchange) rejecting the request.
The solution is to use reference data to
Check if quantity and max_show_quantity are valid against min_trade_vol from reference data.
Check if price and stop_price are valid against tick_size from reference data.
Format all quantities and prices using implied number of decimals from reference data.
WARNING
This is a breaking change!
The user is now required to round all quantities and prices before sending OMS requests to the gateway.
The gateway must have receive reference data from exchange before it can be allowed to forward any OMS requests.
Order quantity and price were not validated against reference data.
There are several scenarios, all with unfortunate side-effects
price=43000.51
would be rounded toprice=43000.5
withtick_size=0.5
. The user would only find out from checkingOrderUpdate.price
.price=43000.6
would be rounded by exchange toprice=43000.5
. The user would only find out from checkingOrderUpdate.price
.price=43000.6
matches on decimals (1 decimal required fortick_size=0.5
). The user would find out fromOrderAck
(origin exchange) rejecting the request.The solution is to use reference data to
quantity
andmax_show_quantity
are valid againstmin_trade_vol
from reference data.price
andstop_price
are valid againsttick_size
from reference data.WARNING
This is a breaking change!