Hi. I was wondering if it is possible to place a cash quantity stock order via the API.
As illustrated here (https://www.interactivebrokers.com/...ecializedorderentry/dynamic_cash_quantity.htm), the idea is that the number of shares would be calculated dynamically by IB based on the current stock price.
I tried placing API orders specifying cashQty and leaving totalQuantity unspecified (or setting it to '' and None) in the Order class. However, that returns "Error 321, [...]- The size value cannot be zero: [...] Canceled order: [...].
Any advice would be highly appreciated. Thank you.
As illustrated here (https://www.interactivebrokers.com/...ecializedorderentry/dynamic_cash_quantity.htm), the idea is that the number of shares would be calculated dynamically by IB based on the current stock price.
I tried placing API orders specifying cashQty and leaving totalQuantity unspecified (or setting it to '' and None) in the Order class. However, that returns "Error 321, [...]- The size value cannot be zero: [...] Canceled order: [...].
Any advice would be highly appreciated. Thank you.