I still use the Legacy DDE API to submit orders from Excel to TWS. But a TWS update about a year ago?
completely broke order submission for me, which I've been pulling my hair out troubleshooting, but I think I found the root of the problem but don't know how to fix it:
When I try to use IB's Excel SAMPLE file (LegacyTwsDde.xls, which is the default one that gets downloaded with any TWS API installation), orders don't actually get submitted to TWS and the Show Errors field gives this message (screenshot below):
Error code: 10270 / Message:?The NbboPriceCap' order attribute is not supported.
Googling that error found this IB Github page:?, which says this about the error code & message above:
"
The nbboPriceCap IBApi.Order attribute is no longer supported. Error received with TWS versions 983+"
Moreover, I found what I think is a related issue discussed in a couple threads on this very forum:
-?
/g/insync/topic/ib_tws_beta_983_0n_version/80870459?p=-?
/g/twsapi/topic/82377975?p=,,,20,0,0,0::,,,0,0,0,82377975TLDR: I think what's going on is that 3 order attributes seem to have been deprecated in some recent TWS or TWS API update, but they never bothered to update the IB Sample Excel files, so using them to submit an order doesn't work because they still refer to an order attribute that no longer exists.So if that's the problem, how might I modify the Sample Excel file so that it no longer looks for this de-supported attribute?? I know a lot of people on this forum have good programming skills and write their own custom API code...but I still rely on the Sample excel files IB supplies. I looked through all the VBA, thinking maybe I could just comment out that NBBO order attribute, but couldn't find anything that looked relevant. Hoping someone can look at that Sample file (LegacyTwsDde.xls, it should be in the?C:\TWS API\samples\Excel folder for anyone who has downloaded TWS API) and tell me how to fix this. Thank you!!
