From 2aa6203898705c7dc830020b5608fbc426d8d8a1 Mon Sep 17 00:00:00 2001 From: takunomi-build-bot Date: Fri, 29 Nov 2024 00:45:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Repository=20layout=20updated=20?= =?UTF-8?q?to=20latest=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit was automatically generated by a script: https://gitfub.space/Jmaa/repo-manager --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) 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