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 ATC
At The Close.ATO
At The Open.DAY
Day order.DYP
Similar toDAY
, but includes extended trading sessionFOK
Fill Or Kill.GCP
Similar toGTC
, but includes extended trading sessionGDP
Similar toGTD
, but includes extended trading sessionGTC
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.
-
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
-