Class OrderFieldSet

java.lang.Object
com.caplin.motif.fx.trading.orders.details.BaseFieldSet
com.caplin.motif.fx.trading.orders.details.OrderFieldSet

@Deprecated public class OrderFieldSet extends BaseFieldSet
Deprecated.

Represents a set of fields relating to an order.

You do not have to create instances of this class yourself. You can retrieve instances of this class by calling OrderBuilder.getEditableFields() or OrderBuilder.getFixedFields().

  • Method Details

    • setAccount

      public OrderFieldSet setAccount(String accountID, String accountName)
      Deprecated.
      Sets the account.
      Parameters:
      accountID - The identifier of the account.
      accountName - A "friendly name" for the account, for display in the front end.
      Returns:
      This instance, to allow method chaining.
    • setAccount

      public OrderFieldSet setAccount(Account account)
      Deprecated.
      Sets the account.
      Parameters:
      account - The account, with id and name
      Returns:
      This instance, to allow method chaining.
    • setCurrencyPair

      public OrderFieldSet setCurrencyPair(String value)
      Deprecated.
      Sets the currency pair. This must be a six character string where the first three characters are the base currency and the second three characters are the term currency, for example USDJPY.
      Parameters:
      value - The currency pair.
      Returns:
      This instance, to allow method chaining.
    • setActivationDate

      public OrderFieldSet setActivationDate(ActivationDate activationDate)
      Deprecated.
      Sets the date, time and location the strategy or order should be activated.

      Certain other values for the activation date are acceptable, for example GFA meaning "Good for Activation" immediately.

      Parameters:
      activationDate - A domain object representing the activation date.
      Returns:
      This instance, to allow method chaining.
      See Also:
    • setExpirationDate

      public OrderFieldSet setExpirationDate(ExpirationDate expirationDate)
      Deprecated.
      Sets the date, time and location the strategy or order should expire. Certain other values for the expiration date are acceptable, for example GTC for "Good til Canceled" or GFD for "Good for Day".
      Parameters:
      expirationDate - A domain object representing the expiration date.
      Returns:
      This instance, to allow method chaining.
    • setAlertType

      public OrderFieldSet setAlertType(Set<AlertType> alertTypes)
      Deprecated.
      Sets the AlertType
      Parameters:
      alertTypes - the set of AlertTypes for this strategy
      Returns:
      This instance, to allow method chaining.
    • setRemarks

      public OrderFieldSet setRemarks(String remarks)
      Deprecated.
      Sets the Remarks
      Parameters:
      remarks - to be attached to the order or strategy
      Returns:
      This instance, to allow method chaining.
    • setMemo

      public OrderFieldSet setMemo(String memo)
      Deprecated.
      Set Memo - the taker short note of the order.
      Parameters:
      memo - to be attached to the order or strategy
      Returns:
      This instance, to allow method chaining.
    • setOrderID

      public OrderFieldSet setOrderID(String orderId)
      Deprecated.
      Sets the ID of the order.
      Parameters:
      orderId - The order ID.
      Returns:
      This instance, to allow method chaining.
    • setAmount

      public OrderFieldSet setAmount(String amount)
      Deprecated.
      Sets the amount specified on the order, in terms of the dealt currency.
      Parameters:
      amount - The amount.
      Returns:
      This instance, to allow method chaining.
    • setAmountFilled

      public OrderFieldSet setAmountFilled(String amount)
      Deprecated.
      Sets the quantity of the order that has been filled so far, in terms of the dealt currency. This amount should always be equal to or less than the total amount of the order.
      Parameters:
      amount - The amount filled so far.
      Returns:
      This instance, to allow method chaining.
    • setAmountRemaining

      public OrderFieldSet setAmountRemaining(String amount)
      Deprecated.
      Sets the amount of the order that is left to fill. This is calculated as the amount specified on the order minus the amount filled so far, in terms of the dealt currency.
      Parameters:
      amount - The amount remaining.
      Returns:
      This instance, to allow method chaining.
    • setBuySell

      public OrderFieldSet setBuySell(BuySell buySell)
      Deprecated.
      Sets the side of the order, from the perspective of the person who placed it.
      Parameters:
      buySell - Either BUY or SELL.
      Returns:
      This instance, to allow method chaining.
    • setDealtCurrency

      public OrderFieldSet setDealtCurrency(String dealtCurrency)
      Deprecated.
      Sets the currency that the amount of the order is specified in. This must be one of the two currencies in the currency pair.
      Parameters:
      dealtCurrency - The dealt currency.
      Returns:
      This instance, to allow method chaining.
    • setExecutionType

      public OrderFieldSet setExecutionType(ExecutionType type)
      Deprecated.
      Sets the execution type of the order, for example Take Profit or Market.
      Parameters:
      type - The execution type.
      Returns:
      This instance, to allow method chaining.
    • setBenchmarkType

      public OrderFieldSet setBenchmarkType(String type)
      Deprecated.
      Sets the Benchmark type of the order,
      Parameters:
      type - The benchmark type.
      Returns:
      This instance, to allow method chaining.
    • setFillRate

      public OrderFieldSet setFillRate(String rate)
      Deprecated.
      Sets the target rate for the order, if for example it's a Take Profit or Stop Loss order. If the order has no target rate, which is the case for Market orders, you don't need to call this method.
      Parameters:
      rate - The target rate.
      Returns:
      This instance, to allow method chaining.
    • setStatus

      public OrderFieldSet setStatus(String status)
      Deprecated.
      Sets the current status of the order, for example WORKING or DEACTIVATED.
      Parameters:
      status - The order status.
      Returns:
      This instance, to allow method chaining.
    • setMargin

      public OrderFieldSet setMargin(String margin)
      Deprecated.
      Sets the margin for the order.
      Parameters:
      margin - The order margin.
      Returns:
      This instance, to allow method chaining.
    • setEditable

      public OrderFieldSet setEditable(boolean editable)
      Deprecated.
      Sets a flag indicating whether this order can be edited or not.
      Parameters:
      editable - A flag indicating whether or not this order can be edited.
      Returns:
      This instance, to allow method chaining.