Jump to content


  • Content count

  • Joined

  • Last visited

  1. Thank you. May you please approve this post? I'd like to bookmark and share the information here.
  2. Can you explain how platforms such as NinjaTrader and Tradingview are giving me data from Forex.com going back to 1997?
  3. Hello, I am finding that the endpoint is returning empty bars for multiple symbols before 2015. Here are my GET requests to the endpoint. The only difference between the two requests are the dates. I repeated this test for all 1 year intervals beginning 2007-2008, 2008-2009, etc and the only GET requests that return non-empty price bars are those requests after 2014. For most requests before 2015, I only get a partial price bar response and zero price bars. Are you able to explain why this is? If there is better endpoint to get price history please advise. Doesn't Work : 4/19/2014 12:00:00 AM - 4/19/2015 12:00:00 AM https://ciapi.cityindex.com/TradingAPI/market/401153870/barhistorybetween ?FromTimestampUTC=1397865600 &ToTimestampUTC=1429401600 &MarketId=401153870 &MaxResults=4000 &Interval=Day &Span=1 &PriceType=Mid &Session=my_session_id &UserName=my_user_name Does Work : 4/19/2015 12:00:00 AM - 4/18/2016 12:00:00 AM https://ciapi.cityindex.com/TradingAPI/market/401153870/barhistorybetween ?FromTimestampUTC=1429401600 &ToTimestampUTC=1460937600 &MarketId=401153870 &MaxResults=4000 &Interval=Day &Span=1 &PriceType=Mid &Session=my_session_id &UserName=my_user_name
  4. We're coming up on a year. There are several issues on this thread. Is there any plan to for getting these bugs and limitations fixed?
  5. I'm looking for the supported span/interval combinations but I'm not able to find it in the documentation: https://docs.labs.cityindex.com/#HTTP Services/GetLatestPriceBars.htm%3FTocPath%3DCIAPI%20Reference|HTTP%20Services|Price%20History|_____1 The error I receive when requesting 4 minute PriceBars is: The combination of interval and span you requested is not supported. But there is no mention of what combinations are supported. I'm expecting to find a table like this: Minute: 1, 2, 3, 5, 10, 30 Hour: 1, 2, 3, 4 Day: 1, Week: 1
  6. Hello, I am trying to aggregate my historical trades to calculate my average position price and size. To do this I need to know which trades are buy/sell to open (buy/sell to close can be calculated by tracking when size becomes zero). The only other alternative I can think of would be to request ALL history since the account was created and funded to ensure starting from a flat position. Of course, this is highly impractical when we only want to analyze the last month of historical trades. Below is an example simplification of a ApiTradeHistoryDTO[ ] array filtered by a single symbol. As an example: Sell 1 at 99 (closing a previous position) Buy 1 at 100 (opening new position, we need a bit to know to start here rather than the prior order) Buy 1 at 101 Buy 1 at 102 Sell 1 at 103 Sell 1 at 104 Sell 1 at 105 (net position closed) The average position is Long 3 at 101. The only way to calculate this is by knowing that the second order in the array was a buy to open order. Otherwise, we would mistake the first order for an opening order when it is actually a closing order. What is the recommended way to get this result with my historical trades?