susansli / augury

Augury is a web application that uses AI to help users decide which stocks to buy. In addition, it displays data pertaining to the portfolios the user has saved, such as current valuation of all stocks held.
0 stars 0 forks source link

[User Settings] [Backend] Update portfolio defaults #46

Open susansli opened 1 month ago

susansli commented 1 month ago

Story

As a user, I want to make updates to my portfolio defaults when my preferences change.

Specifications

Create an endpoint that takes an updated default portfolio object and updates the entry for the particular user/

Acceptance

LukarioMC commented 3 weeks ago

Impl in: #84

Endpoint: PUT {{server_url}}/user/portfolio/defaults

Interface:

{
  userId: Types.ObjectId | string;
  name: string; // Portfolio name
  risk?: PortfolioRisk; // Optional risk if `useCustomRisk` is true
  useCustomRisk: boolean; // If true, indicates custom risk settings are used
  customRiskPercentage1?: number; // First custom percentage value if using custom risk
  customRiskPercentage2?: number; // Second custom percentage value if using custom risk
  sectorTags?: Sectors[]; // Array of sector tags
}