foreign exchange is decentralized, free order book feeds are available through broker demo environments, developer APIs, or retail sentiment snapshots rather than a single public exchange tape.MetaTrader 5 Python Integration (Best for Rapid Prototyping)
If you already run the MT5 desktop terminal on Windows or Linux (via Wine), the official MetaTrader5 Python package provides direct programmatic access to the terminal's internal Depth of Market. Need to a demo account with an MT5 broker that supports Market Depth on raw/ECN accounts.