Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. Last week
  3. Earlier
  4. Hi, Apologies for the long delay - it should not have taken that long to receive a response. It looks as though the responding agent did not understand the query correctly, and is indeed asking you to use the Web platform to view the full account information. I'm sending you a private message with some contact information to progress this query further. Kind Regards. PM
  5. Hi Physicsman, Thank you very much for your response! Oh, I see, thank you for noting that! It hadn't dawned on me that Postman isn't suited for streaming data. Hmm, it's interesting that you note that you're suggesting that if I were to implement part of my program outside of Postman, then I could hypothetically still use Postman for the strictly REST API-interactive elements...still, looks like I need to move away from Postman as my base of operations! Oh, I ended up figuring out the issue related to the screenshot, but since you asked, that's an example response that I found in the Lightstreamer documentation. Ah yes, thank you for confirming that! I was a bit worried that I would have to make development more cumbersome by starting up a server whenever I wanted to test something out. Oh, thank you for going through the trouble of giving me a Postman example! It's interesting that the LS_protocol and LS_cid parameters are superfluous, since that contradicts the Lightstreamer documentation, unless I am missing something. But hey, if it works, it works! Thank you so much, you've been a great help!
  6. I sent an email to api support two weeks ago per your instructions (and also sent a link to this discussion for reference). I just received a reply today: "Please try to use monthly reports to view older information." I'm not sure how to interpret this response to apply it to an api call. I believe they are referring to the web trader platform. Can you offer any interpretation on this reply? It seems a bit impractical to have a 10 day lag in communication. Is there another channel to go through to get a more in depth response for this bug?
  7. Hi there, Just a few notes/queries. The Postman Web API development tool works with static APIs such as REST, it won't be able to handle streaming data that Lightstreamer sends. You'll need to code up the part of your program that can handle streamed data and use that for connecting to LS live prices. In your attached screenshot, was that a result of sending the connection query to push.cityindex.com ? I ask because the Host line states push.lightstreamer.com. You are correct, your PC does NOT need Lightstreamer server installed or running. LS Server is installed on our price servers and is used to stream out the prices that users will connect and receive. Stripping out everything else leaving the bare minimum to connect. Using Postman just for the screenshots to simulate what your connection should be sending. The following should allow you to connect to LS successfully (once you have the part of your program to handle streamed data written.) Kind Regards, PM
  8. Hi, I am running into issues creating a Lightstreamer session. I have spent the last two days scouring the FAQs (yes, including the motown69 thread and several others), the Lightstreamer documents, and the GAIN Capital API documents for solutions to no avail. If someone (probably physicsman) could please help me out, I would be very grateful. Background: I am using a demo account for access to the REST API. My demo will not expire for another 27 days. I have installed and configured both Lightstreamer 7.1.1 and Lightstreamer 7.0.3 to my machine, to different TCL ports. I never have more than one server running at a time. I am sending requests via Postman. I have successfully logged in via the POST request format described in the GAIN Capital API documents. I have successfully retrieved a session token via the GET request format described in the GAIN Capital API documents. All attempts to create a Lightstreamer session that I describe moving forward are executed very soon after successfully retrieving a new session token, and using this session token that has just been retrieved. What I am doing: I do not start a Lightstreamer server on my machine beforehand, since I assume that is unnecessary, given the http://push.cityindex.com/ URI suggests that I would be using a GAIN Capital-hosted Lightstreamer server POST request to http://push.cityindex.com/lightstreamer/create_session.txt?LS_protocol=TLCP-2.2.0&LS_cid=mgQkwtwdysogQz2BJ4Ji kOj2Bg&LS_adapter_set=STREAMINGALL&LS_data_adapter=PRICES.PRICE.154297&LS_user={{userxname}}&LS_password={{sessionxtoken}} As you can see in the URI, I am using the following parameters: LS_protocol : TLCP-2.2.0 As per the Lightstreamer documents LS_cid : mgQkwtwdysogQz2BJ4Ji%20kOj2Bg As per the Lightstreamer documents LS_adapter_set : STREAMINGALL As per the GAIN Capital API documents LS_data_adapter : PRICES.PRICE.154297 As per an example given in the GAIN Capital API documents LS_user : [the same username that worked in the previous requests] As per the GAIN Capital API documents LS_password : [the current, un-expired session token that I successfully retrieved from the preceding GET request. The session token was retrieved very soon before I attempt to send this request] As per the GAIN Capital API documents What I get: "Error: connect ETIMEDOUT" Tweaks I have tried: using "LS_adapter" instead of "LS_adapter_set" What I get: "Error: connect ECONNREFUSED" using "TCLP-2.0.0" instead of "TCLP-2.2.0" for the LS_protocol parameter What I get: "Error: connect ETIMEDOUT" using "TCLP-2.2.0 HTTP/1.1" instead of "TCLP-2.2.0" for the LS_protocol parameter I tried this because the examples from the Lightstreamer documents have the "HTTP/1.1", but it is not clear to me how or where exactly I am supposed to enter this information when sending my request. A screenshot of the example to which I am referring is attached as "image.png". I understand that this could just come down to me being too unfamiliar with HTTP. What I get: "Error: connect ETIMEDOUT" putting "HTTP/1.1" in the first line of the body of the request For rationale, see previous tweak bullet What I get: "Error: connect ETIMEDOUT" omitting the LS_data_adapter parameter What I get: "Error: connect ETIMEDOUT" Any advice would be very much appreciated!
  9. Hello! The "PriceType" parameter used in the API price history calls enables users to select between the ASK / BID / MID price for a market. Since I cannot see which value was used in the API call I can only guess that it was a different one than what the charts are plotting. The charts on the trading platforms also enable users to select between price types. Please check that the same price type is used on the charts and in the API call. As the differences between the prices are roughly the market spread - I'd guess one is different than the other. Kind Regards, PM
  10. ApiMarketInformationDTO MarginFactor

    Hi Garret, Apologies for the confusion. Many of our markets such as these popular GBP and JPY markets are setup tor Step Margin, which is banded depending upon position size. This means it is the StepMargin part of the ApiMarketInformationDTO that should be examined for the Margin information. The response looks similar to the screenshot below, which mirrors how it is shown on the Web platform. Kind Regards, PM
  11. As a quick follow-up, it does look like the API returned price matches when using the Web Trader. I apologize for the noobish question, but what's the difference?
  12. So, apologies in advance if this has been asked previously, I did attempt to search the forum first. In pulling price bars by day and attempting to calculate SMA and EMA for myself, I noticed that there seems to be a slight discrepancy between what is showing as the open and close prices of the bars versus what shows when highlighting a candlestick for the same day in the trading view. As an example, for last Friday, July 17th, 2020, the API returns the following data: { BarDate: '/Date(1594944000000)/', Open: 1.13837, High: 1.14437, Low: 1.13776, Close: 1.14276 } However, in viewing the candlestick data, this is what is displayed: O 1.13824 H 1.14430 L 1.13755 C 1.14261 My guess would be that one or the other is factoring in the spread somehow, but I can't find any documentation to corroborate that. Plus, the diff between the various data points is not consistent across the board. Any help?
  13. Hi there, I'm noticing some differences between the MarginFactor property in the ApiMarketInformationDTO vs. what the web trading platform is displaying for margin, especially for JPY pairs (2% through api, 4% on the web) and GBP pairs (2% through api, 5% on the web). I just want to make sure I'm not misreading something. Are those supposed to be same thing? Thanks! Garrett
  14. Hi, The API team want to check the interactoin of your account with the API. Please contact Client Services who are able to take your account information and can pass that onto the team for investigation. Thank you for your assistance. PM
  15. Hi, Thanks for the test results. I have asked the API team to investigate and will reply when I have a response from them. Kind Regards, PM
  16. I gave this a try and discovered that my Web Trader report only yields 400 lines of trades. I requested a year of trades up to today, and it returns 400 lines of trades in the date range of 26/05/2020 - 16/07/2020. So again, it cuts off in May but a few days ago it went back to May 14th or so -- which tells me it's only returning a fixed number of trades. Then I requested last years trades (Jan 1 2019 to Jan 1 2020) and the Web Trader report yields 400 lines again spanning from 29/08/2019 - 24/10/2019. This is consistent with the results I got via Postman and the GCAPI, so it looks like the API "MaxResults" parameter is not working on the server side.
  17. Hi, As Lightsteamer is a third party product, we are relying on their documentation. You can find it at: https://lightstreamer.com/doc A good place to start is with their General Concepts document and then in the Client Development section, find the relevant file for the programming language you are using. The only things you need to change in the documentation are the URL path (push.cityindex.com), your account credentials, and the Stream adapter targets you subscribe to. The adapters/streams are documented in the Streams section of our documentation. Kind Regards, PM
  18. Hello, For these types of queries, please contact client services where they are authorised to take your account details and investigate further. Kind Regards, PM
  19. Hi Physics Man Thank you for the Information. You have explained the 'What' needs to happen, But i am after the 'How' I can find documentation that explains how to use the https://ciapi.cityindex.com/tradingapi/ (Live) API. But i can't find any Documentation on how to use the https://push.cityindex.com/ (Live). API. Are you able to point me in the write direction? Here is an example of what i mean: - I have attached below instructions explaining how to get a session token. This works fine. But i cant find any information like that on how to use the Light-stream API. I Have downloaded the Light-streamer Client, and cant find any further information on how to connect it all up. Please can you advise....
  20. Hi there, I experienced an odd problem this morning. I have an entry algorithm set up to place a buy stop entry order 2 pips above the high price of the current bar given a certain set of circumstances - this happened on EUR/USD this morning at 10:14:55 UTC. This call returned a red card for an invalid minimum distance to target - well and good. However, the bid/offer prices that caused this to happen (that I'm receiving from Lightstreamer) don't appear to line up with the actual chart data. The order trigger level was set for 1.1329, with a bid/offer of 1.13288/1.13304 (which should still have been ok w/ EUR/USD?). However, in reviewing the chart, it looks like these prices weren't actually hit until after 10:15 AM. I'm just trying to understand what happened here, as it appears that the order should have been fine. Thanks!
  21. Hi, Directions on how to use Lightstreamer with our API: To receive streaming prices from the API, a few pre-requisites must be filled: An account on the Live environment. A client UI that can perform the login by creating a session (POST a Session) on the trading API address of the Live environment for the account. https://ciapi.cityindex.com/tradingapi/ (Live). The client UI must then subscribe to Lightstreamer so that it can receive the live prices. Note: subscribing to the real-time data streams requires authentication information to subscribe. The credentials are your account user name and the password is the Session ID received when logging into the REST part of the API. https://push.cityindex.com/ (Live). Kind Regards, PM
  22. Prices for multiple markets

    Yes, the throttle of 500 / 5 seconds is for any 500 calls. 10-15 positions should not generally cause an issue. On our trading platforms we already do something similar when the users clicks the Close All button - this sends a close order for each each position via the API very similar to what you are looking to do. Kind Regards, PM
  23. Please can you supply an example URI to test the Lightstreamer API. For now i am trying to test my authorization to see if i can connect with the below: http://push.lightstreamer.com/lightstreamer/ls_user=[UserName]&ls_password=[SessionToken] The UserName and SessionToken are paramenters which are linked to a prior step to obtain the session Token. I have tried variations to the above URI and am not having much luck. I have attached a screen shot of the error i am getting. Please can you advise. Many Thanks
  24. Prices for multiple markets

    Great, that's good to know. I'm assuming that throttling also applies to calls to the Order endpoints as well? I ask because I'm writing a method to close all open positions asynchronously, given certain sets of circumstances (if we're within x minutes/seconds of market close, for example). Since these positions will presumably be for different markets, with different quantities, directions, etc, I assumed that I can't just stuff all the position ids into one call to order/newtradeorder. However, I'd still like to close all positions as quickly as possible - hence my plan was to queue up all the close orders and make the api calls asynchronously, as opposed to having to do them all one by one. So, I guess this question is similar to my first: if I were to do that with (potentially) 10-15 open positions, is it likely that I could get throttled? Thanks!
  25. Prices for multiple markets

    Hello, 1) No, we don't have any calls where the user can pull prices for multiple markets in a single call. Throttling generally occurs when there are a large number of calls within a short time frame: 500 calls within 5 seconds. If you are only calling 15 markets that should be fine. 2) It'll mainly be limited by your internet connection and computer hardware, since each market requires bandwidth and processing power from your PC. The more simultaneous subscriptions you have, the more resources will be used. If you have a fast modern PC and a broadband internet connection, you should be able to subscribe to dozens of markets simultaneously without too much of a probelem. Kind Regards, PM
  26. ClientAccountMargin updates

    Hi, If you have open positions, then the stream updates is dependent upon your account operator. Generally, this will be between 10 - 30 seconds between each update. Kind Regards, PM
  27. Hi, Since the development backlog is an internal system only, clients won't be able to track what is on there. I should also note that the request still has to be evaluated by the backlog owner as to whether it is something the API team will implement - the possibility exists that it could be rejected. The other thing to note is that even if accepted, it will be prioritised against all the other items the team have scheduled currently. Given what they are currently working on, I'd estimate that if the request is accepted, it would be in the order of months rather than weeks. On your account history retrieval, lets check that the account is storing the trade history information and something hasn't happened to it. Please login to our Web Trader platform using your account and open the Reports component from the Workspace menu. Select the More History tab. Enter a "Start" date say a year agao or longer, and leave the "end" date as today. Click Search. Does this procedure return all the trades/orders history for your account from the selected period? Kind Regards, PM
  1. Load more activity
×