Skip to content

Commit

Permalink
Fix BinanceBar historical ts_event to close_time
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Apr 13, 2024
1 parent 5fee0f9 commit 882ce3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Released on TBD (UTC).
- Fixed `RiskEngine` cumulative notional calculations for margin accounts (was incorrectly using base currency when selling)
- Fixed selling `Equity` instruments with `CASH` account and `NETTING` OMS incorrectly rejecting (should be able to reduce position)
- Fixed Databento bars decoding (was incorrectly applying display factor)
- Fixed `Binance` bar (kline) to use `close_time` for `ts_event` was `opentime` (#1591), thanks for reporting @OnlyC
- Fixed `AccountMarginExceeded` error condition (margin must actually be exceeded now, and can be zero)

---
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/adapters/binance/common/schemas/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def parse_to_binance_bar(
count=self.trades_count,
taker_buy_base_volume=Decimal(self.taker_base_volume),
taker_buy_quote_volume=Decimal(self.taker_quote_volume),
ts_event=millis_to_nanos(self.open_time),
ts_event=millis_to_nanos(self.close_time),
ts_init=ts_init,
)

Expand Down

0 comments on commit 882ce3c

Please sign in to comment.