Skip to content

Commit

Permalink
Fix bug in cache.bar_types (#2269)
Browse files Browse the repository at this point in the history
  • Loading branch information
faysou authored Jan 30, 2025
1 parent eddfbd8 commit ff93368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nautilus_trader/cache/cache.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ cdef class Cache(CacheFacade):
bar_types = [bar_type for bar_type in bar_types if bar_type.spec.price_type == price_type]

if aggregation_source is not None:
bar_types = [bar_type for bar_type in bar_types if bar_type.spec.price_type == aggregation_source]
bar_types = [bar_type for bar_type in bar_types if bar_type.aggregation_source == aggregation_source]

if instrument_id and price_type:
bar_types.sort(key=self._get_timedelta)
Expand Down

0 comments on commit ff93368

Please sign in to comment.