Jump to content


  • Content count

  • Joined

  • Last visited

About chriss

  • Rank

Profile Information

  • Location
  1. Rony Thanks very much for taking the time to post this. After reading your posting, I was finally able to get this to work. Cheers Chris.
  2. Hi PM I did supply the TradingAccountID parameter. The C# code is: string requestString = serverBaseURL + string.Format("/order/tradehistory?TradingAccountId={0}&maxResults=500&from={1}", tradingAccountId, unixTimestamp); Kind Regards Chris.
  3. Hi PM Many thanks for looking into this. I may have not been clear in my bug report, for which I apologise. It's returning the last 200 trades as of the date when the query is made. It's ignoring the from date. I can understand the limitation of 200 results and I could easily work around that. But I would have thought this was for each query not a limit on the entire trade history. If I ask for trades from 23/3/2020, I would expect the 200 trades from that date. The query appears to just be returning the last 200 trades back from today and ignoring the specified date. Surely this is a bug rather than a limitation? Kind Regards Chris.
  4. I am seeing the same behaviour from tradehistory. When I make a call like this in C#: string requestString = serverBaseURL + string.Format("/order/tradehistory?TradingAccountId={0}&maxResults=500&from={1}", tradingAccountId, unixTimestamp); Where unixTimestamp = 1584955458 (equivalent to approx 23/3/2020) I always get the last 200 trades. It appears that the "from" parameter is ignored. The trading account ID I'm using is correct as I got that from a call to /useraccount/ClientAndTradingAccount. And this code used to work as I previously used it to back-populate some trade history into an Excel sheet. Kind Regards Chris.
  5. Lightstreamer

    Hi PM, I'm a UK client. Chris.
  6. Lightstreamer

    Apologies PM, the result of running this code is that it simply waits for me to press a key with nothing appearing in the console, so no callbacks to QuoteListener. Kind Regards Chris.
  7. I know this forum doesn't support Lightstreamer but I am trying to create the smallest working C# .NET console app that will give me a streaming price. Finding the right set of parameters is proving difficult. Looking at the Lightstreamer documentation doesn't really help as this problem might be specific to the CityIndex parameters. I've managed to use the cityindex API for various other stuff without issues, so I have a valid session ID, etc.. Can you see an obvious problem with this code? Any help is greatly appreciated. Chris. void Main() { LightstreamerClient lsClient = new LightstreamerClient("https://push.cityindex.com", "STREAMINGALL"); lsClient.connectionDetails.User = <UserName>; lsClient.connectionDetails.Password = <SessionId>; lsClient.connect(); var testSubscription = new Subscription("MERGE"); testSubscription.Fields = new string[2] { "MarketId", "Bid"}; testSubscription.Items = new string[1] { "PRICE.154297" }; testSubscription.DataAdapter = "PRICES"; //testSubscription.RequestedMaxFrequency = "3.0"; testSubscription.addListener(new QuoteListener()); lsClient.subscribe(testSubscription); Console.WriteLine("Press a key to quit..."); Console.Read(); } class QuoteListener : SubscriptionListener { void SubscriptionListener.onClearSnapshot(string itemName, int itemPos) { Console.WriteLine("Clear Snapshot for " + itemName + "."); } void SubscriptionListener.onCommandSecondLevelItemLostUpdates(int lostUpdates, string key) { Console.WriteLine("Lost Updates for " + key + " (" + lostUpdates + ")."); } void SubscriptionListener.onCommandSecondLevelSubscriptionError(int code, string message, string key) { Console.WriteLine("Subscription Error for " + key + ": " + message); } void SubscriptionListener.onEndOfSnapshot(string itemName, int itemPos) { Console.WriteLine("End of Snapshot for " + itemName + "."); } void SubscriptionListener.onItemLostUpdates(string itemName, int itemPos, int lostUpdates) { Console.WriteLine("Lost Updates for " + itemName + " (" + lostUpdates + ")."); } void SubscriptionListener.onItemUpdate(ItemUpdate itemUpdate) { Console.WriteLine("New update for " + itemUpdate.ItemName); IDictionary<string, string> listc = itemUpdate.ChangedFields; foreach (string value in listc.Values) { Console.WriteLine(" >>>>>>>>>>>>> " + value); } } void SubscriptionListener.onListenEnd(Subscription subscription) { // throw new System.NotImplementedException(); } void SubscriptionListener.onListenStart(Subscription subscription) { // throw new System.NotImplementedException(); } void SubscriptionListener.onRealMaxFrequency(string frequency) { Console.WriteLine("Real frequency: " + frequency + "."); } void SubscriptionListener.onSubscription() { Console.WriteLine("Start subscription."); } void SubscriptionListener.onSubscriptionError(int code, string message) { Console.WriteLine("Subscription error: " + message); } void SubscriptionListener.onUnsubscription() { Console.WriteLine("Stop subscription."); } }