Minor issue in Open API 2.0 WInForms Sample

Created at 30 Aug 2020, 12:00
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!
CT

ctid2032775

Joined 03.05.2020

Minor issue in Open API 2.0 WInForms Sample
30 Aug 2020, 12:00


Dear all,

in the current version "Get Transactions" returns an error as the time range exceeds the maximum of 1 week.

To fix it the following change needs to be done in Main.cs (from):

private void btnGetTransactions_Click(object sender, EventArgs e)
        {
            var msgFactory = new OpenApiMessagesFactory();
            var msg = msgFactory.CreateCashflowHistoryRequest(_accountID, ((DateTimeOffset)DateTime.Now.AddDays(-5)).ToUnixTimeMilliseconds(), ((DateTimeOffset)DateTime.Now).ToUnixTimeMilliseconds());
            Transmit(msg);
        }

Hope this helps.

Regards,
Christian


@ctid2032775
Replies

PanagiotisCharalampous
31 Aug 2020, 08:55

Hi Christian,

Thanks for pointing this out. I have updated the code accordingly.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous