update readme with updated comments and bitcoinElectrum example
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
32
README.md
32
README.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://drone.stevenpolley.net/steven/ynab-portfolio-monitor)
|
[](https://drone.stevenpolley.net/steven/ynab-portfolio-monitor)
|
||||||
|
|
||||||
Track your securities in YNAB for account types and update your balance automatically. For each configured account, it will update the balance from your broker in YNAB every 6 hours by creating / editing a transaction named "Capital Gains or Losses". On days that exchanges are closed, it will not do anything. The end result is that there will be transaction each day with payee "Capital Gains or Losses" in YNAB for each account you configure, which allows tracking your account balance over time.
|
Track your assets in YNAB and update your balance automatically. For each configured account, it will update the balance in YNAB every 6 hours by creating / editing a transaction named "Capital Gains or Losses". On days that exchanges are closed, it will not do anything. The end result is that there will be transaction each day with payee "Capital Gains or Losses" in YNAB for each account you configure, which allows tracking your account balance over time.
|
||||||
|
|
||||||
It syncs your balance like magic!
|
It syncs your balance like magic!
|
||||||
|
|
||||||
@@ -12,8 +12,6 @@ It syncs your balance like magic!
|
|||||||
|
|
||||||
### Architecture
|
### Architecture
|
||||||
|
|
||||||
No bloat, uses only the standard library, separate all integrations into their own package.
|
|
||||||
|
|
||||||
#### Main Package
|
#### Main Package
|
||||||
|
|
||||||
Each account provider / integration is defined in its own package and adheres to the interface specified in accountProviders.go. When the program starts, init() inside main.go attempts to configure all providers, and uses providers where configuration succeeds and ignores providers if configuration fails (eg: missing environment variable or config file). init() will run again if SIGHUP is received to reload configuration.
|
Each account provider / integration is defined in its own package and adheres to the interface specified in accountProviders.go. When the program starts, init() inside main.go attempts to configure all providers, and uses providers where configuration succeeds and ignores providers if configuration fails (eg: missing environment variable or config file). init() will run again if SIGHUP is received to reload configuration.
|
||||||
@@ -38,6 +36,7 @@ By convention, these methods are implemented in a file called providerImpl.go in
|
|||||||
The following providers are currently available:
|
The following providers are currently available:
|
||||||
|
|
||||||
* bitcoin
|
* bitcoin
|
||||||
|
* bitcoinElectrum
|
||||||
* questrade
|
* questrade
|
||||||
* staticjsonFinnhub
|
* staticjsonFinnhub
|
||||||
* staticjsonYahooFinance
|
* staticjsonYahooFinance
|
||||||
@@ -57,22 +56,21 @@ services:
|
|||||||
|
|
||||||
ynab-portfolio-monitor:
|
ynab-portfolio-monitor:
|
||||||
image: registry.stevenpolley.net/ynab-portfolio-monitor:latest
|
image: registry.stevenpolley.net/ynab-portfolio-monitor:latest
|
||||||
restart: always
|
|
||||||
environment:
|
environment:
|
||||||
- TZ=America/Edmonton
|
- TZ=America/Edmonton # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
- questrade_refresh_token=4dsO6652dS3cxtcctscd3ds4Df2E0
|
- ynab_budget_id=76566452-67ff-4642-99d1-47d752216fb3 # Can get from URL when viewing budget in YNAB
|
||||||
- questrade_account_0=51000001 # TFSA
|
- ynab_secret=98Q_J655F_TAyGnhCCDS4uqRe4R5654DT2d-ZXdssZ # https://api.ynab.com/
|
||||||
- questrade_account_1=51000002 # RRSP
|
- questrade_refresh_token=4dsO6652dS3cxtcctscd3ds4Df2E0 # https://www.questrade.com/api
|
||||||
- questrade_ynab_account_0=731af51e-cb40-4d4a-8094-8654e59e11fc # TFSA
|
- questrade_account_0=51000001 # Account ID of TFSA in Questrade
|
||||||
- questrade_ynab_account_1=78e76e45-2fbe-4ab1-84e9-64ba0996d015 # RRSP
|
- questrade_account_1=51000002 # Account ID of RRSP in Questrade
|
||||||
- ynab_budget_id=76566452-67ff-4642-99d1-47d752216fb3
|
- questrade_ynab_account_0=731af51e-cb40-4d4a-8094-8654e59e11fc # Account ID of TFSA account in YNAB
|
||||||
- ynab_secret=98Q_J655F_TAyGnhCCDS4uqRe4R5654DT2d-ZXdssZ
|
- questrade_ynab_account_1=78e76e45-2fbe-4ab1-84e9-64ba0996d015 # Account ID of RRSP account in YNAB
|
||||||
- bitcoin_address_0=bc1qg0edu4tr7pza8qsxf576r0eulr2ygt3mhldswg
|
- bitcoin_zpub=zpub6qV1y7K8h2R9g4sQmYp5uNc2BvWz1aE3Lr6TtH8FqGz9Ux7eKfV2mJp4Lw8YcR # Master public key is used to derive child addresses with gap limit of 10
|
||||||
- bitcoin_address_1=bc1qeh0dkdqvjyt646657lge0nxqj67z5xa8zxl8q3
|
- bitcoin_spv_server=satoshi.stevenpolley.net:50002 # a public full node and SPV server I run
|
||||||
- bitcoin_address_2=bc1qsfsdqvj4443t64dfssfgexsaqj67z44dsjkfkj
|
- bitcoin_coingecko_api_key=CG-cADc9FSJ4m5mEKN8dLYBPksi # Used for fiat trash conversion - https://www.coingecko.com/en/api
|
||||||
- bitcoin_ynab_account=1f5bec0d-f852-2fbe-bbee-02fa98ded566 # Bitcoin addresses map to single YNAB account
|
- bitcoin_ynab_account=1f5bec0d-f852-2fbe-bbee-02fa98ded566 # Account ID of Bitcoin account in YNAB
|
||||||
volumes:
|
volumes:
|
||||||
- /data/ynab-portfolio-monitor-data:/data
|
- /data/ynab-portfolio-monitor-data:/data # Some providers will not work without a persistent directory, for example OAUTH refresh tokens
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user