Open API 2.0 C++ example
06 Apr 2019, 13:46
Hi,
I would like to share my work with the community. This is a Open API 2.0 C++ template: https://github.com/vinifr/ctraderOpenAPI. It was designed for Linux systems and gcc compiler.
It was made for those dont want to use C# or Java examples. ;)
Replies
viniciusfre
10 Apr 2019, 17:58
Hi Panagiotis,
The code is mostly based on C# sample. Everything is working fine: send messages and receive messages. Heart beat too.
But CreateAccountListRequest()-->ProtoOAGetAccountListByAccessTokenReq() is the only message is not working and I did not figure out yet.
ProtoMessage OpenApiMessagesFactory::CreateAccountListRequest(string token)
{
ProtoOAGetAccountListByAccessTokenReq _msg;
string msg_str;
_msg.set_accesstoken(token);
_msg.SerializeToString(&msg_str);
return CreateMessage(_msg.payloadtype(), msg_str);
}
I am receiving only the token back from server. I was expecting the list of IDs: ctidTraderAccountIds. Any idea what is the issue?
Thanks.
@viniciusfre

PanagiotisCharalampous
10 Apr 2019, 15:20
Ηι viniciusfre,
Thanks this is a very useful contribution to the community.
Best Regards,
Panagiotis
@PanagiotisCharalampous