Skip to content

Commit

Permalink
fix: validate contract secType on null (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Sep 4, 2024
1 parent f339040 commit 4e5685f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ private decimal GetMinTick(Contract contract, string ticker)
/// <param name="ticker">The associated Lean ticker. Just used for logging, can be provided empty</param>
private ContractDetails GetContractDetails(Contract contract, string ticker, bool failIfNotFound = true)
{
if (_contractDetails.TryGetValue(GetUniqueKey(contract), out var details))
if (contract.SecType != null && _contractDetails.TryGetValue(GetUniqueKey(contract), out var details))
{
return details;
}
Expand Down

0 comments on commit 4e5685f

Please sign in to comment.