-
April 29th, 2024, 08:07 AM
#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.
-
April 29th, 2024, 09:57 AM
#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
-
By shirli_om2 in forum Adapter SDKs
Replies: 1
Last Post: March 16th, 2023, 02:15 PM
-
By chanro4 in forum Client SDKs
Replies: 5
Last Post: December 23rd, 2010, 08:34 AM
-
By PeterHiross in forum Adapter SDKs
Replies: 4
Last Post: December 20th, 2010, 08:36 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:01 AM.
Bookmarks