ProtoOAGetTickDataReq.CreateBuilder()

Created at 20 Jan 2025, 15:51
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!
MT

MT5_to_cTrader

Joined 04.11.2024

ProtoOAGetTickDataReq.CreateBuilder()
20 Jan 2025, 15:51


In the following forum entry there is an example of using ProtoOAGetTickDataReq.CreateBuilder() to access both the Bid and Ask prices at the same time…

https://community.ctrader.com/users/profile/33881/forum/?pp=2

e.g.

 var _msg = ProtoOAGetTickDataReq.CreateBuilder();
 _msg.SetCtidTraderAccountId(accountId);
 _msg.SetSymbolId(symbolId);
 _msg.SetType(ProtoOAQuoteType.ASK);
 _msg.SetType(ProtoOAQuoteType.BID);
 _msg.SetFromTimestamp(from);
 _msg.SetToTimestamp(to);

The code above is in C#, so is there a Python equivalent or can you only get one at a time in Python, e.g. Bid or Ask, but not both?

 


@MT5_to_cTrader