Error code 162 - no market data subscription


Hi I’m trying to collect history for ASX stocks.

I’ve followed all steps in Error code 162: Historical Market Data Service error message:No market data permissions as best I can.

I’ve subscribed to market data, including specific to ASX (ASX Total) and shared it with my paper account.

This error occurs for ALL asx listings.
I’ve followed the Market Data Assistant Tool.
I can view many stocks in TWS with no problem.
I’ve upgraded to version 1.6

The only thing I can’t do is the account limit validation https://www.quantrocket.com/docs/#deploy-account-limit-validation because this triggers a MFA/ security code sent to my mobile, which there is no way to enter in jupyter.

Is there a way to input this, along with password when calling

and any other tips to receive data?



For 2 factor auth, you need to open the IB Gateway GUI to complete the login:


For permissions, if you recently enabled them in IB Client Portal, you might need to stop and restart IB Gateway for them to take effect. Also there sometimes seems to be a bit of a delay before IB Gateway is aware you have enabled the permission.


Hi Brian,

Thanks very much for your help!

I’ve followed the account limit validation steps, but despite waiting more than 10 minutes, my account_balance and account_balance_under_limit keys are not displayed.

I followed steps re permissions several days ago. I’ve tried stopping and restarting the gateway.


  1. Still not seeing account balance.

IB provides two usernames for live and paper
How does this relate to credentials in QR?:

I’m definitely subscribed in IB:

  1. I’m now consistently getting error code 200 for ALL ASX listings. This seems unlikely to be anything from Error code 200: No security definition has been found for the request . Except maybe a bug?

  2. I noticed there was a similar, recent issue for non-North American users, that was resolved with later versions???

Can you confirm that ASX history is collectable (for anyone?).

Thanks again.


There are definitely users who are working with ASX. To simplify, try testing with a single security, BHP. See if you can:

collect the listing:

quantrocket master collect -i 4036812

create a db for BHP and collect the history:

quantrocket history create-db 'bhp-1d' -i 4036812 -z '1 day' 
quantrocket history collect 'bhp-1d'

If not, what do the logs say?


Thanks again.

Error code 162

In IB Gateway GUI I’ve got 9 clients, and Market Data Farm is disconnected / red. Is that related?
Any other tips?

IB and quantrocket don’t seem to be matching up for some reason…

FYI, I did use a different email initially for a trial that expired, then signed up with another email. From memory, I may have had the same username for both.

Appreciate your help.


Ultimately it’s just a permission issue. The IB API mirrors Trader Workstation so I recommend logging into Trader Workstation, making sure you can pull up the data there (and that it’s not delayed data), then logging in with the exact same credentials and trading mode in QuantRocket.



after all that, turns out my initial funds had bounced. Now that I’ve sorted that out with IB, working fine.

IB subscriptions also listed as active despite not actually being the case until funds were received (which seems obvious in retrospect!).

Thanks again, @brian, for your patience.