diff --git a/nightly/.doctrees/api_reference/accounting.doctree b/nightly/.doctrees/api_reference/accounting.doctree index 96a34aead08e..dc212b9e403a 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 7cf5e3bd30b3..f85191e85da3 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 4e8fb2e0ca16..7b4b0f4b6d42 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 1e97031314aa..723a69a78ed5 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 d0affbd11474..89168587d2a9 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 907c01485d49..90a4e5a02ff4 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 8ca46cbb08cd..61654a56be8e 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 af0658cd9381..4ad084c88776 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 e3f894746601..9f49b24b4d64 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 d9bcb5f6f37a..e891a3b1d807 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 7debd1779327..2977fca7d1f1 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 4001f5aaef56..bf722ee0b710 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 d6ea3f020bc9..a10d75e7ccee 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 28f963f90e5d..2edd55fa45bf 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 acf8e54ad01a..57f808bd118a 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 271ec5c13e23..ae35c42af605 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 2a4a8cb4ac84..232e96298172 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 3332f5bca370..6195152e6f6d 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 1316ec6571f3..4daaab9af8cc 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 93d1927910bf..6158a3338476 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 ce2eee0d41bc..fd6e1d855a9b 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 3d81c416a7a8..e8edf92aa1c1 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 3b7a69166359..76cbc8f3a309 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 4e7fed24e1a3..c7d2d273708f 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 cb12bf4a979e..9a5116a444fb 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 d8f671d6d8ec..56e6e8eadbbb 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 70b3dac91e97..685acc6ad966 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 a22f973cab98..7bd444cf0dc1 100644 Binary files a/nightly/.doctrees/api_reference/trading.doctree and b/nightly/.doctrees/api_reference/trading.doctree differ diff --git a/nightly/.doctrees/environment.pickle b/nightly/.doctrees/environment.pickle index a61fd51d4c41..e4943f15ac47 100644 Binary files a/nightly/.doctrees/environment.pickle and b/nightly/.doctrees/environment.pickle differ diff --git a/nightly/.doctrees/integrations/ib.doctree b/nightly/.doctrees/integrations/ib.doctree index cb3dec0e7b4c..84ce13ba2f2e 100644 Binary files a/nightly/.doctrees/integrations/ib.doctree and b/nightly/.doctrees/integrations/ib.doctree differ diff --git a/nightly/_sources/integrations/ib.md.txt b/nightly/_sources/integrations/ib.md.txt index e1c97e96b661..3a669a17fd51 100644 --- a/nightly/_sources/integrations/ib.md.txt +++ b/nightly/_sources/integrations/ib.md.txt @@ -1,13 +1,13 @@ # Interactive Brokers -Interactive Brokers (IB) is a trading platform that allows trading across a wide range of financial instruments, including stocks, options, futures, currencies, bonds, funds, and cryptocurrencies. NautilusTrader offers an adapter to integrate with IB using their [Trader Workstation (TWS) API](https://interactivebrokers.github.io/tws-api/index.html) through their Python library, [ibapi](https://github.com/nautechsystems/ibapi). +Interactive Brokers (IB) is a trading platform that allows trading across a wide range of financial instruments, including stocks, options, futures, currencies, bonds, funds, and cryptocurrencies. NautilusTrader offers an adapter to integrate with IB using their [Trader Workstation (TWS) API](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/) through their Python library, [ibapi](https://github.com/nautechsystems/ibapi). -The TWS API serves as an interface to IB's standalone trading applications: TWS and IB Gateway. Both can be downloaded from the IB website. If you haven't installed TWS or IB Gateway yet, refer to the [Initial Setup](https://interactivebrokers.github.io/tws-api/initial_setup.html) guide. In NautilusTrader, you'll establish a connection to one of these applications via the `InteractiveBrokersClient`. +The TWS API serves as an interface to IB's standalone trading applications: TWS and IB Gateway. Both can be downloaded from the IB website. If you haven't installed TWS or IB Gateway yet, refer to the [Initial Setup](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/#tws-download) guide. In NautilusTrader, you'll establish a connection to one of these applications via the `InteractiveBrokersClient`. -Alternatively, you can start with a [dockerized version](https://github.com/gnzsnz/ib-gateway-docker) of the IB Gateway, particularly useful when deploying trading strategies on a hosted cloud platform. This requires having [Docker](https://www.docker.com/) installed on your machine, along with the [docker](https://pypi.org/project/docker/) Python package, which NautilusTrader conveniently includes as an extra package. +Alternatively, you can start with a [dockerized version](https://github.com/gnzsnz/ib-gateway-docker) of the IB Gateway, which is particularly useful when deploying trading strategies on a hosted cloud platform. This requires having [Docker](https://www.docker.com/) installed on your machine, along with the [docker](https://pypi.org/project/docker/) Python package, which NautilusTrader conveniently includes as an extra package. ```{note} -The standalone TWS and IB Gateway applications necessitate manual input of username, password, and trading mode (live or paper) at startup. The dockerized version of the IB Gateway handles these steps programmatically. +The standalone TWS and IB Gateway applications require manually inputting username, password, and trading mode (live or paper) at startup. The dockerized version of the IB Gateway handles these steps programmatically. ``` ## Installation @@ -87,7 +87,7 @@ To troubleshoot TWS API incoming message issues, consider starting at the `Inter ## Instruments & Contracts -In IB, a NautilusTrader `Instrument` is equivalent to a [Contract](https://interactivebrokers.github.io/tws-api/contracts.html). Contracts can be either a [basic contract](https://interactivebrokers.github.io/tws-api/classIBApi_1_1Contract.html) or a more [detailed](https://interactivebrokers.github.io/tws-api/classIBApi_1_1ContractDetails.html) 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. +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/). @@ -195,7 +195,7 @@ instrument_provider_config = InteractiveBrokersInstrumentProviderConfig( ### Data Client -`InteractiveBrokersDataClient` interfaces with IB for streaming and retrieving market data. Upon connection, it configures the [market data type](https://interactivebrokers.github.io/tws-api/market_data_type.html) and loads instruments based on the settings in `InteractiveBrokersInstrumentProviderConfig`. This client can subscribe to and unsubscribe from various market data types, including quote ticks, trade ticks, and bars. +`InteractiveBrokersDataClient` interfaces with IB for streaming and retrieving market data. Upon connection, it configures the [market data type](https://ibkrcampus.com/ibkr-api-page/trader-workstation-api/#delayed-market-data) and loads instruments based on the settings in `InteractiveBrokersInstrumentProviderConfig`. This client can subscribe to and unsubscribe from various market data types, including quote ticks, trade ticks, and bars. Configurable through `InteractiveBrokersDataClientConfig`, it allows adjustments for handling revised bars, trading hours preferences, and market data types (e.g., `IBMarketDataTypeEnum.REALTIME` or `IBMarketDataTypeEnum.DELAYED_FROZEN`). diff --git a/nightly/api_reference/adapters/interactive_brokers.html b/nightly/api_reference/adapters/interactive_brokers.html index 9da8d8969eb6..8c5e5f91cd90 100644 --- a/nightly/api_reference/adapters/interactive_brokers.html +++ b/nightly/api_reference/adapters/interactive_brokers.html @@ -12080,7 +12080,7 @@

