Lean
$LEAN_TAG$
CMEOptionsCategoryList.cs
1
/*
2
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
using
System;
17
using
System.Collections.Generic;
18
using
Newtonsoft.Json;
19
using
QuantConnect
.
Util
;
20
21
namespace
QuantConnect.Securities.FutureOption.Api
22
{
23
/// <summary>
24
/// CME options trades, dates, and expiration list API call root response
25
/// </summary>
26
/// <remarks>Returned as a List of this class</remarks>
27
public
class
CMEOptionsTradeDatesAndExpiration
28
{
29
/// <summary>
30
/// Describes the type of future option this entry is
31
/// </summary>
32
[JsonProperty(
"label"
)]
33
public
string
Label
{
get
;
private
set
; }
34
35
/// <summary>
36
/// Name of the product
37
/// </summary>
38
[JsonProperty(
"name"
)]
39
public
string
Name
{
get
;
private
set
; }
40
41
/// <summary>
42
/// Option type. "AME" for American, "EUR" for European.
43
/// Note that there are other types such as weekly, but we
44
/// only support American options for now.
45
/// </summary>
46
[JsonProperty(
"optionType"
)]
47
public
string
OptionType
{
get
;
private
set
; }
48
49
/// <summary>
50
/// Product ID of the option
51
/// </summary>
52
[JsonProperty(
"productId"
)]
53
public
int
ProductId
{
get
;
private
set
; }
54
55
/// <summary>
56
/// Is Daily option
57
/// </summary>
58
[JsonProperty(
"daily"
)]
59
public
bool
Daily
{
get
;
private
set
; }
60
61
/// <summary>
62
/// ???
63
/// </summary>
64
[JsonProperty(
"sto"
)]
65
public
bool
Sto
{
get
;
private
set
; }
66
67
/// <summary>
68
/// Is weekly option
69
/// </summary>
70
[JsonProperty(
"weekly"
)]
71
public
bool
Weekly
{
get
;
private
set
; }
72
73
/// <summary>
74
/// Expirations of the future option
75
/// </summary>
76
[JsonProperty(
"expirations"
)]
77
public
List<CMEOptionsExpiration>
Expirations
{
get
;
private
set
; }
78
}
79
80
/// <summary>
81
/// Future options Expiration entries. These are useful because we can derive the
82
/// future chain from this data, since FOP and FUT share a 1-1 expiry code.
83
/// </summary>
84
public
class
CMEOptionsExpiration
85
{
86
/// <summary>
87
/// Date of expiry
88
/// </summary>
89
[JsonProperty(
"label"
)]
90
public
string
Label
{
get
;
private
set
; }
91
92
/// <summary>
93
/// Product ID of the expiring asset (usually future option)
94
/// </summary>
95
[JsonProperty(
"productId"
)]
96
public
int
ProductId
{
get
;
private
set
; }
97
98
/// <summary>
99
/// Contract ID of the asset
100
/// </summary>
101
/// <remarks>Used to search settlements for the option chain</remarks>
102
[JsonProperty(
"contractId"
)]
103
public
string
ContractId
{
get
;
private
set
; }
104
105
/// <summary>
106
/// Contract month code formatted as [FUTURE_MONTH_LETTER(1)][YEAR(1)]
107
/// </summary>
108
[JsonProperty(
"expiration"
)]
109
public
CMEOptionExpirationEntry
Expiration
{
get
;
private
set
; }
110
}
111
112
/// <summary>
113
/// Chicago Mercantile Exchange Option Expiration Entry
114
/// </summary>
115
public
class
CMEOptionExpirationEntry
116
{
117
/// <summary>
118
/// Month of expiry
119
/// </summary>
120
[JsonProperty(
"month"
)]
121
public
int
Month
{
get
;
private
set
; }
122
123
/// <summary>
124
/// Year of expiry
125
/// </summary>
126
[JsonProperty(
"year"
)]
127
public
int
Year
{
get
;
private
set
; }
128
129
/// <summary>
130
/// Expiration code (two letter)
131
/// </summary>
132
[JsonProperty(
"code"
)]
133
public
string
Code
{
get
;
private
set
; }
134
135
/// <summary>
136
/// Expiration code (three letter)
137
/// </summary>
138
[JsonProperty(
"twoDigitsCode"
)]
139
public
string
TwoDigitsCode
{
get
;
private
set
; }
140
}
141
}
Common
Securities
FutureOption
Api
CMEOptionsCategoryList.cs
Generated by
1.8.17