Algorithmic trading API guides: stocks, forex and FIX
What each broker's or platform's own documentation says about access, signing in, orders and limits, with Python examples where they can run without a live account.
Short answer: An algorithmic trading API lets software place orders and read positions on an account you already hold, through REST, a local gateway, a terminal or FIX. Access rules, account types and costs vary by broker and by country, so the first step is to read what the broker documents for your account type before you write any code.
These guides do not recommend a broker. They describe official documentation, read on the date given in each guide. Rules depend on your country and account type, and API access can change, so check the broker's own pages before you build.
Start with how the common routes differ if you have not chosen one, then read the notes for the platform you already use.
- Broker REST and WebSocket APIs
- Desktop gateways and terminals
- FIX
- Forex and futures platforms
- Options
Broker REST and WebSocket APIs
Logins, tokens, paper trading and rate limits on brokers that document a web API.
- Stock trading API: what US brokers document, and the quirksNovember 6, 2026 · 13 min readStock trading API inventory, read 5 November 2026: auth, test environments, rate limits and retry quirks across US brokers, with tested Python for the traps.
- Alpaca API Python: alpaca-py, paper trading and limitsNovember 6, 2026 · 13 min readAlpaca API Python guide: alpaca-py 0.45.0, paper trading keys, stock data plans, WebSocket streams, plus retry and timeout behavior tested on a local mock.
- Schwab API Python: OAuth, token expiry and first requestsNovember 6, 2026 · 12 min readSchwab API in Python: Trader API registration, callback rules, token expiry, schwab-py tested with fake tokens, and a re-login monitor for unattended programs.
- Tradier API: pricing, sandbox limits and order statusNovember 6, 2026 · 13 min readTradier API, read 6 November 2026: API access on every plan, a sandbox with 15-minute delayed data, HTTP 400 rate limits, and why a 200 needs a status check.
Desktop gateways and terminals
Routes where a logged-in desktop program or local gateway sits between your code and the broker, and what that means for software that runs unattended.
- Interactive Brokers API key: who gets one, what it costsNovember 6, 2026 · 13 min readInteractive Brokers API key: individual accounts get none. Route table, OAuth eligibility, paper login, market data costs and the API acknowledgement form.
- Interactive Brokers API Python: setup, orders, failuresNovember 6, 2026 · 13 min readInteractive Brokers API Python guide for ibapi 1052.01: why pip is wrong, ports, threading, order callbacks, pacing and reconnects, tested on a mock socket.
- IBKR Web API vs TWS API: login, restarts and who can use itNovember 6, 2026 · 13 min readIBKR Web API vs TWS API from IBKR's docs read 5 Nov 2026: login, restarts, pacing, eligibility, FIX, three project cases and a map of the moved documentation.
- ib_insync vs ib_async: what changes for a live botNovember 6, 2026 · 13 min readib_insync vs ib_async: ib_insync is frozen at 0.9.86. A reproducible API diff, behavior tests on a mock socket, error 200 handling and a migration checklist.
- MT5 API: what MetaQuotes offers and what third parties addNovember 6, 2026 · 13 min readMT5 API means six different things. A map of MQL5, the Python package, the new MCP server, broker-side Manager and Web APIs, bridges and REST wrappers.
- MT5 Python: orders, filling modes, time zones and LinuxNovember 6, 2026 · 13 min readMT5 Python guide: version 5.0.6231 facts, why order_send returns 10030, a tested filling function, return codes, UTC or server time, Linux and VPS limits.
- MT4 API: MQL4, broker-side APIs and Python routesNovember 6, 2026 · 13 min readMT4 API, checked 6 November 2026: no REST API or Python package from MetaQuotes, MQL4 WebRequest as the official way out, and APIs reserved for brokers.
- MQL5 developer: hiring checklist for an Expert AdvisorNovember 6, 2026 · 13 min readHiring an MQL5 developer? What to put in the specification, why to demand .mq5 source, how MQL5 Freelance rules work, MT4 to MT5 conversion and the red flags.
FIX
A FIX initiator and a local acceptor, tested without a live broker.
Forex and futures platforms
Access rules, practice accounts and the routes each platform documents.
- OANDA API Python: v20 tokens, practice account and limitsNovember 6, 2026 · 13 min readOANDA API Python guide: get a v20 token, practice and live hosts, documented limits and conflicts, v20 binding vs requests, and order handling tested on a mock.
- cTrader API: Open API, FIX, cBots and TradingView routesNovember 6, 2026 · 13 min readcTrader API routes from official pages: Open API app review, tokens and limits, FIX gaps, cBots, TradingView, plus what testing the Python SDK on a mock showed.
- NinjaTrader API: NinjaScript, ATI and the REST routeNovember 6, 2026 · 13 min readDoes NinjaTrader have an API? NinjaScript, ATI files and the REST Trade API compared, Python options, TradingView routes, how to hire a NinjaScript developer.
- Rithmic API: Protocol API, R | API+ and conformanceNovember 6, 2026 · 13 min readRithmic API as read 6 Nov 2026: R | API+, the WebSocket and protobuf Protocol API, Diamond API, dev kit requests, conformance and what is not public.
Options: what changes from stocks
Options add contract symbols, option chains, multi-leg orders and account approval levels to an integration, and option quotes come under their own data licenses.
From Fincode
- Broker API integration services for your own accountServiceTrading broker API integration for your own account over REST, FIX or a gateway: order state, rejects, reconciliation. Your country and broker terms come first.
- Crypto exchange API integration servicesServiceConnect crypto exchange APIs to your app, bot or internal tool: market data, orders and balances, with rate-limit handling, retries, logs and documentation.
- Broker API order management integration: example scenarioExample project scenarioExample scenario: connecting internal tools to a brokerage trading API with an order management layer, permissions, risk checks, audit trail and failover.
- Broker API integration: REST, WebSocket and FIXUpdated November 5, 2026 · 11 min readBroker API integration: REST and WebSocket vs FIX sessions, sequence numbers, execution reports, client order IDs, drop copies and certification tests.
- Stock market data APIs: free tiers, licenses, how to chooseUpdated November 5, 2026 · 13 min readStock market data APIs explained: real-time, delayed and end-of-day data, exchange licenses for commercial use, consolidated feeds, adjustments and a checklist.
Frequently asked questions
Is there a free stock market API?
Yes, with limits. What you may build depends on the exchange license behind the data, and free APIs are usually delayed by at least 15 minutes or limited to personal use. A broker's own API usually needs an account with that broker, and access rules vary by country and account type.
These guides are 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.
Other guides
Send a short project brief
The form or an email is enough. You do not need to share your rules yet.
- The exchange or platform you use
- What the software should do
- Your target timeline
- Project briefs and business inquiriesinfo@fincodelabs.com
- WhatsApp (messages only)+90 545 697 41 15 (opens in a new tab)