Jump to content

All Activity

This stream auto-updates     

  1. Earlier
  2. Hi Rony, We haven't encounterd this LS error before and are unsure what is causing it. You might be able to find an answer on the Lightstreamer forums at: https://forums.lightstreamer.com/. Kind Regards, PM
  3. Hello, I am subscribed to the market prices streaming service. After the stream connection is running for a while (it can be 1/2hr - 12hr), it'll abruptly end with this message: Any help is much appreciated, Rony
  4. order execution speed?

    Hi Sigma, I've snet you a private message - see if you can reply to that. Kind Regards, PM
  5. Hi Physicsman, I try to send you a private message but somehow the system blocked it and said I cannot send message to you. Could you suggest other ways to contact you? Thank you
  6. Hi Suchin, Glad to hear the error code 401 is now resolved. Unfortunately, we are not able to provide assistance in C#.Net coding. Kind Regards, PM
  7. order execution speed?

    Hi Sigma, The mean processing time for order execution is 25ms with a median time of 21-22ms. In terms of percentiles, it is: 37-40ms 90th percentile 45ms 95th percentile 70-80ms in the 99th percentile We can look into your specific experience if you send me a private message with your Account ID. Kind Regards, PM
  8. Thanks for above reply with this update we got order id. as we are passing username,session,content-type in body so we changed it to Headers and we got response with order Id. Now we are trying this to make call from .Net C#. Can you suggest how to pass header parameter from it??
  9. order execution speed?

    Hi Sigma, I'll check with the team and will reply when I have their response. Kind Regards, PM
  10. Hi Suchin, From the error message, are you passing the authentication message through with your call in the headers? Every call sent through the API must contain the authentication of your accoutn username and the login session you receive back in reponse to the login request. For eample, your trade request header should have the following: Kind Regards, PM
  11. Hi Physicsman, Thanks so much for the reply. I tested the ping on my side. I got a 10ms round trip time on average. So compare with the 100-200 ms execution speed there seems to be some overhead in some places or do you think that is a reasonable speed? Just want to get some idea on the average time elapse "purely" between Gaincapital get my order request, execute the order and send back the response which does not take internet latency into account.
  12. Unable to place new trade order via postman. please share us full information on this if any body have done this or admin can support this on this issue.
  13. If we same above request make through postman then error give 401 session is invalid. we also tried using C# as below syntax var NewOrder = new newstoplimitorder() { UserName = "DC*****", Session = user.Session }; NewOrder.isTrade = false; NewOrder.AutoRollover = false; NewOrder.AuditId = "LU22344697"; NewOrder.Currency = "USD"; NewOrder.LastChangedDateTimeUTC = null; NewOrder.MarketName = "AUD/CAD"; NewOrder.BidPrice = 0.948050; NewOrder.PositionMethodId = 1; NewOrder.Direction = "buy"; NewOrder.ExpiryDateTimeUTCDate = null; NewOrder.Status = null; NewOrder.MarketId = 401484300; NewOrder.LastChangedDateTimeUTCDate = null; NewOrder.Reference = null; NewOrder.OfferPrice = 0.948310; NewOrder.TriggerPrice = 0.948500; NewOrder.OrderId = null; NewOrder.Quantity = 1005; NewOrder.QuoteId = null; NewOrder.IfDone = false; NewOrder.TradingAccountId = ******; NewOrder.OcoOrder = null; NewOrder.Type = null; NewOrder.Applicability = "GTC"; NewOrder.ExpiryDateTimeUTC = null; sURL = sMainURL + "order/newstoplimitorder"; var postNewOrder = client.PostAsJsonAsync<newstoplimitorder>(sMainURL, NewOrder); postNewOrder.Wait(); HttpResponseMessage responseNewOrder = postNewOrder.Result; //HttpResponseHeader responsemsg = new HttpResponseHeader(); //responsemsg = responseNewOrder.TrailingHeaders; if (responseNewOrder.IsSuccessStatusCode) { object responseContentNewOrder = await responseNewOrder.Content.ReadAsAsync<object>(); } -- So please suggest us with full example hoe to place new order. with its full request body and formate. also if possible using .Net C#. we tried lots of time with chnage in various parameter values but not getting success
  14. Session Token Expiration

    Hi Tom, As mentioned previously, a Session is theoretically valid until a logout DeleteSession call is made. There is a database process that clears the oldest sessions that have been inactive for greater than a certain period of time, once we reach a threshold in the number of active sessions. Cannot predict or say when this will trigger since it is dependent upon those variables. I would suggest adding a login/logout to your processes so that you have a fresh session each time. Kind Regards, PM
  15. Session token expiration time

    Hi Tom, As mentioned previously, a Session is theoretically valid until a logout DeleteSession call is made. There is a database process that clears the oldest sessions that have been inactive for greater than a certain period of time, once we reach a threshold in the number of active sessions. Cannot predict or say when this will trigger since it is dependent upon those variables. I would suggest adding a login/logout to your processes so that you have a fresh session each time. Kind Regards, PM
  16. order execution speed?

    Hi Sigma, Execution speed is dependent upon your internet round trip connection time to our servers + overhead for server processing of the order. Have you checked what your connection speed to the server is by PINGing ciapi.cityindex.com? From my home, I am seeing an average 20ms round trip time. Kind Regards, PM
  17. API LogOn Problem in Python

    Hello, We do not have an official Python library to use with the API and we cannot troubleshoot Python coding. Another user in the past was working with the API with Python and very kindly shared their unofficial library on the forum: The library might be helpful to get you started. Kind Regards, PM
  18. For session tokens that are being used to pull data from the REST API only and nothing else, is there a length of time that these stay "active"? I'm going to assume somewhere around 15-20 days before having to generate a new one. I've been using the same sessionID for an indicator that I built and then noticed that it stopped working last week 9/28 when my program stopped writing my data to the database. Took me a few moments to realize it was the session token since there were no code changes last week. I generated a new sessionID, swapped them out in my code, and it started working as before. Thoughts? -Tom G-
  19. Gonna piggy back off of this thread since its the same topic. For session tokens that are being used to pull data from the REST API only and nothing else, is there a length of time that these stay "active"? I'm going to assume somewhere around 15-20 days before having to generate a new one. I've been using the same sessionID for an indicator that I built and then noticed that it stopped working last week 9/28 when my program stopped writing my data to the database. Took me a few moments to realize it was the session token since there were no code changes last week. I generated a new sessionID, swapped them out in my code, and it started working as before. Thoughts? -Tom G-
  20. API LogOn Problem in Python

    Hello, Is there any update on this topic?
  21. Dear Administrator, Is there any documentation or places that state what is the order execution speed that API user should expect (SLA)? I tried on my side and my observation is on average any market order will take 100-200 milliseconds to complete which is a little bit slow. With that time the quote could already be updated/changed. Could you confirm that this is expected execution speed? If not then probably there is something wrong with my code and I will need to make the enhancement. Thank you in advance.
  22. Hello, Based on the GainCapital Authentication API documention I am trying to test the Logon API with Python which I'm expecting to receive ApiLogOnResponseDTO however, I am getting the 400 HTTP response. Just to troubleshoot this issue I used Postman to see if I get the same error but it appears everything works just fine. Please see the attached screenshot. Here is my Python code. import requests url = 'https://ciapi.cityindex.com/TradingAPI/session' login_request_body = {'Password': 'xxxxxxxxxx', 'UserName': 'xxxxxxxxxx', 'AppKey': 'xxxxxxxxx' } login_response = requests.post(url, data = login_request_body) and here is the response I get PS C:\Code> python3.8.exe .\authapi.py <Response [400]> That being said I would like to know if there is any documentation that can provide us the sample codes in Python. I have seen such documentation for other Forex brokers such as OANDA .
  23. Hi Chris, The task is currently scheduled in the Sprint for the period 20th Oct through 2nd Nov. Kind Regards, PM
  24. PM Just wondering if there had been any progress on this issue? Kind Regards Chris.
  25. Json format

    I apologize for my not being more thorough in my debugging. I thought that I was looking at the raw response, but in fact I was looking at a string which had been corrupted by my own code. Thank you for taking the time to look into this.
  26. Thanks for your help. triggerPrice field was missing. It worked after adding this field.
  1. Load more activity
×