-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backend Copy Portfolio Routes #44
Conversation
d021bbe
to
19d02bc
Compare
} | ||
|
||
// CopyPortfolio copies the positions from the target portfolio into the current user's portfolio. | ||
func (os *PortfolioService) CopyPortfolio(currentUserPortfolio models.UserPortfolio, targetPortfolio models.UserPortfolio) (models.UserPortfolio, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we copying the portfolio to the e-trade account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this just has routes to copy portfolios in our own db for now. ETrade endpoints are not working so I'm looking into fixing that + how to make trade orders for securities with the api
backend/src/services/etrade.go
Outdated
@@ -18,8 +17,10 @@ const APIEnv = "apisb" // "apisb" = SANDBOX, "api" = PROD | |||
|
|||
var oauthClient = oauth.Client{ | |||
Credentials: oauth.Credentials{ | |||
Token: os.Getenv("OAUTH_KEY"), | |||
Secret: os.Getenv("OAUTH_SECRET"), | |||
// Token: os.Getenv("OAUTH_KEY"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning for removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to change that, will fix later tn
Description
Adds routes for copying a portfolio.
Adds dummy data for portfolios and positions.
Adds separate GetPortfolio Route for convenience.
How Has This Been Tested?
copy route updates data in db
Checklist