OKX error 50011
Rate limit reached / too many requests.
Check an order against OKX rules before sending it (free)
What the venue says
- Rate limit reached. Please refer to API documentation and throttle requests accordingly.
- Too Many Requests
Source: General Class, read 2026-11-28. Market: all.
Usual causes
- Calling an endpoint faster than its limit (per endpoint, per UID or IP)
How to fix it
- Throttle to the endpoint's documented limit
- Back off on 429 and retry later; use WebSocket for data
Bounded back-off on HTTP 429 / 418 (never loop forever)
import time, random
def call_with_backoff(call, tries=5, base=1.0, sleep=time.sleep):
for i in range(tries):
status, retry_after = call()
if status not in (429, 418):
return status, i + 1
wait = float(retry_after) if retry_after else base * 2 ** i
sleep(min(wait, 60) + random.random() * 0.1)
raise RuntimeError("still rate limited: stop and alert, do not keep retrying")
answers = iter([(429, "1"), (429, None), (200, None)]) # example: two refusals, then OK
print(*call_with_backoff(lambda: next(answers), sleep=lambda s: None))
Stop this error before the order leaves your bot
The free order check tests size, price, tick, lot step and venue rules for one order and returns the venue error code it would hit. The free EA code check reads MQL5 and Python bot code for the rule checks that stop codes like this one. Both are free; the full EA list is US$19 with a 30-day refund.
Free order check Free EA code check
This page explains an error message. It is information for developers, not financial advice and not a recommendation to trade. Codes and texts come from the venue's official documentation on the date shown; venues change them, so check the source before relying on it. Register built 2026-11-28; the receipt id for this entry is rcp_aaa50cbedcff4c7fbf97.