wboayue / rust-ibapi

An implementation of the Interactive Brokers API for Rust
MIT License
58 stars 23 forks source link

TWS Connection doesn't work #157

Closed BigKahunaCanuck closed 1 week ago

BigKahunaCanuck commented 1 week ago

TWS API (port 7497) throws errors when running https://github.com/wboayue/rust-ibapi/blob/main/examples/market_data.rs ERROR ibapi::transport] error reading next message (shutting down): Io(Os { code: 10060, kind ...

The code works fine with the Gateway.

This means one needs to disconnect from the Desktop to log into the Gateway.

wboayue commented 1 week ago

Was not able to reproduce this with TWS or the Gateway on my system. I suspect this is because TWS uses more resources and may slow responses on your system. Updated the main branch to allow more time to receive data. Give that a try.

wboayue commented 1 week ago

Also are you on a Windows machine? I'm on a Mac, it might be something platform specific.

BigKahunaCanuck commented 1 week ago

I think I am running into a pacing violation. What I am working on is custom scanners and I'm looking at ~600 symbols. When I add sleep time, it gets further. I need to explore smarter pacing strategies.

BigKahunaCanuck commented 1 week ago

Yes, Windows.

On Wed, Nov 6, 2024 at 10:08 PM Wil Boayue @.***> wrote:

Also are you on a Windows machine? I'm on a Mac, it might be something platform specific.

— Reply to this email directly, view it on GitHub https://github.com/wboayue/rust-ibapi/issues/157#issuecomment-2461223778, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5GOZAH73STPIIDAYXBIPKLZ7LKUBAVCNFSM6AAAAABRJQNVM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRRGIZDGNZXHA . You are receiving this because you authored the thread.Message ID: @.***>

wboayue commented 1 week ago

Code updated to handle Windows specific codes.