Skip to content

Again check_win #86

@Lem4aks

Description

@Lem4aks

@Rick-29 well that work on 15 sec, but dont on 300
i fix await asyncio.sleep(240), maybe we change func check_win throw, how max need timeout?

Buy trade result: win
Buy trade data: {'id': 'a326435d-2f12-403c-a730-8f697b870177', 'openTime': '2026-03-26 22:08:39', 'closeTime': '2026-03-26 22:08:54', 'openTimestamp': 1774562919, 'closeTimestamp': 1774562934, 'refundTime': None, 'refundTimestamp': None, 'uid': 125979601, 'requestId': None, 'amount': '1', 'profit': '0.89', 'percentProfit': 89, 'percentLoss': 100, 'openPrice': '1.1443', 'closePrice': '1.14447', 'command': 0, 'asset': 'EURUSD_otc', 'isDemo': 1, 'copyTicket': '', 'openMs': 828, 'closeMs': 0, 'optionType': 100, 'isRollover': None, 'isCopySignal': False, 'isAI': None, 'currency': 'USD', 'amountUsd': None, 'amountUSD': '1', 'result': 'win'}
Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\site-packages\BinaryOptionsToolsV2\pocketoption\asynchronous.py", line 356, in _get_trade_result
trade = await self.client.check_win(id)
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 458, in wait_for
fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\site-packages\BinaryOptionsToolsV2\pocketoption\asynchronous.py", line 340, in check_win
trade = await asyncio.wait_for(self._get_trade_result(id), timeout=timeout_seconds)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 460, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Project\BinaryOptionsTools-v2-master\examples\python\async\check_win.py", line 27, in
asyncio.run(main(ssid))
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Project\BinaryOptionsTools-v2-master\examples\python\async\check_win.py", line 21, in main
sell_data = await api.check_win(sell_id)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python310\lib\site-packages\BinaryOptionsToolsV2\pocketoption\asynchronous.py", line 343, in check_win
raise TimeoutError(f"Timeout waiting for trade result for ID: {id}")
TimeoutError: Timeout waiting for trade result for ID: f0e6c7fc-d81a-4cc5-90c5-26dc2cea5e41

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions