Modeling three markets (BR / US / Crypto) with a single rebalancing engine
Parte de uma série sobre construir o Balance , um app de rebalanceamento de carteira, como dev solo. O Balance começou como um app só do Brasil: tickers da B3, preços em reais, IR brasileiro. Depois vieram ações dos EUA. Depois cripto. O caminho ingênuo teria sido três apps colados — três buscadores de preço, três conjuntos de formulários, três motores de rebalanceamento. Em vez disso, tudo gira…
The Balance app, a portfolio rebalancing tool, was initially developed for the Brazilian market, then expanded to US stocks and cryptocurrencies. To avoid creating separate apps for each market, the developer designed a single app with a core that remains unchanged across markets, and specific features that branch out from a single field, "market".
The app's code differs across markets in four areas: price source, currency symbol, tax rules, and quantity precision. The rebalancing engine, which makes up 90% of the app's logic, remains largely shared across markets, with only minor adjustments for cryptocurrencies.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.