Looking to get Pair prices through the api.

Created at 02 Aug 2019, 21:50
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!
TradeMingZhi's avatar

TradeMingZhi

Joined 05.02.2019

Looking to get Pair prices through the api.
02 Aug 2019, 21:50


I couldn't find any documentation on how I can get a public JSON response with pair list + prices.

Anyone have a link or something?

Im building a program that just needs to refresh forex pair prices once every 10 mins and it will be a public program so the url needs to be public.


@TradeMingZhi
Replies

PanagiotisCharalampous
05 Aug 2019, 09:32

Hi wisegprs,

If you want to get spot prices via Open API, you need to supscribe to stop prices using ProtoOASubscribeSpotsReq. If you want to get trend bar data you can use ProtoOAGetTrendbarsReq. Examples for both messagtes are available in our Open API example project.

Best Regards,

Panagiotis


@PanagiotisCharalampous