Summary
PocketOptionAsync fails during client initialization with a valid-looking 42["auth", ...] SSID. The error happens outside the bot application, in a minimal standalone script.
Environment
- OS: Linux
- Python: 3.14
- Package:
binaryoptionstoolsv2
- Import path:
BinaryOptionsToolsV2.pocketoption
Minimal Reproduction
import asyncio
import time
from BinaryOptionsToolsV2.pocketoption import PocketOptionAsync
SSID = '42["auth",{"session":"...","isDemo":1,"uid":131021432,"platform":3,"isFastHistory":true,"isOptimized":true}]'
async def main() -> None:
started_at = time.monotonic()
try:
print("creating client")
client = PocketOptionAsync(
SSID,
config={
"connection_initialization_timeout_secs": 15,
"timeout_secs": 15,
"terminal_logging": True,
"log_level": "DEBUG",
},
)
print("client created", round(time.monotonic() - started_at, 2))
print("waiting assets")
await client.wait_for_assets(timeout=15)
print("assets loaded", round(time.monotonic() - started_at, 2))
print("getting balance")
balance = await client.balance()
print("balance", balance)
except Exception as exc:
print("ERROR", type(exc).__name__, str(exc))
print("elapsed", round(time.monotonic() - started_at, 2))
if __name__ == "__main__":
asyncio.run(main())
Actual Result
creating client
ERROR ValueError PocketOptionError, General error: Connection initialization timed out
elapsed 15.0
The exception is raised while constructing PocketOptionAsync(...), before wait_for_assets() or balance() are called.
Expected Result
The client should either connect successfully or return a more specific error, for example:
- invalid or expired SSID;
- authentication rejected;
- region unavailable;
- proxy/connectivity error;
- Socket.IO/WebSocket handshake error.
Additional Notes
- The same timeout happens with
platform: 2 and platform: 3.
- The same timeout happens with and without proxy environment variables.
- A minimal auth payload without
uid fails immediately with a parse error, so the provided full 42["auth", ...] payload is at least accepted by the parser.
- HTTPS access to
api-eu.po.market and demo-api-eu.po.market responds from the same machine, so this does not look like a simple DNS/route failure.
Summary
PocketOptionAsyncfails during client initialization with a valid-looking42["auth", ...]SSID. The error happens outside the bot application, in a minimal standalone script.Environment
binaryoptionstoolsv2BinaryOptionsToolsV2.pocketoptionMinimal Reproduction
Actual Result
The exception is raised while constructing
PocketOptionAsync(...), beforewait_for_assets()orbalance()are called.Expected Result
The client should either connect successfully or return a more specific error, for example:
Additional Notes
platform: 2andplatform: 3.uidfails immediately with a parse error, so the provided full42["auth", ...]payload is at least accepted by the parser.api-eu.po.marketanddemo-api-eu.po.marketresponds from the same machine, so this does not look like a simple DNS/route failure.