Excel api login issue

13 posts / 0 new
Last post
Excel api login issue

hi guys, im having issue logging in demo sheet after fill in user credentials and api key, after I clicked log in button, it throw up error on log in vba code:

runtime error '1004', unable to get the RTD property of the wooksheetFunction class

and then I clicked on debug, looks like its coming from loginButton:

Dim authResult As Dictionary
Set authResult = restClient.authenticateAccount(userName, password, apiKey)
If Not authResult Is Nothing Then
appendActivity "Connected"
' Configure Excel to pull streaming updates as often as possible
Application.RTD.ThrottleInterval = 0
' Uncomment for real-time prices - this is very CPU intensive
' Buffer interval defaults to 500ms
'Application.WorksheetFunction.RTD "IG.api.excel.RTD.IGApiRTDServer", "", "bufferInterval", "0"
' Set manual refresh to true from very remote locations
' Application.WorksheetFunction.RTD "IG.api.excel.RTD.IGApiRTDServer", "", "manualRefresh", "true"
' This will require manually calling refresh to update lighstreamer subscriptions, i.e.
' Application.WorksheetFunction.RTD "IG.api.excel.RTD.IGApiRTDServer", "", "refresh"
Dim maxPriceRequestsPerSecond As Double
maxPriceRequestsPerSecond = 0 ' all available updates
If restClient.streamingAuthentication(maxPriceRequestsPerSecond) Then
m_loggedIn = True
appendActivity "Lightstreamer connection failure"
End If
appendActivity "Authentication failed"
End If

End Sub

Re: Excel api login issue

Hi allenshi709

Welcome to the Labs Community.

Are you able to log in successfully to the Companion App using your details? You can find the app here: https://labs.ig.com/sample-apps/api-companion/index.html

Also, did you download the latest version of the Excel sample app? Older versions may have problems.

Lastly, let us know which version of Excel and Windows you have and if they're 32-bit or 64-bit.


thanks for you reply Chris, i

thanks for you reply Chris, i can log into PROD the link you provided. i downloaded the sample package last night and my pc is 64 bits.

Thanks for this. Is your

Thanks for this. Is your Excel version 64-bits as well?


yes, my excel is 64 bit as

yes, my excel is 64 bit as well. not sure where went wrong


Hi Chris

I need your help too. I am not able to log in successful to the Companion App above. the error message is

HTTP 400 "errorCode": "error.public-api.failure.encryption.required"

What is the problem?


@ allenshi709

Hi AllenShi

read this thread: https://labs.ig.com/node/132

and confirm to Chris that all is OK after update the code.

Thanks, koub. :)

Excel api login issue

Hi Chris,

I have also started getting this issue over the last week. It has happened on two machines now for no apparent reason, i.e one minute it would log on and then the next it wouldn't.
The error is with the row “result = Application.WorksheetFunction.RTD(IG_API_RTD_PROC_ID, "", "connect", m_lsHost, m_currentAccountId, password, maxPriceUpdateFrequency)”. The fix mentioned by koub in post #7 doesn't work for me as I don't have the comma issue (I have tried his fix just in case).
I have tried turning off other com Add-Ins as mentioned in a few other posts, but this has not helped. I have now run out of ideas, so any help would be appreciated.
I am on Windows 8.1, Excel 2013 and am using 1.06 of the Excel sample app.



Re: Excel api login issue

Hi all

We're currently looking into these errors, and I'll post back here once we have any news.

Thanks for your patience with this!


Excel api login issue

it would be much appreciated if this can be looked into, i have tried koub solution but didnt work for me neither.

Allenshi709, When you look in

Allenshi709, When you look in your Add-ins in excel, you should see about 12 called "ig.api.excel.rtd.igapirtdserver". Are they listed under Active Application Add-ins or Inactive Application Add-ins?
I have three computers the one that still works has them listed as Active Application Add-ins, the other two have them listed as Inactive Application Add-ins and don't work, so I'm guessing the route of the problem is somewhere around this.



Same issue

I am having the same issue, with both the sample app and new beta app. The adds-ins appear in the inactive (not disabled) add-ins list. I am using Windows 8.1, Excel 2013.

I do not have the language issue, all parameters are populated within the function call.

Everything else is working in the beta now, I am able to place trades etc, but the lack of streaming is a real issue for me. I have been trying to look at the Trust Settings etc, but am stumped for a solution.

I did try to load another third-party RTD app from demos.lightstreamer.com and it did work fine.

Any ideas would be really appreciated.


Excel api login issue - RTD

I had what sounds like the same issue. The problem I had was that though my PC is a 64bit operating system, my version of excel is 32bit and I had installed the 64bit sample spreadsheet. So I would suggest checking the version excel.

Log in or register to post comments