Skip to content

Commit

Permalink
Update gh-pages to output generated at be25c7b
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Jun 9, 2024
1 parent 0b65e72 commit 3982c22
Show file tree
Hide file tree
Showing 1,909 changed files with 4,374 additions and 4,364 deletions.
Binary file modified nightly/.doctrees/api_reference/accounting.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/adapters/betfair.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/adapters/binance.doctree
Binary file not shown.
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/analysis.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/backtest.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/cache.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/common.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/config.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/core.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/data.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/execution.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/indicators.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/live.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/book.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/data.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/events.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/identifiers.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/instruments.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/objects.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/orders.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/position.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/model/tick_scheme.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/persistence.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/portfolio.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/risk.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/serialization.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/system.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/api_reference/trading.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/environment.pickle
Binary file not shown.
Binary file modified nightly/.doctrees/integrations/binance.doctree
Binary file not shown.
Binary file modified nightly/.doctrees/integrations/ib.doctree
Binary file not shown.
18 changes: 11 additions & 7 deletions nightly/_sources/integrations/binance.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,22 @@ E.g. for Binance Futures, the said instruments symbol is `BTCUSDT-PERP` within t

### Trailing stops

Binance use the concept of an *activation price* for trailing stops ([see docs](https://www.binance.com/en-AU/support/faq/what-is-a-trailing-stop-order-360042299292)).
To get trailing stop orders working for Binance we need to use the `trigger_price` value to set the *activation price*.
Binance uses the concept of an activation price for trailing stops, as detailed in their [documentation](https://www.binance.com/en-AU/support/faq/what-is-a-trailing-stop-order-360042299292).
This approach is somewhat unconventional. For trailing stop orders to function on Binance, the activation price can optionally be set using the `trigger_price` value.

For `TRAILING_STOP_MARKET` orders to be submitted successfully, you must define the following:
- Specify a `trailing_offet_type` of either `DEFAULT` or `BASIS_POINTS`
- Specify the `trailing_offset` in basis points (% * 100) e.g. for a callback rate of 1% use 100
Note that the activation price is **not** the same as the trigger/STOP price. Binance will always calculate the trigger price for the order based on the current market price and the callback rate provided by `trailing_offset`.
The activated price is simply the price at which the order will begin trailing based on the callback rate.

When submitting trailing stop orders from your strategy, you have two options:

1. Use the `trigger_price` to manually set the activation price.
2. Leave the `trigger_price` as `None`, making the trailing action immediately "active".

You must also have at least *one* of the following:

- The `trigger_price` for the order is set (this will act as the Binance *activation_price*)
- You have subscribed to quote ticks for the instrument you're submitting the order for (used to infer activation price)
- You have subscribed to trade ticks for the instrument you're submitting the order for (used to infer activation price)
- (or) you have subscribed to quote ticks for the instrument you're submitting the order for (used to infer activation price)
- (or) you have subscribed to trade ticks for the instrument you're submitting the order for (used to infer activation price)

## Configuration

Expand Down
47 changes: 46 additions & 1 deletion nightly/_sources/integrations/ib.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,58 @@ To ensure efficient management of these diverse responsibilities, the `Interacti
To troubleshoot TWS API incoming message issues, consider starting at the `InteractiveBrokersClient._process_message` method, which acts as the primary gateway for processing all messages received from the API.
```

## Symbology
The InteractiveBrokersInstrumentProvider supports two methods for constructing InstrumentId instances, which can be configured via the strict_symbology flag in InteractiveBrokersInstrumentProviderConfig.

### Simplified Symbology
When strict_symbology is set to False (the default setting), the system utilizes the following parsing rules for symbology:

- Forex: The format is `{symbol}/{currency}.{exchange}`, where the currency pair is constructed as `EUR/USD.IDEALPRO`.
- Stocks: The format is `{localSymbol}.{primaryExchange}`. Any spaces in localSymbol are replaced with -, e.g., `BF-B.NYSE`.
- Futures: The format is `{localSymbol}.{exchange}`. Single digit years are expanded to two digits, e.g., `ESM24.CME`.
- Options: The format is `{localSymbol}.{exchange}`, with all spaces removed from localSymbol, e.g., `AAPL230217P00155000.SMART`.
- Index: The format is `^{localSymbol}.{exchange}`, e.g., `^SPX.CBOE`.

### Strict Symbology
Setting strict_symbology to True enforces stricter parsing rules that align directly with the fields defined in the ibapi. The format for each security type is as follows:

- CFDs: `{localSymbol}={secType}.IBCFD`
- Commodities: `{localSymbol}={secType}.IBCMDTY`
- Default for Other Types: `{localSymbol}={secType}.{exchange}`

This configuration ensures that the symbology is explicitly defined and matched with the Interactive Brokers API requirements, providing clear and consistent instrument identification.

## Instruments & Contracts

In IB, a NautilusTrader `Instrument` is equivalent to a [Contract](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/#contracts). Contracts can be either a [basic contract](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/#contract-object) or a more [detailed](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/#contract-details) version (ContractDetails). The adapter models these using `IBContract` and `IBContractDetails` classes. The latter includes critical data like order types and trading hours, which are absent in the basic contract. As a result, `IBContractDetails` can be converted to an `Instrument` while `IBContract` cannot.

To search for contract information, use the [IB Contract Information Center](https://pennies.interactivebrokers.com/cstools/contract_info/).

Examples of `IBContracts`:
It's typically suggested to utilize `strict_symbology=False` (which is the default setting). This allows for a cleaner and more intuitive use of InstrumentId by employing `load_ids` in the `InteractiveBrokersInstrumentProviderConfig`, following the guidelines established in the Simplified Symbology section.
Nonetheless, in order to load multiple Instruments, such as Options Instrument without having to specify each strike explicitly, you would need to utilize `load_contracts` with provided instances of `IBContract`.

```python
for_loading_instrument_expiry = IBContract(
secType="IND",
symbol="SPX",
exchange="CBOE",
build_options_chain=True,
lastTradeDateOrContractMonth='20240718',
)

for_loading_instrument_range = IBContract(
secType="IND",
symbol="SPX",
exchange="CBOE",
build_options_chain=True,
min_expiry_days=0,
max_expiry_days=30,
)
```

> **Note:** The `secType` and `symbol` should be specified for the Underlying Contract.

Some more examples of building IBContracts:
```python
from nautilus_trader.adapters.interactive_brokers.common import IBContract

Expand Down
14 changes: 13 additions & 1 deletion nightly/api_reference/adapters/interactive_brokers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4930,6 +4930,18 @@ <h2 id="module-nautilus_trader.adapters.interactive_brokers.common">
</span>
<span class="w">
</span>
<span class="s">
<span class="pre">
'IND'
</span>
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="s">
<span class="pre">
''
Expand Down Expand Up @@ -11971,7 +11983,7 @@ <h2 id="module-nautilus_trader.adapters.interactive_brokers.config">
at
</span>
<span class="pre">
0x7f3d296f3f90&gt;
0x7fbc3adea050&gt;
</span>
<span class="pre">
=
Expand Down
2 changes: 1 addition & 1 deletion nightly/core/help.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="nautilus_pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (98489f248 2024-06-06)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-118b08c4c78b968e.js"></script><script defer src="./static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.80.0-nightly</span></h2></div><div class="version">(98489f248 2024-06-06)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="nautilus_pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0-nightly (f21554f7f 2024-06-08)" data-channel="nightly" data-search-js="search-9d4fa2dd5e5a7e17.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-118b08c4c78b968e.js"></script><script defer src="./static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.81.0-nightly</span></h2></div><div class="version">(f21554f7f 2024-06-08)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
2 changes: 1 addition & 1 deletion nightly/core/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of crates"><title>Index of crates</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="nautilus_pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (98489f248 2024-06-06)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-118b08c4c78b968e.js"></script><script defer src="./static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.80.0-nightly</span></h2></div><div class="version">(98489f248 2024-06-06)</div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all crates</h1><ul class="all-items"><li><a href="nautilus/index.html">nautilus</a></li><li><a href="nautilus_accounting/index.html">nautilus_accounting</a></li><li><a href="nautilus_adapters/index.html">nautilus_adapters</a></li><li><a href="nautilus_backtest/index.html">nautilus_backtest</a></li><li><a href="nautilus_cli/index.html">nautilus_cli</a></li><li><a href="nautilus_common/index.html">nautilus_common</a></li><li><a href="nautilus_core/index.html">nautilus_core</a></li><li><a href="nautilus_execution/index.html">nautilus_execution</a></li><li><a href="nautilus_indicators/index.html">nautilus_indicators</a></li><li><a href="nautilus_infrastructure/index.html">nautilus_infrastructure</a></li><li><a href="nautilus_model/index.html">nautilus_model</a></li><li><a href="nautilus_network/index.html">nautilus_network</a></li><li><a href="nautilus_persistence/index.html">nautilus_persistence</a></li><li><a href="nautilus_pyo3/index.html">nautilus_pyo3</a></li><li><a href="sandbox/index.html">sandbox</a></li></ul></section></div></main></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of crates"><title>Index of crates</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="nautilus_pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0-nightly (f21554f7f 2024-06-08)" data-channel="nightly" data-search-js="search-9d4fa2dd5e5a7e17.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-118b08c4c78b968e.js"></script><script defer src="./static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.81.0-nightly</span></h2></div><div class="version">(f21554f7f 2024-06-08)</div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all crates</h1><ul class="all-items"><li><a href="nautilus/index.html">nautilus</a></li><li><a href="nautilus_accounting/index.html">nautilus_accounting</a></li><li><a href="nautilus_adapters/index.html">nautilus_adapters</a></li><li><a href="nautilus_backtest/index.html">nautilus_backtest</a></li><li><a href="nautilus_cli/index.html">nautilus_cli</a></li><li><a href="nautilus_common/index.html">nautilus_common</a></li><li><a href="nautilus_core/index.html">nautilus_core</a></li><li><a href="nautilus_execution/index.html">nautilus_execution</a></li><li><a href="nautilus_indicators/index.html">nautilus_indicators</a></li><li><a href="nautilus_infrastructure/index.html">nautilus_infrastructure</a></li><li><a href="nautilus_model/index.html">nautilus_model</a></li><li><a href="nautilus_network/index.html">nautilus_network</a></li><li><a href="nautilus_persistence/index.html">nautilus_persistence</a></li><li><a href="nautilus_pyo3/index.html">nautilus_pyo3</a></li><li><a href="sandbox/index.html">sandbox</a></li></ul></section></div></main></body></html>
Loading

0 comments on commit 3982c22

Please sign in to comment.