- Lambda
- CloudFormation
- SSM Parameter Store
- IAM
- DynamoDB
- API Gateway
- Cloudwatch
Get the total return of the portfolio of investments based on the assets returns saved on dynamoDB by the getAssetReturn
function for a specific user
- username
- startDate
- endDate
Returns an array with {cost, profit, return}
for each day in the period between startDate
and endDate
.
Get the return of a specific asset considering the given transactions
(transaction model on the Transactions Project)
- username
- code: Asset's code
- startDate
- endDate
- transactions: array of transactions
Returns an array with {cost, shares, profit, return}
for each day in the period between startDate
and endDate
.
Get the total sales, profit and taxes of your assets grouped by asset type.
- username
- startDate
- endDate
- transactions: array of transactions
Returns an array with {sales, profit, taxes}
grouped by month in the period between startDate
and endDate
and split by the asset types "Stocks" | "REIT" | "BDR"
.
Get the return of the portfolio
- username
- year
Returns an array with portfolio situation by the end of the last working day of the year. The information include {totalCost, shares, averagePrice, return}
for each different asset in the portfolio of username
.
Must provide x-api-key
and Authentication
headers
SSM parameter store variables created by the terraform infrastructure:
tf-aws_account_id
: your aws account idtf-smartinvest_cognito_pool_id
: cognito user pool idALPHA_API_KEY
: alphavantage api key