¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??


 

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,82377975

TLDR: 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!!


 

Hi there, you can try to modify the code by commenting the line which sets the deprecated attribute. Just place ' on the line and you could also contact IB? (so they can later fix it and help other?API users like you) and tell them this problem.

Thank you

El lun, 25 sept 2023 a las 6:00, grooooper (<8dave808@...>) escribi¨®:
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,82377975

TLDR: 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!!


 

¿ªÔÆÌåÓý

As far as the legacy version goes, it should be as simple as removing the relevant rows (for example row 39 for NBBO Price Cap) from the Extended Order Attributes page, and the corresponding columns (for example column BF for NBBO Price Cap) from the Basic Orders page: and I think the other ones are in rows 37 and 38 and columns BD and BE. I¡¯d have to actually work through the code to confirm that this will be sufficient, and I don¡¯t have time for that. So take a backup copy of the workbook, make these changes, and give it a whirl. I can¡¯t test this myself because I¡¯m not set up for legacy DDE.

?

If it doesn¡¯t work, then I can make a further suggestion to fix the actual VBA code, but I don¡¯t think that should be necessary.

?

In the longer term, the obvious answer is to switch to the ¡®new¡¯ Java-based DDE interface. The sample spreadsheet for that ¨C TwsDde.xls ¨C doesn¡¯t appear to make use of these de-supported order attributes.

?

This is something you¡¯re going to have to do eventually. It may well be that IBKR aren¡¯t going to continue to support the legacy DDE going forward. It¡¯s not difficult to set it up, and it will probably save you time and trouble in the future (as well as providing more functionality, as I understand it).

?

Richard


 

Thank you both for your replies.

@joanmarcel119 - yes, as I wrote in my OP, I went looking through all the VBA, did a ctrl-F search through every Object and Module looking for text string "NBBO", but it isn't anywhere in the VBA code. I'm guessing it's somehow renamed or something, but I don't have the coding abilities to decipher how it appears in the VBA to comment it out. And yes, I've written to IB to let them know about this...I'm surprised no one else has reported it to them because it's been broken for nearly a year!

@Richard L King - yes, the first thing I tried last night was just deleting Row 39, which didn't work. Tried deleting the NBBO columns on the Basic Orders page as you suggested, but still generates that error. Can you let me know what your 'further suggestion' might be to the code?
FYI I have periodically installed and test-driven the 'new' socket-based DDE API but for some reason it has never worked well for me. Performance is incredibly laggy and inconsistent, so I always find myself running back to the Legacy DDE, which is annoying because yes I'm told the socket-based DDE is supposed to be better / faster / more-functionality etc. And yet -- perhaps due to the way my workbooks are set up (I dunno?) -- Legacy DDE has always been the only one of the IB API's that has worked reliably for me. Going back 4+ years IB was saying that they were going to sunset the Legacy DDE, and I've written them periodically to ask whether that was still the plan (and to implore them not to do so)...and they've changed their tune a bit to "yeah, at one point we were going to phase it out, but for now we're keeping it but no promises for the future".


 

¿ªÔÆÌåÓý

Ok, I¡¯ve looked into this a bit more, including stepping through the VBA with the debugger, and unfortunately I can see that the suggestions I made are not going to work, and the code change I alluded to won¡¯t help either.

?

When you install the API, it installs a library called ddedll.dll in your Windows folder. This is used under the hood by the DDE mechanism to communicate with TWS. It may well be that this library needed to be amended to filter out these unsupported order attributes, or something. And maybe the version of the API you¡¯re using doesn¡¯t have that update (by which I mean you may need a newer API version).

?

So which API version are you using? If less than 10.10 (which was the API version where these attributes were de-supported), I suggest you uninstall that one and then install 10.19, and try that. The legacy sample still has these unsupported attributes , but just leave them blank.

?

Then if you still have the problem, I think you¡¯ll have to contact IB.

?


 

Thank you for taking the time to step through the VBA code. If I'm understanding correctly, you're saying that the problem exists in the separate ddedll.dll library file, which is a black box / unmodifiable by the end user?

As for TWS / API versioning, I'm using:
  • A laptop on which I just did a fresh reinstall of Windows
  • A newly-downloaded TWS (version 10.25.1j, which is their 'LATEST' build, but I've also tried the most recent STABLE and BETA builds, same result)
  • A newly-downloaded TWS API version 10.25.01?(which is LATEST, but also tested STABLE, which is v 10.19.01, same result)
  • And the Excel file that generates the NBBO error is the default 'LegacyTwsDde.xls' file that gets downloaded along with the API. I literally just open it in its default state, put my username is cell D5 of the Basic Orders sheet, and press the 'Place / Modify Order' button on one of the default populated rows (e.g. IBM, row 15)...and it throws the NbboPriceCap error in cell J6, as shown in my screenshot.
IB support has thus far just continued to assure me that simply updating my TWS and API will solve everything, despite my protestations that it has plainly not.

They've acknowledged that the 3 order attributes were indeed desupported in API v 10.10 (as documented here:?), but the Q I can't get to the bottom of is what is it about the LegacyTwsDde.xls Sample file that's generate the NbboPriceCap error and preventing orders from getting placed? Like it's all fine and well to "de-support" order attributes, but could it simply be the case that the developers forgot to update the LegacyTwsDde Sample file, which is coded in such a way as to be submitting orders with 3 order attributes that no longer exist, and so something in the chain from Excel > API > TWS is flat-out rejecting these orders as containing, essentially, 'gibberish'? And -- if I'm understanding correctly -- there's nothing that I as the end user can easily modify in the Sample file's VBA to simply not include these now-desupported attributes? (And if that's true then...just?where/when are these attributes getting instructed?)

These all seem like issues IB's API team should understand immediately, but...well, I'm here trying to diagnose from afar because I haven't been making any progress with them.


 

Update for anyone interested: after nearly a year of trying to get IB to address this, I was finally able to get someone on their API team to replicate and acknowledge that the current Legacy DDE Sample Excel file (LegacyTwsDde.xls) indeed has a bug that prevents order submission, since it appears to reference certain order attributes that are no longer supported -- and instead of simply ignoring these attributes, the API rejects the order altogether.
No ETA given for a fix, but just documenting here what I've learned to date in case anyone finds their way to this thread in search of a solution.


 

Another update, this one not good news: IB's API developers acknowledged the bug and confirmed they were able to replicate it on their end -- I expected they'd simply patch it since it seemed like a pretty easy fix to simply remove the 3 order attributes they'd simply neglected to remove from the Legacy DDE API Sample Excel file. Instead, they informed me that after internal discussion they had decided to fully deprecate and sunset the Legacy DDE API. In other words, this was apparently the final straw in finally pulling the plug on Legacy DDE.

This is a frustrating outcome given how much I rely on it (and the fact that the new socket-bridge DDE does not work well with my file -- lag makes it altogether unusable.) It strikes me as a decision made out of mere laziness: developers forgot to update the?LegacyTws.Dde.xls Sample file to remove the de-supported order attributes, and when pressed to correct it decide "nah, we've had enough of that API anyway." Not sure I have much of a chance to get them to reconsider this, since I seem to be a lone voice in trying to get them to take this seriously (it's been broken for nearly a year and they haven't bothered to fix it.)