com.dukascopy.api
Interface IAccount


public interface IAccount

Methods of this interface allows to retrieve account information such as current equity


Nested Class Summary
static class IAccount.AccountState
          Account state: OK, MARGIN_CLOSING, MARGIN_CALL, OK_NO_MARGIN_CALL, DISABLED, BLOCKED.
 
Method Summary
 java.lang.String getAccountId()
          Returns account id
 IAccount.AccountState getAccountState()
          Returns account state
 double getBalance()
          Returns account balance.
 double getBaseEquity()
          Returns current base equity (No open Profit/Loss).
 java.util.Set<java.lang.String> getClientIds()
          Returns client ids for manager account
 java.util.Set<IClientInfo> getClients()
          Get trader Clients set.
 double getCreditLine()
          Returns current available credit.
 java.util.Currency getCurrency()
          Returns account currency
 double getEquity()
          Returns current equity.
 double getLeverage()
          Returns current leverage.
 int getMarginCutLevel()
          Returns maximum use of leverage exceeding which will result in margin cut
 int getOverWeekEndLeverage()
          Returns maximum use of leverage exceeding which will result in margin cut.
 double getStopLossLevel()
          Returns account's equity stop loss level.
 double getUseOfLeverage()
          Returns current use of leverage.
 java.lang.String getUserName()
          Returns user name
 boolean isConnected()
          Returns true if account is connected to server
 boolean isGlobal()
          Returns true if account is global account
 

Method Detail

getCurrency

java.util.Currency getCurrency()
Returns account currency

Returns:
account currency

getEquity

double getEquity()
Returns current equity. Value returned by this function is for information purposes and can be incorrect right after order changes, as it is updated about every 5 seconds

Returns:
equity

getBaseEquity

double getBaseEquity()
Returns current base equity (No open Profit/Loss).
Value returned by this function is for information purposes and can be incorrect right after order changes, as it is updated about every 5 seconds.

Returns:
base equity - equity without open positions' profit/loss

getBalance

double getBalance()
Returns account balance. The last account balance available is the balance for the previous end-of-day processing.

Returns:
balance

getLeverage

double getLeverage()
Returns current leverage. This is fixed value that is set when you sign contract with Dukascopy. Usually has value of 100

Returns:
leverage

getUseOfLeverage

double getUseOfLeverage()
Returns current use of leverage. Value returned by this function is for information purposes and can be incorrect right after order changes, as it is updated about every 5 seconds

Returns:
leverage

getCreditLine

double getCreditLine()
Returns current available credit. Value returned by this function is for information purposes and can be incorrect right after order changes, as it is updated about every 5 seconds

Returns:
available credit

getMarginCutLevel

int getMarginCutLevel()
Returns maximum use of leverage exceeding which will result in margin cut

Returns:
maximum use of leverage before margin cuts

getOverWeekEndLeverage

int getOverWeekEndLeverage()
Returns maximum use of leverage exceeding which will result in margin cut. Value effective before weekends

Returns:
maximum use of leverage before margin cuts at weekends

isGlobal

boolean isGlobal()
Returns true if account is global account

Returns:
true if account is global account

getAccountId

java.lang.String getAccountId()
Returns account id

Returns:
account id

getClientIds

java.util.Set<java.lang.String> getClientIds()
Returns client ids for manager account

Returns:
set of client ids

getAccountState

IAccount.AccountState getAccountState()
Returns account state

Returns:
account state

getStopLossLevel

double getStopLossLevel()
Returns account's equity stop loss level. The equity stop loss level is in the account base currency and define an absolute level of equity from or under which the account will be stopped and their exposures closed.

Returns:
account equity stop loss level

getClients

java.util.Set<IClientInfo> getClients()
Get trader Clients set.

Returns:
a set of current account's clients

isConnected

boolean isConnected()
Returns true if account is connected to server

Returns:
true if account is connected to server, false - otherwise

getUserName

java.lang.String getUserName()
Returns user name

Returns:
user name