Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

getOrdersHistory: Empty results for permanent demo account
 Post subject: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Thu 18 Dec, 2014, 23:39 

User rating: 0
Joined: Tue 01 Nov, 2011, 00:44
Posts: 29
Location: United Kingdom,
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();
}


 
 Post subject: Re: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Fri 19 Dec, 2014, 14:44 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi!
Do you encounter this problem on JForex platform or SDK?


 
 Post subject: Re: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Sat 20 Dec, 2014, 22:28 

User rating: 0
Joined: Tue 01 Nov, 2011, 00:44
Posts: 29
Location: United Kingdom,
SDK


 
 Post subject: Re: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Fri 26 Dec, 2014, 23:40 

User rating: 0
Joined: Tue 01 Nov, 2011, 00:44
Posts: 29
Location: United Kingdom,
Its working now.


 
 Post subject: Re: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Mon 29 Dec, 2014, 00:44 

User rating: 0
Joined: Tue 01 Nov, 2011, 00:44
Posts: 29
Location: United Kingdom,
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?


 
 Post subject: Re: getOrdersHistory: Empty results for permanent demo account Post rating: 0   New post Posted: Mon 29 Dec, 2014, 10:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
New releases announced here: viewforum.php?f=113


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com