Package velox.api.layer1.data
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
-
Enum Constant Summary
Enum Constants Enum Constant Description ATCAt The Close.ATOAt The Open.DAYDay order.DYPSimilar toDAY, but includes extended trading sessionFOKFill Or Kill.GCPSimilar toGTC, but includes extended trading sessionGDPSimilar toGTD, but includes extended trading sessionGTCGood Til Canceled.GTC_POThe post-only flag indicates that the order should only make liquidity.GTDGood Til Date.GTTGood Til Time.IOCImmediate-Or-Cancel. -
Field Summary
Fields Modifier and Type Field Description intcodeCode used in recorded files -
Method Summary
Modifier and Type Method Description static OrderDurationvalueOf(int code)Returns the enum constant of this type with the specified name.static OrderDurationvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static OrderDurationvalueOfLoose(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.
-
Enum Constant Details
-
DAY
Day order. Order is working through the current trading day only. -
DYP
Similar toDAY, but includes extended trading session -
GTC
Good Til Canceled. Order is working until canceled or until the contract is no longer available for trading. -
GCP
Similar toGTC, but includes extended trading session -
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
Similar toGTD, but includes extended trading session -
GTT
Good Til Time. Order is working until the specified time. -
FOK
Fill Or Kill. Immediately fill this order completely or cancel. -
ATO
At The Open. Buy or sell at the very beginning of the trading day. -
ATC
At The Close. Buy or sell at the close of the market, or as near to the closing price as possible. -
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
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 codeCode used in recorded files
-
-
Method Details
-
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
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 namejava.lang.NullPointerException- if the argument is null
-
valueOf
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 namejava.lang.NullPointerException- if the argument is null
-
valueOfLoose
Parse order duration from string that might not exactly match the enum.- Parameters:
name- string to parse- Returns:
- parsed order duration
-