Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

getOrdersHistory: Empty results for permanent demo account
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=52029
Page 1 of 1

Author:  mrgidney [ Thu 18 Dec, 2014, 23:39 ]
Post subject:  getOrdersHistory: Empty results for permanent demo account

context.getHistory().getOrdersHistory is not returning any results for my permanent demo account. account.isGlobal() is returning false and so this account is not global. Note: I can see the orders in Portfolio -> Portfolio Statement.

My code works perfectly fine if I run it against my LIVE account. Why does it not work for my permanent demo account?

 try {
      
List<IOrder> orders = context.getHistory().getOrdersHistory(Instrument.EURUSD, new DateTime().minusYears(5).getMillis(), new DateTime().getMillis());

   for (IOrder order : orders) {               
      System.out.println(order.getId());               
   }

} catch (JFException e) {
    e.printStackTrace();
}

Author:  API Support [ Fri 19 Dec, 2014, 14:44 ]
Post subject:  Re: getOrdersHistory: Empty results for permanent demo account

Hi!
Do you encounter this problem on JForex platform or SDK?

Author:  mrgidney [ Sat 20 Dec, 2014, 22:28 ]
Post subject:  Re: getOrdersHistory: Empty results for permanent demo account

SDK

Author:  mrgidney [ Fri 26 Dec, 2014, 23:40 ]
Post subject:  Re: getOrdersHistory: Empty results for permanent demo account

Its working now.

Author:  mrgidney [ Mon 29 Dec, 2014, 00:44 ]
Post subject:  Re: getOrdersHistory: Empty results for permanent demo account

It takes up to 6 minutes for getOrdersHistory to return results. I see from post [Improve IHistory#getOrdersHistory()] that this is due to be resolved in JForex-API 3.0. Do you have a release date for JForex-API 3.0?

Author:  API Support [ Mon 29 Dec, 2014, 10:41 ]
Post subject:  Re: getOrdersHistory: Empty results for permanent demo account

New releases announced here: viewforum.php?f=113

  Page 1 of 1