jakub-mrow / AMS-backend

0 stars 0 forks source link

Handle cryptocurrencies #79

Closed dawids21 closed 10 months ago

dawids21 commented 12 months ago

We can use the existing model for stocks to handle cryptocurrencies as it requires only minor changes.

  1. Add type: string field to Stock and values: STOCK, CRYPTO. We need to know which stocks are crypto for the proper display on UI
  2. As crypto does not have ISIN we need to change primary key for stocks to ID and change every place where we use ISIN (but we still need to keep ISIN in the DB for import)
  3. Add "dummy" exchange to our DB with CC code and no open hours
  4. As crypto exchange is open 24/7 we need to check the price of crypto at fixed hour (00:00 UTC) (for stocks we check 2-3 hours after exchange was closed)
  5. When adding dividend transaction we should reject if it concerns crypto
  6. Add info about type to an endpoint with info about all stocks (#56)