How to get the .proto file version number used by the client

Created at 03 Aug 2019, 06:17
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!
66

66281850

Joined 26.06.2019

How to get the .proto file version number used by the client
03 Aug 2019, 06:17


There are 2 protocols on the api v2 documentation:

 

ProtoOAVersionReq

The proxy version request. Can be used to check if the .proto file is not obsolete.

 

ProtoOAVersionRes

Response to the ProtoOAVersionReq request.

ProtoOAVersionRes.version  The current version of the server application.

 

I think the role of these two protocols is to get the api version used by the server, and then compare it with the api version used locally to see if it matches.    

But how do you get the version of the api used locally?


@66281850
Replies

PanagiotisCharalampous
05 Aug 2019, 09:38

Hi 66281850,

"But how do you get the version of the api used locally?"

There is no such functionality since you are the one developing the client side therefore if you need it, you will need to develop ot yourself. The two messages mentioned can be used to check the current version on the proxies and detect if there was any update. If you need to keep track what was the current version of your compiled classes, you will need to develop the relevant functionality.

Best Regards,

Panagiotis


@PanagiotisCharalampous