Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fxcm.external.api.transport
Interface IGateway

    public interface IGateway

Interface to the FXCM Platform

Method Summary
`ISessionStatus` | `getCurrentStatus()` Gets last sent ISessionStatus message
`String` | `getSessionID()`
`TradingSessionDesc` | `getTradingSession()` Returns connected TradingSession
`TradingSessionDesc[]` | `getTradingSessions(FXCMLoginProperties aProps)` Obtains list of trading session that is available to login.
`int` | `getUserKind()` Gets the UserKind
`boolean` | `isConnected()` gives status of active connection to fxcm server.
`void` | `login(FXCMLoginProperties aLoginProperties)` login to the FXCM server, exception are raised when a problem occurs during login.
`void` | `logout()` logout of the FXCM server.
`void` | `openSession(TradingSessionDesc aTradingSessionDesc)` Open a sesssion with the supplied TradingSession, only 1 session can be opened.
`void` | `openSession(TradingSessionDesc aTradingSessionDesc, Properties aProperties)` Open a sesssion with the supplied TradingSession, only 1 session can be opened.
`void` | `registerGenericMessageListener(IGenericMessageListener aListener)` register as a aListener of generic messages: quotes,orders,excecutions
`void` | `registerStatusMessageListener(IStatusMessageListener aListener)` register as a aListener of connection status events
`void` | `relogin()` logout, then log back in.
`void` | `removeGenericMessageListener(IGenericMessageListener aListener)` stops the supplied aListener from receiving future notifications.
`void` | `removeStatusMessageListener(IStatusMessageListener aListener)` stops the supplied aListener from receiving future notifications.
`String` | `requestAccountByName(String aAccountName)` Get accounts by account name
`String` | `requestAccounts()` request for accounts associated with this login
`String` | `requestAccounts(long aFXCMAcctID)` Get accounts by acctid
`String` | `requestAccounts(String aLoginID)` request for accounts associated with supplied login id
`String` | `requestClosedPositions()` request for the last 30 closed positions
`String` | `requestClosedPositions(int aFXCMMaxNoResults, UTCDate aFXCMStartDate, UTCTimeOnly aFXCMStartTime, UTCDate aFXCMEndDate, UTCTimeOnly aFXCMEndTime)` Request historical snapshot for closed positions in the range supplied, max allowed is 300
`String` | `requestClosedPositions(long aFXCMAcctID)` request closed positions by acctid
`String` | `requestClosedPositions(String aLoginID)` request for the last 30 closed positions with supplied login id
`String` | `requestOpenOrders()` make a request for open orders on all accounts
`String` | `requestOpenOrders(long aFXCMAcctID)` request open orders by acctid
`String` | `requestOpenOrders(String aLoginID)` request for open orders on all accounts with supplied login id
`String` | `requestOpenPositions()` request for open positions on all accounts
`String` | `requestOpenPositions(long aFXCMAcctID)` request open positions by acctid
`String` | `requestOpenPositions(String aLoginID)` request for open positions on all accounts with supplied login id
`String` | `requestOrderStatus(String aOrderID, OrdStatusRequestType aOrdStatusRequestType, String aAccount)` make a request for the last order message sent for the given order id based on the request type
`String` | `requestTradingSessionStatus()` You must call this after login as part of handshake process otherwise you will not receive messages
`String` | `sendMessage(ITransportable aMessage)` Send an aMessage to the FXCM server, an exception is raised if there is a problem sending the aMessage.

Method Detail

### getCurrentStatus

    ISessionStatus getCurrentStatus()
                                    throws SessionNotEstablishedException

  Gets last sent ISessionStatus message

  Returns:
    ISessionStatus
  Throws:
    `SessionNotEstablishedException`

### getSessionID

    String getSessionID()
                        throws SessionNotEstablishedException

  Returns:
    the current active session id
  Throws:
    `SessionNotEstablishedException`

### getTradingSession

    TradingSessionDesc getTradingSession()
                                         throws SessionNotEstablishedException

  Returns connected TradingSession

  Returns:
    TradingSessionDesc
  Throws:
    `SessionNotEstablishedException`

### getTradingSessions

    TradingSessionDesc[] getTradingSessions(FXCMLoginProperties aProps)
                                            throws Exception

  Obtains list of trading session that is available to login.

  Parameters:
    `aProps` -
  Returns:
    array of trading session
  Throws:
    `Exception`

### getUserKind

    int getUserKind()

  Gets the UserKind

  Returns:
  See Also:
    `com.fxcm.fix.IFixDefs.FXCM_ACCT_TYPE_CUSTOMER`, `com.fxcm.fix.IFixDefs.FXCM_ACCT_TYPE_DEALER`, `com.fxcm.fix.IFixDefs.FXCM_ACCT_TYPE_TRADER`

### isConnected

    boolean isConnected()

  gives status of active connection to fxcm server.

### login

    void login(FXCMLoginProperties aLoginProperties)
               throws Exception

  login to the FXCM server, exception are raised when a problem occurs during login.

  Parameters:
    `aLoginProperties` -
  Throws:
    `Exception`

### logout

    void logout()

  logout of the FXCM server.

### openSession

    void openSession(TradingSessionDesc aTradingSessionDesc)
                     throws Exception

  Open a sesssion with the supplied TradingSession, only 1 session can be opened.

  Parameters:
    `aTradingSessionDesc` -
  Throws:
    `Exception`

