Prices from Market Data Incremental Refresh

06 Dec 2018, 10:34Prices from Market Data Incremental Refresh#1
jam584St1posts: 5since: 06 Dec 2018

Hello. I understand that the prices I receive from Market Data Incremental Refresh are a list of pending buy and sell orders. The question is how can I get the current bid and ask prices for the current instrument? I mean, how to get the market price with the current spread. I would appreciate the answer.

06 Dec 2018, 10:51#2
Panagiotis Charalampousposts: 1818since: 13 Jan 2017

Hi jam584St1,

Depending on the Market Data Request you will send (tag 264) you will be receiving either spot prices or the full depth of market. If you have subscribed for the full depth of market, then the highest bid and the lowest ask are the spot prices.

Best Regards,

Panagiotis


Head of Community Management at cTrader
06 Dec 2018, 12:36#3
jam584St1posts: 5since: 06 Dec 2018

Yes I get full depth. I check which orders are removed from the price book and leave only those that are not deleted. But i've noticed that max bid can be higher than min ask or vice versa and the spread is negative. When I compare fix market data with cTrader current market data, I get different prices. Why it happens?

07 Dec 2018, 13:40#4
jam584St1posts: 5since: 06 Dec 2018

Could you help me with this problem? Or someone else who has a similar issue? Because I can't continue to work with the fix api until I get the right prices.

07 Dec 2018, 13:40#5
jam584St1posts: 5since: 06 Dec 2018

Could you help me with this problem? Or someone else who has a similar issue? Because I can't continue to work with the fix api until I get the right prices.

07 Dec 2018, 16:17#6
Panagiotis Charalampousposts: 1818since: 13 Jan 2017

Hi jam584St1,

FIX API should stream the exact same prices as cTrader applications. If you end up with different spot prices then probably you are doing something wrong. Can you please provide some more information why do you think you get different prices? If you could log a series of messages that you receive and result to different spot prices than cTrader it would be helpful to determine what is the problem. Also let us know the broker you use so that we can compare prices with cTrader. If it is more convenient to send the information with email, please email us at community@spotware.com

Best Regards,

Panagiotis


Head of Community Management at cTrader
07 Dec 2018, 18:06#7
jam584St1posts: 5since: 06 Dec 2018

Thanks a lot! The problem was in script. I fixed it and everything is fine.