/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using QuantConnect.Util;
namespace QuantConnect.Securities.FutureOption.Api
{
///
/// CME options trades, dates, and expiration list API call root response
///
/// Returned as a List of this class
public class CMEOptionsTradeDatesAndExpiration
{
///
/// Describes the type of future option this entry is
///
[JsonProperty("label")]
public string Label { get; private set; }
///
/// Name of the product
///
[JsonProperty("name")]
public string Name { get; private set; }
///
/// Option type. "AME" for American, "EUR" for European.
/// Note that there are other types such as weekly, but we
/// only support American options for now.
///
[JsonProperty("optionType")]
public string OptionType { get; private set; }
///
/// Product ID of the option
///
[JsonProperty("productId")]
public int ProductId { get; private set; }
///
/// Is Daily option
///
[JsonProperty("daily")]
public bool Daily { get; private set; }
///
/// ???
///
[JsonProperty("sto")]
public bool Sto { get; private set; }
///
/// Is weekly option
///
[JsonProperty("weekly")]
public bool Weekly { get; private set; }
///
/// Expirations of the future option
///
[JsonProperty("expirations")]
public List Expirations { get; private set; }
}
///
/// Future options Expiration entries. These are useful because we can derive the
/// future chain from this data, since FOP and FUT share a 1-1 expiry code.
///
public class CMEOptionsExpiration
{
///
/// Date of expiry
///
[JsonProperty("label")]
public string Label { get; private set; }
///
/// Product ID of the expiring asset (usually future option)
///
[JsonProperty("productId")]
public int ProductId { get; private set; }
///
/// Contract ID of the asset
///
/// Used to search settlements for the option chain
[JsonProperty("contractId")]
public string ContractId { get; private set; }
///
/// Contract month code formatted as [FUTURE_MONTH_LETTER(1)][YEAR(1)]
///
[JsonProperty("expiration")]
public CMEOptionExpirationEntry Expiration { get; private set; }
}
///
/// Chicago Mercantile Exchange Option Expiration Entry
///
public class CMEOptionExpirationEntry
{
///
/// Month of expiry
///
[JsonProperty("month")]
public int Month { get; private set; }
///
/// Year of expiry
///
[JsonProperty("year")]
public int Year { get; private set; }
///
/// Expiration code (two letter)
///
[JsonProperty("code")]
public string Code { get; private set; }
///
/// Expiration code (three letter)
///
[JsonProperty("twoDigitsCode")]
public string TwoDigitsCode { get; private set; }
}
}