forked from alpacahq/alpaca-trade-api-csharp
/
TimeInForce.cs
56 lines (50 loc) · 1.52 KB
/
TimeInForce.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
namespace Alpaca.Markets;
/// <summary>
/// Supported order durations in Alpaca REST API.
/// See <a href="https://alpaca.markets/docs/trading/orders/#time-in-force">Alpaca Trading Documentation</a> for more information.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum TimeInForce
{
/// <summary>
/// The order is good for the day and it will be canceled automatically at the end of market hours.
/// </summary>
[EnumMember(Value = "day")]
Day,
/// <summary>
/// The order is good until canceled.
/// </summary>
[UsedImplicitly]
[EnumMember(Value = "gtc")]
Gtc,
/// <summary>
/// The order is placed at the time the market opens.
/// </summary>
/// <remarks>
/// Not supported for crypto trading.
/// </remarks>
[UsedImplicitly]
[EnumMember(Value = "opg")]
Opg,
/// <summary>
/// The order is immediately filled or canceled after being placed (may partial fill).
/// </summary>
[UsedImplicitly]
[EnumMember(Value = "ioc")]
Ioc,
/// <summary>
/// The order is immediately filled or canceled after being placed (may not partial fill).
/// </summary>
[UsedImplicitly]
[EnumMember(Value = "fok")]
Fok,
/// <summary>
/// The order will become a limit order if a limit price is specified or a market order otherwise at market close.
/// </summary>
/// <remarks>
/// Not supported for crypto trading.
/// </remarks>
[UsedImplicitly]
[EnumMember(Value = "cls")]
Cls
}