OrderDuration
Package: velox.api.layer1.data
Type: Enum
Inheritance: java.lang.Object รขโ โ java.lang.Enum
All Implemented Interfaces: Serializable, Comparable
Descriptionโ
Order durations
Enum Constantsโ
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
Fieldsโ
codeโ
public final int code
Code used in recorded files
Methodsโ
valuesโ
public static OrderDuration[] values()
Returns an array containing the constants of this enum class, in the order they are declared.
Returns: an array containing the constants of this enum class, in the order they are declared
valueOfโ
public static OrderDuration valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
toLocalizedStringโ
public String toLocalizedString()
valueOfโ
public static OrderDuration valueOf(int code)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
valueOfLooseโ
public static OrderDuration valueOfLoose(String name)
Parse order duration from string that might not exactly match the enum.
Parameters:
name- string to parse
Returns: parsed order duration