MarketData.GetSymbol

Created at 19 Jun 2016, 21:08
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!
moneybiz's avatar

moneybiz

Joined 06.12.2011

MarketData.GetSymbol
19 Jun 2016, 21:08


Does any call to GetSymbol causes a server trip or is the symbol data always fresh on the client side?

For example if my account currency is EUR and on my bot's OnTick event I call:

MarketData.GetSymbol("USDTRY")

will it give me the latest received symbol data from the server available at the client side without fetching it from the server again on my request or it will fetch the current symbol data form server and then return the value?

I need to process OnTick code as quickly as possible and if GetSymbol causes server trip I'll change the logic.


@moneybiz
Replies

Spotware
23 Jun 2016, 16:51

Dear Trader,

The first time this method is called it subscribes for prices and returns the symbol only when the prices are received. Any additional request will return current prices, as it's already subscribed.


@Spotware

moneybiz
23 Jun 2016, 23:53

RE:

Spotware said:

Dear Trader,

The first time this method is called it subscribes for prices and returns the symbol only when the prices are received. Any additional request will return current prices, as it's already subscribed.

Thank you.
Seems everything is OK.


@moneybiz