at - 0x79e85661b090> + 0x774d796b7c90> = diff --git a/nightly/core/help.html b/nightly/core/help.html index ad2e550e2650..336432d00fff 100644 --- a/nightly/core/help.html +++ b/nightly/core/help.html @@ -1,2 +1,2 @@ -Help +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/nightly/core/index.html b/nightly/core/index.html index a7f6a835a54e..791df1b6cf69 100644 --- a/nightly/core/index.html +++ b/nightly/core/index.html @@ -1,2 +1,2 @@ -Index of crates +Index of crates
\ No newline at end of file diff --git a/nightly/core/nautilus_accounting/account/base/index.html b/nightly/core/nautilus_accounting/account/base/index.html index 35221fcd43bd..02a1d5a6cd15 100644 --- a/nightly/core/nautilus_accounting/account/base/index.html +++ b/nightly/core/nautilus_accounting/account/base/index.html @@ -1,2 +1,2 @@ -nautilus_accounting::account::base - Rust +nautilus_accounting::account::base - Rust
\ No newline at end of file diff --git a/nightly/core/nautilus_accounting/account/base/struct.BaseAccount.html b/nightly/core/nautilus_accounting/account/base/struct.BaseAccount.html index 3068d1475072..039606b75a28 100644 --- a/nightly/core/nautilus_accounting/account/base/struct.BaseAccount.html +++ b/nightly/core/nautilus_accounting/account/base/struct.BaseAccount.html @@ -1,4 +1,4 @@ -BaseAccount in nautilus_accounting::account::base - Rust +BaseAccount in nautilus_accounting::account::base - Rust
pub struct BaseAccount {
     pub id: AccountId,
     pub account_type: AccountType,
diff --git a/nightly/core/nautilus_accounting/account/cash/index.html b/nightly/core/nautilus_accounting/account/cash/index.html
index 3758715afc1b..78dc5935272f 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
+nautilus_accounting::account::cash - Rust
     
\ 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 f91089b4dea9..062cb98b147d 100644 --- a/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html +++ b/nightly/core/nautilus_accounting/account/cash/struct.CashAccount.html @@ -1,4 +1,4 @@ -CashAccount in nautilus_accounting::account::cash - Rust +CashAccount in nautilus_accounting::account::cash - Rust
pub struct CashAccount {
     pub base: BaseAccount,
 }

Fields§

§base: BaseAccount

Implementations§

source§

impl CashAccount

source

pub fn new(event: AccountState, calculate_account_state: bool) -> Result<Self>

source

pub fn is_cash_account(&self) -> bool

source

pub fn is_margin_account(&self) -> bool

source

pub fn is_unleveraged(&self) -> bool

source§

impl CashAccount

source

pub fn py_new( @@ -42,10 +42,10 @@ last_px: Price, liquidity_side: LiquiditySide, use_quote_for_inverse: Option<bool> -) -> Result<Money>

source§

impl Debug for CashAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for CashAccount

§

type Target = BaseAccount

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for CashAccount

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Display for CashAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl IntoPy<Py<PyAny>> for CashAccount

source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
source§

impl PartialEq for CashAccount

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +) -> Result<Money>

