brndnmtthws/thetagang

Facing some issues

twitchplaystrading opened this issue · 3 comments

Hello,

Thank you for making such algo. I was planning to create my own wheel strategy for algotrading but didn't have time to get on it.

Anyways, when i run the following:
thetagang -c thetagang.toml
it seems to work well along with the api gateway with IBC, but i get errors. I can't narrow it down which might be causing the errors and force quitting the gateway. Attached the log for reference.

I'm running Win 10 and i have seamless 2FA enabled and no SLS. Read-only API is disabled.

ib_insync.log

Attached the logs from gateway as well just in case it narrows down the problem.

gateway-exported-logs.txt

Looks like you may have not configured your market data subscriptions in IB. Here are some resources:

https://www.interactivebrokers.com/en/software/am3/am/settings/marketdatasubscriptions.htm
https://www.reddit.com/r/CanadianInvestor/comments/g7a3r0/interactive_brokers_market_data_which_to_choose/
https://www.reddit.com/r/interactivebrokers/comments/gt3ai3/market_data_packages_streaming_vs_realtime/
https://www.reddit.com/r/CanadianInvestor/comments/95ysw8/interactive_brokers_market_data_subscription/

It may be helpful to start by getting IBC and TWS working on its own, then moving on from there.

Additionally, IB lets you enable API access without 2FA, once you enable the app-based 2FA, which makes life a lot easier for automated trading. You can also create a separate login account and limit the permissions (i.e., disable permission to withdraw funds etc).

(Whether or not this is a good idea is a separate issue, IB is not exactly doing a good job with regard to security best practices. Hopefully they're not SolarWinds customers either.)

EDIT: One more thing, if you're using a paper account there's a button you have to check in the paper account settings to share the market data with your paper account. Also, for testing purposes you can set market_data_type = 4 which will use stale market data and should at least allow things to move forward.

Thank you very much! I will go through both of the solutions ASAP and see it'll solve the issues.

I also think IBKR isn't THE best brokers out there. Unfortunately, AFAIK they are one of the few who allow algotrading and use of APIs unless one trades FOREX.

I also think IBKR isn't THE best brokers out there. Unfortunately, AFAIK they are one of the few who allow algotrading and use of APIs unless one trades FOREX.

My experience has been that all brokers are bad, but at least IB has an o.k. API, it mostly works, and they have insanely low rates for margin.