-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different Session API version between demo and live #540
Comments
Hi @Brookie144 and thank you for reporting this issue. Are you using v0.13.6 or did you locally check out the code of "ig-trading-api"? I remember that @krooq also couldn't subscribe to the live LightStreamer API but fixed it by downgrading the "lightstreamer-client-node" dependency: #514 |
Hi @bennycode, thanks for responding so quicky. I was using v0.13.3, I have updated to v0.13.6 and also tried to downgrade the 'lightstreamer-client-node' version from 8.0.5 to 8.0.4 and 8.0.1 and still run into the same issue. Edit: ig-trading-api/src/login/LoginAPI.ts Line 176 in 8c5edc6
|
@Brookie144 does it work now with v0.13.7? |
Hi @bennycode just tried with v0.13.7 and can confirm that I can login to the Lightstreamer API using a live account. |
Cool! Thanks for your help. 👏 |
Hi Benny,
I've just starting using this package, and it's really great! What I am trying to do is use the LightStreamer API to return candle data. If I use the demo environment it works fine, it's only when I try to use the live environment the LightStreamer connection stays at 'Disconnected'.
Looking at the session object between the Live and Demo, it looks like Demo is returning the Version 3 POST object from the Session API (https://labs.ig.com/rest-trading-api-reference/service-detail?id=686) where as the Live environment is returning Version 2. One of the differences is where the accountid is stored in the response. In V3, the accountId is in the response, where in V2 the accountId information is located in an accountInfo object.
I am able to login to the REST Trading API but am not able to login to the LightStreamer API as it it looks like it requires the accountid to be used as the username to make the connection.
Not sure if I am doing something wrong, so appreciate any advice anyone can provide.
The text was updated successfully, but these errors were encountered: