// 01 / problem
Two brokerages, one ledger.
Coinbase and Robinhood each have their own API, schema, and quirks. Anyone trading on both ends up reconciling spreadsheets by hand. The goal: pull both into one Postgres warehouse and treat it like any other operational data — clean, queryable, joinable.
// 02 / approach
Normalize the schema, lean on SQL for analytics.
Extract from each broker's REST API, transform into a unified trades + positions schema in PostgreSQL, then build SQL views on top for realized/unrealized P&L, position-size weighting, and time-windowed returns.
- Per-broker extractors handle API auth, pagination, rate limits
- Normalized schema isolates broker quirks from analytics queries
- Daily refresh job catches new trades incrementally
// 03 / stack
Stack.
Python
Coinbase API
Robinhood API
PostgreSQL
SQL