Jump to content

Recommended Posts

I would like to ask if there are any limitations to the amount of historical bars/ticks you may request through the API.


I did some tests with the C# implementation of the API, requesting 1 million 1 minute bars and 1 million ticks for EUR/USD (market id: 154290). I tried both the synchronous and asynchronous calls. The methods returned successfully, but I got too few results back and they weren't consistent.


For the 1 minute candle requests I got sometimes around 4300 candles and other times close to 5800 candles back. In the first case, the earliest candle date returned was Friday 22 Nov 00:00, which sounds about right (4300 / 1440 ~ 3 days - Friday, Monday, Tuesday). In the second case, the earliest date returned was 13 Nov 00:00, which should not be correct, because 5800 1 minute candles are enough for only 4 days.


For the ticks requests I also had some variation between 50000 and 70000 ticks returned, but the earliest date was quite consistent, in the early hours of Friday 22 Nov.


Is the result incosistency related to the C# implementation or is it an issue with the API in general? If it matters, I performed the tests connecting the RPC client to https://ciapi.cityindex.com/tradingapi and https://push.cityindex.com. I would also like to ask if there are any plans in the future to allow historical requests for specific timeframes, e.g. retrieve 1 minute candles from 1st May 2013 to 30 May 2013.


Thank you in advance!

Share this post

Link to post

Hello Alexnick,


A quick update to let you know that we are looking into your query about the price data in tick and 1 minute time frames. I shall post again once I have the results.


There are plans to have the API feature to request data for specific time frames, however, it is not scheduled for the near future. Realistically, it may be awhile.

Share this post

Link to post

After investigation, the development team has been able to identify this as a bug. I've been told the priority of this bug is relatively high, so expect it to be scheduled for further investigation and resolution in the near future. However, there is no concrete date for a fix at this time.


I shall keep you updated when I hear further information. Thank you for your patience.

Share this post

Link to post

Hi physicsman - could you let me know whether the ability to call historic price bars for different points in time is already available or whether it's coming any time soon? Currently I'm using actual FTSE cash index data from CGQ, however would like to test my trading strategy on CityIndex market valuations (including out-of-hours futures values) as of course they will differ.


Thank you so much (again)!

Share this post

Link to post

Hello Cedric,


Due to our merger with Gain Capital, a large number of new higher priority work items have kept this request stuck in the backlog. I've just checked with our Core Development team and this item isn't planned for any time soon. I'm sorry it isn't better news.


Kind Regards,


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this