An exchange is a marketplace where buyers and sellers trade assets. In stock markets, exchanges list securities and provide the market structure from which brokers execute orders. A crypto exchange is usually a private company that combines trading with platform-operated transaction processing and may offer weaker investor protections than regulated stock markets. section 11.4.1
For programmers, an exchange is both a market venue and a data source. Prices originate at exchanges, while data providers aggregate information across venues and expose it through APIs. Different exchanges can impose different APIs, standards, fees, coverage, and data delays, so a reliable collection pipeline requires maintenance and careful venue selection. section 3.5
Separate the venue from the surrounding services:
- Exchange: brings buyers and sellers together and lists or sells assets. section 11.4.1
- Broker: stands between the buyer and seller, executes orders, and may provide access to multiple exchanges. section 11.4.1
- Data provider: collects technical data from exchanges and presents it through a common interface or API. section 3.5
Exchange data in a Python workflow
An international data workflow can query a provider’s exchange list, select the London Stock Exchange, and load historical Rolls-Royce prices into a pandas DataFrame. EODHD reports 77 available exchanges, illustrating why venue coverage matters when building an analysis product. section 3.5.2
Figure 11.4 On an exchange, sellers and buyers can interact directly. A broker is an entity between a buyer and a seller. A broker usually facilitates trading on one or more exchanges.
Use the exchange-versus-broker diagram to trace how market participants, venues, and order execution relate. section 11.4.1
