Tick data updates

Created at 04 Mar 2020, 14:27
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AC

acrigney

Joined 25.05.2017

Tick data updates
04 Mar 2020, 14:27


Does tick data only come when there is a change of value? sometimes I get no data returned at all.

I know you said tick data depends on the broker.

private void btnGetTickData_Click(object sender, EventArgs e)
        {
            DateTime now = DateTime.Now;            
            long from = ((DateTimeOffset)now.AddMilliseconds(-1)).ToUnixTimeMilliseconds();
            long to = ((DateTimeOffset)now).ToUnixTimeMilliseconds();
            GetTickData(from, to);
        }


@acrigney
Replies

PanagiotisCharalampous
04 Mar 2020, 14:36

Hi acrigney,

What does GetTickData() supposed to do?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

acrigney
04 Mar 2020, 15:01

RE:

Get the latest tick data.

PanagiotisCharalampous said:

Hi acrigney,

What does GetTickData() supposed to do?

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

PanagiotisCharalampous
04 Mar 2020, 15:06

Hi acrigney,

Why do you use a timespan of one millisecond? It is very probable that there will not be any data within this timespan.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

... Deleted by UFO ...

acrigney
05 Mar 2020, 00:47

RE:

So it looks like the only way to get the latest tick data is to pool for it?

kerrifox19 said:

Thanks for sharing this info with us.

 


@acrigney

PanagiotisCharalampous
05 Mar 2020, 08:30

Hi acrigney,

I do not understand what do you mean when you say "pool". You can get historical tick data using ProtoOAGetTickDataReq and you can get spot prices streamed to you using ProtoOASubscribeSpotsReq.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

acrigney
05 Mar 2020, 09:39

RE:

So sorry mate I ment to type poll! So I can use the TickDataReq to poll for any new tickdata up to the last millisecond and if I don't get any new data I will just sleep for a milli sec and then try again?

PanagiotisCharalampous said:

 

Hi acrigney,

I do not understand what do you mean when you say "pool". You can get historical tick data using ProtoOAGetTickDataReq and you can get spot prices streamed to you using ProtoOASubscribeSpotsReq.

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

PanagiotisCharalampous
05 Mar 2020, 09:43

Hi acrigney,

You can use ProtoOAGetTickDataReq to get data for specific period of time. If there are tick data in the specified time span they will be returned. If there are not, the repsonce will be empty.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous