Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Dec 30, 2023
1 parent b36bec3 commit bccf3e0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ NautilusTrader is designed in a modular way to work with 'adapters' which provid
connectivity to data providers and/or trading venues - converting their raw API
into a unified interface. The following integrations are currently supported:

| Name | ID | Type | Status | Docs |
| :-------------------------------------------------------- | :---------- | :---------------------- | :------------------------------------------------------ | :---------------------------------------------------------------- |
| [Betfair](https://betfair.com) | `BETFAIR` | Sports betting exchange | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/betfair.html) |
| [Binance](https://binance.com) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance US](https://binance.us) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance Futures](https://www.binance.com/en/futures) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Bybit](https://www.bybit.com) | `BYBIT` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/building-orange) | |
| [Databento](https://databento.com) | `DATABENTO` | Data provider | ![status](https://img.shields.io/badge/building-orange) | |
| [Interactive Brokers](https://www.interactivebrokers.com) | `IB` | Brokerage (multi-venue) | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/ib.html) |
| Name | ID | Type | Status | Docs |
| :-------------------------------------------------------- | :-------------------- | :---------------------- | :------------------------------------------------------ | :---------------------------------------------------------------- |
| [Betfair](https://betfair.com) | `BETFAIR` | Sports betting exchange | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/betfair.html) |
| [Binance](https://binance.com) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance US](https://binance.us) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance Futures](https://www.binance.com/en/futures) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Bybit](https://www.bybit.com) | `BYBIT` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/building-orange) | |
| [Databento](https://databento.com) | `DATABENTO` | Data provider | ![status](https://img.shields.io/badge/building-orange) | |
| [Interactive Brokers](https://www.interactivebrokers.com) | `INTERACTIVE_BROKERS` | Brokerage (multi-venue) | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/ib.html) |

Refer to the [Integrations](https://docs.nautilustrader.io/integrations/index.html) documentation for further details.

Expand Down Expand Up @@ -251,7 +251,7 @@ The below are some examples of this:
## Docker
Docker containers are built using a base `python:3.10-slim` with the following image variant tags:
Docker containers are built using a base `python:3.11-slim` with the following image variant tags:
- `nautilus_trader:latest` has the latest release version installed
- `nautilus_trader:develop` has the head of the `develop` branch installed
Expand Down
9 changes: 5 additions & 4 deletions docs/concepts/strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,14 @@ Here is an example configuration:
```python
from decimal import Decimal
from nautilus_trader.config import StrategyConfig
from nautilus_trader.model.data import BarType
from nautilus_trader.model.identifiers import InstrumentId
from nautilus_trader.trading.strategy import Strategy


class MyStrategyConfig(StrategyConfig):
instrument_id: str
bar_type: str
instrument_id: InstrumentId
bar_type: BarType
fast_ema_period: int = 10
slow_ema_period: int = 20
trade_size: Decimal
Expand All @@ -542,8 +543,8 @@ class MyStrategy(Strategy):
# trading strategy to initialize.

config = MyStrategyConfig(
instrument_id="ETHUSDT-PERP.BINANCE",
bar_type="ETHUSDT-PERP.BINANCE-1000-TICK[LAST]-INTERNAL",
instrument_id=InstrumentId.from_str("ETHUSDT-PERP.BINANCE"),
bar_type=BarType.from_str("ETHUSDT-PERP.BINANCE-1000-TICK[LAST]-INTERNAL"),
trade_size=Decimal(1),
order_id_tag="001",
)
Expand Down
5 changes: 3 additions & 2 deletions docs/getting_started/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

NautilusTrader is tested and supported for Python 3.10-3.11 on the following 64-bit platforms:
NautilusTrader is tested and supported for Python 3.10-3.12 on the following 64-bit platforms:

| Operating System | Supported Versions | CPU Architecture |
|------------------------|-----------------------|-------------------|
Expand All @@ -21,7 +21,8 @@ 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
- `betfair`: Betfair adapter (integration)
- `databento`: Databento adapter (integration)
- `docker`: Needed for Docker when using the IB gateway
- `ib`: Interactive Brokers adapter

Expand Down
10 changes: 6 additions & 4 deletions docs/getting_started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ from nautilus_trader.trading.strategy import Strategy, StrategyConfig


class MACDConfig(StrategyConfig):
instrument_id: str
instrument_id: InstrumentId
fast_period: int = 12
slow_period: int = 26
trade_size: int = 1_000_000
Expand All @@ -91,11 +91,13 @@ class MACDStrategy(Strategy):
super().__init__(config=config)
# Our "trading signal"
self.macd = MovingAverageConvergenceDivergence(
fast_period=config.fast_period, slow_period=config.slow_period, price_type=PriceType.MID
fast_period=config.fast_period,
slow_period=config.slow_period,
price_type=PriceType.MID,
)
# We copy some config values onto the class to make them easier to reference later on
self.entry_threshold = config.entry_threshold
self.instrument_id = InstrumentId.from_str(config.instrument_id)
self.instrument_id = config.instrument_id
self.trade_size = Quantity.from_int(config.trade_size)

# Convenience
Expand Down Expand Up @@ -173,7 +175,7 @@ To configure a `BacktestNode`, we first need to create an instance of a `Backtes
following (minimal) aspects of the backtest:

- `engine` - The engine for the backtest representing our core system, which will also contain our strategies
- `venues` - The simulated venues (exchanges or brokers) available in the backtest
- `venues` - The simulated execution venues (exchanges or brokers) available in the backtest
- `data` - The input data we would like to perform the backtest on

There are many more configurable features which will be described later in the docs, for now this will get us up and running.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Welcome to the official documentation for NautilusTrader!
providing quantitative traders with the ability to backtest portfolios of automated trading strategies
on historical data with an event-driven engine, and also deploy those same strategies live, with no code changes.**

The platform boasts an extensive array of features and capabilities, coupled with open-ended flexibility for assembling
The platform provides an extensive array of features and capabilities, coupled with open-ended flexibility for assembling
trading systems using the framework. Given the breadth of information, and required pre-requisite knowledge, both beginners and experts alike may find the learning curve steep.
However, this documentation aims to assist you in learning and understanding NautilusTrader, so that you can then leverage it to achieve your algorithmic trading goals.

Expand Down
6 changes: 3 additions & 3 deletions examples/live/bybit/bybit_request_custom_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@


class RequestDemoStrategyConfig(StrategyConfig, frozen=True):
instrument_id: str
instrument_id: InstrumentId
interval: int


Expand All @@ -64,7 +64,7 @@ class RequestDemoStrategy(Strategy):
def __init__(self, config: RequestDemoStrategyConfig):
super().__init__()
self.interval = config.interval
self.instrument_id = InstrumentId.from_str(config.instrument_id)
self.instrument_id = config.instrument_id

def on_start(self):
seconds_delta = timedelta(seconds=self.interval)
Expand Down Expand Up @@ -124,7 +124,7 @@ def on_historical_data(self, data: Data):

node = TradingNode(config=config_node)

instrument_id = "ETHUSDT-LINEAR.BYBIT"
instrument_id = InstrumentId.from_str("ETHUSDT-LINEAR.BYBIT")
strategy_config = RequestDemoStrategyConfig(
instrument_id=instrument_id,
interval=10,
Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"\n",
"\n",
"class MACDConfig(StrategyConfig):\n",
" instrument_id: str\n",
" instrument_id: InstrumentId\n",
" fast_period: int = 12\n",
" slow_period: int = 26\n",
" trade_size: int = 1_000_000\n",
Expand All @@ -120,7 +120,7 @@
" )\n",
" # We copy some config values onto the class to make them easier to reference later on\n",
" self.entry_threshold = config.entry_threshold\n",
" self.instrument_id = InstrumentId.from_str(config.instrument_id)\n",
" self.instrument_id = config.instrument_id\n",
" self.trade_size = Quantity.from_int(config.trade_size)\n",
" self.entry_threshold = config.entry_threshold\n",
"\n",
Expand Down Expand Up @@ -323,7 +323,7 @@
" strategy_path=\"__main__:MACDStrategy\",\n",
" config_path=\"__main__:MACDConfig\",\n",
" config=dict(\n",
" instrument_id=instruments[0].id.value,\n",
" instrument_id=instruments[0].id,\n",
" fast_period=12,\n",
" slow_period=26,\n",
" ),\n",
Expand Down

0 comments on commit bccf3e0

Please sign in to comment.