All work
Entry 02 of 03
Work
Exchange Integrations
Give quotes from different APIs a common format
Read the walkthrough
- Request a sample quote
- Map the exchange fields
- Store the quote record
Overview
Exchange APIs use their own names for symbols, prices and times. I build Python adapters that translate those fields into a consistent quote record so another part of the bot can consume it.
What it covers
- Market data endpoints
- Symbol mapping
- Price fields
- Timestamp normalization
The adapter boundary
The illustrated exchange returns a pair and its last price. The adapter maps those fields to symbol and price, then stores the observation under the fictional DEMO/UNIT pair.
Map an exchange quote
- Choose one market-data endpoint and save a sample response for the symbol you want to monitor.
- Write a Python adapter that maps the exchange’s symbol, latest price and timestamp to the same fields used by your quote store.
- Test the adapter with a saved response from each supported exchange and verify the time units before ingesting new quotes.