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.

Initial Balance
 Post subject: Initial Balance Post rating: 0   New post Posted: Mon 15 Jul, 2013, 15:01 

User rating: 0
Joined: Sat 08 Jun, 2013, 12:05
Posts: 71
Location: FranceFrance
I have looked through the API, and didn't find a method to read the initial balance (of a PAMM demo account)

I could always use the historical orders methods to sum up all pnls of orders, and sum up all client deposit with https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IMessage.Type.html#WITHDRAWAL (<- does this message type gather all client withdraws and deposits? (all ratio changes)).
Thanks


 
The Best Answer  Post subject: Re: Initial Balance Post rating: 0   New post Posted: Mon 15 Jul, 2013, 15:11 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#PAMM_Client_Data


 
 Post subject: Re: Initial Balance Post rating: 0   New post Posted: Mon 15 Jul, 2013, 21:40 

User rating: 0
Joined: Sat 08 Jun, 2013, 12:05
Posts: 71
Location: FranceFrance
thanks

is there a preference between
if(message instanceof IWithdrawalMessage){
    //..
and
if (message.getType() == Type.WITHDRAWAL) {
    IWithdrawalMessage m = (IWithdrawalMessage)message ;
    //...


 
 Post subject: Re: Initial Balance Post rating: 0   New post Posted: Tue 16 Jul, 2013, 07:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Semantically no.


 
 Post subject: Re: Initial Balance Post rating: 0   New post Posted: Tue 16 Jul, 2013, 08:56 

User rating: 0
Joined: Sat 08 Jun, 2013, 12:05
Posts: 71
Location: FranceFrance
ok thanks;)

sorry to get back on this, is there actually a way to capture the balance withdrawal events in 'history' mode, in the onMessage function, to be able to retrace the evolution of balance?
I was using another API where it was possible, (one could capture normal orders and 'withdrawal orders')

Thanks


 
 Post subject: Re: Initial Balance Post rating: 0   New post Posted: Tue 16 Jul, 2013, 09:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
No there is no such information available from the API.


 

Jump to:  

cron
  © 1998-2026 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