erdewit / ib_insync

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

10182错误代码是什么问题? #669

Closed cgntiger closed 6 months ago

cgntiger commented 6 months ago

发生10182错误代码,但是盈透官方文档并没有发现这个错误代码。请问这种问题是什么情况出现的?该如何解决? @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 2023-12-11 00:01:34,085 ib_insync.wrapper ERROR Error 10182, reqId 1417916308: \u8bf7\u6c42\u5b9e\u65f6\u66f4\u65b0\u5931\u8d25\uff08\u8fde\u63a5\u65ad\u5f00\uff09\u3002

转义: 2023-12-11 00:01:03,948 ib_insync.wrapper error error 10182, reqid 1417916307: 请求实时更新失败(连接断开)。 2023-12-11 00:01:34,085 ib_insync.wrapper error error 10182, reqid 1417916308: 请求实时更新失败(连接断开)。

erdewit commented 6 months ago

Please have the courtesy to write in English.