![]() | Get Option Chains Example |
Note: This is preliminary documentation provided only as a preview, and is subject to change. Please contact the author for pricing and licensing information.
This topic demonstrates how a list of option chains can be retrieved.
Import the following namespaces:
using ETradeNet.Market; using ETradeNet.Market.OptionChains.Data;
Implement the following method:
async Task<IEnumerable<OptionPair>> GetOptionChainsAsync(DateTime expDate, string underlier, IMarketInitializer init) { using (var market = new MarketService(init)) { var response = await market.OptionChains.GetListAsync(expDate, underlier); return response.OptionPairs; } }