Enum OrderDuration

java.lang.Object
java.lang.Enum<OrderDuration>
velox.api.layer1.data.OrderDuration
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OrderDuration>, java.lang.constant.Constable

public enum OrderDuration
extends java.lang.Enum<OrderDuration>
Order durations
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    ATC
    At The Close.
    ATO
    At The Open.
    DAY
    Day order.
    DYP
    Similar to DAY, but includes extended trading session
    FOK
    Fill Or Kill.
    GCP
    Similar to GTC, but includes extended trading session
    GDP
    Similar to GTD, but includes extended trading session
    GTC
    Good Til Canceled.
    GTC_PO
    The post-only flag indicates that the order should only make liquidity.
    GTD
    Good Til Date.
    GTT
    Good Til Time.
    IOC
    Immediate-Or-Cancel.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int code
    Code used in recorded files
  • Method Summary

    Modifier and Type Method Description
    static OrderDuration valueOf​(int code)
    Returns the enum constant of this type with the specified name.
    static OrderDuration valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static OrderDuration valueOfLoose​(java.lang.String name)
    Parse order duration from string that might not exactly match the enum.
    static OrderDuration[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DAY

      public static final OrderDuration DAY
      Day order. Order is working through the current trading day only.
    • DYP

      public static final OrderDuration DYP
      Similar to DAY, but includes extended trading session
    • GTC

      public static final OrderDuration GTC
      Good Til Canceled. Order is working until canceled or until the contract is no longer available for trading.
    • GCP

      public static final OrderDuration GCP
      Similar to GTC, but includes extended trading session
    • GTD

      public static final OrderDuration GTD
      Good Til Date. Order is working until the end of the nearest trading day for the contract on or before the date specified in the order.
    • GDP

      public static final OrderDuration GDP
      Similar to GTD, but includes extended trading session
    • GTT

      public static final OrderDuration GTT
      Good Til Time. Order is working until the specified time.
    • FOK

      public static final OrderDuration FOK
      Fill Or Kill. Immediately fill this order completely or cancel.
    • ATO

      public static final OrderDuration ATO
      At The Open. Buy or sell at the very beginning of the trading day.
    • ATC

      public static final OrderDuration ATC
      At The Close. Buy or sell at the close of the market, or as near to the closing price as possible.
    • IOC

      public static final OrderDuration IOC
      Immediate-Or-Cancel. An IOC requires all or part of the order to be executed immediately; otherwise, the order (or any unfilled parts of the order) will be canceled.
    • GTC_PO

      public static final OrderDuration GTC_PO
      The post-only flag indicates that the order should only make liquidity. If any part of the order results in taking liquidity, the order will be rejected and no part of it will execute. Relevant for GDAX
  • Field Details

    • code

      public final int code
      Code used in recorded files
  • Method Details

    • values

      public static OrderDuration[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static OrderDuration valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • valueOf

      public static OrderDuration valueOf​(int code)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      code - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • valueOfLoose

      public static OrderDuration valueOfLoose​(java.lang.String name)
      Parse order duration from string that might not exactly match the enum.
      Parameters:
      name - string to parse
      Returns:
      parsed order duration