TWS API, #N/A error in Excel

Discussion in 'Interactive Brokers' started by Svalbards, Apr 7, 2021.

  1. I've downloaded the latest version of TWS API and ticked the "Enable ActiveX and Sockets Clients" box under API Settings in TWS.

    However, when attempting to run the sample Excel sheet TwsRtdServer sheet or building simple RTD functions to bring in stock prices I get #N/A error codes. I've tried to repair Excel but the problem still remains. I’m running Excel on Microsoft 365.

    IB help has told me that it has come to their attention, that MS 365 does not work correctly with RTD. Thus using MS 365 is not recommended for Excel RTD usage. Is this true? Anybody else with similar problem?
     
  2. If i remember correctly, the API you have to download for a 32bit operating system despite you probably having a 64bit operating system, otherwise it does not work.
     
  3. Or perhaps its not the API but actually the TWS version must be for 32 bit. I can't remember, i had this issue 1 year or so ago.
     
  4. Thank you Signate67. I'll try but TWS is only available for 64bit. Also, according to TWS API release notes, API is now compatible with 64-bit Excel since version 973.07
     
  5. zdave83

    zdave83

    For me, RTD is working with TWS 981.2x and current version of MS 365 Excel 64-bit.
     
  6. Thank you for your reply zdave83. That's good to hear.
    I'm also using TWS 981.2x.
    My API_Version=9.81.01. Are you using that?

    In Excel when I go to File – Options – Add-ins, I see that the tws.twsrtdserverctrl add-in is inactive. When clicking Manage Excel Add-ins, I don’t see it as an available add-in. Any idea if this is the source of my problem? If so, any idea how to make the add-in active?
     
  7. zdave83

    zdave83

    API version from API_VersionNum.txt ...... API_Version=9.76.01
    twsrtdserverctrl is in the Active list.
    upload_2021-4-8_12-56-56.png

    When you look for twsrtdserverctrl, is it in a spreadsheet with RTD commands? In my spreadsheets that do not have RTD commands there's no twsrtdserverctrl in the Add-In's list.
     
  8. Thanks.
    I'm trying to run the sample sheet TwsRtdServer.xls that's in the C:\TWS API\samples\Excel\ folder. That one has RTD commands. However, twsrtdserverctrl add-in is under the Inactive Application Add-ins.
    If I click Manage Excel Add-ins below, it doesn't show up as an alternative. I don't know why.
    Did you have to load that add-in in a certain way?
     
  9. zdave83

    zdave83

    I don't recall ... its been years. However I'm sure I followed the API guide ......

    http://interactivebrokers.github.io/tws-api/excel_apis.html
     
    #10     Apr 9, 2021