{"id":13628584,"url":"https://github.com/MatissJanis/sls-ynab-stock-updates","last_synced_at":"2025-04-17T04:32:01.038Z","repository":{"id":55744380,"uuid":"158203926","full_name":"MatissJanis/sls-ynab-stock-updates","owner":"MatissJanis","description":"Serverless function to automatically update balance of investment accounts in YNAB","archived":true,"fork":false,"pushed_at":"2022-06-07T18:22:04.000Z","size":929,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-08T19:42:06.779Z","etag":null,"topics":["finance","fintech","investment","serverless","stock","stocks","ynab"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatissJanis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-19T10:36:35.000Z","updated_at":"2024-08-28T04:35:08.000Z","dependencies_parsed_at":"2022-08-15T06:40:50.652Z","dependency_job_id":null,"html_url":"https://github.com/MatissJanis/sls-ynab-stock-updates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatissJanis%2Fsls-ynab-stock-updates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatissJanis%2Fsls-ynab-stock-updates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatissJanis%2Fsls-ynab-stock-updates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatissJanis%2Fsls-ynab-stock-updates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatissJanis","download_url":"https://codeload.github.com/MatissJanis/sls-ynab-stock-updates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249315962,"owners_count":21249866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","fintech","investment","serverless","stock","stocks","ynab"],"created_at":"2024-08-01T22:00:54.237Z","updated_at":"2025-04-17T04:32:00.570Z","avatar_url":"https://github.com/MatissJanis.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# sls-ynab-stock-updates\n\n[![Deploy](https://github.com/MatissJanis/sls-ynab-stock-updates/actions/workflows/deploy.yaml/badge.svg)](https://github.com/MatissJanis/sls-ynab-stock-updates/actions/workflows/deploy.yaml)\n\nServerless function to automatically update investment account balances in YNAB. If the assets are in multiple currencies - tries it's best to convert to the accounts base currency.\n\n## Requirements\n\n- Node\n- NPM\n\n## Installation\n\n```sh\nnpm install\n```\n\n## Setup\n\nThere are a few preliminary steps that must be taken to start using this serverless function.\n\n1. Add information about your portfolio to the YNAB accounts you would like to be tracked.\n\nFormat: `INVESTMENTS: {Stock Symbol} {Amount}, {Stock Symbol} {Amount}...`\n\nExample: `INVESTMENTS: AAPL 191, MSFT 120`\n\nCrypto example: `INVESTMENTS: BTC-EUR 0.09231, XMR-USD 120.3341`\n\n![](setup.png)\n\n2. Create a `serverless.env.yml` environment variable file and copy the existing variables from the example file.\n\n```sh\ncp serverless.env.example.yml serverless.env.yml\n```\n\n3. Set the environment variables\n\n- `YNAB_API_TOKEN`: personal API token generated in the [YNAB homepage](https://app.youneedabudget.com/settings/developer).\n- `AUTOMATIC_APPROVAL`: should the automatic balance adjustment transactions be auto-approved? Useful to set this to `true` if you are running this function hourly/daily/weekly/etc and don't want to go through streams of transactions.\n- `AUTOMATIC_CURRENCY_CONVERSION`: should automatic currency conversion be turned on? Converts to budgets base currency. Useful if, you have assets in multiple currencies and they are all in one account.\n- `ALARM_EMAIL`: what email should be notified if the function starts malfunctioning and throwing errors?\n\n4. Deploy the function\n\n```sh\nnpm run deploy\n```\n\n## Development\n\n1. Define necessary env variables in `serverless.env.yml` (example available in `serverless.env.example.yml`)\n\n2. Run (to run locally)\n\n```sh\nnpm start\n```\n\n## Deployment\n\nIf you wish to run this serverless function on a schedule (configured in `serverless.yml` file), then it must be deployed. This can be done by running the following command.\n\n```sh\nnpm run deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatissJanis%2Fsls-ynab-stock-updates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMatissJanis%2Fsls-ynab-stock-updates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatissJanis%2Fsls-ynab-stock-updates/lists"}