Skip to content

Commit f7b121f

Browse files
committed
Improve IBKR gateway timeout diagnostics
1 parent 4a69886 commit f7b121f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ def send_tg_message(message):
219219

220220

221221
def connect_ib():
222+
print(
223+
f"Connecting to IB gateway {IB_HOST}:{IB_PORT} (mode={RUNTIME_SETTINGS.ib_gateway_mode}, client_id={IB_CLIENT_ID})",
224+
flush=True,
225+
)
222226
return ibkr_connect_ib(IB_HOST, IB_PORT, IB_CLIENT_ID)
223227

224228

@@ -261,6 +265,11 @@ def build_execution_report(log_context):
261265
},
262266
diagnostics={
263267
"strategy_config_source": FEATURE_RUNTIME_CONFIG_SOURCE,
268+
"ib_gateway_host": IB_HOST,
269+
"ib_gateway_port": IB_PORT,
270+
"ib_gateway_mode": RUNTIME_SETTINGS.ib_gateway_mode,
271+
"ib_gateway_ip_mode": RUNTIME_SETTINGS.ib_gateway_ip_mode,
272+
"ib_client_id": IB_CLIENT_ID,
264273
},
265274
artifacts={
266275
"feature_snapshot_path": FEATURE_SNAPSHOT_PATH,

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
flask
22
gunicorn
3-
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@v0.7.2
3+
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@v0.7.3
44
us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@v0.7.2
55
pandas
66
numpy

0 commit comments

Comments
 (0)