diff --git a/nightly/.doctrees/api_reference/accounting.doctree b/nightly/.doctrees/api_reference/accounting.doctree index e536694eb537..96a34aead08e 100644 Binary files a/nightly/.doctrees/api_reference/accounting.doctree and b/nightly/.doctrees/api_reference/accounting.doctree differ diff --git a/nightly/.doctrees/api_reference/adapters/betfair.doctree b/nightly/.doctrees/api_reference/adapters/betfair.doctree index d803bf49bd67..7cf5e3bd30b3 100644 Binary files a/nightly/.doctrees/api_reference/adapters/betfair.doctree and b/nightly/.doctrees/api_reference/adapters/betfair.doctree differ diff --git a/nightly/.doctrees/api_reference/adapters/binance.doctree b/nightly/.doctrees/api_reference/adapters/binance.doctree index e7ffde0b05c3..4e8fb2e0ca16 100644 Binary files a/nightly/.doctrees/api_reference/adapters/binance.doctree and b/nightly/.doctrees/api_reference/adapters/binance.doctree differ diff --git a/nightly/.doctrees/api_reference/adapters/interactive_brokers.doctree b/nightly/.doctrees/api_reference/adapters/interactive_brokers.doctree index 6ab180cfa256..1e97031314aa 100644 Binary files a/nightly/.doctrees/api_reference/adapters/interactive_brokers.doctree and b/nightly/.doctrees/api_reference/adapters/interactive_brokers.doctree differ diff --git a/nightly/.doctrees/api_reference/analysis.doctree b/nightly/.doctrees/api_reference/analysis.doctree index 49ea29da5962..d0affbd11474 100644 Binary files a/nightly/.doctrees/api_reference/analysis.doctree and b/nightly/.doctrees/api_reference/analysis.doctree differ diff --git a/nightly/.doctrees/api_reference/backtest.doctree b/nightly/.doctrees/api_reference/backtest.doctree index 6082e57474e2..907c01485d49 100644 Binary files a/nightly/.doctrees/api_reference/backtest.doctree and b/nightly/.doctrees/api_reference/backtest.doctree differ diff --git a/nightly/.doctrees/api_reference/cache.doctree b/nightly/.doctrees/api_reference/cache.doctree index 2a5895baa4a5..8ca46cbb08cd 100644 Binary files a/nightly/.doctrees/api_reference/cache.doctree and b/nightly/.doctrees/api_reference/cache.doctree differ diff --git a/nightly/.doctrees/api_reference/common.doctree b/nightly/.doctrees/api_reference/common.doctree index b014e69639bb..af0658cd9381 100644 Binary files a/nightly/.doctrees/api_reference/common.doctree and b/nightly/.doctrees/api_reference/common.doctree differ diff --git a/nightly/.doctrees/api_reference/core.doctree b/nightly/.doctrees/api_reference/core.doctree index d16effe9d441..e3f894746601 100644 Binary files a/nightly/.doctrees/api_reference/core.doctree and b/nightly/.doctrees/api_reference/core.doctree differ diff --git a/nightly/.doctrees/api_reference/data.doctree b/nightly/.doctrees/api_reference/data.doctree index ec69aba44555..d9bcb5f6f37a 100644 Binary files a/nightly/.doctrees/api_reference/data.doctree and b/nightly/.doctrees/api_reference/data.doctree differ diff --git a/nightly/.doctrees/api_reference/execution.doctree b/nightly/.doctrees/api_reference/execution.doctree index 6bbc8af957ce..7debd1779327 100644 Binary files a/nightly/.doctrees/api_reference/execution.doctree and b/nightly/.doctrees/api_reference/execution.doctree differ diff --git a/nightly/.doctrees/api_reference/indicators.doctree b/nightly/.doctrees/api_reference/indicators.doctree index e1ad34c796d7..4001f5aaef56 100644 Binary files a/nightly/.doctrees/api_reference/indicators.doctree and b/nightly/.doctrees/api_reference/indicators.doctree differ diff --git a/nightly/.doctrees/api_reference/live.doctree b/nightly/.doctrees/api_reference/live.doctree index 913c122efa83..d6ea3f020bc9 100644 Binary files a/nightly/.doctrees/api_reference/live.doctree and b/nightly/.doctrees/api_reference/live.doctree differ diff --git a/nightly/.doctrees/api_reference/model/book.doctree b/nightly/.doctrees/api_reference/model/book.doctree index fe49675f3f1d..28f963f90e5d 100644 Binary files a/nightly/.doctrees/api_reference/model/book.doctree and b/nightly/.doctrees/api_reference/model/book.doctree differ diff --git a/nightly/.doctrees/api_reference/model/data.doctree b/nightly/.doctrees/api_reference/model/data.doctree index d5a40a8b8592..acf8e54ad01a 100644 Binary files a/nightly/.doctrees/api_reference/model/data.doctree and b/nightly/.doctrees/api_reference/model/data.doctree differ diff --git a/nightly/.doctrees/api_reference/model/events.doctree b/nightly/.doctrees/api_reference/model/events.doctree index 8852cc7bfe4e..271ec5c13e23 100644 Binary files a/nightly/.doctrees/api_reference/model/events.doctree and b/nightly/.doctrees/api_reference/model/events.doctree differ diff --git a/nightly/.doctrees/api_reference/model/identifiers.doctree b/nightly/.doctrees/api_reference/model/identifiers.doctree index 719d7aa9c2ef..2a4a8cb4ac84 100644 Binary files a/nightly/.doctrees/api_reference/model/identifiers.doctree and b/nightly/.doctrees/api_reference/model/identifiers.doctree differ diff --git a/nightly/.doctrees/api_reference/model/instruments.doctree b/nightly/.doctrees/api_reference/model/instruments.doctree index 7a0ad52615c1..3332f5bca370 100644 Binary files a/nightly/.doctrees/api_reference/model/instruments.doctree and b/nightly/.doctrees/api_reference/model/instruments.doctree differ diff --git a/nightly/.doctrees/api_reference/model/objects.doctree b/nightly/.doctrees/api_reference/model/objects.doctree index 5a4bfb1851b3..1316ec6571f3 100644 Binary files a/nightly/.doctrees/api_reference/model/objects.doctree and b/nightly/.doctrees/api_reference/model/objects.doctree differ diff --git a/nightly/.doctrees/api_reference/model/orders.doctree b/nightly/.doctrees/api_reference/model/orders.doctree index 54ed66c5d74f..93d1927910bf 100644 Binary files a/nightly/.doctrees/api_reference/model/orders.doctree and b/nightly/.doctrees/api_reference/model/orders.doctree differ diff --git a/nightly/.doctrees/api_reference/model/position.doctree b/nightly/.doctrees/api_reference/model/position.doctree index 60735dc1a785..ce2eee0d41bc 100644 Binary files a/nightly/.doctrees/api_reference/model/position.doctree and b/nightly/.doctrees/api_reference/model/position.doctree differ diff --git a/nightly/.doctrees/api_reference/model/tick_scheme.doctree b/nightly/.doctrees/api_reference/model/tick_scheme.doctree index 724e4aeea8c3..3d81c416a7a8 100644 Binary files a/nightly/.doctrees/api_reference/model/tick_scheme.doctree and b/nightly/.doctrees/api_reference/model/tick_scheme.doctree differ diff --git a/nightly/.doctrees/api_reference/persistence.doctree b/nightly/.doctrees/api_reference/persistence.doctree index a0cfb137c599..3b7a69166359 100644 Binary files a/nightly/.doctrees/api_reference/persistence.doctree and b/nightly/.doctrees/api_reference/persistence.doctree differ diff --git a/nightly/.doctrees/api_reference/portfolio.doctree b/nightly/.doctrees/api_reference/portfolio.doctree index 9297bd1b9b98..4e7fed24e1a3 100644 Binary files a/nightly/.doctrees/api_reference/portfolio.doctree and b/nightly/.doctrees/api_reference/portfolio.doctree differ diff --git a/nightly/.doctrees/api_reference/risk.doctree b/nightly/.doctrees/api_reference/risk.doctree index bbf5b14dd923..cb12bf4a979e 100644 Binary files a/nightly/.doctrees/api_reference/risk.doctree and b/nightly/.doctrees/api_reference/risk.doctree differ diff --git a/nightly/.doctrees/api_reference/serialization.doctree b/nightly/.doctrees/api_reference/serialization.doctree index 9e15f765acc3..d8f671d6d8ec 100644 Binary files a/nightly/.doctrees/api_reference/serialization.doctree and b/nightly/.doctrees/api_reference/serialization.doctree differ diff --git a/nightly/.doctrees/api_reference/system.doctree b/nightly/.doctrees/api_reference/system.doctree index a19a6429d033..70b3dac91e97 100644 Binary files a/nightly/.doctrees/api_reference/system.doctree and b/nightly/.doctrees/api_reference/system.doctree differ diff --git a/nightly/.doctrees/api_reference/trading.doctree b/nightly/.doctrees/api_reference/trading.doctree index 0e166183a998..a22f973cab98 100644 Binary files a/nightly/.doctrees/api_reference/trading.doctree and b/nightly/.doctrees/api_reference/trading.doctree differ diff --git a/nightly/.doctrees/concepts/data.doctree b/nightly/.doctrees/concepts/data.doctree index f579c1cee8c1..61f681ea9825 100644 Binary files a/nightly/.doctrees/concepts/data.doctree and b/nightly/.doctrees/concepts/data.doctree differ diff --git a/nightly/.doctrees/environment.pickle b/nightly/.doctrees/environment.pickle index d3bff20a0b2f..a61fd51d4c41 100644 Binary files a/nightly/.doctrees/environment.pickle and b/nightly/.doctrees/environment.pickle differ diff --git a/nightly/.doctrees/integrations/databento.doctree b/nightly/.doctrees/integrations/databento.doctree index 26c32d9a4011..c0c1a26c464d 100644 Binary files a/nightly/.doctrees/integrations/databento.doctree and b/nightly/.doctrees/integrations/databento.doctree differ diff --git a/nightly/.doctrees/integrations/index.doctree b/nightly/.doctrees/integrations/index.doctree index e23689862916..30216c7c10a1 100644 Binary files a/nightly/.doctrees/integrations/index.doctree and b/nightly/.doctrees/integrations/index.doctree differ diff --git a/nightly/_sources/concepts/data.md.txt b/nightly/_sources/concepts/data.md.txt index bbb85470848a..9964a606c860 100644 --- a/nightly/_sources/concepts/data.md.txt +++ b/nightly/_sources/concepts/data.md.txt @@ -41,7 +41,7 @@ To achieve this, two main components are necessary: ### Data loaders Data loader components are typically specific for the raw source/format and per integration. For instance, Binance order book data is stored in its raw CSV file form with -an entirely different format to [Databento Binary Encoding (DBN)](https://docs.databento.com/knowledge-base/new-users/dbn-encoding/getting-started-with-dbn) files. +an entirely different format to [Databento Binary Encoding (DBN)](https://databento.com/docs/knowledge-base/new-users/dbn-encoding/getting-started-with-dbn) files. ### Data wranglers diff --git a/nightly/_sources/integrations/databento.md.txt b/nightly/_sources/integrations/databento.md.txt index a43710e16e73..ad10aa049e5b 100644 --- a/nightly/_sources/integrations/databento.md.txt +++ b/nightly/_sources/integrations/databento.md.txt @@ -1,10 +1,10 @@ # Databento ```{warning} -We are currently working on this integration guide - consider it incomplete for now. +We are currently working on this integration guide. ``` -NautilusTrader provides an adapter for integrating with the Databento API and [Databento Binary Encoding (DBN)](https://docs.databento.com/knowledge-base/new-users/dbn-encoding) format data. +NautilusTrader provides an adapter for integrating with the Databento API and [Databento Binary Encoding (DBN)](https://databento.com/docs/knowledge-base/new-users/dbn-encoding) format data. As Databento is purely a market data provider, there is no execution client provided - although a sandbox environment with simulated execution could still be set up. It's also possible to match Databento data with Interactive Brokers execution, or to calculate traditional asset class signals for crypto trading. @@ -17,7 +17,7 @@ The capabilities of this adapter include: [Databento](https://databento.com/signup) currently offers 125 USD in free data credits (historical data only) for new account sign-ups. With careful requests, this is more than enough for testing and evaluation purposes. -It's recommended you make use of the [/metadata.get_cost](https://docs.databento.com/api-reference-historical/metadata/metadata-get-cost) endpoint. +It's recommended you make use of the [/metadata.get_cost](https://databento.com/docs/api-reference-historical/metadata/metadata-get-cost) endpoint. ``` ## Overview @@ -44,13 +44,13 @@ and won't need to necessarily work with these lower level components directly. ## Databento documentation -Databento provides extensive documentation for users which can be found in the [Databento knowledge base](https://docs.databento.com/knowledge-base/new-users). -It's recommended you also refer to the Databento documentation in conjunction with this Nautilus integration guide. +Databento provides extensive documentation for users which can be found in the [Databento knowledge base](https://databento.com/docs/knowledge-base/new-users). +It's recommended you also refer to this Databento documentation in conjunction with this NautilusTrader integration guide. ## Databento Binary Encoding (DBN) Databento Binary Encoding (DBN) is an extremely fast message encoding and storage format for normalized market data. -The [DBN specification](https://docs.databento.com/knowledge-base/new-users/dbn-encoding) includes a simple, self-describing metadata header and a fixed set of struct definitions, +The [DBN specification](https://databento.com/docs/knowledge-base/new-users/dbn-encoding) includes a simple, self-describing metadata header and a fixed set of struct definitions, which enforce a standardized way to normalize market data. The integration provides a decoder which can convert DBN format data to Nautilus objects. @@ -91,7 +91,7 @@ The Nautilus decoder will use the Databento `raw_symbol` for the Nautilus `symbo from the Databento instrument definition message for the Nautilus `venue`. Databento datasets are identified with a *dataset code* which is not the same -as a venue identifier. You can read more about Databento dataset naming conventions [here](https://docs.databento.com/api-reference-historical/basics/datasets). +as a venue identifier. You can read more about Databento dataset naming conventions [here](https://databento.com/docs/api-reference-historical/basics/datasets). Of particular note is for CME Globex MDP 3.0 data (`GLBX.MDP3` dataset code), the following exchanges are all grouped under the `GLBX` venue. These mappings can be determined from the @@ -105,7 +105,7 @@ instruments `exchange` field: - `XNYM` - **New York Mercantile Exchange (NYMEX)** ```{note} -Other venue MICs can be found in the `venue` field of responses from the [metadata.list_publishers](https://docs.databento.com/api-reference-historical/metadata/metadata-list-publishers?historical=http&live=python) endpoint. +Other venue MICs can be found in the `venue` field of responses from the [metadata.list_publishers](https://databento.com/docs/api-reference-historical/metadata/metadata-list-publishers?historical=http&live=python) endpoint. ``` ## Timestamps @@ -127,8 +127,8 @@ When decoding and normalizing Databento to Nautilus we generally assign the Data ```{note} See the following Databento docs for further information: -- [Databento standards and conventions - timestamps](https://docs.databento.com/knowledge-base/new-users/standards-conventions/timestamps) -- [Databento timestamping guide](https://docs.databento.com/knowledge-base/data-integrity/timestamping/timestamps-on-databento-and-how-to-use-them) +- [Databento standards and conventions - timestamps](https://databento.com/docs/knowledge-base/new-users/standards-conventions/timestamps) +- [Databento timestamping guide](https://databento.com/docs/knowledge-base/data-integrity/timestamping/timestamps-on-databento-and-how-to-use-them) ``` ## Data types @@ -136,6 +136,10 @@ See the following Databento docs for further information: The following section discusses Databento schema -> Nautilus data type equivalence and considerations. +```{note} +See the Databento [list of fields by schema guide](https://databento.com/docs/knowledge-base/new-users/fields-by-schema). +``` + ### Instrument definitions Databento provides a single schema to cover all instrument classes, these are @@ -143,17 +147,17 @@ decoded to the appropriate Nautilus `Instrument` types. The following Databento instrument classes are supported by NautilusTrader: -| Databento instrument class | Nautilus instrument type | -|----------------------------|------------------------------| -| STOCK | `Equity` | -| FUTURE | `FuturesContract` | -| CALL | `OptionsContract` | -| PUT | `OptionsContract` | -| FUTURESPREAD | `FuturesSpread` | -| OPTIONSPREAD | `OptionsSpread` | -| MIXEDSPREAD | `OptionsSpread` | -| FXSPOT | `CurrencyPair` | -| BOND | Not yet available | +| Databento instrument class | Code | Nautilus instrument type | +|----------------------------|------|------------------------------| +| Stock | `K` | `Equity` | +| Future | `F` | `FuturesContract` | +| Call | `C` | `OptionsContract` | +| Put | `P` | `OptionsContract` | +| Future spread | `S` | `FuturesSpread` | +| Option spread | `T` | `OptionsSpread` | +| Mixed spread | `M` | `OptionsSpread` | +| FX spot | `X` | `CurrencyPair` | +| Bond | `B` | Not yet available | ### MBO (market by order) @@ -171,9 +175,9 @@ object, which occurs during the replay startup sequence. ### MBP-1 (market by price, top-of-book) -This schema represents the top-of-book only. Like with MBO messages, some +This schema represents the top-of-book only (quotes *and* trades). Like with MBO messages, some messages carry trade information, and so when decoding MBP-1 messages Nautilus -will produce a `QuoteTick` and also a `TradeTick` if the message is a trade. +will produce a `QuoteTick` and *also* a `TradeTick` if the message is a trade. ### OHLCV (bar aggregates) @@ -183,9 +187,9 @@ The Nautilus decoder will normalize the `ts_event` timestamps to the **close** o ### Imbalance & Statistics -The Databento `imbalance` and `statistics` schemas cannot be represented as a built-in Nautilus data types +The Databento `imbalance` and `statistics` schemas cannot be represented as a built-in Nautilus data types, and so they have specific types defined in Rust `DatabentoImbalance` and `DatabentoStatistics`. -Python bindings are provided via pyo3 (Rust) and so the types behaves a little differently to a built-in Nautilus +Python bindings are provided via pyo3 (Rust) so the types behave a little differently to a built-in Nautilus data types, where all attributes are pyo3 provided objects and not directly compatible with certain methods which may expect a Cython provided type. There are pyo3 -> legacy Cython object conversion methods available, which can be found in the API reference. @@ -244,7 +248,7 @@ the Nautilus Parquet data from disk, which achieves extremely high through-put ( than converting DBN -> Nautilus on the fly for every backtest run). ```{note} -Performance benchmarks are under development. +Performance benchmarks are currently under development. ``` ## Loading DBN data diff --git a/nightly/_sources/integrations/index.md.txt b/nightly/_sources/integrations/index.md.txt index 6609b559f6af..1861de65b06f 100644 --- a/nightly/_sources/integrations/index.md.txt +++ b/nightly/_sources/integrations/index.md.txt @@ -26,12 +26,12 @@ running strategies which are able to access larger capital allocations. | 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) | +| [Betfair](https://betfair.com) | `BETFAIR` | Sports Betting Exchange | ![status](https://img.shields.io/badge/stable-green) | [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/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/databento.html) | +| [Databento](https://databento.com) | `DATABENTO` | Data Provider | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/databento.html) | | [Interactive Brokers](https://www.interactivebrokers.com) | `INTERACTIVE_BROKERS` | Brokerage (multi-venue) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/ib.html) | ## Implementation goals diff --git a/nightly/api_reference/adapters/interactive_brokers.html b/nightly/api_reference/adapters/interactive_brokers.html index b610ca85534e..9da8d8969eb6 100644 --- a/nightly/api_reference/adapters/interactive_brokers.html +++ b/nightly/api_reference/adapters/interactive_brokers.html @@ -12080,7 +12080,7 @@
+
+ LogGuard
+
+
+
+
@@ -20035,6 +20044,44 @@
+
+ -
+
+
+ class
+
+
+
+
+
+
+ LogGuard
+
+
+
+ ¶
+
+
+ -
+
+ Bases:
+
+
+ object
+
+
+
+
+ Provides a
+
+ LogGuard
+
+ which serves as a token to signal the initialization
+of the logging system. It also ensures that the global logger is flushed
+of any buffered records when the instance is destroyed.
+
+
+
-
@@ -26476,9 +26523,11 @@
→
This function should only be called once per process, at the beginning of the application -run. +run. Subsequent calls will raise a + + RuntimeError + + , as there can only be one + + LogGuard + + per initialized system.
+ + LogGuard + +
++ + RuntimeError + + – If the logging system has already been initialized. +
+Data loader components are typically specific for the raw source/format and per integration. For instance, Binance order book data is stored in its raw CSV file form with an entirely different format to - + Databento Binary Encoding (DBN) files. diff --git a/nightly/core/help.html b/nightly/core/help.html index 362d8c629340..ad2e550e2650 100644 --- a/nightly/core/help.html +++ b/nightly/core/help.html @@ -1,2 +1,2 @@ -
pub struct BaseAccount {
+BaseAccount in nautilus_accounting::account::base - Rust
+ Struct nautilus_accounting::account::base::BaseAccount
source · pub struct BaseAccount {
pub id: AccountId,
pub account_type: AccountType,
pub base_currency: Option<Currency>,
@@ -8,27 +8,27 @@
pub commissions: HashMap<Currency, f64>,
pub balances: HashMap<Currency, AccountBalance>,
pub balances_starting: HashMap<Currency, Money>,
-}
Fields§
§id: AccountId
§account_type: AccountType
§base_currency: Option<Currency>
§calculate_account_state: bool
§events: Vec<AccountState>
§commissions: HashMap<Currency, f64>
§balances: HashMap<Currency, AccountBalance>
§balances_starting: HashMap<Currency, Money>
Implementations§
source§impl BaseAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
+}Fields§
§id: AccountId
§account_type: AccountType
§base_currency: Option<Currency>
§calculate_account_state: bool
§events: Vec<AccountState>
§commissions: HashMap<Currency, f64>
§balances: HashMap<Currency, AccountBalance>
§balances_starting: HashMap<Currency, Money>
Implementations§
source§impl BaseAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
+) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
Trait Implementations§
source§impl Debug for BaseAccount
source§impl IntoPy<Py<PyAny>> for BaseAccount
source§impl PyClassImpl for BaseAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<BaseAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
-#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a BaseAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut BaseAccount
source§impl PyTypeInfo for BaseAccount
§type AsRefTarget = PyCell<BaseAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.Auto Trait Implementations§
§impl Freeze for BaseAccount
§impl RefUnwindSafe for BaseAccount
§impl Send for BaseAccount
§impl Sync for BaseAccount
§impl Unpin for BaseAccount
§impl UnwindSafe for BaseAccount
Blanket Implementations§
Trait Implementations§
source§impl Debug for BaseAccount
source§impl IntoPy<Py<PyAny>> for BaseAccount
source§impl PyClassImpl for BaseAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<BaseAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
+#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a BaseAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut BaseAccount
source§impl PyTypeInfo for BaseAccount
§type AsRefTarget = PyCell<BaseAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.Auto Trait Implementations§
§impl Freeze for BaseAccount
§impl RefUnwindSafe for BaseAccount
§impl Send for BaseAccount
§impl Sync for BaseAccount
§impl Unpin for BaseAccount
§impl UnwindSafe for BaseAccount
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/nightly/core/nautilus_accounting/account/cash/index.html b/nightly/core/nautilus_accounting/account/cash/index.html
index 70eb33694c4a..3758715afc1b 100644
--- a/nightly/core/nautilus_accounting/account/cash/index.html
+++ b/nightly/core/nautilus_accounting/account/cash/index.html
@@ -1,2 +1,2 @@
-nautilus_accounting::account::cash - Rust
- Module nautilus_accounting::account::cash
source · Structs§
\ No newline at end of file
+nautilus_accounting::account::cash - Rust
+ Module nautilus_accounting::account::cash
source · Structs§
\ No newline at end of file
diff --git a/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html b/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html
index 1952d1945b3e..f91089b4dea9 100644
--- a/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html
+++ b/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html
@@ -1,51 +1,51 @@
-CashAccount in nautilus_accounting::account::cash - Rust
- Struct nautilus_accounting::account::cash::CashAccount
source · pub struct CashAccount {
+CashAccount in nautilus_accounting::account::cash - Rust
+ Struct nautilus_accounting::account::cash::CashAccount
source · pub struct CashAccount {
pub base: BaseAccount,
-}
Fields§
§base: BaseAccount
Implementations§
source§impl CashAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn is_cash_account(&self) -> bool
sourcepub fn is_margin_account(&self) -> bool
sourcepub fn is_unleveraged(&self) -> bool
source§impl CashAccount
sourcepub fn py_new(
+}Fields§
§base: BaseAccount
Implementations§
source§impl CashAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn is_cash_account(&self) -> bool
sourcepub fn is_margin_account(&self) -> bool
sourcepub fn is_unleveraged(&self) -> bool
Methods from Deref<Target = BaseAccount>§
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
+) -> PyResult<Self>
Methods from Deref<Target = BaseAccount>§
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
+) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
Trait Implementations§
source§impl Account for CashAccount
source§fn balance_total(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_total(&self) -> HashMap<Currency, Money>
source§fn balance_free(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_free(&self) -> HashMap<Currency, Money>
source§fn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_locked(&self) -> HashMap<Currency, Money>
source§fn last_event(&self) -> Option<AccountState>
source§fn events(&self) -> Vec<AccountState>
source§fn event_count(&self) -> usize
source§fn currencies(&self) -> Vec<Currency>
source§fn starting_balances(&self) -> HashMap<Currency, Money>
source§fn balances(&self) -> HashMap<Currency, AccountBalance>
source§fn apply(&mut self, event: AccountState)
source§fn calculate_balance_locked<T: Instrument>(
+) -> Result<Money>
Trait Implementations§
source§impl Account for CashAccount
source§fn balance_total(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_total(&self) -> HashMap<Currency, Money>
source§fn balance_free(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_free(&self) -> HashMap<Currency, Money>
source§fn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_locked(&self) -> HashMap<Currency, Money>
source§fn last_event(&self) -> Option<AccountState>
source§fn events(&self) -> Vec<AccountState>
source§fn event_count(&self) -> usize
source§fn currencies(&self) -> Vec<Currency>
source§fn starting_balances(&self) -> HashMap<Currency, Money>
source§fn balances(&self) -> HashMap<Currency, AccountBalance>
source§fn apply(&mut self, event: AccountState)
source§fn calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
source§fn calculate_pnls<T: Instrument>(
+) -> Result<Money>
source§fn calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
source§fn calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
source§fn calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
source§impl Debug for CashAccount
source§impl Deref for CashAccount
source§impl DerefMut for CashAccount
source§impl Display for CashAccount
source§impl IntoPy<Py<PyAny>> for CashAccount
source§impl PartialEq for CashAccount
source§impl Debug for CashAccount
source§impl Deref for CashAccount
source§impl DerefMut for CashAccount
source§impl Display for CashAccount
source§impl IntoPy<Py<PyAny>> for CashAccount
source§impl PartialEq for CashAccount
source§impl PyClassImpl for CashAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<CashAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
-#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<CashAccount> for PyClassImplCollector<CashAccount>
source§fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a CashAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CashAccount
source§impl PyMethods<CashAccount> for PyClassImplCollector<CashAccount>
source§fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for CashAccount
§type AsRefTarget = PyCell<CashAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.source§impl Eq for CashAccount
Auto Trait Implementations§
§impl Freeze for CashAccount
§impl RefUnwindSafe for CashAccount
§impl Send for CashAccount
§impl Sync for CashAccount
§impl Unpin for CashAccount
§impl UnwindSafe for CashAccount
Blanket Implementations§
source§impl PyClassImpl for CashAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<CashAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
+#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<CashAccount> for PyClassImplCollector<CashAccount>
source§fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a CashAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CashAccount
source§impl PyMethods<CashAccount> for PyClassImplCollector<CashAccount>
source§fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for CashAccount
§type AsRefTarget = PyCell<CashAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.source§impl Eq for CashAccount
Auto Trait Implementations§
§impl Freeze for CashAccount
§impl RefUnwindSafe for CashAccount
§impl Send for CashAccount
§impl Sync for CashAccount
§impl Unpin for CashAccount
§impl UnwindSafe for CashAccount
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<Q, K> Equivalent<K> for Qwhere
diff --git a/nightly/core/nautilus_accounting/account/index.html b/nightly/core/nautilus_accounting/account/index.html
index 5ecaf73c7af9..13c32ffb9b47 100644
--- a/nightly/core/nautilus_accounting/account/index.html
+++ b/nightly/core/nautilus_accounting/account/index.html
@@ -1,2 +1,2 @@
-nautilus_accounting::account - Rust
-
\ No newline at end of file
+nautilus_accounting::account - Rust
+
\ No newline at end of file
diff --git a/nightly/core/nautilus_accounting/account/margin/index.html b/nightly/core/nautilus_accounting/account/margin/index.html
index d46c1e76ffd1..72b0a4bb3910 100644
--- a/nightly/core/nautilus_accounting/account/margin/index.html
+++ b/nightly/core/nautilus_accounting/account/margin/index.html
@@ -1,2 +1,2 @@
-nautilus_accounting::account::margin - Rust
- Module nautilus_accounting::account::margin
source · Structs§
\ No newline at end of file
+nautilus_accounting::account::margin - Rust
+ Module nautilus_accounting::account::margin
source · Structs§
\ No newline at end of file
diff --git a/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html b/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html
index e3fae98edc5e..c32f50086718 100644
--- a/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html
+++ b/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html
@@ -1,30 +1,30 @@
-MarginAccount in nautilus_accounting::account::margin - Rust
- Struct nautilus_accounting::account::margin::MarginAccount
source · pub struct MarginAccount {
+MarginAccount in nautilus_accounting::account::margin - Rust
+ Struct nautilus_accounting::account::margin::MarginAccount
source · pub struct MarginAccount {
pub base: BaseAccount,
pub leverages: HashMap<InstrumentId, f64>,
pub margins: HashMap<InstrumentId, MarginBalance>,
pub default_leverage: f64,
-}
Fields§
§base: BaseAccount
§leverages: HashMap<InstrumentId, f64>
§margins: HashMap<InstrumentId, MarginBalance>
§default_leverage: f64
Implementations§
source§impl MarginAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn set_default_leverage(&mut self, leverage: f64)
sourcepub fn set_leverage(&mut self, instrument_id: InstrumentId, leverage: f64)
sourcepub fn get_leverage(&self, instrument_id: &InstrumentId) -> f64
sourcepub fn is_unleveraged(&self, instrument_id: InstrumentId) -> bool
sourcepub fn is_cash_account(&self) -> bool
sourcepub fn is_margin_account(&self) -> bool
sourcepub fn initial_margins(&self) -> HashMap<InstrumentId, Money>
sourcepub fn maintenance_margins(&self) -> HashMap<InstrumentId, Money>
sourcepub fn update_initial_margin(
+}Fields§
§base: BaseAccount
§leverages: HashMap<InstrumentId, f64>
§margins: HashMap<InstrumentId, MarginBalance>
§default_leverage: f64
Implementations§
source§impl MarginAccount
sourcepub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>
sourcepub fn set_default_leverage(&mut self, leverage: f64)
sourcepub fn set_leverage(&mut self, instrument_id: InstrumentId, leverage: f64)
sourcepub fn get_leverage(&self, instrument_id: &InstrumentId) -> f64
sourcepub fn is_unleveraged(&self, instrument_id: InstrumentId) -> bool
sourcepub fn is_cash_account(&self) -> bool
sourcepub fn is_margin_account(&self) -> bool
sourcepub fn initial_margins(&self) -> HashMap<InstrumentId, Money>
sourcepub fn maintenance_margins(&self) -> HashMap<InstrumentId, Money>
sourcepub fn update_initial_margin(
&mut self,
instrument_id: InstrumentId,
margin_init: Money
-)
sourcepub fn initial_margin(&self, instrument_id: InstrumentId) -> Money
sourcepub fn update_maintenance_margin(
+)
sourcepub fn initial_margin(&self, instrument_id: InstrumentId) -> Money
sourcepub fn update_maintenance_margin(
&mut self,
instrument_id: InstrumentId,
margin_maintenance: Money
-)
sourcepub fn maintenance_margin(&self, instrument_id: InstrumentId) -> Money
sourcepub fn calculate_initial_margin<T: Instrument>(
+)
sourcepub fn maintenance_margin(&self, instrument_id: InstrumentId) -> Money
sourcepub fn calculate_initial_margin<T: Instrument>(
&mut self,
instrument: T,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Money
sourcepub fn calculate_maintenance_margin<T: Instrument>(
+) -> Money
sourcepub fn calculate_maintenance_margin<T: Instrument>(
&mut self,
instrument: T,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Money
sourcepub fn recalculate_balance(&mut self, currency: Currency)
source§impl MarginAccount
sourcepub fn py_calculate_initial_margin(
+) -> Money
sourcepub fn recalculate_balance(&mut self, currency: Currency)
source§impl MarginAccount
sourcepub fn py_calculate_initial_margin(
&mut self,
instrument: PyObject,
quantity: Quantity,
@@ -38,50 +38,50 @@
price: Price,
use_quote_for_inverse: Option<bool>,
py: Python<'_>
-) -> PyResult<Money>
Methods from Deref<Target = BaseAccount>§
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
+) -> PyResult<Money>
Methods from Deref<Target = BaseAccount>§
sourcepub fn base_balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_total(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_free(&self) -> HashMap<Currency, Money>
sourcepub fn base_balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcepub fn base_balances_locked(&self) -> HashMap<Currency, Money>
sourcepub fn base_last_event(&self) -> Option<AccountState>
sourcepub fn update_balances(&mut self, balances: Vec<AccountBalance>)
sourcepub fn base_apply(&mut self, event: AccountState)
sourcepub fn base_calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
+) -> Result<Money>
sourcepub fn base_calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
sourcepub fn base_calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
Trait Implementations§
source§impl Account for MarginAccount
source§fn balance_total(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_total(&self) -> HashMap<Currency, Money>
source§fn balance_free(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_free(&self) -> HashMap<Currency, Money>
source§fn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_locked(&self) -> HashMap<Currency, Money>
source§fn last_event(&self) -> Option<AccountState>
source§fn events(&self) -> Vec<AccountState>
source§fn event_count(&self) -> usize
source§fn currencies(&self) -> Vec<Currency>
source§fn starting_balances(&self) -> HashMap<Currency, Money>
source§fn balances(&self) -> HashMap<Currency, AccountBalance>
source§fn apply(&mut self, event: AccountState)
source§fn calculate_balance_locked<T: Instrument>(
+) -> Result<Money>
Trait Implementations§
source§impl Account for MarginAccount
source§fn balance_total(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_total(&self) -> HashMap<Currency, Money>
source§fn balance_free(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_free(&self) -> HashMap<Currency, Money>
source§fn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
source§fn balances_locked(&self) -> HashMap<Currency, Money>
source§fn last_event(&self) -> Option<AccountState>
source§fn events(&self) -> Vec<AccountState>
source§fn event_count(&self) -> usize
source§fn currencies(&self) -> Vec<Currency>
source§fn starting_balances(&self) -> HashMap<Currency, Money>
source§fn balances(&self) -> HashMap<Currency, AccountBalance>
source§fn apply(&mut self, event: AccountState)
source§fn calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
source§fn calculate_pnls<T: Instrument>(
+) -> Result<Money>
source§fn calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
source§fn calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
source§fn calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
source§impl Debug for MarginAccount
source§impl Deref for MarginAccount
source§impl DerefMut for MarginAccount
source§impl Display for MarginAccount
source§impl Hash for MarginAccount
source§impl Debug for MarginAccount
source§impl Deref for MarginAccount
source§impl DerefMut for MarginAccount
source§impl Display for MarginAccount
source§impl Hash for MarginAccount
source§impl IntoPy<Py<PyAny>> for MarginAccount
source§impl PartialEq for MarginAccount
source§impl IntoPy<Py<PyAny>> for MarginAccount
source§impl PartialEq for MarginAccount
source§impl PyClassImpl for MarginAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<MarginAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
-#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<MarginAccount> for PyClassImplCollector<MarginAccount>
source§fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a MarginAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut MarginAccount
source§impl PyMethods<MarginAccount> for PyClassImplCollector<MarginAccount>
source§fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for MarginAccount
§type AsRefTarget = PyCell<MarginAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.source§impl Eq for MarginAccount
Auto Trait Implementations§
§impl Freeze for MarginAccount
§impl RefUnwindSafe for MarginAccount
§impl Send for MarginAccount
§impl Sync for MarginAccount
§impl Unpin for MarginAccount
§impl UnwindSafe for MarginAccount
Blanket Implementations§
source§impl PyClassImpl for MarginAccount
source§const IS_BASETYPE: bool = false
#[pyclass(subclass)]source§const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]source§const IS_MAPPING: bool = false
#[pyclass(mapping)]source§const IS_SEQUENCE: bool = false
#[pyclass(sequence)]§type ThreadChecker = SendablePyClass<MarginAccount>
This handles following two situations: Read more§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable§type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
+#[pyclass(extends=PyDict)]
, it’s PyDict
.source§fn items_iter() -> PyClassItemsIter
source§fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<isize>
§fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<MarginAccount> for PyClassImplCollector<MarginAccount>
source§fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a MarginAccount
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut MarginAccount
source§impl PyMethods<MarginAccount> for PyClassImplCollector<MarginAccount>
source§fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for MarginAccount
§type AsRefTarget = PyCell<MarginAccount>
Utility type to make Py::as_ref work.source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.§fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.§fn is_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
Checks if object
is an instance of this type.source§impl Eq for MarginAccount
Auto Trait Implementations§
§impl Freeze for MarginAccount
§impl RefUnwindSafe for MarginAccount
§impl Send for MarginAccount
§impl Sync for MarginAccount
§impl Unpin for MarginAccount
§impl UnwindSafe for MarginAccount
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<Q, K> Equivalent<K> for Qwhere
diff --git a/nightly/core/nautilus_accounting/account/trait.Account.html b/nightly/core/nautilus_accounting/account/trait.Account.html
index 8bd6aba00a03..35a8321b0fd3 100644
--- a/nightly/core/nautilus_accounting/account/trait.Account.html
+++ b/nightly/core/nautilus_accounting/account/trait.Account.html
@@ -1,5 +1,5 @@
-Account in nautilus_accounting::account - Rust
- Trait nautilus_accounting::account::Account
source · pub trait Account {
+Account in nautilus_accounting::account - Rust
+ Trait nautilus_accounting::account::Account
source · pub trait Account {
Show 16 methods
// Required methods
fn balance_total(&self, currency: Option<Currency>) -> Option<Money>;
fn balances_total(&self) -> HashMap<Currency, Money>;
@@ -36,23 +36,23 @@
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
) -> Result<Money>;
-}
Required Methods§
sourcefn balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_total(&self) -> HashMap<Currency, Money>
sourcefn balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_free(&self) -> HashMap<Currency, Money>
sourcefn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_locked(&self) -> HashMap<Currency, Money>
sourcefn last_event(&self) -> Option<AccountState>
sourcefn events(&self) -> Vec<AccountState>
sourcefn event_count(&self) -> usize
sourcefn currencies(&self) -> Vec<Currency>
sourcefn starting_balances(&self) -> HashMap<Currency, Money>
sourcefn balances(&self) -> HashMap<Currency, AccountBalance>
sourcefn apply(&mut self, event: AccountState)
sourcefn calculate_balance_locked<T: Instrument>(
+}Required Methods§
sourcefn balance_total(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_total(&self) -> HashMap<Currency, Money>
sourcefn balance_free(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_free(&self) -> HashMap<Currency, Money>
sourcefn balance_locked(&self, currency: Option<Currency>) -> Option<Money>
sourcefn balances_locked(&self) -> HashMap<Currency, Money>
sourcefn last_event(&self) -> Option<AccountState>
sourcefn events(&self) -> Vec<AccountState>
sourcefn event_count(&self) -> usize
sourcefn currencies(&self) -> Vec<Currency>
sourcefn starting_balances(&self) -> HashMap<Currency, Money>
sourcefn balances(&self) -> HashMap<Currency, AccountBalance>
sourcefn apply(&mut self, event: AccountState)
sourcefn calculate_balance_locked<T: Instrument>(
&mut self,
instrument: T,
side: OrderSide,
quantity: Quantity,
price: Price,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
sourcefn calculate_pnls<T: Instrument>(
+) -> Result<Money>
sourcefn calculate_pnls<T: Instrument>(
&self,
instrument: T,
fill: OrderFilled,
position: Option<Position>
-) -> Result<Vec<Money>>
sourcefn calculate_commission<T: Instrument>(
+) -> Result<Vec<Money>>
sourcefn calculate_commission<T: Instrument>(
&self,
instrument: T,
last_qty: Quantity,
last_px: Price,
liquidity_side: LiquiditySide,
use_quote_for_inverse: Option<bool>
-) -> Result<Money>
Object Safety§
This trait is not object safe.Implementors§
source§impl Account for CashAccount
source§impl Account for MarginAccount
\ No newline at end of file
+) -> Result<Money>Object Safety§
This trait is not object safe.Implementors§
source§impl Account for CashAccount
source§impl Account for MarginAccount
\ No newline at end of file
diff --git a/nightly/core/nautilus_accounting/all.html b/nightly/core/nautilus_accounting/all.html
index 9e19da8570b2..6818f257c678 100644
--- a/nightly/core/nautilus_accounting/all.html
+++ b/nightly/core/nautilus_accounting/all.html
@@ -1,2 +1,2 @@
-List of all items in this crate
+List of all items in this crate
\ No newline at end of file
diff --git a/nightly/core/nautilus_accounting/index.html b/nightly/core/nautilus_accounting/index.html
index 18cdbc566407..5b9c51625d1e 100644
--- a/nightly/core/nautilus_accounting/index.html
+++ b/nightly/core/nautilus_accounting/index.html
@@ -1,3 +1,3 @@
-nautilus_accounting - Rust