Results 1 to 6 of 6
  1. #1

    Struggling to connect via Python using a demo IG account

    Hello all,
    As per the title suggests, I am trying to use the IG API to stream some data, and am struggling with it.
    The topic came up before, but some of the posts are quite old. I have tried some github sharing python code samples found online, but I have not been able to successfully connect with any of them.

    I also tried to post directly in my browser with "https://demo-apd.marketdatasystems.com/lightstreamer/create_session.txt?LS_user=XXXXXX&LS_password=CST-YYYYYYYYYYY|XST-ZZZZZZZZZZ&LS_adapter_set=DEFAULT" (with my details now removed)


    I am getting:
    OK
    SessionId:XXXXXXXXXXXXXXXXXXXXXXX
    ControlAddress:apd144f.marketdatasystems.com
    KeepaliveMillis:5000
    MaxBandwidth:0.0
    Preamble: preparing push
    Preamble: preparing push
    Preamble: preparing push


    PROBE
    PROBE

    Are you able to please assist?

    Many thanks
    M

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi,

    Please could you share some more information about the problem you got with the Python client you have tested?
    I.e. whether you are able to open a client session or not or only the data streaming is not working.
    Could you enable library logging (https://sdk.lightstreamer.com/ls-pyt...o.html#logging)?
    Additionally, please keep in mind any potential constraints related to the versions supported by IG, which you can check here: https://lightstreamer.com/share/ig/index.html

    Regards,
    Giuseppe

  3. #3
    Hello Giuseppe. Thanks for the response. I just came across https://trading-ig.readthedocs.io/en/latest/ which solved my issue. Take care. M

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Thanks for the feedback.

    Regards,
    Giuseppe

  5. #5
    Dear M / 33isgreat,

    would you mind sharing how the trading-ig library helped?

    I am running into the same issue: Connecting to the IG lightstreamer server works via http (tested via curl), but not when using the lightstreamer python package. For both, connecting via the trading_ig wrapper or using the `from lightstreamer.client import LightstreamerClient` directly, I always end up with this:

    ```
    2024-01-03 16:25:05.179955|ERROR|lightstreamer.session|Thread-3 (_hx_local_2)|Retrying c
    onnection in 3878.010208005435ms. Cause: HTTP error
    ```

    @Guiseppe: Is there a way to increase the verbosity of the logging for the python client in order to debug what is causing this HTTP error?


    Many thanks and best regards,
    Matthias

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Matthias,

    Which version of the Python client lib are you using?
    With latest version the instructions to activate the debug logging are these: https://sdk.lightstreamer.com/ls-pyt...o.html#logging

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Connect to Lightstreamer via web socket c#
    By avdev in forum Client SDKs
    Replies: 1
    Last Post: September 25th, 2020, 02:12 PM
  2. Unable to connect via Windows command prompt
    By PBLopez in forum Client SDKs
    Replies: 1
    Last Post: April 16th, 2018, 09:04 AM
  3. DotNet Client not able to connect via NTLM proxy
    By vpurohit in forum Client SDKs
    Replies: 1
    Last Post: April 29th, 2013, 08:56 AM
  4. RTD Demo will not connect to Lightstreamer Server
    By krohnjw in forum Client SDKs
    Replies: 23
    Last Post: February 8th, 2011, 01:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 12:55 PM.