Tag | Name | Type | Required | Description |
---|---|---|---|---|
40 | OrdType | Char | Y | Order Type must be 2 (Limit) |
152 | CashOrderQty | Decimal | Y | The notional value you wish to trade |
TimeInForce
, SelfTradePrevention
, and PostOnly
are supported.
OrderQty
when submitting a limit order with CashOrderQty
.CashOrderQty
on limit orders is available for both buy and sell orders despite the following example featuring a buy order.OrdType=1|Side=1|CashOrderQty=30000
However, a market order leaves the executed price out of the client’s control.
With the following market state:
Bid Size | Bid | Ask | Ask Size |
---|---|---|---|
60,000 | 10 | ||
10 | 59,000 |
notional/price
division to calculate the necessary OrderQty
. The resulting order would look like:
OrdType=2|Side=1|Price=60000|OrderQty=0.5
If this order is filled at $2,000, then everything works as intended. In actuality, the market may change from the time in between when the user submits the order and when it is received by the exchange.
To illustrate, consider the case where the market state has changed to the following at the time when the exchange receives your order:
Bid Size | Bid | Ask | Ask Size |
---|---|---|---|
59,000 | 10 | ||
10 | 58,999 |
CashOrderQty
instead of OrderQty
:
OrdType=2|Side=1|Price=60000|CashOrderQty=30000
Given the same market state:
Bid Size | Bid | Ask | Ask Size |
---|---|---|---|
59,000 | 10 | ||
10 | 58,999 |
0.50847457
, making the total notional of this order $29,999.9996.
In a separate example, with the following market state:
Bid Size | Bid | Ask | Ask Size |
---|---|---|---|
60,500 | 1 | ||
59,500 | 0.3 | ||
10 | 59,999 |
0.2025
.
CashOrderQty
is not supported.OrderQty
/CumQty
/LeavesQty
is supplied in all Execution Reports. In particular OrderQty
is calculated after the order has been processed as a taker (i.e., it is NOT calculated with CashOrderQty / Price
), such that all quantity tags are consistent with one another.Size
field is populated in all WebSocket feed messages. No changes are expected from the perspective of a WebSocket consumer.Example 1 - A buy GTC order partially fills before resting
CashOrderQty
in the ExecutionReport is not $1,000 due to fees and base increment truncation.0.03 * $2951.86666... = $88.556
.The remaining notional of $996.01591412 - $88.556 = $907.45991412
will rest on the book with a quantity of $907.45991412 / $2952 = 0.30740512
.Note that OrderQty = CumQty + LeavesQty
. In the case of this specific order we have: 0.03 + 0.30740512 = 0.33740512
.The order is now rested on the book and be filled as passive.Example 2 - A buy IOC order that results in no fills
OrderQty
is 0
in this case and this order will not be published in public WebSocket channels. It appears in the user channel only for this particular client.Example 3 - A sell GTC order with Self Trade Prevention (decrement and cancel)
LeavesQty
of 0.025
that was self trade cancelled: