|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
User
Method Summary | |
---|---|
void |
close(LimitOrder lo)
Closes the specified LimitOrder. |
void |
close(MarketOrder mo)
Closes the specified MarketOrder. |
void |
close(java.lang.String position)
|
void |
closeAllLimitOrders()
Closes all limit orders. |
void |
closeAllMarketOrders()
Closes all market orders. |
void |
execute(LimitOrder lo)
Executes the specified LimitOrder. |
void |
execute(MarketOrder mo)
Executes the specified MarketOrder. |
int |
getAccountId()
Returns the unique id number associated with this account. |
java.lang.String |
getAccountName()
Returns the account name. |
double |
getBalance()
Returns the most up-to-date account balance, querying the server if neccessary. |
long |
getCreateDate()
Returns the creation date for this account expressed as a unix timestamp. |
int |
getEnteredMarginCallTime()
Returns the time margin call was entered. |
FXEventManager |
getEventManager()
Gets the eventManager for this Account |
java.lang.String |
getHomeCurrency()
Returns the home currency for this account. |
double |
getMarginAvailable()
Returns the most up-to-date margin available value, querying the server if neccessary. |
double |
getMarginCallRate()
Returns the margin call rate. |
double |
getMarginRate()
Returns the margin rate. |
double |
getMarginUsed()
Returns the most up-to-date margin used value, querying the server if neccessary. |
java.util.Vector<? extends LimitOrder> |
getOrders()
Returns the Vector of LimitOrders held by this account, querying the server if neccessary. |
LimitOrder |
getOrderWithId(long transactionNumber)
Returns the LimitOrder with the given transaction number. |
Position |
getPosition(FXPair pair)
Get the currently open market position for a given pair |
java.util.Vector<? extends Position> |
getPositions()
Get all the currently open market positions |
double |
getPositionValue()
Returns the most up-to-date values of all trades held by this account based in home currency, querying the server if neccessary. |
java.lang.String |
getProfile()
Returns the profile string for this account |
double |
getRealizedPL()
Returns the most up-to-date realized profit/loss value, querying the server if neccessary. |
java.util.Vector<? extends MarketOrder> |
getTrades()
Returns the Vector of MarketOrders currently held by this account, querying the server if neccessary. |
MarketOrder |
getTradeWithId(long transactionNumber)
Returns the MarketOrder with the given transaction number. |
TrailingStop |
getTrailingStop(MarketOrder trade)
Returns the trailing stop for the given trade. |
java.util.Vector<? extends Transaction> |
getTransactions()
Returns a Vector of Transactions that have recently occured on this account, querying the server if neccessary. |
Transaction |
getTransactionWithId(long transactionNumber)
Returns the Transaction with the given transaction number. |
double |
getUnrealizedPL()
Returns the most up-to-date unrealized profit/loss value, querying the server if neccessary. |
void |
modify(LimitOrder lo)
Modifies the specified LimitOrder. |
void |
modify(MarketOrder mo)
Modifies the specified MarketOrder. |
void |
setProfile(java.lang.String newprofile)
Sends a profile string to be saved on the server and associated with this account. |
java.lang.String |
toString()
|
Method Detail |
---|
void close(LimitOrder lo) throws OAException
lo
- the limit order to be closed
OAException
LimitOrder
void close(MarketOrder mo) throws OAException
mo
- the MarketOrder to be closed
OAException
MarketOrder
void close(java.lang.String position) throws OAException
OAException
void closeAllMarketOrders() throws OAException
OAException
void closeAllLimitOrders() throws OAException
OAException
void execute(LimitOrder lo) throws OAException
lo
- the limit order to be opened
OAException
LimitOrder
void execute(MarketOrder mo) throws OAException
mo
- the market order to be executed
OAException
MarketOrder
int getAccountId()
java.util.Vector<? extends Position> getPositions() throws AccountException
AccountException
Position getPosition(FXPair pair) throws AccountException
pair
- The pair to get the position of
AccountException
java.lang.String getAccountName()
double getBalance() throws AccountException
AccountException
long getCreateDate()
java.lang.String getHomeCurrency()
double getMarginAvailable() throws AccountException
AccountException
double getMarginCallRate()
double getMarginRate()
double getMarginUsed() throws AccountException
AccountException
java.util.Vector<? extends LimitOrder> getOrders() throws AccountException
AccountException
LimitOrder
LimitOrder getOrderWithId(long transactionNumber) throws AccountException
transactionNumber
- the transaction number for the order
AccountException
LimitOrder
double getPositionValue() throws AccountException
AccountException
java.lang.String getProfile()
double getRealizedPL() throws AccountException
AccountException
java.util.Vector<? extends MarketOrder> getTrades() throws AccountException
AccountException
MarketOrder
MarketOrder getTradeWithId(long transactionNumber) throws AccountException
transactionNumber
- the transaction number for the order
AccountException
MarketOrder
java.util.Vector<? extends Transaction> getTransactions() throws AccountException
AccountException
Transaction
Transaction getTransactionWithId(long transactionNumber) throws AccountException
transactionNumber
- the transaction number for the transaction
AccountException
Transaction
double getUnrealizedPL() throws AccountException
AccountException
void modify(LimitOrder lo) throws OAException
lo
- the LimitOrder to be modified
OAException
LimitOrder
void modify(MarketOrder mo) throws OAException
mo
- the MarketOrder to be modified
OAException
MarketOrder
FXEventManager getEventManager() throws AccountException
AccountException
void setProfile(java.lang.String newprofile) throws AccountException
NOTE: The profile string is used by the fxTrade Platform GUI for saving Account preference information. Do not modify the profile string if you intent to continue using the fxTrade GUI.
newprofile
- the new profile string to be saved on the server
AccountException
java.lang.String toString()
toString
in class java.lang.Object
TrailingStop getTrailingStop(MarketOrder trade)
null
value is returned.
trade
- the trade with a trailing stop
int getEnteredMarginCallTime()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |