How to build a ProtoOASymbolByIdReq request

Created at 28 Sep 2021, 20:06
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!
olegchubukov's avatar

olegchubukov

Joined 23.08.2019

How to build a ProtoOASymbolByIdReq request
28 Sep 2021, 20:06


Hi!

What parameters should go into setSymbolId() method?

I get IndexOutOfBoundsException when I enter setSymbolId(0, 1)

 

ProtoOASymbolByIdReq protoOASymbolByIdReq = ProtoOASymbolByIdReq
        .newBuilder()
        .setSymbolId(???, ???)
        .setCtidTraderAccountId(ctidTraderAccountId)
        .build();

 

Thanks!


@olegchubukov
Replies

olegchubukov
28 Sep 2021, 21:28

RE:

Found the answer. There are methods addAllSymbolId() and addSymbolId() for this purpose that take symbol id.


@olegchubukov