Skip to content

Release 1.192.0 #1648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 193 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
180c5df
Bump version
cjdsellers Apr 20, 2024
b8ce7ad
Fix docstring typos
cjdsellers Apr 20, 2024
8dd3c5f
Add additional Rust docs
cjdsellers Apr 20, 2024
6070ce8
Fix CurrencyPair.from_pyo3_c lot_size conversion (#1597)
filipmacek Apr 20, 2024
8769dae
Refactor order create method for Cython and Rust (#1598)
filipmacek Apr 20, 2024
30aff27
Add from_str pyo3 method in identifier_for_python macro (#1599)
filipmacek Apr 20, 2024
fbf67eb
Finish Instrument trait and implement sqlx trait FromRow for instrume…
filipmacek Apr 20, 2024
7ebeed4
Group sql models and code under infrastructure
cjdsellers Apr 20, 2024
341481b
Formatting
cjdsellers Apr 20, 2024
a4e97f9
Reorganize infrastructure crate
cjdsellers Apr 20, 2024
9c13852
Update dependencies
cjdsellers Apr 20, 2024
7a87e21
Fix clippy lints
cjdsellers Apr 20, 2024
9acab20
Add type annotation
cjdsellers Apr 20, 2024
c1fe038
Add additional Rust docs
cjdsellers Apr 21, 2024
42dc7e2
Add release notes
cjdsellers Apr 21, 2024
04bda9e
Fix ParquetDataCatalog bar queries by instrument_id
cjdsellers Apr 21, 2024
02669ae
Repair TestTimer tests
cjdsellers Apr 21, 2024
5f4e484
Add LiveTimer tests
cjdsellers Apr 21, 2024
30e964b
Change tags type to list[str]
cjdsellers Apr 21, 2024
13a42b0
Add Nautilus CLI (#1602)
filipmacek Apr 21, 2024
524816e
Update release notes
cjdsellers Apr 21, 2024
9d07ad4
Update dependencies
cjdsellers Apr 22, 2024
1a4604b
Optimize collection returns
cjdsellers Apr 22, 2024
ca66fdf
Fix IBOrderTags list support (#1603)
rsmb7z Apr 22, 2024
509392b
Upgrade datafusion
cjdsellers Apr 23, 2024
e0fc34b
Add Rust docs
cjdsellers Apr 23, 2024
2b17007
Update Binance Futures fee rates
cjdsellers Apr 23, 2024
649238e
Add Rust docs
cjdsellers Apr 23, 2024
ab55a2a
Continue Cache in Rust
cjdsellers Apr 23, 2024
828ca94
Fix clippy lints
cjdsellers Apr 23, 2024
1e34216
Fix TimeBarAggregator.stop setting timer name to None
cjdsellers Apr 23, 2024
b008fb3
Add CFD and Commodity support for Interactive Brokers (#1604)
DracheShiki Apr 23, 2024
b80d881
Update instrument docstrings
cjdsellers Apr 23, 2024
536d647
Betfair bugfix: Reload cache as a dict of venue and client order ids …
imemo88 Apr 24, 2024
e39591a
Add contract activation and expiration handling
cjdsellers Apr 24, 2024
d3149c5
Remove outdated symbology handling for CBOT instruments (#1609)
rsmb7z Apr 25, 2024
e5b5ba5
Update github workflows
cjdsellers Apr 24, 2024
2c27426
Update dependencies
cjdsellers Apr 25, 2024
319342d
Add contract expiration order and position closing
cjdsellers Apr 25, 2024
2fd9337
Update flags description
cjdsellers Apr 25, 2024
6513d20
Add Postgres cache database (#1607)
filipmacek Apr 26, 2024
c22bf00
Update release notes
cjdsellers Apr 25, 2024
b5a9360
Update dependencies
cjdsellers Apr 26, 2024
2423a3d
Update release notes
cjdsellers Apr 26, 2024
0b08c51
Add *.iml files to .gitignore (#1611)
filipmacek Apr 26, 2024
7896810
Continue Cache in Rust
cjdsellers Apr 27, 2024
0c1bea3
Fix clippy lints
cjdsellers Apr 27, 2024
792ccf6
Update core dependencies
cjdsellers Apr 27, 2024
fbf778f
Rename TimedeltaNanos to DurationNanos
cjdsellers Apr 27, 2024
4efcdc3
Add OrderList impl and tests
cjdsellers Apr 27, 2024
d2e2399
Update test name
cjdsellers Apr 27, 2024
335cbae
Consistently use reference in retain
cjdsellers Apr 27, 2024
7b9815f
Add Cache tests
cjdsellers Apr 27, 2024
9f34244
Add AccountId methods
cjdsellers Apr 27, 2024
5369328
Add Cache index build
cjdsellers Apr 27, 2024
6fe3ae3
Fix Money.from_str underscore parsing
cjdsellers Apr 27, 2024
2e23d21
Fix sandbox account initialization (#1613)
davidsblom Apr 27, 2024
9852a41
Add psql cache database - instruments (#1614)
filipmacek Apr 27, 2024
71af97d
Improve Money error messages
cjdsellers Apr 27, 2024
f33369e
Cleanup imports
cjdsellers Apr 27, 2024
50451b5
Make error variable consistent and formatting
cjdsellers Apr 27, 2024
ee174b7
Fix OrderList display
cjdsellers Apr 27, 2024
7a88a50
Refine Cache index building
cjdsellers Apr 27, 2024
a56c912
Add Cache methods in Rust
cjdsellers Apr 27, 2024
3df7693
Improve Quantity and Price string parsing
cjdsellers Apr 28, 2024
4f8d463
Add another quote tick stub
cjdsellers Apr 28, 2024
73bbc44
Consistently use UnixNanos default
cjdsellers Apr 28, 2024
d303679
Continue Cache tests in Rust
cjdsellers Apr 28, 2024
f8976ca
Fix IBContractDetails parsing (#1615)
rsmb7z Apr 28, 2024
6d807d3
Fix Portfolio registration for IB (#1616)
rsmb7z Apr 28, 2024
729b4ec
Fix docker/login-action version specifier
cjdsellers Apr 28, 2024
f78b7c9
Update release notes
cjdsellers Apr 28, 2024
de66c16
Skip database infrastructure tests unless Linux
cjdsellers Apr 28, 2024
d17c477
Remove docker services from mac-os runner
cjdsellers Apr 28, 2024
62fc78f
Only run database infrastructure tests on Linux
cjdsellers Apr 28, 2024
0821b22
Fix GitHub workflows
cjdsellers Apr 28, 2024
6405fa0
Add Sandbox example with Interactive Brokers (#1618)
rsmb7z Apr 29, 2024
093dd50
Update dependencies
cjdsellers Apr 29, 2024
0924ef2
Add services make targets
cjdsellers Apr 29, 2024
4275015
Pause mac-os platform in build workflow
cjdsellers Apr 29, 2024
e7d0503
Update release notes
cjdsellers Apr 29, 2024
0dde491
Derive QuoteTick and TradeTick builders
cjdsellers Apr 29, 2024
a83209b
Refine tick stubs
cjdsellers Apr 29, 2024
c1b9cb7
Continue Cache tests in Rust
cjdsellers Apr 29, 2024
3482475
Support S3 parquet data catalog (#1620)
benjaminsingleton Apr 30, 2024
5d468cc
Update dependencies
cjdsellers Apr 30, 2024
041147a
Refine client base logging
cjdsellers Apr 30, 2024
223c4b5
Fix Binance Futures account balance calculation
cjdsellers Apr 30, 2024
cee0e0c
Fix issue in Interactive Brokers get_historical_bars (#1621)
rsmb7z May 1, 2024
953c188
Fix IBKR reconnection after gateway/TWS disconnection (#1622)
benjaminsingleton May 2, 2024
0d3ddbc
Update release notes
cjdsellers May 2, 2024
d3fca70
Update dependencies
cjdsellers May 2, 2024
c48a3d8
Add Bar stub and builder
cjdsellers May 2, 2024
300998d
Add Cache tests in Rust
cjdsellers May 2, 2024
bb32dc6
Upgrade Rust
cjdsellers May 3, 2024
617aeb2
Wrap put_nowait with loop.call_soon_threadsafe
cjdsellers May 3, 2024
0726200
Add SyntheticInstrument stub and builder
cjdsellers May 3, 2024
a1c0200
Add Cache tests in Rust
cjdsellers May 3, 2024
81afa3b
Fix clippy lints
cjdsellers May 3, 2024
9fa7aa3
Refine Cache tests with fixture
cjdsellers May 3, 2024
88b1229
Reorganize cache and msgbus modules
cjdsellers May 3, 2024
d209dee
Reorganize data stubs in Rust
cjdsellers May 3, 2024
a00c7d3
Fix typo
cjdsellers May 3, 2024
8b552c0
Move data GetTsInit impls
cjdsellers May 3, 2024
88dfc3b
Move default identifiers to stubs
cjdsellers May 3, 2024
a44b87f
Consolidate OrderAny in separate module
cjdsellers May 3, 2024
29f00bf
Consolidate InstrumentAny in separate module
cjdsellers May 3, 2024
e9e8959
Update dependencies
cjdsellers May 3, 2024
c70ddbe
Refine stubs use and fix events display
cjdsellers May 3, 2024
fb9f923
Add order traits and rename event variants
cjdsellers May 4, 2024
50e2b53
Fix Order.is_open logic in Rust
cjdsellers May 4, 2024
8e4739d
Add Cache tests in Rust
cjdsellers May 4, 2024
3e65eb3
Add Bar.from_raw_arrays_to_list (#1623)
rsmb7z May 4, 2024
fa1a3db
Minor formatting and update release notes
cjdsellers May 4, 2024
0890280
Fix position closing on contract expiration (#1624)
rsmb7z May 4, 2024
e7b41a2
Remove panic setting from workspace test profile
cjdsellers May 4, 2024
a8a78ac
Refine UUID4
cjdsellers May 4, 2024
67db125
Improve Currency display and debug
cjdsellers May 4, 2024
16f5393
Remove redundant allow_cash_positions config
cjdsellers May 5, 2024
5e793cc
Standardize test naming
cjdsellers May 5, 2024
c01066d
Refine Currency display
cjdsellers May 5, 2024
7e2459b
Standardize order events display
cjdsellers May 5, 2024
2722031
Standardize order events display
cjdsellers May 5, 2024
f5315a9
Fix typo
cjdsellers May 5, 2024
a75ed55
Add RiskEngine test
cjdsellers May 5, 2024
257e279
Update README
cjdsellers May 5, 2024
f33803a
Standardize and refine events display in Rust
cjdsellers May 5, 2024
5f719c9
Standardize repr and str ordering
cjdsellers May 5, 2024
dfb049f
Fix timer cancel when it is already expired (#1628)
davidsblom May 5, 2024
648c399
Update dependencies
cjdsellers May 5, 2024
e69b53e
Standardize timer API in Rust
cjdsellers May 6, 2024
a91a4a8
Remove incorrect hyphens
cjdsellers May 6, 2024
f6c830a
Update example config and strategy docstrings
cjdsellers May 6, 2024
21ecc79
Refine Money debug and display in Rust
cjdsellers May 6, 2024
6e9188f
Standardize Debug and Display implementations
cjdsellers May 6, 2024
b68a5a9
Update dependencies
cjdsellers May 8, 2024
eab0c08
Standardize value type display vs serializable strings
cjdsellers May 8, 2024
add2449
Fix IBKR resubscribing after disconnection (#1626)
benjaminsingleton May 8, 2024
72df140
Standardize commissions serialization
cjdsellers May 8, 2024
12a6390
Standardize commissions serialization
cjdsellers May 8, 2024
deef562
Standardize order price display strings
cjdsellers May 8, 2024
e17d9da
Refine Order.to_dict commissions and linked_order_ids
cjdsellers May 8, 2024
59d056e
Update release notes
cjdsellers May 8, 2024
792523f
Fix IBOrder attributes assignment (#1634)
rsmb7z May 9, 2024
28bd423
Add psql cache database orders (#1631)
filipmacek May 9, 2024
89ebca4
Update release notes
cjdsellers May 9, 2024
5a3fdf9
Update dependencies
cjdsellers May 10, 2024
a90481c
Ignore postgres infrastruture tests temporarily
cjdsellers May 10, 2024
2a546ae
Update default postgres database
cjdsellers May 10, 2024
96769e6
Upgrade poetry
cjdsellers May 10, 2024
d3e271d
Fix TimeEvent equality
cjdsellers May 10, 2024
ad9a515
Improve venue order ID generation and assignment
cjdsellers May 10, 2024
7d38223
Update dependencies
cjdsellers May 11, 2024
4d567e0
Improve Portfolio position update logic
cjdsellers May 11, 2024
ee47d5e
Improve venue order ID cache indexing
cjdsellers May 11, 2024
fadba42
Add serial attribute in Postgres infrastructure tests (#1637)
filipmacek May 11, 2024
f87c385
Export order apply function with pyo3 (#1638)
filipmacek May 11, 2024
2526448
Refine order event object conversions
cjdsellers May 11, 2024
6e8eab5
Refine instrument object conversions
cjdsellers May 11, 2024
004db85
Update docs
cjdsellers May 12, 2024
6763bf9
Allow updating venue_order_id on modify
cjdsellers May 12, 2024
ff7c338
Add OrderMatchingEngine cached filled quantity
cjdsellers May 12, 2024
f169cce
Update dependencies including datafusion
cjdsellers May 12, 2024
ee1c9b2
Continue Cache in Rust
cjdsellers May 12, 2024
c1cc60f
Deserialize bool to u8 in Rust order events (#1641)
filipmacek May 13, 2024
7575aa3
Update release notes
cjdsellers May 13, 2024
08bcaf8
Update release notes
cjdsellers May 14, 2024
b7373ff
Improve LiveTimer robustness and flexibility
cjdsellers May 14, 2024
27b7abb
Fix matching engine cached filled quantity applying partial fills (#1…
davidsblom May 14, 2024
c7170c1
Simplify cached_filled_qty calculations
cjdsellers May 14, 2024
ac95a96
Fix clippy lints
cjdsellers May 14, 2024
03ceff2
Use NonZeroU64 for timer interval fields
cjdsellers May 14, 2024
5108b57
Fix clippy lint
cjdsellers May 14, 2024
3373cba
Update dependencies including pyarrow
cjdsellers May 15, 2024
3046583
Upgrade databento
cjdsellers May 15, 2024
95b449b
Update dependencies including databento
cjdsellers May 16, 2024
923644f
Add initial adapters development guide
cjdsellers May 16, 2024
85f8e08
Improve Betfair session renewal (#1644)
imemo88 May 16, 2024
a6ba752
Refine core UUID4
cjdsellers May 16, 2024
88da572
Add additional timer docs in Rust
cjdsellers May 16, 2024
fab5a0f
Update release notes
cjdsellers May 16, 2024
0d09adf
Upgrade betfair_parser
cjdsellers May 16, 2024
d5d06b2
Add bar_execution option to SandboxExecutionClient (#1646)
davidsblom May 17, 2024
0660436
Fix adapters guide title and code blocks
cjdsellers May 17, 2024
876912d
Change OrderMatchingEngine bar processing conditions
cjdsellers May 17, 2024
0abd58a
Improve Cache logging consistency
cjdsellers May 17, 2024
95702c0
Update Rust dependencies
cjdsellers May 17, 2024
326ebf1
Check redis version on connection
cjdsellers May 17, 2024
dcc5677
Remove redundant Portfolio calculations
cjdsellers May 17, 2024
ae9677a
Fix CashAccount PnL and balance calculations
cjdsellers May 17, 2024
06bafab
Add Cfd instrument optional base_currency
cjdsellers May 18, 2024
da5451d
Update release notes
cjdsellers May 18, 2024
380169c
Update release notes
cjdsellers May 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '3.5'

services:
postgres:
container_name: nautilus-database
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pass}
POSTGRES_DATABASE: nautilus
PGDATA: /data/postgres
volumes:
- nautilus-database:/data/postgres
ports:
- "5432:5432"
networks:
- nautilus-network
restart: unless-stopped

pgadmin:
container_name: nautilus-pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@mail.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5051}:80"
networks:
- nautilus-network
restart: unless-stopped

redis:
container_name: nautilus-redis
image: redis
ports:
- 6379:6379
restart: unless-stopped
networks:
- nautilus-network

networks:
nautilus-network:

volumes:
nautilus-database:
pgadmin:
2 changes: 1 addition & 1 deletion .docker/nautilus_trader.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.8.2 \
POETRY_VERSION=1.8.3 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
Expand Down
39 changes: 30 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ jobs:
env:
BUILD_MODE: debug
RUST_BACKTRACE: 1
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DB: nautilus
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Free disk space (Ubuntu)
Expand Down Expand Up @@ -105,10 +124,16 @@ jobs:
# pre-commit run --hook-stage manual gitlint-ci
pre-commit run --all-files

- name: Install Redis (Linux)
- name: Install Nautilus CLI and run init postgres
run: |
sudo apt-get install redis-server
redis-server --daemonize yes
make install-cli
nautilus database init --schema ${{ github.workspace }}/schema
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DATABASE: nautilus

- name: Run nautilus_core cargo tests (Linux)
run: |
Expand Down Expand Up @@ -209,7 +234,8 @@ jobs:
PARALLEL_BUILD: false

build-macos:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -290,11 +316,6 @@ jobs:
# pre-commit run --hook-stage manual gitlint-ci
pre-commit run --all-files

- name: Install Redis (macOS)
run: |
brew install redis
redis-server --daemonize yes

- name: Run nautilus_core cargo tests (macOS)
run: |
cargo install cargo-nextest
Expand Down
31 changes: 28 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ jobs:
python-version: ["3.10"] # Fails on 3.11 due Cython
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DB: nautilus
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Free disk space (Ubuntu)
Expand Down Expand Up @@ -90,10 +109,16 @@ jobs:
path: ${{ env.POETRY_CACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install Redis
- name: Install Nautilus CLI and run init postgres
run: |
sudo apt-get install redis-server
redis-server --daemonize yes
make install-cli
nautilus database init --schema ${{ github.workspace }}/schema
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DATABASE: nautilus

- name: Run tests with coverage
run: make pytest-coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7.0.7
uses: tj-actions/branch-names@v8.0.1

- name: Build nautilus_trader image (nightly)
if: ${{ steps.branch-name.outputs.current_branch == 'nightly' }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*.env
*.tar.gz*
*.zip
*.iml

*.dbz
*.dbn
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ repos:
types: [python]

- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
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.3.7
rev: v0.4.4
hooks:
- id: ruff
args: ["--fix"]
Expand Down Expand Up @@ -111,7 +111,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
args: [
Expand Down
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ docs-python: install-just-deps-all

.PHONY: docs-rust
docs-rust:
(cd nautilus_core && RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps)
(cd nautilus_core && RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all-features --no-deps --workspace --exclude tokio-tungstenite)

.PHONY: clippy
clippy:
Expand Down Expand Up @@ -137,6 +137,14 @@ docker-build-jupyter:
docker-push-jupyter:
docker push ${IMAGE}:jupyter

.PHONY: start-services
start-services:
docker-compose -f .docker/docker-compose.yml up -d

.PHONY: stop-services
stop-services:
docker-compose -f .docker/docker-compose.yml down

.PHONY: pytest
pytest:
bash scripts/test.sh
Expand All @@ -153,11 +161,6 @@ test-examples:
install-talib:
bash scripts/install-talib.sh

.PHONY: init-db
init-db:
(cd nautilus_core && cargo run --bin init-db)

.PHONY: drop-db
drop-db:
(cd nautilus_core && cargo run --bin drop-db)

.PHONY: install-cli
install-cli:
(cd nautilus_core && cargo install --path cli --bin nautilus)
43 changes: 12 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

| Platform | Rust | Python |
| :----------------- | :------ | :----- |
| `Linux (x86_64)` | 1.77.1+ | 3.10+ |
| `macOS (x86_64)` | 1.77.1+ | 3.10+ |
| `macOS (arm64)` | 1.77.1+ | 3.10+ |
| `Windows (x86_64)` | 1.77.1+ | 3.10+ |
| `Linux (x86_64)` | 1.78.0+ | 3.10+ |
| `macOS (x86_64)` | 1.78.0+ | 3.10+ |
| `macOS (arm64)` | 1.78.0+ | 3.10+ |
| `Windows (x86_64)` | 1.78.0+ | 3.10+ |

- **Website:** https://nautilustrader.io
- **Docs:** https://docs.nautilustrader.io
Expand All @@ -44,8 +44,8 @@ including FX, Equities, Futures, Options, CFDs, Crypto and Betting - across mult

## Features

- **Fast** - C-level speed through Rust and Cython. Asynchronous networking with [uvloop](https://github.com/MagicStack/uvloop)
- **Reliable** - Type safety through Rust and Cython. Redis backed performant state persistence
- **Fast** - Core written in Rust with asynchronous networking using [tokio](https://crates.io/crates/tokio)
- **Reliable** - Type safety and thread safety through Rust. Redis backed performant state persistence
- **Portable** - OS independent, runs on Linux, macOS, Windows. Deploy using Docker
- **Flexible** - Modular adapters mean any REST, WebSocket, or FIX API can be integrated
- **Advanced** - Time in force `IOC`, `FOK`, `GTD`, `AT_THE_OPEN`, `AT_THE_CLOSE`, advanced order types and conditional triggers. Execution instructions `post-only`, `reduce-only`, and icebergs. Contingency order lists including `OCO`, `OTO`
Expand Down Expand Up @@ -76,7 +76,8 @@ express the granular time and event dependent complexity of real-time trading, w
proven to be more suitable due to their inherently higher performance, and type safety.

One of the key advantages of NautilusTrader here, is that this reimplementation step is now circumvented - as the critical core components of the platform
have all been written entirely in Rust or Cython. This means we're using the right tools for the job, where systems programming languages compile performant binaries,
have all been written entirely in [Rust](https://www.rust-lang.org/) or [Cython](https://cython.org/).
This means we're using the right tools for the job, where systems programming languages compile performant binaries,
with CPython C extension modules then able to offer a Python native environment, suitable for professional quantitative traders and trading firms.

## Why Python?
Expand All @@ -91,16 +92,6 @@ implementing large performance-critical systems. Cython has addressed a lot of t
of a statically typed language, embedded into Pythons rich ecosystem of software libraries and
developer/user communities.

## What is Cython?

[Cython](https://cython.org) is a compiled programming language which aims to be a superset of the Python programming
language, designed to give C-like performance with code that is written in Python - with
optional C-inspired syntax.

The project heavily utilizes Cython to provide static type safety and increased performance
for Python through [C extension modules](https://docs.python.org/3/extending/extending.html). The vast majority of the production code is actually
written in Cython, however the libraries can be accessed from both Python and Cython.

## What is Rust?

[Rust](https://www.rust-lang.org/) is a multi-paradigm programming language designed for performance and safety, especially safe
Expand All @@ -111,9 +102,8 @@ Rust’s rich type system and ownership model guarantees memory-safety and threa
eliminating many classes of bugs at compile-time.

The project increasingly utilizes Rust for core performance-critical components. Python language binding is handled through
Cython, with static libraries linked at compile-time before the wheel binaries are packaged, so a user
does not need to have Rust installed to run NautilusTrader. In the future as more Rust code is introduced,
[PyO3](https://pyo3.rs/latest) will be leveraged for easier Python bindings.
Cython and [PyO3](https://pyo3.rs/latest), with static libraries linked at compile-time before the wheel binaries are packaged, so a user
does not need to have Rust installed to run NautilusTrader.

This project makes the [Soundness Pledge](https://raphlinus.github.io/rust/2020/01/18/soundness-pledge.html):

Expand All @@ -124,15 +114,6 @@ This project makes the [Soundness Pledge](https://raphlinus.github.io/rust/2020/

![Architecture](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/_images/architecture-overview.png?raw=true "architecture")

## Quality Attributes

- Reliability
- Performance
- Modularity
- Testability
- Maintainability
- Deployability

## Integrations

NautilusTrader is designed in a modular way to work with _adapters_ which provide
Expand Down Expand Up @@ -238,8 +219,8 @@ A `Makefile` is provided to automate most installation and build tasks for devel
- `make install-debug` -- Same as `make install` but with `debug` build mode
- `make install-just-deps` -- Installs just the `main`, `dev` and `test` dependencies (does not install package)
- `make install-just-deps-all` -- Same as `make install-just-deps` and additionally installs `docs` dependencies
- `make build` -- Runs the Cython build script in `release` build mode (default)
- `make build-debug` -- Runs the Cython build script in `debug` build mode
- `make build` -- Runs the build script in `release` build mode (default)
- `make build-debug` -- Runs the build script in `debug` build mode
- `make build-wheel` -- Runs the Poetry build with a wheel format in `release` mode
- `make build-wheel-debug` -- Runs the Poetry build with a wheel format in `debug` mode
- `make clean` -- **CAUTION** Cleans all non-source artifacts from the repository
Expand Down
39 changes: 39 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# NautilusTrader 1.192.0 Beta

Released on 18th May 2024 (UTC).

### Enhancements
- Added Nautilus CLI (see [docs](https://docs.nautilustrader.io/nightly/developer_guide/index.html)) (#1602), many thanks @filipmacek
- Added `Cfd` and `Commodity` instruments with Interactive Brokers support (#1604), thanks @DracheShiki
- Added `OrderMatchingEngine` futures and options contract activation and expiration simulation
- Added Sandbox example with Interactive Brokers (#1618), thanks @rsmb7z
- Added `ParquetDataCatalog` S3 support (#1620), thanks @benjaminsingleton
- Added `Bar.from_raw_arrays_to_list` (#1623), thanks @rsmb7z
- Added `SandboxExecutionClientConfig.bar_execution` option (#1646), thanks @davidsblom
- Improved venue order ID generation and assignment (it was previously possible for the `OrderMatchingEngine` to generate multiple IDs for the same order)
- Improved `LiveTimer` robustness and flexibility by not requiring positive intervals or stop times in the future (will immediately produce a time event), thanks for reporting @davidsblom

### Breaking Changes
- Removed `allow_cash_positions` config (simplify to the most common use case, spot trading should track positions)
- Changed `tags` param and return type from `str` to `list[str]` (more naturally expresses multiple tags)
- Changed `Order.to_dict()` `commission` and `linked_order_id` fields to lists of strings rather than comma separated strings
- Changed `OrderMatchingEngine` to no longer process internally aggregated bars for execution (no tests failed, but still classifying as a behavior change), thanks for reporting @davidsblom

### Fixes
- Fixed `CashAccount` PnL and balance calculations (was adjusting filled quantity based on open position quantity - causing a desync and incorrect balance values)
- Fixed `from_str` for `Price`, `Quantity` and `Money` when input string contains underscores in Rust, thanks for reporting @filipmacek
- Fixed `Money` string parsing where the value from `str(money)` can now be passed to `Money.from_str`
- Fixed `TimeEvent` equality (now based on the event `id` rather than the event `name`)
- Fixed `ParquetDataCatalog` bar queries by `instrument_id` which were no longer returning data (the intent is to use `bar_type`, however using `instrument_id` now returns all matching bars)
- Fixed venue order ID generation and application in sandbox mode (was previously generating additional venue order IDs), thanks for reporting @rsmb7z and @davidsblom
- Fixed multiple fills causing overfills in sandbox mode (`OrderMatchingEngine` now caching filled quantity to prevent this) (#1642), thanks @davidsblom
- Fixed `leaves_qty` exception message underflow (now correctly displays the projected negative leaves quantity)
- Fixed Interactive Brokers contract details parsing (#1615), thanks @rsmb7z
- Fixed Interactive Brokers portfolio registration (#1616), thanks @rsmb7z
- Fixed Interactive Brokers `IBOrder` attributes assignment (#1634), thanks @rsmb7z
- Fixed IBKR reconnection after gateway/TWS disconnection (#1622), thanks @benjaminsingleton
- Fixed Binance Futures account balance calculation (was over stating `free` balance with margin collateral, which could result in a negative `locked` balance)
- Fixed Betfair stream reconnection and avoid multiple reconnect attempts (#1644), thanks @imemo88

---

# NautilusTrader 1.191.0 Beta

Released on 20th April 2024 (UTC).
Expand Down
Loading
Loading