Class ExpirationDate
java.lang.Object
com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
com.caplin.motif.fx.trading.orders.submission.ExpirationDate
Deprecated.
The date an order should expire. This can be a recognised string from a backend trading system just as GFD (Good for Day) or can be a date and time with a location or UTC offset.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ExpirationDate
Deprecated.An instance of ExpirationDate that represents Fill or Kill.static final ExpirationDate
Deprecated.An instance of ExpirationDate that represents Good for Day.static final ExpirationDate
Deprecated.An instance of ExpirationDate that represents Good til Canceled.static final ExpirationDate
Deprecated.An instance of ExpirationDate that represents Immediate or Cancel.Fields inherited from class com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
DATE_PATTERN, dateStr, datetime, isLocal, LOCAL, location, offset, timeStr, ZEROED_OFFSET
-
Constructor Summary
ConstructorDescriptionExpirationDate
(String date, String time, String location, String offset) Deprecated.Constructs a GTD (Good til Date) ExpirationDate which represents a specific date, time and location. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Deprecated.int
hashCode()
Deprecated.boolean
Deprecated.A 'Fill or Kill' expiration means that the order must immediately be fully filled by the backend trading system, or it should be canceled.boolean
Deprecated.A 'Good For Day' expiration means that the order should stay in effect until the end of the trading day, at which point the order should be canceled by the back end system.boolean
Deprecated.A 'Good Till Canceled' expiration means that the order should stay in effect until the client decides to cancel it.boolean
Deprecated.A 'Good Till Date' expiration means that the order should stay in effect until the date and time specified by the client.boolean
Deprecated.An 'Immediate or Cancel' expiration means that the order must be at least immediately partially filled by the backend trading system, or it should be cancelled.static ExpirationDate
parseFromValues
(String date, String time, String location, String offset) Deprecated.toString()
Deprecated.Methods inherited from class com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
getDateAsString, getDateTime, getLocation, getOffset, getTimeAsString, isLocal, parse
-
Field Details
-
FOK
Deprecated.An instance of ExpirationDate that represents Fill or Kill. -
IOC
Deprecated.An instance of ExpirationDate that represents Immediate or Cancel. -
GTC
Deprecated.An instance of ExpirationDate that represents Good til Canceled. -
GFD
Deprecated.An instance of ExpirationDate that represents Good for Day.
-
-
Constructor Details
-
ExpirationDate
public ExpirationDate(String date, String time, String location, String offset) throws OrderConfigurationException Deprecated.Constructs a GTD (Good til Date) ExpirationDate which represents a specific date, time and location. If you don't want a GTD expiration date, you can use one of the static instances provided as fields on this class:
- Parameters:
date
- The date as string in the format "YYYYMMDD".time
- The time as string in the format "HH:MM:SS".location
- The location pertaining to the date and time the order should expire. This can either be an entry in the tz database such as "Europe/London", or the string "LOCAL" (OrderValidityDate.LOCAL
).offset
- The UTC offset if the location was specified as "LOCAL", i.e local to the user. If a specific location is provided then this value must be null, because the offset can be inferred from the date, time and location.- Throws:
OrderConfigurationException
- If any of the criteria specified byOrderValidityDate.parse(String, String, String, String)
are not met. In particular, make sure you only provide a location or an offset, but not both. One of those two parameters must be null, or an exception will be thrown.
-
-
Method Details
-
parseFromValues
public static ExpirationDate parseFromValues(String date, String time, String location, String offset) throws OrderConfigurationException Deprecated.- Throws:
OrderConfigurationException
-
isGoodTillCanceled
public boolean isGoodTillCanceled()Deprecated.A 'Good Till Canceled' expiration means that the order should stay in effect until the client decides to cancel it.- Returns:
- A boolean representing whether or not the expiration of the order is 'Good Till Canceled' (GTC)
-
isGoodForDay
public boolean isGoodForDay()Deprecated.A 'Good For Day' expiration means that the order should stay in effect until the end of the trading day, at which point the order should be canceled by the back end system.- Returns:
- A boolean representing whether or not the expiration date is 'Good For Day' (GFD)
-
isGoodTillDate
public boolean isGoodTillDate()Deprecated.A 'Good Till Date' expiration means that the order should stay in effect until the date and time specified by the client. s- Returns:
- A boolean representing whether or not the expiration date is 'Good Till Date' (GTD)
-
isFillOrKill
public boolean isFillOrKill()Deprecated.A 'Fill or Kill' expiration means that the order must immediately be fully filled by the backend trading system, or it should be canceled.- Returns:
- A boolean representing whether or not the expiration date is 'Fill or Kill' (FOK)
-
isImmediateOrCancel
public boolean isImmediateOrCancel()Deprecated.An 'Immediate or Cancel' expiration means that the order must be at least immediately partially filled by the backend trading system, or it should be cancelled.- Returns:
- A boolean representing whether or not the expiration date is 'Immediate or Cancel' (IOC)
-
getDateFieldValue
Deprecated. -
equals
Deprecated.- Overrides:
equals
in classOrderValidityDate
-
hashCode
public int hashCode()Deprecated.- Overrides:
hashCode
in classOrderValidityDate
-
toString
Deprecated.- Overrides:
toString
in classOrderValidityDate
-