The JAVA SDK is deprecated

  • The OANDA v1 REST API will cease to function for your account as early as May 2018.
  • Please migrate your applications to use the v20 REST API. A Java wrapper is available in the sample code section.

Account Interface


Interface Account

public interface Account

An Account object represents an existing Oanda account. Accounts cannot be created through this API. Accounts are identified by a unique integer id (accountId). Current open trades, orders and transactions are maintained and kept up-to-date within the object.


Returns the account name.

java.lang.String getAccountName()


Returns the most up-to-date account balance, querying the server if neccessary.

Returns: The account balance Throws: AccountException

double getBalance() throws AccountException

Find more information about Account here