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.util
Class MessageGenerator

    java.lang.Object
      com.fxcm.external.api.util.MessageGenerator

    public class MessageGenerator

extends Object

Constructor Summary
`MessageGenerator()`

Method Summary
`static OrderSingle` | `generateAcceptOrder(String aQuoteID, String aCustomText)` Generates an Accept OrderSingle in response to a Requote
`static OrderSingle` | `generateCloseMarketOrder(String aOpenPosID, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generate a close order at market price
`static OrderSingle` | `generateCloseOrder(double aPrice, String aOpenPosID, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generate close order
`static OrderSingle` | `generateCloseOrder(double aPrice, String aOpenPosID, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aAtMarketPoints)` Generate close order at market points
`static OrderSingle` | `generateCloseOrder(String aQuoteID, double aPrice, String aOpenPosID, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generate close order
`static OrderSingle` | `generateCloseOrder(String aQuoteID, double aPrice, String aOpenPosID, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aAtMarketPoints)` Generate close order at market points
`static OrderSingle` | `generateMarketOrder(String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generates a true market order.
`static OrderSingle` | `generateOpenOrder(double aPrice, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generate Open order
`static OrderSingle` | `generateOpenOrder(double aPrice, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aAtMarketPoints)` Generate Open order at market points
`static OrderSingle` | `generateOpenOrder(String aQuoteID, double aPrice, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Generate Open order
`static OrderSingle` | `generateOpenOrder(String aQuoteID, double aPrice, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aAtMarketPoints)` Generate Open order at market points
`static OrderCancelRequest` | `generateOrderCancelRequest(String aClCustomText, String aOrderID, ISide aSide, String aAccount)` Generate request to cancel a pending order.
`static OrderCancelReplaceRequest` | `generateOrderReplaceRequest(String aClCustomText, String aOrderID, ISide aSide, IOrdType aOrdType, double aPrice, int aTrailing, String aAccount)` Generate an update to a pending order at market points
`static OrderCancelReplaceRequest` | `generateOrderReplaceRequest(String aClCustomText, String aOrderID, ISide aSide, IOrdType aOrdType, double aPrice, String aAccount)` Generate an update to a pendnig order
`static QuoteResponse` | `generatePassResponse(String aQuoteID)` Generates a delete response for a requote or request for quote
`static OrderSingle` | `generateStopLimitClose(double aPrice, String aPosID, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Place a stop or a limit on an existing position or order.
`static OrderSingle` | `generateStopLimitClose(double aPrice, String aPosID, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aTrailing)` Place a stop or a limit on an existing position or order.
`static OrderSingle` | `generateStopLimitEntry(double aPrice, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Place a stop or a limit to enter the market.
`static OrderSingle` | `generateStopLimitEntry(double aPrice, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aTrailing)` Place a stop or a limit to enter the market.
`static OrderSingle` | `generateStopLimitEntry(String aQuoteID, double aPrice, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText)` Place a stop or a limit to enter the market.
`static OrderSingle` | `generateStopLimitEntry(String aQuoteID, double aPrice, IOrdType aOrderType, String aAccount, double aAmount, ISide aSide, String aCurrency, String aClCustomText, int aTrailing)` Place a stop or a limit to enter the market.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageGenerator

    public MessageGenerator()

Method Detail

### generateAcceptOrder

    public static OrderSingle generateAcceptOrder(String aQuoteID,
                                                  String aCustomText)

  Generates an Accept OrderSingle in response to a Requote

  Parameters:
    `aQuoteID` - quoteid
    `aCustomText` - txt
  Returns:
    OrderSingle

### generateCloseMarketOrder

    public static OrderSingle generateCloseMarketOrder(String aOpenPosID,
                                                       String aAccount,
                                                       double aAmount,
                                                       ISide aSide,
                                                       String aCurrency,
                                                       String aClCustomText)

  Generate a close order at market price

  Parameters:
    `aOpenPosID` - pos id
    `aAccount` - acct
    `aAmount` - amount
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateCloseOrder

    public static OrderSingle generateCloseOrder(String aQuoteID,
                                                 double aPrice,
                                                 String aOpenPosID,
                                                 String aAccount,
                                                 double aAmount,
                                                 ISide aSide,
                                                 String aCurrency,
                                                 String aClCustomText)

  Generate close order

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aOpenPosID` - posid
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateCloseOrder

    public static OrderSingle generateCloseOrder(double aPrice,
                                                 String aOpenPosID,
                                                 String aAccount,
                                                 double aAmount,
                                                 ISide aSide,
                                                 String aCurrency,
                                                 String aClCustomText)

  Generate close order

  Parameters:
    `aPrice` - price
    `aOpenPosID` - posid
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateCloseOrder

    public static OrderSingle generateCloseOrder(String aQuoteID,
                                                 double aPrice,
                                                 String aOpenPosID,
                                                 String aAccount,
                                                 double aAmount,
                                                 ISide aSide,
                                                 String aCurrency,
                                                 String aClCustomText,
                                                 int aAtMarketPoints)

  Generate close order at market points

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aOpenPosID` - posid
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aAtMarketPoints` - at mkt pts
  Returns:
    OrderSingle

### generateCloseOrder

    public static OrderSingle generateCloseOrder(double aPrice,
                                                 String aOpenPosID,
                                                 String aAccount,
                                                 double aAmount,
                                                 ISide aSide,
                                                 String aCurrency,
                                                 String aClCustomText,
                                                 int aAtMarketPoints)

  Generate close order at market points

  Parameters:
    `aPrice` - price
    `aOpenPosID` - posid
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aAtMarketPoints` - at mkt pts
  Returns:
    OrderSingle

### generateMarketOrder

    public static OrderSingle generateMarketOrder(String aAccount,
                                                  double aAmount,
                                                  ISide aSide,
                                                  String aCurrency,
                                                  String aClCustomText)

  Generates a true market order.

  Parameters:
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateOpenOrder

    public static OrderSingle generateOpenOrder(String aQuoteID,
                                                double aPrice,
                                                String aAccount,
                                                double aAmount,
                                                ISide aSide,
                                                String aCurrency,
                                                String aClCustomText)

  Generate Open order

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateOpenOrder

    public static OrderSingle generateOpenOrder(double aPrice,
                                                String aAccount,
                                                double aAmount,
                                                ISide aSide,
                                                String aCurrency,
                                                String aClCustomText)

  Generate Open order

  Parameters:
    `aPrice` - price
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateOpenOrder

    public static OrderSingle generateOpenOrder(String aQuoteID,
                                                double aPrice,
                                                String aAccount,
                                                double aAmount,
                                                ISide aSide,
                                                String aCurrency,
                                                String aClCustomText,
                                                int aAtMarketPoints)

  Generate Open order at market points

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aAtMarketPoints` - at mkt pts
  Returns:
    OrderSingle

### generateOpenOrder

    public static OrderSingle generateOpenOrder(double aPrice,
                                                String aAccount,
                                                double aAmount,
                                                ISide aSide,
                                                String aCurrency,
                                                String aClCustomText,
                                                int aAtMarketPoints)

  Generate Open order at market points

  Parameters:
    `aPrice` - price
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aAtMarketPoints` - at mkt pts
  Returns:
    OrderSingle

### generateOrderCancelRequest

    public static OrderCancelRequest generateOrderCancelRequest(String aClCustomText,
                                                                String aOrderID,
                                                                ISide aSide,
                                                                String aAccount)

  Generate request to cancel a pending order.

  Parameters:
    `aClCustomText` - txt
    `aOrderID` - orderid
    `aSide` - side
    `aAccount` - account
  Returns:
    OrderCancelRequest

### generateOrderReplaceRequest

    public static OrderCancelReplaceRequest generateOrderReplaceRequest(String aClCustomText,
                                                                        String aOrderID,
                                                                        ISide aSide,
                                                                        IOrdType aOrdType,
                                                                        double aPrice,
                                                                        String aAccount)

  Generate an update to a pendnig order

  Parameters:
    `aClCustomText` - txt
    `aOrderID` - orderid
    `aSide` - side
    `aOrdType` - ordtype
    `aPrice` - price
    `aAccount` - account
  Returns:
    OrderCancelReplaceRequest

### generateOrderReplaceRequest

    public static OrderCancelReplaceRequest generateOrderReplaceRequest(String aClCustomText,
                                                                        String aOrderID,
                                                                        ISide aSide,
                                                                        IOrdType aOrdType,
                                                                        double aPrice,
                                                                        int aTrailing,
                                                                        String aAccount)

  Generate an update to a pending order at market points

  Parameters:
    `aClCustomText` - txt
    `aOrderID` - orderid
    `aSide` - side
    `aOrdType` - ordtype
    `aPrice` - price
    `aTrailing` - trailing distance
    `aAccount` - account
  Returns:
    OrderCancelReplaceRequest

### generatePassResponse

    public static QuoteResponse generatePassResponse(String aQuoteID)

  Generates a delete response for a requote or request for quote

  Parameters:
    `aQuoteID` - quoteid
  Returns:
    QuoteResponse

### generateStopLimitClose

    public static OrderSingle generateStopLimitClose(double aPrice,
                                                     String aPosID,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText)

  Place a stop or a limit on an existing position or order. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aPrice` - price
    `aPosID` - posid
    `aOrderType` - ordertype
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateStopLimitClose

    public static OrderSingle generateStopLimitClose(double aPrice,
                                                     String aPosID,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText,
                                                     int aTrailing)

  Place a stop or a limit on an existing position or order. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aPrice` - price
    `aPosID` - posid
    `aOrderType` - ord type
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aTrailing` - trailing distance
  Returns:
    OrderSingle

### generateStopLimitEntry

    public static OrderSingle generateStopLimitEntry(String aQuoteID,
                                                     double aPrice,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText)

  Place a stop or a limit to enter the market. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aOrderType` - ord type
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateStopLimitEntry

    public static OrderSingle generateStopLimitEntry(double aPrice,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText)

  Place a stop or a limit to enter the market. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aPrice` - price
    `aOrderType` - ord type
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
  Returns:
    OrderSingle

### generateStopLimitEntry

    public static OrderSingle generateStopLimitEntry(String aQuoteID,
                                                     double aPrice,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText,
                                                     int aTrailing)

  Place a stop or a limit to enter the market. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aQuoteID` - quoteid
    `aPrice` - price
    `aOrderType` - ord type
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aTrailing` - trailing distance
  Returns:
    OrderSingle

### generateStopLimitEntry

    public static OrderSingle generateStopLimitEntry(double aPrice,
                                                     IOrdType aOrderType,
                                                     String aAccount,
                                                     double aAmount,
                                                     ISide aSide,
                                                     String aCurrency,
                                                     String aClCustomText,
                                                     int aTrailing)

  Place a stop or a limit to enter the market. For aOrderType, specify IFixDefs.ORDTYPE_LIMIT or IFixDefs.ORDERTYPE_STOP

  Parameters:
    `aPrice` - price
    `aOrderType` - ord type
    `aAccount` - acct
    `aAmount` - amt
    `aSide` - side
    `aCurrency` - ccy
    `aClCustomText` - txt
    `aTrailing` - trailing distance
  Returns:
    OrderSingle

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.