About the Financial Contracts Option ETI
Financial Contracts provide 2 main definition for retrieving options data:
OptionFxDefinition
OptionEtiDefinition
Alternatively, option data can also be retrieved using FinancialContractsDefinition with a specific request object.
OptionEtiDefinition - options methods
InstrumentTag(string tag)
A user-defined string to identify the instrument.
InstrumentCode(string code)
RIC of an ETI option, used to retrieve the option contract description. Optional.
If not specified, instrumentCode of UnderlyingDefinition must be provided.
PricingParams(OptionFx.IEtiPricingDefintion pricing)
Properties used to control the Fx pricing calculations.
Fields(params string[] fields)
The collection of fields included within the response. Default: all available on the server.
Fields(IEnumerable
The collection of fields included within the response. Default: all available on the server.
Outputs(params FinancialContracts.Output[] outputs)
Defines the sections that will be returned within the response.
Outputs(IEnumerable<FinancialContracts.Output> outputs)
Defines the sections that will be returned within the response.
Strike(double strike)
Option strike price. Required only if pricing an OTC Option.
BuySell(FinancialContracts.BuySell buySell)
The side of the deal. Optional. Default: Buy.
CallPut(FinancialContracts.CallPut callPut)
Defines the type of an option. Optional. Default: Call.
ExcerciseStyle(OptionEti.ExerciseStyle style)
Defines the exercise style of the option. Optional. Default: Euro.
EndDate(DateTime date)
The Option expiry date expressed in ISO 8601 format. Required only when pricing an OTC Option.
EndDate(string date)
The Option expiry date expressed in ISO 8601 format. Required only when pricing an OTC Option.
UnderlyingInstrument(string underlying)
Details of the underlying Instrument Code.
AsianDefinition(OptionEti.IEtiAsianDefinition asian)
An Asian option is an option type where the payoff depends on the average price of the underlying asset over a certain period of time.
BarrierDefinition(OptionEto.IEtiBarrierDefinition barrier)
Details of a barrier option. Required only when defining a barrier option.
DoubleBarriersDefinition(OptionEti.IEtiDoubleBarrierDefinition barrier)
Details of an FX double barrier option. Required only when defining a barrier option.
BinaryDefinition(OptionEti.IEtiBinaryDefinition binary)
Details of an Fx binary option. Required only when defining a binary option.
CBBCDefinition(OptionEti.IEtiCbbcDefinition cbbc)
Details for CBBC (Call Bear/Bull Contract) option. Required only when defining a CBBC option
LotSize(double lotSize)
The lot size (the number of options bought or sold in one transaction). Optional. Default: 2.
DealContract(int contract)
Number of contracts bought or sold in the deal. Optional
Closure(object closure)
Optionally, include a user-defined Closure to match specific requests and responses.
ExtendedParams(JObject extendedParams)
Apply any properties that are not available within this request interface.
The extended params acts as a fallback measure in case properties are unavailable.
It is also an alternative for users that prefer to define the request using native json definitions.
Usage
- An example of a simple ETI option with default parameters
```csharp
var data = OptionEti.Definition("AAPLM192420500.U").GetData();
2. An example of multiple ETI options requesting specific fields data retrieval
```csharp
var data = OptionEti.Definition("AAPLA192420000.U", "AAPLA192426000.U")
.Fields("InstrumentCode", "StrikePrice", "EndDate", "ExerciseType",
"OptionPrice", "UnderlyingRIC", "ErrorMessage")
.GetData();
-
An example of an ETI option with multiple specific properties
var data = OptionEti.Definition() .ExcerciseStyle(OptionEti.ExerciseStyle.Amer) .Strike(255) .EndDate(DateTime.Now.AddDays(30)) .BuySell(FinancialContracts.BuySell.Sell) .CallPut(FinancialContracts.CallPut.Call) .UnderlyingInstrument("AAPL.O") .Fields("InstrumentCode", "ExerciseType", "ValuationDate", "EndDate", "StrikePrice", "OptionPrice", "UnderlyingRIC", "UnderlyingPrice", "ExerciseStyle", "ErrorMessage") .GetData(); -
An example of requesting an ETI option using the Financial Contracts definition with a specific request object
```csharp
var eti = new JObject()
{
["universe"] = new JArray(new JObject()
{["instrumentType"] = "Option", ["instrumentDefinition"] = new JObject() { ["InstrumentCode"] = "AAPLM192420500.U", ["underlyingType"] = "Eti" }})
};
var data = FinancialContracts.Definition(eti).GetData();
5. An example of requesting multiple ETI options using the Financial Contracts definition with a specific request object
```csharp
var eti = new JObject()
{
["fields"] = new JArray("InstrumentCode", "StrikePrice", "EndDate", "ExerciseType",
"OptionPrice", "UnderlyingRIC", "ErrorMessage"),
["universe"] = new JArray(new JObject()
{
["instrumentType"] = "Option",
["instrumentDefinition"] = new JObject()
{
["InstrumentCode"] = "AAPLA192420000.U",
["underlyingType"] = "Eti"
}
}, new JObject()
{
["instrumentType"] = "Option",
["instrumentDefinition"] = new JObject()
{
["InstrumentCode"] = "AAPLA192426000.U",
["underlyingType"] = "Eti"
}
})
};
var data = FinancialContracts.Definition(eti).GetData();
- An example of requesting an ETI option with multiple definition properties usign the Financial Contracts definition with a specific request object.
```csharp
var eti = new JObject()
{
["fields"] = new JArray("InstrumentCode", "ExerciseType", "ValuationDate", "EndDate",
["universe"] = new JArray(new JObject()"StrikePrice", "OptionPrice", "UnderlyingRIC", "UnderlyingPrice", "ExerciseStyle", "ErrorMessage"),
{
})["instrumentType"] = "Option", ["instrumentDefinition"] = new JObject() { ["underlyingType"] = "Eti", ["buySell"] = "Sell", ["callPut"] = "Call", ["endDate"] = $"{DateTime.Now.AddDays(30):O}", ["exerciseStyle"] = "Amer", ["strike"] = 255, ["UnderlyingDefinition"] = new JObject() { ["instrumentCode"] = "AAPL.O" } }
};
var data = FinancialContracts.Definition(eti).GetData();
```