/// <summary> /// Selects contract(s) from a list of contracts with varying expiry dates. /// The reference price, in combination with the offset, is used to select contract(s) depending on strike. /// An offset of 0 returns contract(s) with a strike which is equal of greater to the reference price. /// An offset of +1 returns contract(s) with the next greater strike. /// Negative Values select contract(s) with strikes below the reference price. /// </summary> public static IObservable <IReadOnlyList <ContractDetails> > ContractDetailsStrikeSelect( this IObservable <IReadOnlyList <ContractDetails> > source, int offset, double referencePrice) => ThrowIf.ThrowIfEmpty(source).Select(cds => SelectStrike(cds, offset, referencePrice));
/// <summary> /// For each particular contractId, if SMART is one of the exchanges, this filter removes the contracts with other exchanges. /// </summary> public static IObservable <IReadOnlyList <ContractDetails> > ContractDetailsSmartFilter(this IObservable <IReadOnlyList <ContractDetails> > source) => ThrowIf.ThrowIfEmpty(source).Select(ContractDetailsSmartFilter);