If your Python bot hangs forever waiting for the result of an order on IQ Option, you have probably fallen into the same hole we did: the check_win / check_win_v4 methods of the unofficial iqoptionapi library enter an infinite loop on the new assets with the -op suffix (e.g. USDJPY-op). This article documents the real problem we faced in 2026 running our bot in production (demo account) and the three solutions that are working — with minimal code for each one.
First of all: iqoptionapi is an unofficial library, maintained by the community via reverse engineering of the WebSocket. It can break at any time, without warning. If you want a foundation with an official, documented API, the alternative is Deriv — that is where we ported part of our bot.
The problem: why check_win freezes on -op assets
The “-op” assets are IQ Option’s newest options product. The fatal detail: for these assets, the platform does not populate the WebSocket messages the lib expects in order to consider the order closed. check_win_v4 sits in a while True waiting for an event that never arrives — and your bot freezes with it. It is not a bug in your code: it is the lib expecting a message contract that the new product does not honour. We covered how these methods normally work in Python + IQ Option: the unofficial API explained.
Solution 1 — Result via balance delta
The most robust of the three, with one precondition: the bot must trade one order at a time (ours does). If only one order is open, the balance variation after expiry is the result, mathematically: win = +stake × payout, loss = −stake, draw = 0. No waiting for any message at all.
Simple, with no dependency on check_win. But note the comment “wait for settlement” — that is where the second trap lives.
Solution 2 — Read the balance on the full minute (the WIN-turned-LOSS bug)
We found out the hard way: IQ Option settles the order on the full-minute boundary (or full quarter-hour), and not at “moment of purchase + N minutes”. If you buy at 14:03:37 with a 2-minute expiry, settlement does not happen at 14:05:37 — it aligns to the platform’s minute grid.
Real bug we lived through: a WIN of +1,120 was recorded as a LOSS by the bot, because it read the balance too early — before the broker credited the payout. The delta was still negative (only the stake debit had landed). In the day’s statistics, a winning trade became a defeat. This kind of silent error corrupts all of your numbers.
The fix: align the read to the next full minute after the nominal expiry, and then poll for up to 2-3 minutes until the balance stabilises (two identical readings in a row):
Solution 3 — Adaptive expiry (2-min turbo → 15-min binary)
Third stumble: sometimes the broker rejects the turbo order because the schedule for that expiry is closed for the asset. Instead of losing the signal, the bot tries plan B — redoing the order as a 15-minute binary:
Careful: a different expiry changes the signal’s statistics — log which path was used on each trade, as we do, so you can separate the samples later. The fundamentals of buy and of reading the result are covered in Python + IQ Option: the unofficial API explained.
Bonus: -op assets do not appear in constants.ACTIVES
Another stumble for anyone migrating to the new assets: they are not listed in constants.ACTIVES, so the lib does not even know they exist. The way out is to inject the IDs at bot startup:
And one account detail, not a code detail: in our case, it was the verified account that unlocked access to the -op assets. If they do not show up for you, check your account status before hunting for a bug in Python.
The big picture: an unofficial lib is technical debt you accept
The three solutions above are running in production in our bot (on a demo account — the numbers are in Our bot’s results at 3 brokers). But let’s not sugar-coat the situation: all of this is engineering on top of a library that IQ Option does not recognise and could invalidate tomorrow. That is exactly why we also ported the bot to Deriv, which has an official API — the broker comparison and the lib guide are in Python + IQ Option: the unofficial API.
Tired of reverse engineering? Deriv has an official, documented API with a stable WebSocket — it is the foundation of our 45-day study.
Explore the Deriv API (demo account) →Affiliate link. Always develop and test on demo.
Read next
→ Python + IQ Option: the unofficial API explained
→ Deriv bot: how to create one without coding (2026)
→ Our bot’s demo account results: 3 brokers, real numbers
→ The 2 strategies that survived out-of-sample (complete rules)
Dan Machado
Developer of the IA Trader Pro project. Builds and documents in public a binary options bot in Python, tested on demo accounts at three brokers (Deriv, IQ Option and Quotex) — publishing the numbers that work and, above all, the ones that don’t.
Disclaimer: binary options are extremely high-risk products and most retail traders lose money. The code in this article consists of educational examples, tested by us on a DEMO account with an unofficial library that can break at any moment. Nothing here is investment advice or a promise of profit. Never trade with money you cannot afford to lose.
