After some thinking, it may not be best to have the forex rate stored in the trade_opportunity table. The trade_opportunity currently has quote prices, and there are two rates that can possibly for any given bot. We can associate each trade_opportunity record with either one or two forex_rate records, which will give the quote per USD rates.
We can then update the forex_rate table on every poll. If at some point the forex turns into a separate service of some sort, the db structure to support that will be readily available.
After some thinking, it may not be best to have the forex rate stored in the
trade_opportunity
table. The trade_opportunity currently has quote prices, and there are two rates that can possibly for any given bot. We can associate eachtrade_opportunity
record with either one or twoforex_rate
records, which will give the quote per USD rates.We can then update the
forex_rate
table on every poll. If at some point the forex turns into a separate service of some sort, the db structure to support that will be readily available.Proposal 1
trade_opportunity
forex_rate
Proposal 2
trade_opportunity
forex_rate