-
December 29th, 2014, 02:35 AM
#11
Hi All, I tried in 2 different PCs running:
- Windows 7
- Python 2.7.8
- Java jdk1.8.0_25
but I receive the following error:
ERROR:root:Server response error: <!--
Unable to connect to Lightsreamer Server
while the server is running, I can confirm that I can see push data using browser at http://localhost:xxxx
any suggestion?
Thanks and br
-
December 29th, 2014, 10:35 AM
#12
Hi,
I've just uploaded a new version with improved error logs, in order to print out the complete server response.
In the meantime, could you please tell us which version of Lightstreamer Server you are currently using?
Regards,
Gianluca
-
December 30th, 2014, 11:11 AM
#13
Moreover, be aware that the demo does not work with the Moderato Edition, as stated in the Compatibility Notes you can find here.
Let me know.
Thanks and Regards,
Gianluca
-
December 30th, 2014, 06:12 PM
#14
Ciao Gianluca!
many thanks for your help, following your suggestion
- I downloaded Lightstreamer Allegro/Presto/Vivace Editions at http://download.lightstreamer.com/
- I installed the deploy of stocklist demo at https://github.com/Weswit/Lightstrea...-java/releases (unzip and copying the folder into <LS path>\adapters\Demo\stocklist
- I aligned Java version with the mine : set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25 of file LS.bat in <LS path>\bin\windows
- I lauched Start_LS_as_Application.bat
- successfully checked that via browser at http://localhost:8789/demos/StockListDemo/ push stock data are displayed (I randomly choose 8789 as port, I aligned the port into conf file : <port>8789</port> of file lightstreamer_conf.xml )
- from the python IDLE, I run the code without any modification except the port at
lightstreamer_client = LSClient("http://localhost:8789", "DEMO")
now I see the following:
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
------------HIT CR TO UNSUBSCRIBE AND DISCONNECT FROM LIGHTSTREAMER-------------
(no new lines after this one, I waited ~10 minutes)
I have
- Windows 7 64bit
- Python 2.7.8
- Java jdk1.8.0_25
I'm available for further tests, any help or hint will be appreciated
Thanks and br
-
December 30th, 2014, 06:43 PM
#15
ok, after further tests I have an update, it doesn't work if I lauch it from IDLE, otherwise it works if I launch it directly from cmd or simply clicking on the icon. Many thanks!
-
December 31st, 2014, 10:52 AM
#16
Hi,
I admit I didn't test the script from the Python IDLE. It actually shows a strange behavior, I suppose due to the raw_input() function: if you hit cr just after running the code you can see all the updates printing out on the console, then the script ends. I will investigate on this. Many thanks for reporting such bizarre issue!
Regards,
Gianluca
-
January 8th, 2015, 11:57 PM
#17
Hi Gianluca, as requested on IG forum here, I post here the issue I faced while trying to develop an LS python client for IG.com API :
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi Gianluca, many thanks for your code. It works perfectly with LighStreamer Stock_List_Demo but for me it doesn't with IG LS server.
I modified your code in order to be used with IG : http://www.yourfilelink.com/get.php?fid=1018265
Instruction
1) login into http://labs.ig.com/sample-apps/api-companion/index.html with a DEMO account and copy CST, XST e account name
2) modify lines 313-318 updating values
EXAMPLE:
################################################## ##########################
############### SECTION TO BE UPDATED USING DATA PROVIDED BY REST TRADING API
cst = 'c39bccbe6e63b808606717650b7d60dfdf164344af2f0e07e 2e5640d8721a24301111'
xst = '9959426da3f4a889a21c3ec43c7b863f9488a780e6e41e898 003645a38fe4bb201111'
usr = "XAGUS"
################################################## ###########################
3) update lines 337-340 with an Item and a field (as indicated in https://labs.ig.com/streaming-api-reference) :
EXAMPLE:
subscription = Subscription( mode="MERGE",
adapter="",
items=["CHART:CS.D.EURJPY.CFD.IP:TICK"],
fields=['OFR'] )
4) save and run the code
It connects to LS server but I don't see any update after "HIT CR TO UNSUBSCRIBE AND DISCONNECT FROM LIGHTSTREAMER"...
I'm doing something wrong?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Many thanks for your quick support and best regards!
-
January 9th, 2015, 10:00 AM
#18
Hi Colombao,
are you executing the code from IDLE or from command line?
Gianluca
-
January 9th, 2015, 10:29 AM
#19
Hi Gianluca, I tried both. Does it work for you with step I provided?
Best regards
-
January 9th, 2015, 10:57 AM
#20
Hi Gianluca, i suggest you to use following schema, because I'm quite sure that it should work with IG
item_ids='MARKET:CS.D.GBPUSD.CFD.IP',
schema='UPDATE_TIME BID OFFER CHANGE MARKET_STATE'
I sent you a private message with my credentials. Thanks and br
Similar Threads
-
By Alessandro in forum Client SDKs
Replies: 1
Last Post: December 18th, 2014, 06:15 PM
-
By keyan in forum Client SDKs
Replies: 4
Last Post: December 18th, 2014, 06:12 PM
-
By subuta in forum Client SDKs
Replies: 2
Last Post: January 5th, 2012, 09:53 AM
Tags for this Thread
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 05:35 PM.
Bookmarks