com.oanda.fxtrade.api
Class API

java.lang.Object
  extended by com.oanda.fxtrade.api.API

public class API
extends java.lang.Object

API is a factory class with static methods for creation of different class instances used to utilise OANDA fxTrade API.

Author:
www.oanda.com

Constructor Summary
API()
           
 
Method Summary
static FXClient createFXClient(ServerInfo serverInfo)
           
static FXClient createFXGame()
          Creates new instance of FXGame class
static FXPair createFXPair()
          Creates new instance of FXPair class
static FXPair createFXPair(java.lang.String pair)
          Creates new instance of FXPair class
static FXPair createFXPair(java.lang.String base, java.lang.String quote)
          Creates new instance of FXPair class
static FXTick createFXTick(long timestamp, double bid, double ask)
          Creates new instance of FXTick class
static FXClient createFXTrade()
          Creates new instance of FXTrade class
static LimitOrder createLimitOrder()
          Creates new instance of LimitOrder class
static MarketOrder createMarketOrder()
          Creates new instance of MarketOrder class
static MarketTransferOrder createMarketTransferOrder()
           
static ServerInfo createServerInfo()
           
static StopLossOrder createStopLossOrder(double stopLoss)
          Creates new instance of StopLossOrder class
static TakeProfitOrder createTakeProfitOrder(double takeProfit)
          Creates new instance of TakeProfitOrder class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

API

public API()
Method Detail

createFXGame

public static FXClient createFXGame()
Creates new instance of FXGame class

Returns:
FXGame object
See Also:
FXClient

createFXTrade

public static FXClient createFXTrade()
Creates new instance of FXTrade class

Returns:
FXTrade object
See Also:
FXClient

createFXClient

public static FXClient createFXClient(ServerInfo serverInfo)

createServerInfo

public static ServerInfo createServerInfo()

createFXPair

public static FXPair createFXPair()
Creates new instance of FXPair class

Returns:
FXPair object

createFXPair

public static FXPair createFXPair(java.lang.String pair)
Creates new instance of FXPair class

Parameters:
pair - string representing pair symbol
Returns:
FXPair object

createFXPair

public static FXPair createFXPair(java.lang.String base,
                                  java.lang.String quote)
Creates new instance of FXPair class

Parameters:
base - base part of pair
quote - quote part of pair
Returns:
FXPair object

createLimitOrder

public static LimitOrder createLimitOrder()
Creates new instance of LimitOrder class

Returns:
LimitOrder object

createMarketOrder

public static MarketOrder createMarketOrder()
Creates new instance of MarketOrder class

Returns:
MarketOrder object

createMarketTransferOrder

public static MarketTransferOrder createMarketTransferOrder()

createStopLossOrder

public static StopLossOrder createStopLossOrder(double stopLoss)
Creates new instance of StopLossOrder class

Parameters:
stopLoss - value of stop loss
Returns:
StopLossOrder object

createTakeProfitOrder

public static TakeProfitOrder createTakeProfitOrder(double takeProfit)
Creates new instance of TakeProfitOrder class

Parameters:
takeProfit - value of take profit
Returns:
TakeProfitOrder object

createFXTick

public static FXTick createFXTick(long timestamp,
                                  double bid,
                                  double ask)
Creates new instance of FXTick class

Parameters:
timestamp - unix time-stamp
bid - value of bid
ask - value of ask
Returns:
FXTick object


Copyright © 2005 OANDA Corporation. All Rights Reserved.