market data subscription

Moderator: Moderator

market data subscription

Postby alexbodn » Wed May 27, 2015 9:54 am

hello friends,

i'm building a c++ client on linux, starting from your sample,
and implementing functionality from the examples.

please clarify a small issue:
as there is api for subscribing to offers, and also to historical market
bar data at given intervals,
what i don't find clear enough, is the option to keep receiving bar
data in the future, at the given intervals, similar to the offers
.

is this supported, or do i have to request the bars at the time intervals?
for the second option, could you please give me the interval time value
for each of the timeframes? i mean DATE values.

btw, does the new history prices api bring new/relevant functionality
over the main api?

thanks in advance,
alex
alexbodn
 
Posts: 1
Joined: Wed May 27, 2015 9:36 am

Re: market data subscription

Postby Georgiy » Thu May 28, 2015 7:44 am

Hello alexbodn,

1. "as there is api for subscribing to offers"
Yes, you need to subscribe to updates of the Offers table. Use the IO2GOffersTable.subscribeUpdate method.

2. "and also to historical market"
There is no way to subscribe to historical market.

To keep historical market data in the actual state you need to track the updates in the
Offers table and change the Close, High, Low values according to the new price for the
current candle. Also, you need to track when the new candle starts (new minute, new hour,
new day etc) and create a new candle. For periods with the fixed length (minute, hour)
you just need to add the length of the period to the beginning of a candle to get the
time it completes. For the rest periods (week, month, year) the more complex calculations
are necessary.

We have an example (C# calculation) to determine candle borders. We can provide you with
it if you are interested or just prepare an example for C++ later.

Thank you.
Georgiy
FXCodeBase: Initiate
 
Posts: 150
Joined: Tue Jul 29, 2014 4:49 am


Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 4 guests