### openSession

    void openSession(TradingSessionDesc aTradingSessionDesc,
                     Properties aProperties)
                     throws Exception

  Open a sesssion with the supplied TradingSession, only 1 session can be opened.

  Parameters:
    `aTradingSessionDesc` -
    `aProperties` -
  Throws:
    `Exception`

### registerGenericMessageListener

    void registerGenericMessageListener(IGenericMessageListener aListener)

  register as a aListener of generic messages: quotes,orders,excecutions

  Parameters:
    `aListener` -

### registerStatusMessageListener

    void registerStatusMessageListener(IStatusMessageListener aListener)

  register as a aListener of connection status events

  Parameters:
    `aListener` -

### relogin

    void relogin()
                 throws Exception

  logout, then log back in. Exception are raised when a problem occurs during relogin

  Throws:
    `Exception`

### removeGenericMessageListener

    void removeGenericMessageListener(IGenericMessageListener aListener)

  stops the supplied aListener from receiving future notifications.

  Parameters:
    `aListener` -

### removeStatusMessageListener

    void removeStatusMessageListener(IStatusMessageListener aListener)

  stops the supplied aListener from receiving future notifications.

  Parameters:
    `aListener` -

### requestAccounts

    String requestAccounts()

  request for accounts associated with this login

  Returns:
    massStatusReqID or null if there is a problem on request

### requestAccounts

    String requestAccounts(String aLoginID)

  request for accounts associated with supplied login id

  Parameters:
    `aLoginID` -
  Returns:
    requestid or null if there is a problem on request

### requestAccounts

    String requestAccounts(long aFXCMAcctID)

  Get accounts by acctid

  Parameters:
    `aFXCMAcctID` -
  Returns:
    requestid or null if there is a problem on request

### requestAccountByName

    String requestAccountByName(String aAccountName)

  Get accounts by account name

  Parameters:
    `aAccountName` -
  Returns:
    requestid or null if there is a problem on request

### requestClosedPositions

    String requestClosedPositions()

  request for the last 30 closed positions

  Returns:
    massStatusReqID or null if there is a problem on request

### requestClosedPositions

    String requestClosedPositions(String aLoginID)

  request for the last 30 closed positions with supplied login id

  Parameters:
    `aLoginID` -
  Returns:
    requestid or null if there is a problem on request

### requestClosedPositions

    String requestClosedPositions(long aFXCMAcctID)

  request closed positions by acctid

  Parameters:
    `aFXCMAcctID` -
  Returns:
    requestid or null if there is a problem on request

### requestClosedPositions

    String requestClosedPositions(int aFXCMMaxNoResults,
                                  UTCDate aFXCMStartDate,
                                  UTCTimeOnly aFXCMStartTime,
                                  UTCDate aFXCMEndDate,
                                  UTCTimeOnly aFXCMEndTime)

  Request historical snapshot for closed positions in the range supplied, max allowed is 300

  Parameters:
    `aFXCMMaxNoResults` -
    `aFXCMStartDate` -
    `aFXCMStartTime` -
    `aFXCMEndDate` -
    `aFXCMEndTime` -
  Returns:
    requestid or null if there is a problem on request

### requestOpenOrders

    String requestOpenOrders()

  make a request for open orders on all accounts

  Returns:
    massStatusReqID or null if there is a problem on request

### requestOpenOrders

    String requestOpenOrders(String aLoginID)

  request for open orders on all accounts with supplied login id

  Parameters:
    `aLoginID` -
  Returns:
    requestid or null if there is a problem on request

### requestOpenOrders

    String requestOpenOrders(long aFXCMAcctID)

  request open orders by acctid

  Parameters:
    `aFXCMAcctID` -
  Returns:
    requestid or null if there is a problem on request

### requestOpenPositions

    String requestOpenPositions()

  request for open positions on all accounts

  Returns:
    requestid or null if there is a problem on request

### requestOpenPositions

    String requestOpenPositions(String aLoginID)

  request for open positions on all accounts with supplied login id

  Parameters:
    `aLoginID` -
  Returns:
    requestid or null if there is a problem on request

### requestOpenPositions

    String requestOpenPositions(long aFXCMAcctID)

  request open positions by acctid

  Parameters:
    `aFXCMAcctID` -
  Returns:
    requestid or null if there is a problem on request

### requestOrderStatus

    String requestOrderStatus(String aOrderID,
                              OrdStatusRequestType aOrdStatusRequestType,
                              String aAccount)

  make a request for the last order message sent for the given order id based on the request type

  Parameters:
    `aOrderID` -
    `aOrdStatusRequestType` -
    `aAccount` -
  Returns:
    requestid or null if there is a problem on request

### requestTradingSessionStatus

    String requestTradingSessionStatus()

  You must call this after login as part of handshake process otherwise you will not receive messages

  Returns:
    requestid or null if there is a problem on request

### sendMessage

    String sendMessage(ITransportable aMessage)
                       throws Exception

  Send an aMessage to the FXCM server, an exception is raised if there is a problem sending the aMessage.

  Parameters:
    `aMessage` -
  Returns:
    requestid
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 FXCM, LLC. All Rights Reserved.