ProtoOADealListReq returns no results

Created at 03 Aug 2020, 00:22
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!
KO

kostya.bartchenkov

Joined 03.08.2020

ProtoOADealListReq returns no results
03 Aug 2020, 00:22


Hi,

I'm trying to get trades history for my Demo account by using ProtoOADealListReq but it returns 0 results.

I see plenty of deals in History via Web Interface but get nothing via API


ProtoOADealListReq req = ProtoOADealListReq.newBuilder()
        .setCtidTraderAccountId(traderAccountId)
        .setMaxRows(5)
        .setFromTimestamp(OffsetDateTime.now().minusDays(6).toEpochSecond())
        .setToTimestamp(OffsetDateTime.now().toEpochSecond())
        .build();
ProtoMessageReceiver protoMessageReceiver = nettyClient.writeAndFlush(req);

 

Am I missing something?


@kostya.bartchenkov
Replies

PanagiotisCharalampous
03 Aug 2020, 09:26

Hi kostya.bartchenkov,

The request requires UNIX timestamps as input which are measured in milliseconds. You need to change your code accordingly.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

kostya.bartchenkov
04 Aug 2020, 00:31

RE:

PanagiotisCharalampous said:

Hi kostya.bartchenkov,

The request requires UNIX timestamps as input which are measured in milliseconds. You need to change your code accordingly.

Best Regards,

Panagiotis 

Join us on Telegram

 

Thanks a lot. I must have missed that. It all works.

 

Is it possible to get list of closed orders with labels as ProtoOADealListRes doesn't have labels. Or is there a Order Details API?

 

Thanks a lot in advance.


@kostya.bartchenkov

PanagiotisCharalampous
04 Aug 2020, 08:18

Hi kostya.bartchenkov,

No this is not possible at the moment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous