garethadamson 2 Report post Posted September 28, 2015 I'm in the early stages of developing my solution. The static API works well for me, and I can fetch historical data. But when it comes to streaming, using the new Java Universal client classes, I am not seeing any data at all, and I wonder whether someone out there can help me get started. Really appreciated if you can! Perhaps the first thing to ask. Although I am sure I am sending the correct credentials to the static log on, including AppKey, the response I am receiving contains the field AllowedAccountOperator : false. Would that prevent streaming? I have waited a few days, but perhaps my AppKey still needs activating or something? 2 malyer and Yourorino reacted to this Share this post Link to post
Physicsman 25 Report post Posted September 28, 2015 Hi Gareth, Are you using a demo account that you obtained by signing up from our website? Or did you get a proper test account from your staff contact here? A quick way to check that your account credentials are fully working and operational is to see if you can use them to login to your account using any of our front end trading platforms. It can be our desktop Web or any mobile App as you prefer. All our trading platforms use the API so if you can login then your account will work directly with the API. The other thing is whether your account is a Live environment account or a Pre-Production environment account. Accounts are only usable on the environment for which they are applicable. The streaming part of the API has 2 different URLs - one for each environment. You'll need to use the correct URL for your account type. https://push.cityindex.com/ (Live). https://pushpreprod.cityindextest9.co.uk (Pre-Prod). Finally, the streaming part of our API is based upon a third party product called LightStreamer. Have you checked their documentation (http://www.lightstreamer.com/doc) to see what error message you are getting or why you would not be getting any streaming data? I assume you have subscribed to a price stream for a market you are interested in using the correct MarketID? Cordially, PM! Share this post Link to post
garethadamson 2 Report post Posted September 28, 2015 Hi Physicsman Many thanks for the quick response, and sorry, it was my silly mistake! I needed to make an explicit call to Client.connect(). <facepalm /> I now see (amongst a ton of other output) ERROR17Requested default Data Adapter for STREAMINGALL not found I should now be able to find my way around that, but if you can see immediately what mistake it suggests, it would be a mercy to let me know. So it seems the AllowedAccountOperator logon response field doesn't mean anything, or at least nothing relevant to me? Kindest regards and apologies Gareth Share this post Link to post
garethadamson 2 Report post Posted September 29, 2015 Just to let you know, I got it working. For anyone else having similar trouble afterwards... In the Universal Lightstreamer Client API (e.g. Java Client v.3 and later), you need to Set to Adapter Set to e.g. STREAMINGALL in LightstreamerClient constructor Set Items to e.g. PRICE.400616114 in Subscription constructor (takes an array of strings for several items) Set Data Adapter to e.g. PRICES in Subscription setDataAdapter method et voila! It feels slightly illogical to set the items before the adapter, but it works. Many thanks again Gareth Share this post Link to post
Physicsman 25 Report post Posted September 29, 2015 Hi Gareth, Thank you for the tip - I'm sure other users will appreciate it greatly! I'm glad to hear you managed to get it working - the AllowedAccountOperator field is not relevant to your use of the API. Kind Regards, PM! Share this post Link to post
birdy2016 1 Report post Posted February 22, 2016 Hi, im new in this forum. At the moment i use the Rest API and it works fine for me. Now, i want to use the streaming api. Is there an code example (Java) for the citiindex api? Some code snippets? Kind regrads Share this post Link to post
Physicsman 25 Report post Posted March 21, 2016 Hi, The streaming part of the API uses the third party Lightstreamer product. They have a comprehensive documentation set at their site and they also have a forum for user queries. Some introductory reading about Lightstreamer to start with is General Concepts followed by Network Protocol Tutorial. Hope that helps! PM! Share this post Link to post