All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Reworked semantic model: a
KlineTimestampis now defined strictly by(open, interval), timezone is presentation-only. - Comparison methods (
__eq__,__lt__,__le__,__gt__,__ge__) now operate exclusively on the UTCopentimestamp. - Hashing changed to use
(open, interval)only, removing timezone from identity. - Arithmetic with
timedeltanow returns new KlineTimestamp objects; arithmetic between two KlineTimestamp objects now returns only atimedeltadifference. - Replaced
update_timezone()with immutablewith_timezone(). - Replaced interval mutability with
with_interval(). - Added strict input validation and full immutability guarantees using
@dataclass(frozen=True).
- Guard check to prevent accidental propagation of
NaTinto_pandas_timestamp. - Fully deterministic ordering: lexicographic
(open, tick_ms)ordering.
- Deprecated accessors
get_candle_open_timestamp_ms()andget_candle_close_timestamp_ms(). - Removed direct timezone mutation (
update_timezone). - Removed legacy semantics for
__add__/__sub__.
- First public-release candidate with timezone handling and pandas integration.
- Added support for all fixed-duration Binance-style intervals.
- Initial implementation of KlineTimestamp with opening/closing calculations.
- Basic timezone support using
pytz. - Navigation helpers (
next(),prev()). - Basic arithmetic using
timedelta.
- Monthly interval
1Mwith variable-duration candles (28-31 days). Calendar-aware open/close,next()/prev()navigate months correctly, leap years handled. KlineTimestamp - KlineTimestampreturnstimedelta(difference between opens). Previously raisedTypeError.- Input validation:
timestamp_msmust beint. Passingfloatnow raisesTypeError.
1M(monthly) no longer silently degrades to1m(1 minute) via.lower(). Interval normalization is now case-sensitive for1M.__eq__/__hash__now use(open, tick_ms)consistently with_cmp_key, fixing a potential inconsistency where equality used(open, interval)but ordering used(open, close).to_datetime()uses integer division (// 1000) instead of float division (/ 1000) to avoid precision loss.- Simplified double
cast()into_pandas_timestamp()to singlecast().