Class ExpirationDate


  • @Deprecated
    public class ExpirationDate
    extends OrderValidityDate
    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.

    • Constructor Summary

      Constructors 
      Constructor Description
      ExpirationDate​(java.lang.String date, java.lang.String time, java.lang.String location, java.lang.String offset)
      Deprecated.
      Constructs a GTD (Good til Date) ExpirationDate which represents a specific date, time and location.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      java.lang.String getDateFieldValue()
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      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.
      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.
      boolean isGoodTillCanceled()
      Deprecated.
      A 'Good Till Canceled' expiration means that the order should stay in effect until the client decides to cancel it.
      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.
      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.
      static ExpirationDate parseFromValues​(java.lang.String date, java.lang.String time, java.lang.String location, java.lang.String offset)
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • FOK

        public static final ExpirationDate FOK
        Deprecated.
        An instance of ExpirationDate that represents Fill or Kill.
      • IOC

        public static final ExpirationDate IOC
        Deprecated.
        An instance of ExpirationDate that represents Immediate or Cancel.
      • GTC

        public static final ExpirationDate GTC
        Deprecated.
        An instance of ExpirationDate that represents Good til Canceled.
      • GFD

        public static final ExpirationDate GFD
        Deprecated.
        An instance of ExpirationDate that represents Good for Day.
    • Constructor Detail

      • ExpirationDate

        public ExpirationDate​(java.lang.String date,
                              java.lang.String time,
                              java.lang.String location,
                              java.lang.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 by OrderValidityDate.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 Detail

      • 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

        public java.lang.String getDateFieldValue()
        Deprecated.
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Overrides:
        equals in class OrderValidityDate