Results 1 to 7 of 7

Hybrid View

  1. #1
    It seems there might be a misunderstanding in the way the Lightstreamer Client API is being used.
    To ensure the API is used correctly, I recommend reviewing the parameters passed to the class constructors against the official documentation.
    This will help clarify the expected number of parameters and their intended use, leading to more effective integration of the Lightstreamer Client.

  2. #2
    Thanks for the pointer. I realised the main error in what I was doing shortly after I posted, which was I wasn’t passing tuples into the subscription command.

    That has moved me on to the next error which seems to be that the import command does not bring in custom variable types that the API documentation assumes are there.

    Not sure if it is me being silly or whether the documentation is for an older version of the code.

    For example the documention says you should create a subscription via the following

    sub = Subscription("MERGE",["item1","item2","item3"],["stock_name","last_price"])

    but that doesn’t work, as Subscription variable isn’t recognised and I find I have to do this;

    subscription_data = LightstreamerSubscription("MERGE", ['MARKET:IX.D.FTSE.CFD.IP'], ['BID'])

    Now I have a similar issue with listeners;

    class SubListener(SubscriptionListener):
    def onItemUpdate(self, update):
    print("UPDATE " + update.getValue("stock_name") + " " + update.getValue("last_price"))

    SubscriptionListener isn’t defined anywhere so you can’t pass it as a variable into the class.

    If you remove subscription listener from the class, you can run it and assign it, but then every time some data is passed back, the code falls over.

    What am I missing?

 

 

Similar Threads

  1. Getting exceptions on initial subscription request
    By shirli_om2 in forum Adapter SDKs
    Replies: 1
    Last Post: March 16th, 2023, 02:15 PM
  2. Replies: 5
    Last Post: December 23rd, 2010, 08:34 AM
  3. Getting time out on initial subscription request
    By PeterHiross in forum Adapter SDKs
    Replies: 4
    Last Post: December 20th, 2010, 08:36 AM

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 07:17 AM.