Back to Community
This algorithm is not connected to Interactive Brokers. Log in to IB. Can't log into this IB account because it is already in use.

Cloned from "Paper Trading With Interactive Brokers - Open Beta Launch" BETA MARKET CLOSED Stop Algorithm
This algorithm is not connected to Interactive Brokers. Log in to IB

The page at https://www.quantopian.com says:
Can't log into this IB account because it is already in use.

15 responses

Hi Abe,

Interactive Brokers only allows one connection per account. If you are running your Quantopian algorithm, you cannot login to TWS/Webtrader with the same username/password. This will terminate your connection to Quantopian and your algorithm will stop running.

For real money accounts, IB lets you create a second user for the same account at no cost. You can use this second login to simultaneously monitor your account in IB while your algo is running on Quantopian. Unfortunately, IB does not allow you to create a second login for paper accounts.

For more information on simultaneously logging into IB and Quantopian please see our live trading FAQ.

Best,
Alisa

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Hi Alisa,

Thanks.

I was not logged in to TWS at the time, so I don't understand what caused this bug. Nor why it said MARKET CLOSED way after the open. I stopped the algo and restarted, and now it works. So there is definitely a bug there, where Quantopian thought I was both logged in and not logged in.

I still need to know how to log out of IB while the algo is running, without killing all orders and liquidating positions.

We investigated and it looks like you may have had two sessions started at different times in two separate tabs (or browsers?). But either way, I can see how this caused confusion and we'd like to fix this in the future.

If you press "Stop Algorithm" in the live trading dashboard this will shutdown your algorithm. It will stop your algorithm from placing any additional orders. It will not cancel any open orders or liquidate your positions.

I'm glad that everything is working now and if you have any questions, you can reach me at [email protected]

I'm having a different login problem. I've been able to log in with paper trading, but I can't log in for real money trading. My account comes with a card with 200 or so challenge response codes, which I have to enter after the password. But the login for Quantopian doesn't seem to support this. Has anyone else had this problem?

Hi Richard,

We definitely support (and require!) captcha-card responses on IB accounts that are configured for them. The IB login flow on Quantopian is essentially:

  • Click "Start Live Algorithm", select your real-money broker account from the drop down
  • Enter your IB password (which is not stored anywhere in Quantopian)
  • If our IB infrastructure detects that a captcha is required, you will be shown the two card ID numbers to enter in the same window that your password was just entered.
  • If that is successful, your algorithm will connect.

I'll follow up with you via email to discuss your login issues this morning. Cheers!

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Richard,

Haven't gotten to that stage yet. Have to debug my algo code first in IB simulator code, and try to understand Quantopian/IB interaction. I can't afford a Knight Capital or Flash Crash debacle.

Please let us know how the Real account works for you.

Thanks,
Abe

I just started live today without a hitch. I am running the same algorithm in live IB mode, paper trading IB mode, and simulated mode with Quantopian.
The paper trading account had some securities which were left over from previous runs. They synced up seamlessly. All three runs are more or less in sync, but not identical, because they are using different amounts of cash. I got my buys this morning at 3 different prices. IB live was in the middle. The Quantopian simulator was a few pennies more, and the IB paper trader was a few pennies less. Don't know why.

Hello Richard,

My IB account is live today, at least for access via TWS. When you are running a live algo on Quantopian can you monitor simultaneously in TWS?

Does IB see your live algo and your paper trading algo as being on different machines and hence give delayed prices to the paper one? (See: "Accordingly, clients seeking to simultaneously operate both live and paper trading account TWS sessions must do so on the same device in order to share a given market data subscription. If concurrent logins on different devices are detected, the live account session will be afforded the real-time market data subscriptions and the paper trading account session delayed data, as available." at http://ibkb.interactivebrokers.com/tag/market-data)

In Quantopian simulated mode presumably Nanex prices are used. Maybe this mix of IB and Nanex and live and delayed is causing the difference you see in prices?

P.

How does the IB Secure Login System (SLS) affect trading through Quantopian?

We support the security code card to login to your IB account. You will enter these private numbers in step 3 of the login process for real money accounts, as detailed by John above.

Do you guys also support the various electronic PIN cards that IB has?

Do you guys also support the various electronic PIN cards that IB has?

We're not actually sure. Let me explain...

Our code assumes that the IB's Gateway application prompts for your username and password and then prompts for an authentication code. If the electronic PIN cards use the same IB Gateway workflow as the security code card, then they should work just fine in Quantopian. If you have an electronic PIN card, please give it a try and let us know. If it doesn't work quite right, let us know and we'll order one of the PIN cards from IB so we can reproduce the issue and get it to work.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

I'm confused by the "at no cost" comment I've seen a few times about adding a 2nd user.

Adding a second user for an individual account holder
http://ibkb.interactivebrokers.com/article/1004 says at the bottom:

In accordance with market data vendor requirements, the account will be assessed a separate market data subscription fee for each user account added. In addition, user account market data subscriptions are tied to and cannot vary from that of the account holder.

So, whatever you already have your primary account, gets doubled onto the 2nd user.
I suppose it would free if you weren't paying for any real-time data, but that would seem unusual.

Not a huge deal, and I get the benefit and almost necessity; but, please clarify if I am misunderstanding.

Thanks,
Ken

You could use the second account (Without any special data feed) for Quantopian trading and the main account with the data feed for day trading. So far the only data feed I really pay are the Earnings calendar and basic fundamentals all other you get free if you trade enough

I don't think you can do that, different data for different accounts. It says "In addition, user account market data subscriptions are tied to and cannot vary from that of the account holder".

I still pay for the new "US Value Bundle" as you noted, I'm not trading enough :).
So, yeah maybe free it you trade a lot. I could see that.