This repository provides functionality to create a sankey chart. This outputs a text file that is designed to be copy and pasted into SankeyMatic or a similar tool.
In order to use this you need your YNAB API key as well as the budget id of the budget you want to work with.
To get the budget id run the following command and grab the corresponding id.
curl -H "Authorization: Bearer <ACCESS_TOKEN>" https://api.ynab.com/v1/budgets
Then open ynab_sankey.py
and update the following two lines at the top:
# User inputs
api_key = 'yourapikeyhere'
budget_id = 'yourbudgetidhere'
To run the script:
python ynab_sankey.py