Since I was just starting out, I set the number of shares according to my asset status and started trading, but I encountered another unexpected behavior…
Until now, I had been testing the program with the minimum unit of 100 shares, but when I increased the number of shares, the order was “consigned at a different rate”! Surprise
Basically, it is a market order program, but since it is margin trading, I assumed that it would interpret it as a swallowing action and execute the entire order.
However, I don’t know if it properly judged the situation on the order board or if it was simply a contract at an unfavorable rate, but it was signed in parts at a different rate.
*For the time being, I think it is the latter.
The so-called order number (OrderID) is the same, but the data structure is such that multiple different execution numbers (ExecutionID) and quantities (Qty) are linked.
You can settle all at once by specifying the symbol and side of the trade, but you cannot settle all at once by order number (OrderID), so you need to specify the execution number (ExecutionID) and quantity (Qty) to request a settlement order.
…It’s really difficult.