binaryoptionstoolsv2 0.2.11__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.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/__init__.py +31 -7
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/pocketoption/__init__.py +6 -4
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/pocketoption/asynchronous.py +10 -12
- 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.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/validator.py +2 -6
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/Cargo.lock +668 -634
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/Cargo.toml +6 -6
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/PKG-INFO +33 -14
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/README.md +30 -10
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/Cargo.toml +6 -6
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/profile.rs +8 -6
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/state.rs +2 -1
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/lib.rs +3 -4
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/candle.rs +83 -14
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/connect.rs +43 -0
- binaryoptionstoolsv2-0.2.12/crates/binary_options_tools/src/pocketoption/error.rs +137 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/deals.rs +7 -8
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/get_candles.rs +57 -13
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/historical_data.rs +30 -7
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/keep_alive.rs +1 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/mod.rs +0 -4
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/pending_trades.rs +109 -45
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/pending_trades_tests.rs +206 -145
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/raw.rs +13 -6
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/subscriptions.rs +88 -53
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades.rs +33 -34
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/common.rs +1 -2
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/pocket_client.rs +89 -34
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/ssid.rs +22 -10
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/state.rs +53 -3
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/types.rs +10 -20
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/utils.rs +8 -4
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/Cargo.toml +9 -7
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/error.rs +82 -60
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/framework.rs +1 -1
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/lib.rs +29 -3
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/pocketoption.rs +12 -10
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/Cargo.toml +2 -2
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/README.md +3 -3
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/docs/testing-framework.md +3 -3
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/Cargo.toml +1 -1
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/src/modules/lightweight.rs +0 -3
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/src/rule.rs +3 -2
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/client.rs +40 -17
- binaryoptionstoolsv2-0.2.12/crates/core/src/message.rs +5 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/middleware.rs +1 -1
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/rules.rs +15 -5
- binaryoptionstoolsv2-0.2.12/crates/core/src/signals.rs +56 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/rule_macro_tests.rs +70 -72
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/runner_command_tests.rs +8 -20
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/stream_tests.rs +17 -14
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/testing_wrapper_tests.rs +1 -1
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/two_step_standalone.rs +20 -25
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/Cargo.toml +5 -8
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/lib.rs +1 -42
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/pyproject.toml +3 -4
- binaryoptionstoolsv2-0.2.11/BinaryOptionsToolsV2/pocketoption/synchronous.py +0 -287
- binaryoptionstoolsv2-0.2.11/crates/binary_options_tools/src/pocketoption/error.rs +0 -73
- binaryoptionstoolsv2-0.2.11/crates/binary_options_tools/src/reimports.rs +0 -1
- binaryoptionstoolsv2-0.2.11/crates/core/examples/basic_connector_usage.rs +0 -72
- binaryoptionstoolsv2-0.2.11/crates/core/src/message.rs +0 -1
- binaryoptionstoolsv2-0.2.11/crates/core/src/signals.rs +0 -45
- binaryoptionstoolsv2-0.2.11/crates/macros/examples/action_example.rs +0 -49
- binaryoptionstoolsv2-0.2.11/crates/macros/readme.md +0 -1
- binaryoptionstoolsv2-0.2.11/crates/macros/src/config.rs +0 -366
- binaryoptionstoolsv2-0.2.11/crates/macros/src/deserialize.rs +0 -26
- binaryoptionstoolsv2-0.2.11/crates/macros/src/impls/mod.rs +0 -1
- binaryoptionstoolsv2-0.2.11/crates/macros/src/impls/module_impl.rs +0 -31
- binaryoptionstoolsv2-0.2.11/crates/macros/src/serialize.rs +0 -21
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/BinaryOptionsToolsV2.pyi +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/config.py +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/tracing.py +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/Readme.md +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/data/expert_options_regions.json +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/data/pocket_options_regions.json +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/config.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/error.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/action.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/client.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/connect.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/error.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/keep_alive.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/modules/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/regions.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/expertoptions/types.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/market.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/framework/virtual_market.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/assets.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/balance.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/deals_tests.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/resilient_parsing_tests.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/server_time.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/concurrency.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/modules/trades_tests/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/pocketoption/regions.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/traits.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/utils/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/utils/serialize.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/binary_options_tools/src/validator.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/Readme.md +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/build.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/config.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/logs.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/runtime.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/stream.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/bindings_pyo3/src/validator.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/.gitignore +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/diagrams/architecture.txt +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/diagrams/diagram.txt +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/examples/echo_client.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/examples/middleware_example.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/examples/testing_echo_client.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/src/lib.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/macros/src/modules/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/builder.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/callback.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/connector.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/error.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/lib.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/reimports.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/statistics.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/testing.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/traits.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/utils/mod.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/utils/stream.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/utils/time.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/src/utils/tracing.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/core/tests/middleware_tests.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/.gitignore +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/ActionImpl_README.md +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/Cargo.lock +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/LICENSE +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/action.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/region.rs +0 -0
- {binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/crates/macros/src/timeout.rs +0 -0
{binaryoptionstoolsv2-0.2.11 → binaryoptionstoolsv2-0.2.12}/BinaryOptionsToolsV2/__init__.py
RENAMED
|
@@ -4,7 +4,13 @@ import sys
|
|
|
4
4
|
from .config import Config as Config
|
|
5
5
|
from . import tracing as tracing
|
|
6
6
|
from . import validator as validator
|
|
7
|
-
from .pocketoption import
|
|
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
|
+
)
|
|
8
14
|
|
|
9
15
|
# Import the Rust module and re-export its attributes
|
|
10
16
|
_rust_module = None
|
|
@@ -25,12 +31,30 @@ elif os.environ.get("PYTEST_CURRENT_TEST"):
|
|
|
25
31
|
|
|
26
32
|
# Names expected from the Rust cdylib; only those actually loaded will be available
|
|
27
33
|
_rust_exported_names = [
|
|
28
|
-
"RawPocketOption",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
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",
|
|
33
51
|
]
|
|
34
52
|
__rust_all__ = [n for n in _rust_exported_names if n in globals()]
|
|
35
53
|
|
|
36
|
-
__all__ = list(
|
|
54
|
+
__all__ = list(
|
|
55
|
+
set(
|
|
56
|
+
__pocket_all__
|
|
57
|
+
+ ["tracing", "validator", "PocketOptionAsync", "PocketOption", "RawHandler", "Validator"]
|
|
58
|
+
+ __rust_all__
|
|
59
|
+
)
|
|
60
|
+
)
|
|
@@ -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
|
|
@@ -191,7 +191,7 @@ def sanitize_and_validate_ssid(ssid: str, logger: "Logger") -> str:
|
|
|
191
191
|
warnings_list.append(f"missing required field '{field}'")
|
|
192
192
|
|
|
193
193
|
session = auth_data.get("session", "")
|
|
194
|
-
if session and not re.match(r
|
|
194
|
+
if session and not re.match(r"^[a-zA-Z0-9_\-]{10,}$", str(session)):
|
|
195
195
|
warnings_list.append(f"session token has unexpected format (length={len(str(session))})")
|
|
196
196
|
|
|
197
197
|
uid = auth_data.get("uid")
|
|
@@ -219,7 +219,8 @@ def sanitize_and_validate_ssid(ssid: str, logger: "Logger") -> str:
|
|
|
219
219
|
raise ValueError(
|
|
220
220
|
"Invalid SSID: " + "; ".join(critical) + ". "
|
|
221
221
|
"The SSID payload must contain 'session' and 'uid' fields. "
|
|
222
|
-
"Ensure your SSID follows the format: 42['auth',{{'session':'...','uid':123,...}}]"
|
|
222
|
+
"Ensure your SSID follows the format: 42['auth',{{'session':'...','uid':123,...}}]"
|
|
223
|
+
)
|
|
223
224
|
|
|
224
225
|
return ssid
|
|
225
226
|
|
|
@@ -462,8 +463,8 @@ class PocketOptionAsync:
|
|
|
462
463
|
|
|
463
464
|
Args:
|
|
464
465
|
asset (str): Trading asset (e.g., "EURUSD_otc")
|
|
465
|
-
timeframe (int): Candle timeframe in seconds (e.g., 60 for 1-minute candles)
|
|
466
466
|
period (int): Historical period in seconds to fetch
|
|
467
|
+
offset (int): Candle timeframe in seconds (e.g., 60 for 1-minute candles)
|
|
467
468
|
|
|
468
469
|
Returns:
|
|
469
470
|
List[Dict]: List of candles, each containing:
|
|
@@ -486,8 +487,8 @@ class PocketOptionAsync:
|
|
|
486
487
|
|
|
487
488
|
Args:
|
|
488
489
|
asset (str): Trading asset (e.g., "EURUSD_otc")
|
|
489
|
-
timeframe (int): Candle timeframe in seconds (e.g., 60 for 1-minute candles)
|
|
490
490
|
period (int): Historical period in seconds to fetch
|
|
491
|
+
offset (int): Candle timeframe in seconds (e.g., 60 for 1-minute candles)
|
|
491
492
|
time (int): Time to fetch candles from
|
|
492
493
|
|
|
493
494
|
Returns:
|
|
@@ -589,7 +590,7 @@ class PocketOptionAsync:
|
|
|
589
590
|
if deal_json is None:
|
|
590
591
|
return None
|
|
591
592
|
return json.loads(deal_json)
|
|
592
|
-
|
|
593
|
+
|
|
593
594
|
async def open_pending_order(
|
|
594
595
|
self,
|
|
595
596
|
open_type: int,
|
|
@@ -608,7 +609,7 @@ class PocketOptionAsync:
|
|
|
608
609
|
open_type (int): The type of the pending order.
|
|
609
610
|
amount (float): The amount to trade.
|
|
610
611
|
asset (str): The asset symbol (e.g., "EURUSD_otc").
|
|
611
|
-
open_time (int | str): The server time to open the trade.
|
|
612
|
+
open_time (int | str): The server time to open the trade.
|
|
612
613
|
Can be a Unix timestamp (int) or a formatted string "YYYY-MM-DD HH:MM:SS".
|
|
613
614
|
open_price (float): The price to open the trade at.
|
|
614
615
|
timeframe (int): The duration of the trade in seconds.
|
|
@@ -641,13 +642,14 @@ class PocketOptionAsync:
|
|
|
641
642
|
# We can't easily convert "YYYY-MM-DD" to timestamp without more info,
|
|
642
643
|
# but for the sake of not crashing, we'll try to parse it or use 0.
|
|
643
644
|
from datetime import datetime
|
|
645
|
+
|
|
644
646
|
try:
|
|
645
647
|
# PocketOption strings are usually UTC
|
|
646
|
-
dt = datetime.strptime(open_time,
|
|
648
|
+
dt = datetime.strptime(open_time, "%Y-%m-%d %H:%M:%S")
|
|
647
649
|
actual_open_time = int(dt.timestamp())
|
|
648
650
|
except Exception:
|
|
649
651
|
actual_open_time = 0
|
|
650
|
-
|
|
652
|
+
|
|
651
653
|
# Retry with converted integer
|
|
652
654
|
order = await self.client.open_pending_order(
|
|
653
655
|
open_type, amount, asset, actual_open_time, open_price, timeframe, min_payout, command
|
|
@@ -789,7 +791,6 @@ class PocketOptionAsync:
|
|
|
789
791
|
return None
|
|
790
792
|
return json.loads(deal_json)
|
|
791
793
|
|
|
792
|
-
|
|
793
794
|
async def clear_closed_deals(self) -> None:
|
|
794
795
|
"""Removes all closed deals from the client's memory.
|
|
795
796
|
|
|
@@ -1520,6 +1521,3 @@ class PocketOptionAsync:
|
|
|
1520
1521
|
async context manager or when it is garbage collected.
|
|
1521
1522
|
"""
|
|
1522
1523
|
return await self.client.create_raw_iterator(message, validator.raw_validator, timeout)
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|