source§

impl Debug for CashAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for CashAccount

§

type Target = BaseAccount

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for CashAccount

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Display for CashAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl IntoPy<Py<PyAny>> for CashAccount

source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
source§

impl PartialEq for CashAccount

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PyClass for CashAccount

§

type Frozen = False

Whether the pyclass is frozen. Read more
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 BaseType = PyAny

Base class
§

type ThreadChecker = SendablePyClass<CashAccount>

This handles following two situations: Read more
§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
§

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 doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
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

§

type Holder = Option<PyRef<'py, CashAccount>>

source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CashAccount

§

type Holder = Option<PyRefMut<'py, CashAccount>>

source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

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§

const NAME: &'static str = "CashAccount"

Class name.
source§

const MODULE: Option<&'static str> = _

Module name, if any.
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> Any for T
where +#[pyclass(extends=PyDict)], it’s PyDict.

source§

fn items_iter() -> PyClassItemsIter

source§

fn doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
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

§

type Holder = Option<PyRef<'py, CashAccount>>

source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CashAccount

§

type Holder = Option<PyRefMut<'py, CashAccount>>

source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

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§

const NAME: &'static str = "CashAccount"

Class name.
source§

const MODULE: Option<&'static str> = _

Module name, if any.
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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where diff --git a/nightly/core/nautilus_accounting/account/index.html b/nightly/core/nautilus_accounting/account/index.html index 13c32ffb9b47..c61f0d5955ed 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 +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 72b0a4bb3910..1559554d1407 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 +nautilus_accounting::account::margin - Rust
\ 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 c32f50086718..07445fd8e47e 100644 --- a/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html +++ b/nightly/core/nautilus_accounting/account/margin/struct.MarginAccount.html @@ -1,4 +1,4 @@ -MarginAccount in nautilus_accounting::account::margin - Rust +MarginAccount in nautilus_accounting::account::margin - Rust
pub struct MarginAccount {
     pub base: BaseAccount,
     pub leverages: HashMap<InstrumentId, f64>,
diff --git a/nightly/core/nautilus_accounting/account/trait.Account.html b/nightly/core/nautilus_accounting/account/trait.Account.html
index 35a8321b0fd3..89d11a34f49d 100644
--- a/nightly/core/nautilus_accounting/account/trait.Account.html
+++ b/nightly/core/nautilus_accounting/account/trait.Account.html
@@ -1,4 +1,4 @@
-Account in nautilus_accounting::account - Rust
+Account in nautilus_accounting::account - Rust
     
pub trait Account {
 
Show 16 methods // Required methods fn balance_total(&self, currency: Option<Currency>) -> Option<Money>; diff --git a/nightly/core/nautilus_accounting/all.html b/nightly/core/nautilus_accounting/all.html index 6818f257c678..2314cf727168 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 5b9c51625d1e..8b103ae2f574 100644 --- a/nightly/core/nautilus_accounting/index.html +++ b/nightly/core/nautilus_accounting/index.html @@ -1,3 +1,3 @@ -nautilus_accounting - Rust path: String, instrument_id: Option<InstrumentId>, include_trades: Option<bool>, - ) -> anyhow::Result<Vec<QuoteTick>> { + ) -> PyResult<Vec<QuoteTick>> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::Mbp1Msg>( - path_buf, - instrument_id, - include_trades.unwrap_or(false), - )?; + let iter = self + .read_records::<dbn::Mbp1Msg>(path_buf, instrument_id, include_trades.unwrap_or(false)) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { @@ -626,7 +650,7 @@

Files

} } Ok((None, _)) => continue, - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } @@ -640,15 +664,13 @@

