binaryoptionstoolsv2 0.2.9__tar.gz → 0.2.12__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.
- {binaryoptionstoolsv2-0.2.9/python → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/BinaryOptionsToolsV2.pyi +19 -2
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/__init__.py +60 -0
- {binaryoptionstoolsv2-0.2.9/python → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/config.py +38 -65
- {binaryoptionstoolsv2-0.2.9/python → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/pocketoption/__init__.py +6 -4
- {binaryoptionstoolsv2-0.2.9/python → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/pocketoption/asynchronous.py +405 -284
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/pocketoption/synchronous.py +659 -0
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/pocketoption/tools/__init__.py +7 -0
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/pocketoption/tools/login.py +515 -0
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/tracing.py +91 -0
- binaryoptionstoolsv2-0.2.12/BinaryOptionsToolsV2/validator.py +76 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/Cargo.lock +876 -866
- binaryoptionstoolsv2-0.2.12/Cargo.toml +41 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12}/LICENSE +100 -100
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/PKG-INFO +33 -14
- binaryoptionstoolsv2-0.2.9/Readme.md → binaryoptionstoolsv2-0.2.12/README.md +30 -10
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/Cargo.toml +46 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/config.rs +6 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/error.rs +5 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/action.rs +1 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/client.rs +1 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/connect.rs +3 -3
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/error.rs +1 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/keep_alive.rs +5 -16
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/profile.rs +13 -11
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/state.rs +3 -2
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/types.rs +2 -2
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/virtual_market.rs +5 -5
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/lib.rs +6 -7
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/candle.rs +368 -29
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/connect.rs +46 -3
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/error.rs +137 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/assets.rs +265 -263
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/balance.rs +101 -84
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/deals.rs +206 -74
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/modules/deals_tests.rs +147 -0
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/modules/get_candles.rs +748 -0
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/modules/historical_data.rs +523 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/keep_alive.rs +5 -2
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/mod.rs +3 -4
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/modules/pending_trades.rs +587 -0
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/modules/pending_trades_tests.rs +1152 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/raw.rs +112 -54
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/resilient_parsing_tests.rs +3 -4
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/server_time.rs +84 -66
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/subscriptions.rs +288 -198
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades.rs +93 -54
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/common.rs +4 -5
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/concurrency.rs +1 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/pocket_client.rs +182 -161
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/ssid.rs +225 -11
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/state.rs +96 -23
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/types.rs +49 -35
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/utils.rs +449 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/utils/mod.rs +1 -1
- binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3/Cargo.toml +49 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/build.rs +1 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/config.rs +10 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/error.rs +82 -47
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/framework.rs +3 -3
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/lib.rs +38 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/logs.rs +4 -4
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/pocketoption.rs +129 -48
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/validator.rs +2 -49
- binaryoptionstoolsv2-0.2.12/crates/core/Cargo.toml +35 -0
- binaryoptionstoolsv2-0.2.12/crates/core/LICENSE +100 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/README.md +5 -5
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/diagrams/architecture.txt +51 -51
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/diagrams/diagram.txt +40 -40
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/docs/testing-framework.md +13 -13
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/examples/echo_client.rs +6 -6
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/examples/middleware_example.rs +6 -6
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/examples/testing_echo_client.rs +7 -7
- binaryoptionstoolsv2-0.2.12/crates/core/macros/Cargo.toml +14 -0
- binaryoptionstoolsv2-0.2.12/crates/core/macros/LICENSE +100 -0
- binaryoptionstoolsv2-0.2.12/crates/core/macros/src/lib.rs +184 -0
- binaryoptionstoolsv2-0.2.12/crates/core/macros/src/modules/lightweight.rs +4 -0
- binaryoptionstoolsv2-0.2.12/crates/core/macros/src/modules/mod.rs +1 -0
- binaryoptionstoolsv2-0.2.12/crates/core/macros/src/rule.rs +571 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/builder.rs +13 -12
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/callback.rs +51 -51
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/client.rs +152 -144
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/connector.rs +52 -52
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/error.rs +51 -49
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/lib.rs +3 -0
- binaryoptionstoolsv2-0.2.12/crates/core/src/message.rs +5 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/middleware.rs +502 -502
- binaryoptionstoolsv2-0.2.12/crates/core/src/rules.rs +793 -0
- binaryoptionstoolsv2-0.2.12/crates/core/src/signals.rs +56 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/statistics.rs +8 -18
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/testing.rs +623 -623
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/traits.rs +250 -233
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/utils/stream.rs +8 -4
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/utils/time.rs +20 -20
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/tests/middleware_tests.rs +3 -3
- binaryoptionstoolsv2-0.2.12/crates/core/tests/rule_macro_tests.rs +858 -0
- binaryoptionstoolsv2-0.2.12/crates/core/tests/runner_command_tests.rs +157 -0
- binaryoptionstoolsv2-0.2.12/crates/core/tests/stream_tests.rs +70 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/tests/testing_wrapper_tests.rs +196 -198
- binaryoptionstoolsv2-0.2.12/crates/core/tests/two_step_standalone.rs +180 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/Cargo.toml +10 -13
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/action.rs +3 -3
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/lib.rs +4 -27
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/region.rs +10 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/timeout.rs +1 -1
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/pyproject.toml +6 -7
- binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust/Cargo.toml +0 -46
- binaryoptionstoolsv2-0.2.9/Cargo.toml +0 -18
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/Cargo.lock +0 -2498
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/Cargo.toml +0 -46
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/error.rs +0 -67
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/modules/get_candles.rs +0 -348
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/modules/historical_data.rs +0 -1041
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/modules/pending_trades.rs +0 -332
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/modules/pending_trades_tests.rs +0 -805
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/pocketoption/utils.rs +0 -226
- binaryoptionstoolsv2-0.2.9/crates/binary_options_tools/src/reimports.rs +0 -1
- binaryoptionstoolsv2-0.2.9/crates/core/Cargo.lock +0 -1994
- binaryoptionstoolsv2-0.2.9/crates/core/Cargo.toml +0 -38
- binaryoptionstoolsv2-0.2.9/crates/core/LICENSE +0 -100
- binaryoptionstoolsv2-0.2.9/crates/core/data/batching.rs +0 -218
- binaryoptionstoolsv2-0.2.9/crates/core/data/client2.rs +0 -1001
- binaryoptionstoolsv2-0.2.9/crates/core/data/client_enhanced.rs +0 -1011
- binaryoptionstoolsv2-0.2.9/crates/core/data/connection.rs +0 -294
- binaryoptionstoolsv2-0.2.9/crates/core/data/events.rs +0 -242
- binaryoptionstoolsv2-0.2.9/crates/core/data/websocket_config.rs +0 -228
- binaryoptionstoolsv2-0.2.9/crates/core/errors.log +0 -0
- binaryoptionstoolsv2-0.2.9/crates/core/readme.md +0 -37
- binaryoptionstoolsv2-0.2.9/crates/core/src/constants.rs +0 -7
- binaryoptionstoolsv2-0.2.9/crates/core/src/error.rs +0 -82
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/client.rs +0 -700
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/config.rs +0 -63
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/mod.rs +0 -8
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/send.rs +0 -304
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/stream.rs +0 -121
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/traits.rs +0 -113
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/types.rs +0 -163
- binaryoptionstoolsv2-0.2.9/crates/core/src/general/validate.rs +0 -19
- binaryoptionstoolsv2-0.2.9/crates/core/src/lib.rs +0 -9
- binaryoptionstoolsv2-0.2.9/crates/core/src/reimports.rs +0 -5
- binaryoptionstoolsv2-0.2.9/crates/core/src/utils/mod.rs +0 -2
- binaryoptionstoolsv2-0.2.9/crates/core/src/utils/time.rs +0 -19
- binaryoptionstoolsv2-0.2.9/crates/core/src/utils/tracing.rs +0 -109
- binaryoptionstoolsv2-0.2.9/crates/core-pre/.vscode/mcp.json +0 -13
- binaryoptionstoolsv2-0.2.9/crates/core-pre/Cargo.toml +0 -26
- binaryoptionstoolsv2-0.2.9/crates/core-pre/examples/basic_connector_usage.rs +0 -72
- binaryoptionstoolsv2-0.2.9/crates/core-pre/src/message.rs +0 -1
- binaryoptionstoolsv2-0.2.9/crates/core-pre/src/signals.rs +0 -45
- binaryoptionstoolsv2-0.2.9/crates/macros/.gitignore +0 -2
- binaryoptionstoolsv2-0.2.9/crates/macros/LICENSE +0 -100
- binaryoptionstoolsv2-0.2.9/crates/macros/examples/action_example.rs +0 -49
- binaryoptionstoolsv2-0.2.9/crates/macros/readme.md +0 -1
- binaryoptionstoolsv2-0.2.9/crates/macros/src/config.rs +0 -366
- binaryoptionstoolsv2-0.2.9/crates/macros/src/deserialize.rs +0 -26
- binaryoptionstoolsv2-0.2.9/crates/macros/src/impls/config_impl.rs +0 -7
- binaryoptionstoolsv2-0.2.9/crates/macros/src/impls/mod.rs +0 -1
- binaryoptionstoolsv2-0.2.9/crates/macros/src/serialize.rs +0 -21
- binaryoptionstoolsv2-0.2.9/python/BinaryOptionsToolsV2/__init__.py +0 -54
- binaryoptionstoolsv2-0.2.9/python/BinaryOptionsToolsV2/pocketoption/synchronous.py +0 -724
- binaryoptionstoolsv2-0.2.9/python/BinaryOptionsToolsV2/tracing.py +0 -96
- binaryoptionstoolsv2-0.2.9/python/BinaryOptionsToolsV2/validator.py +0 -198
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/binary_options_tools}/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/Readme.md +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/data/expert_options_regions.json +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/data/pocket_options_regions.json +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/regions.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/market.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/regions.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/traits.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/utils/serialize.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/validator.rs +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/Readme.md +0 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/runtime.rs +0 -0
- {binaryoptionstoolsv2-0.2.9/BinaryOptionsToolsV2/rust → binaryoptionstoolsv2-0.2.12/crates/bindings_pyo3}/src/stream.rs +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/.gitignore +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/reimports.rs +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/utils/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/core-pre → binaryoptionstoolsv2-0.2.12/crates/core}/src/utils/tracing.rs +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/core → binaryoptionstoolsv2-0.2.12/crates/macros}/.gitignore +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/ActionImpl_README.md +0 -0
- {binaryoptionstoolsv2-0.2.9 → binaryoptionstoolsv2-0.2.12}/crates/macros/Cargo.lock +0 -0
- {binaryoptionstoolsv2-0.2.9/crates/binary_options_tools → binaryoptionstoolsv2-0.2.12/crates/macros}/LICENSE +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
from typing import Any, Callable, List, Optional
|
|
1
|
+
from typing import Any, Callable, List, Optional, Tuple
|
|
2
|
+
|
|
3
|
+
class Action:
|
|
4
|
+
Call: "Action"
|
|
5
|
+
Put: "Action"
|
|
2
6
|
|
|
3
7
|
class PyConfig:
|
|
4
8
|
def __init__(
|
|
@@ -90,13 +94,15 @@ class RawPocketOption:
|
|
|
90
94
|
command: int,
|
|
91
95
|
) -> str: ...
|
|
92
96
|
async def closed_deals(self) -> str: ...
|
|
97
|
+
async def get_closed_deal(self, id: str) -> Optional[str]: ...
|
|
93
98
|
async def clear_closed_deals(self) -> None: ...
|
|
94
99
|
async def opened_deals(self) -> str: ...
|
|
100
|
+
async def get_opened_deal(self, id: str) -> Optional[str]: ...
|
|
95
101
|
async def payout(self) -> str: ...
|
|
96
102
|
async def history(self, asset: str, period: int) -> str: ...
|
|
97
103
|
async def compile_candles(self, asset: str, custom_period: int, lookback_period: int) -> str: ...
|
|
98
104
|
async def subscribe_symbol(self, symbol: str) -> StreamIterator: ...
|
|
99
|
-
async def
|
|
105
|
+
async def subscribe_symbol_chunked(self, symbol: str, chunk_size: int) -> StreamIterator: ...
|
|
100
106
|
async def subscribe_symbol_timed(self, symbol: str, time: Any) -> StreamIterator: ...
|
|
101
107
|
async def subscribe_symbol_time_aligned(self, symbol: str, time: Any) -> StreamIterator: ...
|
|
102
108
|
async def send_raw_message(self, message: str) -> None: ...
|
|
@@ -141,14 +147,25 @@ class PyVirtualMarket:
|
|
|
141
147
|
async def update_price(self, asset: str, price: float) -> None: ...
|
|
142
148
|
|
|
143
149
|
class PyStrategy:
|
|
150
|
+
current_candle: int
|
|
144
151
|
def __init__(self) -> None: ...
|
|
145
152
|
def on_start(self, ctx: PyContext) -> None: ...
|
|
146
153
|
def on_candle(self, ctx: PyContext, asset: str, candle_json: str) -> None: ...
|
|
154
|
+
def on_balance(self, ctx: PyContext, balance: float) -> None: ...
|
|
155
|
+
def trade(self, ctx: PyContext, asset: str, amount: float, timeframe: int, direction: Action) -> List[str]: ...
|
|
156
|
+
def result(self, ctx: PyContext, id: str) -> str: ...
|
|
157
|
+
def add(self, name: str, indicator: Any) -> None: ...
|
|
158
|
+
def get(self, name: str) -> Optional[Any]: ...
|
|
159
|
+
def list_indicators(self) -> List[Tuple[str, str]]: ...
|
|
160
|
+
def update(self, candle: str) -> None: ...
|
|
161
|
+
def reset(self) -> None: ...
|
|
162
|
+
def period(self) -> int: ...
|
|
147
163
|
|
|
148
164
|
class PyBot:
|
|
149
165
|
def __init__(
|
|
150
166
|
self, client: RawPocketOption, strategy: PyStrategy, virtual_market: Optional[PyVirtualMarket] = None
|
|
151
167
|
) -> None: ...
|
|
168
|
+
def with_update_interval(self, millis: int) -> None: ...
|
|
152
169
|
def add_asset(self, asset: str, period: int) -> None: ...
|
|
153
170
|
async def run(self) -> None: ...
|
|
154
171
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
from .config import Config as Config
|
|
5
|
+
from . import tracing as tracing
|
|
6
|
+
from . import validator as validator
|
|
7
|
+
from .pocketoption import (
|
|
8
|
+
PocketOptionAsync as PocketOptionAsync,
|
|
9
|
+
PocketOption as PocketOption,
|
|
10
|
+
RawHandler as RawHandler,
|
|
11
|
+
Validator as Validator,
|
|
12
|
+
__all__ as __pocket_all__,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
# Import the Rust module and re-export its attributes
|
|
16
|
+
_rust_module = None
|
|
17
|
+
try:
|
|
18
|
+
_rust_module = importlib.import_module(".BinaryOptionsToolsV2", __package__)
|
|
19
|
+
except (ImportError, ValueError):
|
|
20
|
+
try:
|
|
21
|
+
_rust_module = importlib.import_module("BinaryOptionsToolsV2")
|
|
22
|
+
if _rust_module is sys.modules.get(__package__):
|
|
23
|
+
_rust_module = None
|
|
24
|
+
except ImportError:
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
if _rust_module is not None:
|
|
28
|
+
globals().update({k: v for k, v in _rust_module.__dict__.items() if not k.startswith("_")})
|
|
29
|
+
elif os.environ.get("PYTEST_CURRENT_TEST"):
|
|
30
|
+
print(f"[ERROR] Rust extension module not found (__package__={__package__})")
|
|
31
|
+
|
|
32
|
+
# Names expected from the Rust cdylib; only those actually loaded will be available
|
|
33
|
+
_rust_exported_names = [
|
|
34
|
+
"RawPocketOption",
|
|
35
|
+
"RawValidator",
|
|
36
|
+
"RawHandler",
|
|
37
|
+
"RawHandle",
|
|
38
|
+
"Logger",
|
|
39
|
+
"LogBuilder",
|
|
40
|
+
"PyConfig",
|
|
41
|
+
"PyBot",
|
|
42
|
+
"PyStrategy",
|
|
43
|
+
"PyContext",
|
|
44
|
+
"PyVirtualMarket",
|
|
45
|
+
"Action",
|
|
46
|
+
"StreamLogsIterator",
|
|
47
|
+
"StreamLogsLayer",
|
|
48
|
+
"StreamIterator",
|
|
49
|
+
"RawStreamIterator",
|
|
50
|
+
"start_tracing",
|
|
51
|
+
]
|
|
52
|
+
__rust_all__ = [n for n in _rust_exported_names if n in globals()]
|
|
53
|
+
|
|
54
|
+
__all__ = list(
|
|
55
|
+
set(
|
|
56
|
+
__pocket_all__
|
|
57
|
+
+ ["tracing", "validator", "PocketOptionAsync", "PocketOption", "RawHandler", "Validator"]
|
|
58
|
+
+ __rust_all__
|
|
59
|
+
)
|
|
60
|
+
)
|
{binaryoptionstoolsv2-0.2.9/python → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/config.py
RENAMED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import sys
|
|
2
3
|
from dataclasses import dataclass, field
|
|
3
4
|
from typing import Any, Dict, List
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
def _get_pyconfig():
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
"""Get the PyConfig class from the compiled Rust module via package namespace."""
|
|
9
|
+
pkg = sys.modules.get(__package__ or "")
|
|
10
|
+
if pkg is not None and hasattr(pkg, "PyConfig"):
|
|
11
|
+
return pkg.PyConfig
|
|
12
|
+
import BinaryOptionsToolsV2 as _mod
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
except (ImportError, AttributeError):
|
|
14
|
-
# Fallback to direct import
|
|
15
|
-
try:
|
|
16
|
-
from ..BinaryOptionsToolsV2 import PyConfig
|
|
17
|
-
|
|
18
|
-
return PyConfig
|
|
19
|
-
except ImportError:
|
|
20
|
-
import BinaryOptionsToolsV2
|
|
21
|
-
|
|
22
|
-
return getattr(BinaryOptionsToolsV2, "PyConfig")
|
|
14
|
+
return _mod.PyConfig
|
|
23
15
|
|
|
24
16
|
|
|
25
17
|
@dataclass
|
|
@@ -35,6 +27,7 @@ class Config:
|
|
|
35
27
|
connection_initialization_timeout_secs: int = 60
|
|
36
28
|
timeout_secs: int = 30
|
|
37
29
|
urls: List[str] = field(default_factory=list)
|
|
30
|
+
max_subscriptions: int = 4
|
|
38
31
|
|
|
39
32
|
# Logging configuration
|
|
40
33
|
terminal_logging: bool = False
|
|
@@ -49,8 +42,6 @@ class Config:
|
|
|
49
42
|
self._locked = False
|
|
50
43
|
|
|
51
44
|
def __setattr__(self, name: str, value: Any) -> None:
|
|
52
|
-
"""Override setattr to check for locked state"""
|
|
53
|
-
# Allow setting private attributes and during initialization
|
|
54
45
|
if name.startswith("_") or not hasattr(self, "_locked") or not self._locked:
|
|
55
46
|
super().__setattr__(name, value)
|
|
56
47
|
else:
|
|
@@ -58,21 +49,15 @@ class Config:
|
|
|
58
49
|
|
|
59
50
|
@property
|
|
60
51
|
def pyconfig(self) -> Any:
|
|
61
|
-
"""
|
|
62
|
-
Returns the PyConfig instance for use in Rust code.
|
|
63
|
-
Once this is accessed, the configuration becomes locked.
|
|
64
|
-
"""
|
|
52
|
+
"""Returns the PyConfig instance for use in Rust code, then locks config."""
|
|
65
53
|
if self._pyconfig is None:
|
|
66
54
|
self._pyconfig = _get_pyconfig()()
|
|
67
|
-
self.
|
|
55
|
+
self._sync_pyconfig()
|
|
68
56
|
self._locked = True
|
|
69
57
|
return self._pyconfig
|
|
70
58
|
|
|
71
|
-
def
|
|
72
|
-
"""
|
|
73
|
-
if self._locked:
|
|
74
|
-
raise RuntimeError("Configuration is locked and cannot be modified after being used")
|
|
75
|
-
|
|
59
|
+
def _sync_pyconfig(self):
|
|
60
|
+
"""Sync all Python config fields to the Rust PyConfig instance."""
|
|
76
61
|
if self._pyconfig is None:
|
|
77
62
|
self._pyconfig = _get_pyconfig()()
|
|
78
63
|
|
|
@@ -82,40 +67,37 @@ class Config:
|
|
|
82
67
|
self._pyconfig.connection_initialization_timeout_secs = self.connection_initialization_timeout_secs
|
|
83
68
|
self._pyconfig.timeout_secs = self.timeout_secs
|
|
84
69
|
self._pyconfig.urls = self.urls
|
|
70
|
+
self._pyconfig.max_subscriptions = self.max_subscriptions
|
|
71
|
+
|
|
72
|
+
def _validate(self):
|
|
73
|
+
"""Validate config values, raising ValueError on invalid input."""
|
|
74
|
+
if self.max_allowed_loops < 0:
|
|
75
|
+
raise ValueError("max_allowed_loops must be non-negative")
|
|
76
|
+
if self.sleep_interval < 0:
|
|
77
|
+
raise ValueError("sleep_interval must be non-negative")
|
|
78
|
+
if self.reconnect_time < 1:
|
|
79
|
+
raise ValueError("reconnect_time must be at least 1 second")
|
|
80
|
+
if self.connection_initialization_timeout_secs < 1:
|
|
81
|
+
raise ValueError("connection_initialization_timeout_secs must be at least 1")
|
|
82
|
+
if self.timeout_secs < 1:
|
|
83
|
+
raise ValueError("timeout_secs must be at least 1")
|
|
84
|
+
if self.max_subscriptions < 1:
|
|
85
|
+
raise ValueError("max_subscriptions must be at least 1")
|
|
85
86
|
|
|
86
87
|
@classmethod
|
|
87
88
|
def from_dict(cls, config_dict: Dict[str, Any]) -> "Config":
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
config_dict: Dictionary containing configuration values
|
|
93
|
-
|
|
94
|
-
Returns:
|
|
95
|
-
Config instance
|
|
96
|
-
"""
|
|
97
|
-
return cls(**{k: v for k, v in config_dict.items() if k in Config.__dataclass_fields__})
|
|
89
|
+
"""Creates a Config instance from a dictionary."""
|
|
90
|
+
cfg = cls(**{k: v for k, v in config_dict.items() if k in cls.__dataclass_fields__})
|
|
91
|
+
cfg._validate()
|
|
92
|
+
return cfg
|
|
98
93
|
|
|
99
94
|
@classmethod
|
|
100
95
|
def from_json(cls, json_str: str) -> "Config":
|
|
101
|
-
"""
|
|
102
|
-
Creates a Config instance from a JSON string.
|
|
103
|
-
|
|
104
|
-
Args:
|
|
105
|
-
json_str: JSON string containing configuration values
|
|
106
|
-
|
|
107
|
-
Returns:
|
|
108
|
-
Config instance
|
|
109
|
-
"""
|
|
96
|
+
"""Creates a Config instance from a JSON string."""
|
|
110
97
|
return cls.from_dict(json.loads(json_str))
|
|
111
98
|
|
|
112
99
|
def to_dict(self) -> Dict[str, Any]:
|
|
113
|
-
"""
|
|
114
|
-
Converts the configuration to a dictionary.
|
|
115
|
-
|
|
116
|
-
Returns:
|
|
117
|
-
Dictionary containing all configuration values
|
|
118
|
-
"""
|
|
100
|
+
"""Converts the configuration to a dictionary."""
|
|
119
101
|
return {
|
|
120
102
|
"max_allowed_loops": self.max_allowed_loops,
|
|
121
103
|
"sleep_interval": self.sleep_interval,
|
|
@@ -123,29 +105,20 @@ class Config:
|
|
|
123
105
|
"connection_initialization_timeout_secs": self.connection_initialization_timeout_secs,
|
|
124
106
|
"timeout_secs": self.timeout_secs,
|
|
125
107
|
"urls": self.urls,
|
|
108
|
+
"max_subscriptions": self.max_subscriptions,
|
|
126
109
|
"terminal_logging": self.terminal_logging,
|
|
127
110
|
"log_level": self.log_level,
|
|
111
|
+
"extra_duration": self.extra_duration,
|
|
128
112
|
}
|
|
129
113
|
|
|
130
114
|
def to_json(self) -> str:
|
|
131
|
-
"""
|
|
132
|
-
Converts the configuration to a JSON string.
|
|
133
|
-
|
|
134
|
-
Returns:
|
|
135
|
-
JSON string containing all configuration values
|
|
136
|
-
"""
|
|
115
|
+
"""Converts the configuration to a JSON string."""
|
|
137
116
|
return json.dumps(self.to_dict())
|
|
138
117
|
|
|
139
118
|
def update(self, config_dict: Dict[str, Any]) -> None:
|
|
140
|
-
"""
|
|
141
|
-
Updates the configuration with values from a dictionary.
|
|
142
|
-
|
|
143
|
-
Args:
|
|
144
|
-
config_dict: Dictionary containing new configuration values
|
|
145
|
-
"""
|
|
119
|
+
"""Updates config from a dictionary. Raises RuntimeError if locked."""
|
|
146
120
|
if self._locked:
|
|
147
121
|
raise RuntimeError("Configuration is locked and cannot be modified after being used")
|
|
148
|
-
|
|
149
122
|
for key, value in config_dict.items():
|
|
150
123
|
if hasattr(self, key):
|
|
151
124
|
setattr(self, key, value)
|
|
@@ -7,13 +7,15 @@ as well as specific classes for Pocket Option trading.
|
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
"asynchronous",
|
|
10
|
-
"
|
|
10
|
+
"login",
|
|
11
|
+
"login_async",
|
|
11
12
|
"PocketOptionAsync",
|
|
12
13
|
"PocketOption",
|
|
13
14
|
"RawHandler",
|
|
14
15
|
"RawHandlerSync",
|
|
16
|
+
"Validator",
|
|
15
17
|
]
|
|
16
|
-
|
|
17
|
-
from . import asynchronous, synchronous
|
|
18
|
-
from .asynchronous import PocketOptionAsync, RawHandler
|
|
18
|
+
from .tools.login import login, login_async
|
|
19
|
+
from . import asynchronous, synchronous as synchronous
|
|
20
|
+
from .asynchronous import PocketOptionAsync, RawHandler, Validator
|
|
19
21
|
from .synchronous import PocketOption, RawHandlerSync
|