erdewit / ib_insync

Python sync/async framework for Interactive Brokers API
BSD 2-Clause "Simplified" License
2.75k stars 723 forks source link

Error code 10182 occurred, but this error code was not found in the official IB documentation. How to solve it? #670

Closed cgntiger closed 5 months ago

cgntiger commented 6 months ago

Error code 10182 occurred, but this error code was not found in the official IB documentation. May I ask how this problem occurs? How to solve it? @erdewit

def onBarUpdate(bars, hasNewBar):
    if hasNewBar:
        print(bars)
    else:
        print("No new bars")

bars = ib.reqHistoricalData(
    contract,
    endDateTime='',
    durationStr='3 D',
    barSizeSetting='15 mins',
    whatToShow='TRADES',
    useRTH=False,
    keepUpToDate=True,
    formatDate=1)
ib.barUpdateEvent += onBarUpdate
ib.run()

2023-12-11 00:01:03,948 ib_insync.wrapper ERROR Error 10182, reqId 1417916307: \u8bf7\u6c42\u5b9e\u65f6\u66f4\u65b0\u5931\u8d25\uff08\u8fde\u63a5\u65ad\u5f00\uff09\u3002

escape: 2023-12-11 00:01:03,948 ib_insync.wrapper error error 10182, reqid 1417916307: Requesting live updates failed (connection dropped).

biney59 commented 6 months ago

From my understanding, ib_insync does not really have handles for every single error code, except for some critical ones needed. Error code and message are simply forwarded to handler, and user decides what to do.

What is it you want "solved" exactly?

erdewit commented 5 months ago

As the contract is not specified I can't reproduce this.