diff --git a/README.md b/README.md index 8158231..558a977 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,49 @@ Uses their [API](https://www.nordnet.dk/externalapi/docs/api). Thanks to utilities](https://github.com/helmstedt/nordnet-utilities), which helped with implementing this functionality. Exposes the same data as the home page. +## Example Application + +The library ships with an example application in the form of a CLI program that +can display a tree representation of assets in known depositories: + +```bash +python -m fin_depo +``` + +Example output: + +``` +Aggregated + ├─ Kraken + │ ├─ BTC 0.00871009 + │ └─ EUR 200.5 + └─ Kucoin + ├─ Kucoin trade + │ ├─ BTC 0.00169297 + │ └─ USDT 20 + └─ Kucoin main + ├─ BTC 0 + └─ USDT 40 +``` + +## Usage + +Using the Kraken API as an example: + +```python +depo_fetcher = fin_depo.defi_kraken.KrakenDepoFetcher( + KRAKEN_KEY, KRAKEN_SECRET, +) + +depo = depo_fetcher.get_depo() + +depo.assets() +> [BTC, USDT] + +depo.get_amount_of_asset(BTC) +> 0.1 +``` + ## Future extension - [ ] Investment Bank: Saxo Bank OpenAPI diff --git a/setup.py b/setup.py index a3aa115..7f620c0 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,49 @@ Uses their [API](https://www.nordnet.dk/externalapi/docs/api). Thanks to utilities](https://github.com/helmstedt/nordnet-utilities), which helped with implementing this functionality. Exposes the same data as the home page. +## Example Application + +The library ships with an example application in the form of a CLI program that +can display a tree representation of assets in known depositories: + +```bash +python -m fin_depo +``` + +Example output: + +``` +Aggregated + ├─ Kraken + │ ├─ BTC 0.00871009 + │ └─ EUR 200.5 + └─ Kucoin + ├─ Kucoin trade + │ ├─ BTC 0.00169297 + │ └─ USDT 20 + └─ Kucoin main + ├─ BTC 0 + └─ USDT 40 +``` + +## Usage + +Using the Kraken API as an example: + +```python +depo_fetcher = fin_depo.defi_kraken.KrakenDepoFetcher( + KRAKEN_KEY, KRAKEN_SECRET, +) + +depo = depo_fetcher.get_depo() + +depo.assets() +> [BTC, USDT] + +depo.get_amount_of_asset(BTC) +> 0.1 +``` + ## Future extension - [ ] Investment Bank: Saxo Bank OpenAPI