Skip to content

Commit

Permalink
Release 1.186.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Feb 2, 2024
2 parents 9d09e96 + 2f49dc3 commit 8aae236
Show file tree
Hide file tree
Showing 129 changed files with 4,960 additions and 2,199 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
hooks:
- id: fmt
name: cargo fmt
description: Format files with cargo fmt (nightly toolchain).
description: Format files with cargo fmt.
entry: cargo fmt
language: system
types: [rust]
Expand Down Expand Up @@ -73,7 +73,7 @@ repos:
types: [python]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
types_or: [python, pyi]
Expand All @@ -82,7 +82,7 @@ repos:
exclude: "docs/_pygments/monokai.py"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.15
hooks:
- id: ruff
args: ["--fix"]
Expand Down
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ install:

.PHONY: install-debug
install-debug:
BUILD_MODE=debug poetry install --with dev,test --all-extras
BUILD_MODE=debug poetry install --with dev,test --all-extras --sync

.PHONY: install-just-deps
install-just-deps:
Expand Down Expand Up @@ -82,7 +82,7 @@ cargo-build:

.PHONY: cargo-update
cargo-update:
(cd nautilus_core && cargo update && cargo install cargo-nextest)
(cd nautilus_core && cargo update && cargo install cargo-nextest && cargo install cargo-llvm-cov)

.PHONY: cargo-test
cargo-test:
Expand All @@ -92,9 +92,17 @@ cargo-test:
fi
RUST_BACKTRACE=1 && (cd nautilus_core && cargo nextest run --workspace --exclude tokio-tungstenite)

.PHONY: cargo-test-nightly
cargo-test-nightly:
RUST_BACKTRACE=1 && (cd nautilus_core && cargo +nightly test)
.PHONY: cargo-test-coverage
cargo-test-coverage:
@if ! cargo nextest --version >/dev/null 2>&1; then \
echo "cargo-nextest is not installed. You can install it using 'cargo install cargo-nextest'"; \
exit 1; \
fi
@if ! cargo llvm-cov --version >/dev/null 2>&1; then \
echo "cargo-llvm-cov is not installed. You can install it using 'cargo install cargo-llvm-cov'"; \
exit 1; \
fi
RUST_BACKTRACE=1 && (cd nautilus_core && cargo llvm-cov nextest run --workspace --exclude tokio-tungstenite)

.PHONY: cargo-bench
cargo-bench:
Expand Down
18 changes: 18 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# NautilusTrader 1.186.0 Beta

Released on 2nd February 2024 (UTC).

### Enhancements
None

### Breaking Changes
None

### Fixes
- Fixed Interactive Brokers get account positions bug (#1475), thanks @benjaminsingleton
- Fixed `TimeBarAggregator` handling of interval types on build
- Fixed `BinanceSpotExecutionClient` non-existent method name, thanks @sunlei
- Fixed unused `psutil` import, thanks @sunlei

---

# NautilusTrader 1.185.0 Beta

Released on 26th January 2024 (UTC).
Expand Down
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3

import datetime
import itertools
import os
import platform
import shutil
import subprocess
import sysconfig
from datetime import datetime
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -350,7 +350,7 @@ def build() -> None:
print(f"PYO3_ONLY={PYO3_ONLY}\n")

print("Starting build...")
ts_start = datetime.utcnow()
ts_start = datetime.datetime.now(datetime.timezone.utc)
build()
print(f"Build time: {datetime.utcnow() - ts_start}")
print(f"Build time: {datetime.datetime.now(datetime.timezone.utc) - ts_start}")
print("\033[32m" + "Build completed" + "\033[0m")
3 changes: 1 addition & 2 deletions docs/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ To install the latest binary wheel (or sdist package) from PyPI using Pythons _p
Install optional dependencies as 'extras' for specific integrations:

- `betfair`: Betfair adapter (integration)
- `databento`: Databento adapter (integration)
- `docker`: Needed for Docker when using the IB gateway
- `docker`: Needed for Docker when using the IB gateway (with the Interactive Brokers adapter)
- `ib`: Interactive Brokers adapter

To install with specific extras using _pip_:
Expand Down
28 changes: 15 additions & 13 deletions examples/live/databento/databento_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
from nautilus_trader.config.common import StrategyConfig
from nautilus_trader.live.node import TradingNode
from nautilus_trader.model.book import OrderBook

# from nautilus_trader.model.data import BarType
from nautilus_trader.model.data import OrderBookDeltas
from nautilus_trader.model.data import QuoteTick
from nautilus_trader.model.data import TradeTick
from nautilus_trader.model.enums import BookType
from nautilus_trader.model.identifiers import InstrumentId
from nautilus_trader.model.identifiers import TraderId
from nautilus_trader.trading.strategy import Strategy
Expand All @@ -41,8 +42,8 @@
# For correct subscription operation, you must specify all instruments to be immediately
# subscribed for as part of the data client configuration
instrument_ids = [
# InstrumentId.from_str("AAPL.XCHI"),
# InstrumentId.from_str("ESH4.GLBX"),
InstrumentId.from_str("AAPL.XCHI"),
InstrumentId.from_str("ESH4.GLBX"),
InstrumentId.from_str("ESM4.GLBX"),
]

Expand Down Expand Up @@ -80,6 +81,7 @@
http_gateway=None,
instrument_provider=InstrumentProviderConfig(load_all=True),
instrument_ids=instrument_ids,
parent_symbols={"GLBX.MDP3": {"ES.FUT", "ES.OPT"}},
),
},
timeout_connection=10.0,
Expand Down Expand Up @@ -128,7 +130,7 @@ def on_start(self) -> None:
"""
Actions to be performed when the strategy is started.
Here we specify the 'DATABENTO' client for subscriptions.
Here we specify the 'DATABENTO' client_id for subscriptions.
"""
for instrument_id in self.instrument_ids:
Expand All @@ -137,15 +139,15 @@ def on_start(self) -> None:
# book_type=BookType.L3_MBO,
# client_id=DATABENTO_CLIENT_ID,
# )
self.subscribe_order_book_snapshots(
instrument_id=instrument_id,
book_type=BookType.L2_MBP,
depth=10,
client_id=DATABENTO_CLIENT_ID,
interval_ms=100,
)
# self.subscribe_quote_ticks(instrument_id, client_id=DATABENTO_CLIENT_ID)
# self.subscribe_trade_ticks(instrument_id, client_id=DATABENTO_CLIENT_ID)
# self.subscribe_order_book_snapshots(
# instrument_id=instrument_id,
# book_type=BookType.L2_MBP,
# depth=10,
# client_id=DATABENTO_CLIENT_ID,
# interval_ms=100,
# )
self.subscribe_quote_ticks(instrument_id, client_id=DATABENTO_CLIENT_ID)
self.subscribe_trade_ticks(instrument_id, client_id=DATABENTO_CLIENT_ID)
# self.request_quote_ticks(instrument_id)
# self.request_trade_ticks(instrument_id)
# self.request_bars(BarType.from_str(f"{instrument_id}-1-MINUTE-LAST-EXTERNAL"))
Expand Down
Loading

0 comments on commit 8aae236

Please sign in to comment.