HeartBeat/All symbols' price info

Created at 07 Jun 2020, 15:20
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!
BE

BenjaminR

Joined 12.06.2019

HeartBeat/All symbols' price info
07 Jun 2020, 15:20


Hi,

I have 2 questions: 

1., How often do I send HeartBeat messages to keep the API connection alive?

2., Is there an easiest  (and fastest) way o get  all symbols' Ask and Bid prices as: 

for (int i = 1; i < SymbolsNumber; i++) 

{

            message = _messageConstructor.MarketDataRequestMessage(MessageConstructor.SessionQualifier.QUOTE,
            _messageSequenceNumber, 
            "SymbolName", 1, 1, 0, 1, SymbolID);
}

Thanks,


@BenjaminR
Replies

PanagiotisCharalampous
09 Jun 2020, 09:39

Hi BenjaminR,

1. Every 10 seconds.

2. Yes, you can request for more than one symbols in one message. You can specify the number of symbols requested in tag 146 and send an equal number of tag 55 entries with the symbols you wish to receive.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

opusensemble
01 Aug 2021, 19:58

Heartbeat documentation

Hi,

Where can the heartbeat documentation or a usage example be found?

Looking forward to hearing back from you, 
Best Regards, 


@opusensemble

amusleh
02 Aug 2021, 07:53

RE: Heartbeat documentation

opusensemble said:

Hi,

Where can the heartbeat documentation or a usage example be found?

Looking forward to hearing back from you, 
Best Regards, 

Hi,

You can find all details on the documentation.


@amusleh