Short answer: Interactive Brokers API keys do not exist for individual accounts: the TWS API trusts a logged-in TWS or IB Gateway session, and the retail Web API uses the Client Portal Gateway with a browser login. Consumer keys and RSA keys belong to approved organizations and vendors under OAuth, and the only token an individual generates is the report-only Flex Web Service token. As read on 5 November 2026, IBKR lists no fee for the TWS or Web API, but you need a funded IBKR Pro account, and live market data needs USD 500 in equity plus the subscription cost.
The facts below come from IBKR's documentation and pricing pages, all read on 5 November 2026; where its pages disagree, this guide says so. No IBKR account was available, so nothing here was tried on a real login.
No broker is recommended or ranked and there are no referral links. Account types, API access and rules depend on your country: IBKR's limitations page (opens in a new tab) says Interactive Brokers Canada does not allow client-built order systems for products on Canadian markets, including through third-party platforms. For readers in Turkey, separate rules apply to leveraged FX with foreign firms: the Capital Markets Board said on 23 February 2023 (opens in a new tab) that residents may trade leveraged products only through firms it has authorized (Law No. 6362 (opens in a new tab) Articles 99(4) and 109(2)). Automated trading can lose money.
Does Interactive Brokers have an API key? The route table
Only the approval-based routes involve keys, so what you hold depends on your account type.
| Route | What you hold | Who qualifies | Cost listed by IBKR |
|---|---|---|---|
| TWS API | Your username, password and 2FA, entered in TWS or IB Gateway; programs then open its local socket with a client ID | Funded IBKR Pro account | No API fee listed; market data extra |
| Web API, Client Portal Gateway | The same login, in a browser on the machine running the gateway | Individual accounts | Described as free to all clients; market data extra |
| Web API, OAuth 1.0a, first party | Consumer key, encryption keys and access token from a Self Service Portal | Approved institutions trading their own capital, such as advisors and hedge funds | None listed; apply by email |
| Web API, OAuth 1.0a, third party | The same, plus public keys, a callback URL and a signed Web API agreement | Vendors with an established business and Compliance approval | None listed; apply by questionnaire or email (pages differ) |
| Web API, OAuth 2.0 (beta on one page) | RSA public key of at least 3,072 bits, sent through the secure message center | Licensed organizations, advisors and IBrokers | None listed; apply by email |
| FIX | A dedicated FIX session user | USD 10,000 minimum equity to apply, then vetting and certification | Monthly minimum commission: USD 1,500 for the first session, USD 1,000 for each further one |
| Flex Web Service (reports only) | A token from Client Portal, valid from 6 hours to 1 year, optionally limited to IPs | Account holders | None listed |
| AI Integration (MCP) (opens in a new tab) | A login on IBKR's own screen, authorized from an MCP-capable AI tool; no key | Active IBKR account; automated execution is a separate add-on with its own limits | No extra connection fee, per IBKR |
IBKR's registration page (opens in a new tab) says: "OAuth 2.0 is not available to Individual account structures." So how to create an Interactive Brokers API key has no answer for a retail account. A third-party package that advertises key-based login is not an IBKR route, so check what it does with credentials.
IBKR estimates (opens in a new tab) 2 to 3 weeks of screening, 3 to 6 weeks of Compliance review and 3 to 5 weeks for agreement and setup, which is 8 to 14 weeks if run in sequence.
One conflict: the Web API introduction (opens in a new tab) says authorization uses OAuth 2.0, while Getting Started (opens in a new tab) sends retail clients to the gateway; the registration page settles it for individuals.
How to get Interactive Brokers API access as an individual
Open and fund an IBKR Pro account, then switch the API on in your own software; IBKR says (opens in a new tab) funded clients can use the Web API's trading features without an approval process.
- Account. It must be open, funded and IBKR Pro. The Web API changelog (opens in a new tab) says the gateway blocks IBKR Lite and fractional order submissions from 30 October 2026. The message that API support is not available for accounts with commission-free trading means Lite (opens in a new tab), or a switch to Pro that has not taken effect yet; that happens after the daily server reset.
- Two-factor method. Supported (opens in a new tab): IB Key, Handy Key, SMS and Digital Security Card+. Not supported: Security Code Card, Temporary Security Code Card and Online Code Card.
- Trading permissions. They are held per username and per security type, so a request can fail on a product you never enabled.
- TWS API. In TWS, enable ActiveX and Socket Clients (IBKR says it is automatic in IB Gateway) and check the socket port. Read-Only API is on by default (opens in a new tab) and blocks every API order until you clear it.
- Web API. Run the Client Portal Gateway (it needs Java), log in at https://localhost:5000, then initialize a brokerage session.
Choosing between them is in IBKR Web API vs TWS API, and working code in Interactive Brokers API Python.
Interactive Brokers paper trading API key: there is none
Paper access uses a separate paper username and password, not a key, and it still depends on an open, funded live account.
You find the username in Client Portal (opens in a new tab) under Settings, then Paper Trading Account, where you can also reset the password. Set a password that differs from the live one: IBKR's TradingView FAQ (opens in a new tab) attributes the login error Failed to generate sso dh token to indistinct live and paper details. On the TWS API, the same socket code reaches paper simply because TWS or IB Gateway was logged in with paper credentials, usually on a different port.
Market data can be shared (opens in a new tab) from a live user to one paper account, but a paper session loses it (opens in a new tab) if that live user logs in to Client Portal. And IBKR warns that paper relies on more simulated technology than live, so order execution may differ.
Interactive Brokers API cost and pricing on 5 November 2026
The money goes to market data, charged per username, and to FIX minimums if you take that route; IBKR lists no separate fee for the TWS or Web API.
| Item | Non-professional | Professional |
|---|---|---|
| NYSE (Network A/CTA) top of book | USD 1.50 | USD 45.00 |
| NYSE American, ARCA, BATS, IEX, regionals (Network B) top of book | USD 1.50 | USD 25.00 |
| NASDAQ (Network C/UTP) top of book | USD 1.50 | USD 25.00 |
| Quote Booster pack: 100 more Level 1 lines, 1 more depth line | USD 30.00 | USD 30.00 |
| Minimum equity for an individual account (not a fee) | USD 500 plus subscription cost | USD 500 plus subscription cost |
Hypothetical example. A script needs top-of-book US stock quotes from all three networks. As a non-professional that is 3 x USD 1.50 = USD 4.50 a month, so USD 504.50 must be in the account to activate it. As a professional it is 45 + 25 + 25 = USD 95.00, about 21 times as much. A second username pays again.
Conditions that change the budget:
- Status. IBKR says (opens in a new tab) all users start as professional until an individual changes it in Client Portal, and that companies and accounts used beyond personal investing count as professional. A tool built under a company account belongs in the right-hand column.
- Billing. Fees are not pro-rated (opens in a new tab), and that page says customers without enough cash for them will have positions liquidated and accounts below USD 500 in equity lose market data. Funding takes effect the next business day (opens in a new tab), so same-day subscriptions wait.
- No extra subscription. The introduction (opens in a new tab) names forex and crypto; the third-party FAQ names forex, bonds and index CFDs.
- Delayed data. Free where offered; the pages differ. The TWS API page (opens in a new tab) gives 15 to 20 minutes and includes NYSE and NASDAQ stocks; the pricing page says usually 10 to 20 minutes and that Interactive Brokers LLC clients no longer get delayed US equity quotes.
- On-platform data. Free quotes in TWS are often not available on the API (opens in a new tab). The pricing page advertises free Cboe One and IEX streaming without mentioning the API, and the TWS API limitations page (opens in a new tab) says live API data needs a paid subscription, so budget as if that feed does not reach your code.
- Lines. Every user starts with 100 market data lines (opens in a new tab), shared between TWS and API connections.
- Bundles. The pricing page also lists a bundle route to the same networks that adds US options, with a commission waiver on part of the fee.
What you may do with the data is a licensing question, covered in stock market data API. IBKR's download page also prohibits using the TWS API to pass market data to third parties without its prior written approval.
Market Data API Acknowledgement: the form behind not-subscribed errors
Sign it once in Client Portal, because without it API market data requests fail as not subscribed even when you paid for the data.
The form (opens in a new tab) applies to the TWS API, the Web API and third-party software. It may appear under the notification bell; otherwise go to Settings, Market Data Subscriptions, and open the Market Data API Acknowledgement box. Then log out of all active platforms and log back in, so the next API session picks it up.
| Code | Meaning | First check |
|---|---|---|
| 354 | Requested market data is not subscribed | Subscription on this username, and the acknowledgement |
| 10089 | API data requires a subscription | You hold the on-platform version only |
| 10186 | Not subscribed, and delayed data is not enabled | Request delayed data explicitly, or subscribe |
| 10197 | No market data during a competing session | Live and paper sessions both asking for the same data |
US futures add a second form. The API User Activity Certification (opens in a new tab) is assigned the day after a first API trade with US futures permissions, to comply with CME Rule 576, and it asks which software generates your orders and who operates it.
Session limits that a key would not remove
IBKR allows one brokerage session per username at a time, so plan usernames and restarts before writing code.
- One brokerage session per username. TWS, Client Portal, IBKR Mobile and the Web API compete (opens in a new tab) for it. A second username is free to create, but market data is charged again for it.
- Restarts. TWS and IB Gateway are designed to restart daily (opens in a new tab); with auto-restart they can run about a week before someone must log in again. IBKR's pages disagree on the day: the download page and FAQ point to the Saturday night reset and Sunday, while the reauthentication page (opens in a new tab) says the weekly cycle starts on Monday.
- Gateway login. IBKR does not support automating (opens in a new tab) the Client Portal Gateway login, which is needed daily, in a browser on the same machine as the gateway.
- No headless mode. TWS and IB Gateway need a login window. This guide gives no help bypassing login or 2FA: IBKR does not support it, and it would mean storing the credentials that protect your account.
Who should hold the credentials in a hired project?
You should: give a developer a limited user and paper access, never your own login.
IBKR describes limited-permission users (opens in a new tab) that let a developer work on a live account without withdrawal access or direct trading access; you request one from its Account Configuration team. Keep real logins out of chat and code, and treat a Flex token like a password, since it reads reports for every linked account in its queries. Username IP restrictions (opens in a new tab) are available to all customers and take 1 to 2 business days. Storage and rotation advice is in API key security for trading bots, and integration design in broker API integration.
A hosted vendor asking for your username and password is not using IBKR's third-party Web API route, which is OAuth 1.0a. For integration work in general, see exchange API integration; naming IBKR here does not mean Fincode integrates it or has built on it.
Frequently asked questions
How do I get an Interactive Brokers API key?
An individual account does not get one. You log in to TWS, IB Gateway or the Client Portal Gateway instead; keys exist only on OAuth routes for approved organizations and vendors, as read on 5 November 2026.
Is the Interactive Brokers API free?
IBKR describes the Web API's trading features as free to its clients and lists no TWS API fee. Market data is charged per username, and FIX has monthly minimum commissions of USD 1,500 for the first session.
Can an individual use OAuth with Interactive Brokers?
Not OAuth 2.0, which IBKR's registration page excludes for individual account structures. OAuth 1.0a is listed for institutions and third-party software developers, subject to approval.
Why does the API say market data is not subscribed after I paid?
Usually the Market Data API Acknowledgement is unsigned, the subscription sits on another username, or you hold a version that covers TWS only. Sign the form, then log out of all platforms and back in.
Can I avoid logging in every day?
On TWS and IB Gateway, auto-restart can stretch this to about a week. IBKR does not support automating the Client Portal Gateway login, and OAuth is the fully programmatic route for those who qualify.
Sources
- IBKR Web API: Authentication introduction (methods and supported account types) (opens in a new tab)
- IBKR Web API: OAuth 2.0 Registration Process (opens in a new tab)
- IBKR Web API: OAuth 1.0a first-party Registration Process (opens in a new tab)
- IBKR Web API: Trading Access for Third Parties (onboarding stages and estimates) (opens in a new tab)
- IBKR Web API: Trading Access for Individuals (opens in a new tab)
- IBKR Web API: Client Portal Gateway FAQ (opens in a new tab)
- IBKR TWS API: Requirements (opens in a new tab)
- IBKR: Market Data Requirements (opens in a new tab)
- IBKR: Market Data API Acknowledgement (opens in a new tab)
- IBKR: Market Data Pricing (non-professional and professional fees, billing notes) (opens in a new tab)
- IBKR: Professional vs Non-Professional market data status (opens in a new tab)
- IBKR FIX: Requirements and Costs (opens in a new tab)
- IBKR Flex Web Service: Enable and Create Access Token (opens in a new tab)
- IBKR TWS API: Error Codes (opens in a new tab)
- SPK (Capital Markets Board): Notice on unauthorized leveraged transactions, 23 February 2023 (Turkish) (opens in a new tab)
This guide is general information about software and markets, not investment, legal or tax advice. Automated trading can lose money, past or backtested performance does not guarantee future results, and the rules that apply depend on your jurisdiction and your exchange's terms. Sources, checks and corrections: see the editorial policy.