Files

path: String, instrument_id: Option<InstrumentId>, include_trades: Option<bool>, - ) -> anyhow::Result<PyObject> { + ) -> PyResult<PyObject> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::Mbp1Msg>( - path_buf, - instrument_id, - include_trades.unwrap_or(false), - )?; + let iter = self + .read_records::<dbn::Mbp1Msg>(path_buf, instrument_id, include_trades.unwrap_or(false)) + .map_err(to_pyvalue_err)?; - exhaust_data_iter_to_pycapsule(py, iter) + exhaust_data_iter_to_pycapsule(py, iter).map_err(to_pyvalue_err) } #[pyo3(name = "load_tbbo_trades")] @@ -656,9 +678,11 @@

Files

&self, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<Vec<TradeTick>> { + ) -> PyResult<Vec<TradeTick>> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::TbboMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::TbboMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { @@ -668,7 +692,7 @@

Files

data.push(trade); } } - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } @@ -681,11 +705,13 @@

Files

py: Python, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<PyObject> { + ) -> PyResult<PyObject> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::TbboMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::TbboMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; - exhaust_data_iter_to_pycapsule(py, iter) + exhaust_data_iter_to_pycapsule(py, iter).map_err(to_pyvalue_err) } #[pyo3(name = "load_trades")] @@ -693,9 +719,11 @@

Files

&self, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<Vec<TradeTick>> { + ) -> PyResult<Vec<TradeTick>> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::TradeMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::TradeMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { @@ -706,7 +734,7 @@

Files

} } Ok((None, _)) => continue, - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } @@ -719,11 +747,13 @@

Files

py: Python, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<PyObject> { + ) -> PyResult<PyObject> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::TradeMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::TradeMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; - exhaust_data_iter_to_pycapsule(py, iter) + exhaust_data_iter_to_pycapsule(py, iter).map_err(to_pyvalue_err) } #[pyo3(name = "load_bars")] @@ -731,9 +761,11 @@

Files

&self, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<Vec<Bar>> { + ) -> PyResult<Vec<Bar>> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::OhlcvMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::OhlcvMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { @@ -744,7 +776,7 @@

Files

} } Ok((None, _)) => continue, - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } @@ -757,11 +789,13 @@

Files

py: Python, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<PyObject> { + ) -> PyResult<PyObject> { let path_buf = PathBuf::from(path); - let iter = self.read_records::<dbn::OhlcvMsg>(path_buf, instrument_id, false)?; + let iter = self + .read_records::<dbn::OhlcvMsg>(path_buf, instrument_id, false) + .map_err(to_pyvalue_err)?; - exhaust_data_iter_to_pycapsule(py, iter) + exhaust_data_iter_to_pycapsule(py, iter).map_err(to_pyvalue_err) } #[pyo3(name = "load_imbalance")] @@ -769,15 +803,17 @@

Files

&self, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<Vec<DatabentoImbalance>> { + ) -> PyResult<Vec<DatabentoImbalance>> { let path_buf = PathBuf::from(path); - let iter = self.read_imbalance_records::<dbn::ImbalanceMsg>(path_buf, instrument_id)?; + let iter = self + .read_imbalance_records::<dbn::ImbalanceMsg>(path_buf, instrument_id) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { match result { Ok(item) => data.push(item), - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } @@ -789,15 +825,17 @@

Files

&self, path: String, instrument_id: Option<InstrumentId>, - ) -> anyhow::Result<Vec<DatabentoStatistics>> { + ) -> PyResult<Vec<DatabentoStatistics>> { let path_buf = PathBuf::from(path); - let iter = self.read_statistics_records::<dbn::StatMsg>(path_buf, instrument_id)?; + let iter = self + .read_statistics_records::<dbn::StatMsg>(path_buf, instrument_id) + .map_err(to_pyvalue_err)?; let mut data = Vec::new(); for result in iter { match result { Ok(item) => data.push(item), - Err(e) => return Err(e), + Err(e) => return Err(to_pyvalue_err(e)), } } diff --git a/nightly/core/src/nautilus_adapters/databento/python/mod.rs.html b/nightly/core/src/nautilus_adapters/databento/python/mod.rs.html index 2db0c92b5ae6..38b6ab397dc7 100644 --- a/nightly/core/src/nautilus_adapters/databento/python/mod.rs.html +++ b/nightly/core/src/nautilus_adapters/databento/python/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source