ProtoOAGetTickDataReq.CreateBuilder()
Created at 20 Jan 2025, 15:51
MT
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?