Qubx 3.17.3.dev1__tar.gz → 3.17.3.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/PKG-INFO +1 -1
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/_version.py +2 -2
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/connector.py +36 -20
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bybit/bybit.py +2 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bybit/connector.py +25 -24
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/utils.py +14 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/state.py +7 -1
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/utils.pyx +4 -2
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/.gitignore +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/LICENSE +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/README.md +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/pyproject.toml +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/scripts/build.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/_nb_magic.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/connector.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/data.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/iteratedstream.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/management.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/ome.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/optimization.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/runner.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/sentinels.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/simulated_data.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/simulated_exchange.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/simulator.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/transfers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/backtester/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/commands.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/deploy.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/misc.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/release.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/resolver.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/s3.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/theme.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/tui.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/cli/user_config.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/config.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/adapters/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/adapters/polling_adapter.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/connection_manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/data.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exceptions.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchange_manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/_two_stream.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/binance/connector.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/binance/exchange.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bitfinex/bitfinex.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bitfinex/connector.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bybit/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/gateio/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/gateio/gateio.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/hyperliquid/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/hyperliquid/hyperliquid.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/kraken/kraken.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/okx/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/okx/connector.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/okx/okx.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/factory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/factory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/funding_rate.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/liquidation.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/ohlc.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/open_interest.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/orderbook.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/quote.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/handlers/trade.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/plugin.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/rate_limits.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/subscription_config.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/subscription_manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/subscription_orchestrator.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/warmup_service.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/plugin.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/registry.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/tardis/data.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/tardis/plugin.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/tardis/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/builtin.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/decorator.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/executor.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/interfaces.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/server.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/control/types.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/config.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/diffs.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/reconciler.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/reducer.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/account_manager/state_machine.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/basics.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/boot.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/connector.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/context.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/detectors/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/detectors/delisting.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/detectors/stale.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/errors.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/events.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/exceptions.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/fit_context.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/fit_executor.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/helpers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/initializer.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/instrument_service.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/interfaces.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/loggers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/lookups.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/metrics.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/instrument_service.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/market.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/processing.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/subscription.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/trading.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/universe.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/mixins/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/series.pxd +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/series.pyi +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/series.pyx +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/state_snapshot.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/status.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/subscription_watchdog.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/core/utils.pyi +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/cache.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/containers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/guards.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/registry.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storage.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/ccxt.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/csv.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/handy.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/multi.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/questdb.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/stub.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/storages/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/data/transformers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/composite.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/csv.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/indicator.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/inmemory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/prometheus.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/emitters/questdb.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/composite.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/formatters/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/formatters/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/formatters/incremental.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/formatters/slack.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/formatters/target_position.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/redis_streams.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/exporters/slack.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/gathering/simplest.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/health/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/health/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/health/dummy.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/health/status.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/csv.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/factory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/inmemory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/mongo.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/loggers/postgres.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/notifications/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/notifications/composite.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/notifications/slack.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/notifications/throttler.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/pandaz/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/pandaz/stats.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/pandaz/ta.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/pandaz/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/plugins/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/plugins/loader.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/backend.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/config.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/engine.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/ip_resolver.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/pools.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/redis_backend.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/rate_limiting/resilient.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/_build.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/crypto-fees.ini +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/hyperliquid-spot.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/hyperliquid.f-perpetual.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-binance-spot.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-binance.cm-future.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-binance.cm-perpetual.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-binance.um-future.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-binance.um-perpetual.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-bitfinex.f-perpetual.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-kraken-spot.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-kraken.f-future.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/resources/instruments/symbols-kraken.f-perpetual.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restarts/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restarts/state_resolvers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restarts/time_finders.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/balance.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/factory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/interfaces.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/position.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/signal.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/state.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/restorers/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/state/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/state/dummy.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/state/redis.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/state/runtime_info.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/state/safe.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/ta/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/ta/indicators.pxd +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/ta/indicators.pyi +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/ta/indicators.pyx +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/base.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/accounts.toml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/config.yml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/jlive.sh.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/jpaper.sh.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/pyproject.toml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/src/{{ strategy_name }}/__init__.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/src/{{ strategy_name }}/strategy.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/project/template.yml +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.claude/skills/qubx-cli/SKILL.md +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.claude/skills/qubx-indicators/SKILL.md +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.claude/skills/simulation-explorer/SKILL.md +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.claude/skills/strategy-release/SKILL.md +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.github/workflows/ci.yml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.gitignore.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.python-version +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.vscode/launch.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.vscode/settings.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/.vscode/tasks.json +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/CLAUDE.md.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/README.md.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/configs/.gitkeep +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/justfile.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/pyproject.toml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/research/.gitkeep +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/src/{{ strategy_name }}/__init__.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/src/{{ strategy_name }}/cli.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/src/{{ strategy_name }}/strategy.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/template.yml +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/repo/tests/test_strategy.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/__init__.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/accounts.toml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/config.yml.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/jlive.sh.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/jpaper.sh.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/strategy.py.j2 +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/templates/simple/template.yml +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/advanced.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/composite.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/rebalancers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/riskctrl.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/trackers/sizers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/_pyxreloader.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/charting/lookinglass.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/charting/mpl_helpers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/charting/orderbook.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/clock.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/collections.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/hft/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/hft/numba_utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/hft/orderbook.pyi +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/hft/orderbook.pyx +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/marketdata/binance.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/marketdata/ccxt.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/marketdata/dukas.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/misc.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/nonce.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/numbers_utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/orderbook.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/dashboard.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/data.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/interfaces.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/renderers/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/plotting/renderers/plotly.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/questdb.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/rate_limiter.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/results.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/ringbuffer.pxd +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/ringbuffer.pyi +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/ringbuffer.pyx +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/_jupyter_runner.pyt +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/accounts.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/configs.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/factory.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/kernel_service.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/runner.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/app.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/handlers.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/init_code.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/kernel.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/styles.tcss +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/__init__.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/account_summary.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/command_input.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/debug_log.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/log_filter.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/orders_table.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/positions_table.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/quotes_table.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/runner/textual/widgets/repl_output.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/s3.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/slack.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/threading.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/throttler.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/time.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/utils/websocket_manager.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/tests/strategies/macd_crossover/src/macd_crossover/indicators/macd.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/tests/strategies/macd_crossover/src/macd_crossover/models/macd_crossover.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/tests/strategies/macd_crossover/src/macd_crossover/models/utils.py +0 -0
- {qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/tests/strategies/obi_trader/src/obi_trader/models/obi_trader.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '3.17.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (3, 17, 3, '
|
|
21
|
+
__version__ = version = '3.17.3.dev2'
|
|
22
|
+
__version_tuple__ = version_tuple = (3, 17, 3, 'dev2')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -97,6 +97,7 @@ from .utils import (
|
|
|
97
97
|
ccxt_convert_positions,
|
|
98
98
|
ccxt_extract_deals_from_exec,
|
|
99
99
|
ccxt_extract_leverage_settings,
|
|
100
|
+
ccxt_extract_margin_modes,
|
|
100
101
|
ccxt_find_instrument,
|
|
101
102
|
info_float,
|
|
102
103
|
instrument_to_ccxt_symbol,
|
|
@@ -131,6 +132,7 @@ class _LeverageInfo:
|
|
|
131
132
|
configured: float | None
|
|
132
133
|
maximum: int | None
|
|
133
134
|
max_notional: float | None = None
|
|
135
|
+
margin_mode: str | None = None
|
|
134
136
|
|
|
135
137
|
|
|
136
138
|
_VENUE_VERDICT_ERRORS: tuple[type[Exception], ...] = (
|
|
@@ -909,16 +911,18 @@ class CcxtConnector(ChannelEmitter):
|
|
|
909
911
|
return
|
|
910
912
|
# - adopt what we just set, so the next call for the same value is skipped without
|
|
911
913
|
# waiting for the poller; the poller corrects it if the venue disagrees
|
|
912
|
-
cached = self._leverage_cache.get(symbol)
|
|
913
914
|
# The cap belongs to the bracket we just left, so the new one is read here rather than
|
|
914
915
|
# carried or dropped: dropping left the position reading null for up to an hour, until
|
|
915
916
|
# the sweep — a snapshot only copies a cap across when the Differ flags that position
|
|
916
917
|
# for a size or margin change, which a leverage edit does not cause.
|
|
917
|
-
max_notional = await self.
|
|
918
|
+
max_notional, margin_mode = await self._read_leverage_row(symbol)
|
|
919
|
+
# read after the await: an hourly sweep landing inside it must not be rolled back here
|
|
920
|
+
cached = self._leverage_cache.get(symbol)
|
|
918
921
|
self._leverage_cache[symbol] = _LeverageInfo(
|
|
919
922
|
configured=leverage,
|
|
920
923
|
maximum=cached.maximum if cached is not None else None,
|
|
921
924
|
max_notional=max_notional,
|
|
925
|
+
margin_mode=margin_mode or (cached.margin_mode if cached is not None else None),
|
|
922
926
|
)
|
|
923
927
|
# the cache is private to the connector; the Position is what every reader sees, and
|
|
924
928
|
# only the snapshot writes it — so announce the ack rather than wait for one
|
|
@@ -928,21 +932,22 @@ class CcxtConnector(ChannelEmitter):
|
|
|
928
932
|
)
|
|
929
933
|
)
|
|
930
934
|
|
|
931
|
-
async def
|
|
932
|
-
"""One symbol's notional cap at its current leverage, from symbolConfig.
|
|
935
|
+
async def _read_leverage_row(self, symbol: str) -> tuple[float | None, str | None]:
|
|
936
|
+
"""One symbol's notional cap at its current leverage, and its margin mode, from symbolConfig.
|
|
933
937
|
|
|
934
|
-
None on any failure — and on a venue without the endpoint — which the AM reads
|
|
935
|
-
known", clearing the stale value rather than keeping a cap from the wrong bracket.
|
|
938
|
+
The cap is None on any failure — and on a venue without the endpoint — which the AM reads
|
|
939
|
+
as "not known", clearing the stale value rather than keeping a cap from the wrong bracket.
|
|
936
940
|
"""
|
|
937
941
|
if not self._em.exchange.has.get("fetchLeverages"):
|
|
938
|
-
return None
|
|
942
|
+
return None, None
|
|
939
943
|
try:
|
|
940
944
|
rows = await self._em.exchange.fetch_leverages([symbol])
|
|
941
945
|
except Exception as e: # noqa: BLE001 — the ack itself already landed
|
|
942
946
|
logger.warning(f"[{self.exchange_name}] cap read for {symbol} after the leverage ack: {e}")
|
|
943
|
-
return None
|
|
944
|
-
|
|
945
|
-
|
|
947
|
+
return None, None
|
|
948
|
+
leverage_rows = list(rows.values()) if isinstance(rows, dict) else rows
|
|
949
|
+
settings = ccxt_extract_leverage_settings(leverage_rows)
|
|
950
|
+
return settings.get(symbol, (None, None))[1], ccxt_extract_margin_modes(leverage_rows).get(symbol)
|
|
946
951
|
|
|
947
952
|
def _start_leverage_poller(self) -> None:
|
|
948
953
|
if self._leverage_future is None or self._leverage_future.done():
|
|
@@ -976,6 +981,7 @@ class CcxtConnector(ChannelEmitter):
|
|
|
976
981
|
configured: dict[str, float] = {}
|
|
977
982
|
notionals: dict[str, float] = {}
|
|
978
983
|
maxima: dict[str, float] = {}
|
|
984
|
+
modes: dict[str, str] = {}
|
|
979
985
|
configured_read = True
|
|
980
986
|
# - annotated locals: ccxt's BASE Exchange declares both methods as an unconditional
|
|
981
987
|
# `raise NotSupported`, so their inferred return type is NoReturn. Only the venue
|
|
@@ -983,12 +989,14 @@ class CcxtConnector(ChannelEmitter):
|
|
|
983
989
|
# override does raise, and the except below is what handles it.
|
|
984
990
|
try:
|
|
985
991
|
rows: dict[str, Any] = await ex.fetch_leverages()
|
|
986
|
-
|
|
992
|
+
leverage_rows = list(rows.values()) if isinstance(rows, dict) else rows
|
|
993
|
+
settings = ccxt_extract_leverage_settings(leverage_rows)
|
|
987
994
|
for symbol, (leverage, max_notional) in settings.items():
|
|
988
995
|
if leverage is not None:
|
|
989
996
|
configured[symbol] = int(leverage)
|
|
990
997
|
if max_notional is not None:
|
|
991
998
|
notionals[symbol] = max_notional
|
|
999
|
+
modes = ccxt_extract_margin_modes(leverage_rows)
|
|
992
1000
|
except Exception as e: # noqa: BLE001
|
|
993
1001
|
configured_read = False
|
|
994
1002
|
logger.debug(f"[{self.exchange_name}] configured-leverage read failed: {type(e).__name__}: {e}")
|
|
@@ -1028,8 +1036,9 @@ class CcxtConnector(ChannelEmitter):
|
|
|
1028
1036
|
configured=configured.get(symbol),
|
|
1029
1037
|
maximum=maxima.get(symbol),
|
|
1030
1038
|
max_notional=notionals.get(symbol),
|
|
1039
|
+
margin_mode=modes.get(symbol),
|
|
1031
1040
|
)
|
|
1032
|
-
for symbol in configured.keys() | maxima.keys() | notionals.keys()
|
|
1041
|
+
for symbol in configured.keys() | maxima.keys() | notionals.keys() | modes.keys()
|
|
1033
1042
|
}
|
|
1034
1043
|
if configured_read:
|
|
1035
1044
|
# rebuilt wholesale, so a symbol the venue stopped reporting leaves the cache with it
|
|
@@ -1038,11 +1047,16 @@ class CcxtConnector(ChannelEmitter):
|
|
|
1038
1047
|
# The `configured` read failed (bybit has no fetch_leverages), so this sweep cannot
|
|
1039
1048
|
# speak for it: a wholesale rebuild would erase what the write path adopted and evict
|
|
1040
1049
|
# every symbol the tier read left out — on bybit, everything past its pagination cap.
|
|
1041
|
-
# max_notional
|
|
1050
|
+
# max_notional and margin_mode ride the same failed read, so they are preserved too.
|
|
1042
1051
|
for symbol, info in rebuilt.items():
|
|
1043
1052
|
held = self._leverage_cache.get(symbol)
|
|
1044
1053
|
self._leverage_cache[symbol] = (
|
|
1045
|
-
replace(
|
|
1054
|
+
replace(
|
|
1055
|
+
info,
|
|
1056
|
+
configured=held.configured,
|
|
1057
|
+
max_notional=held.max_notional,
|
|
1058
|
+
margin_mode=held.margin_mode,
|
|
1059
|
+
)
|
|
1046
1060
|
if held is not None
|
|
1047
1061
|
else info
|
|
1048
1062
|
)
|
|
@@ -1256,8 +1270,10 @@ class CcxtConnector(ChannelEmitter):
|
|
|
1256
1270
|
return cached.max_notional if cached is not None and cached.max_notional is not None else float("inf")
|
|
1257
1271
|
|
|
1258
1272
|
def get_margin_mode(self, instrument: Instrument) -> str | None:
|
|
1259
|
-
|
|
1260
|
-
|
|
1273
|
+
"""Cache-only, like the leverage getters; the sweep fills it from symbolConfig, which
|
|
1274
|
+
covers flat symbols."""
|
|
1275
|
+
cached = self._leverage_cache.get(instrument_to_ccxt_symbol(instrument))
|
|
1276
|
+
return cached.margin_mode if cached is not None else None
|
|
1261
1277
|
|
|
1262
1278
|
def get_adl_level(self, instrument: Instrument) -> int | None:
|
|
1263
1279
|
row = self._fetch_position_row(instrument)
|
|
@@ -1947,10 +1963,10 @@ class CcxtConnector(ChannelEmitter):
|
|
|
1947
1963
|
|
|
1948
1964
|
include_orders=True -> open orders + algo/trigger orders + positions + balances (startup
|
|
1949
1965
|
discovery + periodic sweep). include_orders=False -> positions + balances ONLY (steady
|
|
1950
|
-
state): the open-orders / algo legs carry
|
|
1951
|
-
|
|
1952
|
-
(open_orders=None -> reconcile leaves order state untouched; orders
|
|
1953
|
-
stream + the periodic full sweep).
|
|
1966
|
+
state): the open-orders / algo legs carry the highest REST weight, and with Qubx rate
|
|
1967
|
+
limiting off they share ccxt's serialised throttler with order placement — so steady
|
|
1968
|
+
snapshots skip them (open_orders=None -> reconcile leaves order state untouched; orders
|
|
1969
|
+
are tracked via the WS stream + the periodic full sweep).
|
|
1954
1970
|
|
|
1955
1971
|
Reconcile applies a snapshot as authoritative, so a leg that failed to fetch skips the
|
|
1956
1972
|
emit entirely and the AM asks again on its next tick. A single row that will not convert
|
|
@@ -65,6 +65,8 @@ class BybitF(CcxtFuturePatchMixin, cxp.bybit):
|
|
|
65
65
|
},
|
|
66
66
|
"options": {
|
|
67
67
|
"fetchOrder": {"acknowledged": True},
|
|
68
|
+
# matches ccxt's 10s HTTP timeout: requests are signed before the socket opens
|
|
69
|
+
"recvWindow": 10 * 1000,
|
|
68
70
|
# caps the cursor walk armed by params={"paginate": True}; read by the
|
|
69
71
|
# pagination driver only, so it cannot re-arm on the recursive call
|
|
70
72
|
"fetchOpenOrders": {"paginationCalls": 20},
|
|
@@ -56,45 +56,46 @@ class BybitCcxtConnector(_TwoStreamCcxtConnector):
|
|
|
56
56
|
ccxt's ``bybit.parse_position`` hardcodes ``marginMode: None``; the symbol only feeds
|
|
57
57
|
``safe_symbol``, so any held instrument answers for all of them.
|
|
58
58
|
|
|
59
|
-
Served from the cache once
|
|
60
|
-
placement, and ``set_margin_mode`` drops the cache when the value can have changed.
|
|
59
|
+
Served from the cache once warm; the hourly sweep re-reads it.
|
|
61
60
|
"""
|
|
62
61
|
if not positions:
|
|
63
62
|
return
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
if self._margin_mode is None:
|
|
64
|
+
try:
|
|
65
|
+
self._margin_mode = await self._read_margin_mode(instrument_to_ccxt_symbol(positions[0].instrument))
|
|
66
|
+
except Exception as e: # noqa: BLE001
|
|
67
|
+
logger.debug(f"[{self.exchange_name}] fetch_margin_mode: {e}")
|
|
68
|
+
return
|
|
69
|
+
if self._margin_mode is None:
|
|
66
70
|
return
|
|
67
|
-
self._margin_mode = mode
|
|
68
71
|
for pos in positions:
|
|
69
|
-
pos.margin_mode =
|
|
72
|
+
pos.margin_mode = self._margin_mode
|
|
70
73
|
|
|
71
74
|
async def _read_margin_mode(self, symbol: str) -> Literal["cross", "isolated"] | None:
|
|
72
|
-
"""PORTFOLIO_MARGIN has no framework equivalent and normalizes to None.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
except Exception as e: # noqa: BLE001
|
|
76
|
-
logger.debug(f"[{self.exchange_name}] fetch_margin_mode for {symbol}: {e}")
|
|
77
|
-
return None
|
|
75
|
+
"""PORTFOLIO_MARGIN has no framework equivalent and normalizes to None. Raises on a
|
|
76
|
+
venue error, which a caller must not confuse with that None."""
|
|
77
|
+
row = await self._em.exchange.fetch_margin_mode(symbol)
|
|
78
78
|
return normalize_margin_mode(row.get("marginMode"))
|
|
79
79
|
|
|
80
|
+
async def _refresh_leverage_cache(self) -> None:
|
|
81
|
+
await super()._refresh_leverage_cache()
|
|
82
|
+
# changeable from the venue UI; nothing else invalidates it
|
|
83
|
+
symbol = next(iter(self._leverage_cache), None) or next(iter(self._symbol_to_instrument), None)
|
|
84
|
+
if symbol is None:
|
|
85
|
+
return
|
|
86
|
+
try:
|
|
87
|
+
self._margin_mode = await self._read_margin_mode(symbol)
|
|
88
|
+
except Exception as e: # noqa: BLE001 — keep the cached mode rather than blanking it
|
|
89
|
+
logger.debug(f"[{self.exchange_name}] margin mode re-read: {e}")
|
|
90
|
+
|
|
80
91
|
def set_margin_mode(self, instrument: Instrument, mode: str) -> bool:
|
|
81
|
-
"""
|
|
92
|
+
"""Adopt the written value; the getter is cache-only."""
|
|
82
93
|
ok = super().set_margin_mode(instrument, mode)
|
|
83
94
|
if ok:
|
|
84
|
-
self._margin_mode =
|
|
95
|
+
self._margin_mode = normalize_margin_mode(mode)
|
|
85
96
|
return ok
|
|
86
97
|
|
|
87
98
|
def get_margin_mode(self, instrument: Instrument) -> str | None:
|
|
88
|
-
"""Serve what the snapshot cached; a cold cache costs one REST hop on the strategy
|
|
89
|
-
thread, every later call a field read. Never raises at the caller: a venue read that
|
|
90
|
-
fails or times out reports None, as the base connector's does."""
|
|
91
|
-
if self._margin_mode is not None:
|
|
92
|
-
return self._margin_mode
|
|
93
|
-
try:
|
|
94
|
-
self._margin_mode = self._run_sync(self._read_margin_mode(instrument_to_ccxt_symbol(instrument)))
|
|
95
|
-
except Exception as e: # noqa: BLE001
|
|
96
|
-
logger.debug(f"[{self.exchange_name}] margin mode read for {instrument.symbol}: {e}")
|
|
97
|
-
return None
|
|
98
99
|
return self._margin_mode
|
|
99
100
|
|
|
100
101
|
def _extract_venue_figures(
|
|
@@ -392,6 +392,20 @@ def ccxt_extract_leverage_settings(rows: list[dict] | None) -> dict[str, tuple[f
|
|
|
392
392
|
return out
|
|
393
393
|
|
|
394
394
|
|
|
395
|
+
def ccxt_extract_margin_modes(rows: list[dict] | None) -> dict[str, str]:
|
|
396
|
+
"""Map ccxt symbol -> margin mode from ``fetch_leverages`` rows.
|
|
397
|
+
|
|
398
|
+
symbolConfig reports it for every symbol; positionRisk omits flat ones.
|
|
399
|
+
"""
|
|
400
|
+
out: dict[str, str] = {}
|
|
401
|
+
for row in rows or []:
|
|
402
|
+
symbol = row.get("symbol")
|
|
403
|
+
mode = normalize_margin_mode(row.get("marginMode"))
|
|
404
|
+
if symbol and mode is not None:
|
|
405
|
+
out[symbol] = mode
|
|
406
|
+
return out
|
|
407
|
+
|
|
408
|
+
|
|
395
409
|
def ccxt_convert_orderbook(
|
|
396
410
|
ob: dict,
|
|
397
411
|
instr: Instrument,
|
|
@@ -477,7 +477,13 @@ class AccountState:
|
|
|
477
477
|
)
|
|
478
478
|
return True
|
|
479
479
|
|
|
480
|
-
|
|
480
|
+
# half-lot / half-tick like the Differ: n * lot_size is not always the double the
|
|
481
|
+
# venue's decimal parses to
|
|
482
|
+
inst = snapshot.instrument
|
|
483
|
+
changed = (
|
|
484
|
+
abs(existing.quantity - snapshot.quantity) > inst.lot_size * 0.5
|
|
485
|
+
or abs(existing.position_avg_price - snapshot.position_avg_price) > inst.tick_size * 0.5
|
|
486
|
+
)
|
|
481
487
|
if changed:
|
|
482
488
|
logger.info(
|
|
483
489
|
f"[{self.exchange}] reconcile: position <y>{snapshot.instrument}</y> from snapshot -> "
|
|
@@ -186,11 +186,13 @@ cpdef double grid_ceil(double a, double step):
|
|
|
186
186
|
return copysign(ceil(_snap_tick_noise(fabs(a) / step)) * step, a)
|
|
187
187
|
|
|
188
188
|
|
|
189
|
-
cpdef double add_in_lots(double quantity, double amount, double lot_size)
|
|
189
|
+
cpdef double add_in_lots(double quantity, double amount, double lot_size):
|
|
190
190
|
"""
|
|
191
191
|
Sum two lot multiples in whole lots, so a subtraction cannot land a few ulp off the grid.
|
|
192
|
+
|
|
193
|
+
Snapped onto the grid: n * lot_size is not always the double the venue's decimal parses to.
|
|
192
194
|
"""
|
|
193
|
-
return (round(quantity / lot_size) + round(amount / lot_size)) * lot_size
|
|
195
|
+
return grid_floor((round(quantity / lot_size) + round(amount / lot_size)) * lot_size, lot_size)
|
|
194
196
|
|
|
195
197
|
|
|
196
198
|
cpdef bint is_lot_multiple(double quantity, double lot_size) noexcept:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/binance/connector.py
RENAMED
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/binance/exchange.py
RENAMED
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bitfinex/bitfinex.py
RENAMED
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/bitfinex/connector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/hyperliquid/__init__.py
RENAMED
|
File without changes
|
{qubx-3.17.3.dev1 → qubx-3.17.3.dev2}/src/qubx/connectors/ccxt/exchanges/hyperliquid/hyperliquid.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|