Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lasconic/finary_uapi
https://github.com/lasconic/finary_uapi
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lasconic/finary_uapi
- Owner: lasconic
- License: mit
- Created: 2022-06-16T20:06:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T10:36:36.000Z (9 months ago)
- Last Synced: 2024-04-29T11:43:20.851Z (9 months ago)
- Language: Python
- Size: 551 KB
- Stars: 29
- Watchers: 5
- Forks: 6
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - lasconic/finary_uapi - (Python)
README
Finary Unofficial API wrapper
A simple command line tool to interact with your Finary account.
Finary is a real time portfolio & stocks tracker. It supports precious metal, cryptos, stocks and a lot more.
If you don't already have an account, here is a referral link to sign up: https://finary.com/referral/7a49bf74c6d9cb3fca2a:warning: Use at your own risk. I'm not responsible if you trash your account. :warning:
## Project goals
* Provide a command line tool to do a large part of what you can do on Finary website
* Automate some requested features not yet implemented by finary like CSV import/export## Quick start
1. Install requirements. `pip install finary_uapi`.
2. Copy paste the `credentials.json.tpl` file to `credentials.json` and file your username and password.
3. Run `python -m finary_uapi signin`
4. You are good to go and can explore the API. Run `python -m finary_uapi` for available commands.
5. Try `python -m finary_uapi me` or `python -m finary_uapi investments`.
6. If you get errors about being unauthorized, you need to signin again.## Usage
Run ``python -m finary_uapi` for an up to date version.
```
Usage:
finary_uapi signin [MFA_CODE]
finary_uapi me
finary_uapi institution_connections
finary_uapi organizations
finary_uapi timeseries
finary_uapi checking_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=]
finary_uapi fonds_euro
finary_uapi startups
finary_uapi investments
finary_uapi investments dividends
finary_uapi investments transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=]
finary_uapi crowdlendings
finary_uapi crowdlendings distribution
finary_uapi crowdlendings add
finary_uapi crowdlendings delete
finary_uapi cryptos
finary_uapi cryptos distribution
finary_uapi cryptos add
finary_uapi cryptos update
finary_uapi cryptos delete
finary_uapi precious_metals search QUERY
finary_uapi precious_metals
finary_uapi precious_metals add
finary_uapi precious_metals delete
finary_uapi holdings_accounts [crypto | stocks | crowdlending | ]
finary_uapi holdings_accounts add (crypto | stocks | crowdlending)
finary_uapi holdings_accounts add (checking | saving)
finary_uapi holdings_accounts delete
finary_uapi holdings_accounts update []
finary_uapi generic_asset_categories
finary_uapi generic_assets
finary_uapi generic_assets add
finary_uapi generic_assets update
finary_uapi generic_assets delete
finary_uapi crypto_chains
finary_uapi crypto_currency search QUERY
finary_uapi fiat_currency search QUERY
finary_uapi institutions search QUERY
finary_uapi securities search QUERY
finary_uapi securities
finary_uapi securities add
finary_uapi securities delete
finary_uapi insights
finary_uapi loans
finary_uapi credit_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=]
finary_uapi real_estates
finary_uapi real_estates add rent []
finary_uapi real_estates add []
finary_uapi real_estates update rent
finary_uapi real_estates update
finary_uapi real_estates delete
finary_uapi scpis search QUERY
finary_uapi scpis
finary_uapi watches search QUERY
finary_uapi import crowdlending_csv FILENAME [-d] [-f]
finary_uapi import cryptocom FILENAME [(--new=NAME | --edit=account_id | --add=account_id)]
finary_uapi import nexo FILENAME [(--new=NAME | --edit=account_id | --add=account_id)]
finary_uapi import crypto_csv FILENAME [(--new=NAME | --edit=account_id | --add=account_id)]
finary_uapi import stocks_csv FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] [-d]
finary_uapi import stocks_json FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] [-d]
```## Examples
* List crypto accounts, and display id and name
```
python -m finary_uapi holdings_accounts crypto | jq '.result[] | {id: .id, name: .name}'
```* List investment accounts, and display id and name
```
python -m finary_uapi holdings_accounts stocks | jq '.result[] | {id: .id, name: .name}'
```* Import a CSV file from crypto.com in a new crypto account on Finary. Replace the filename and the account name
```
python -m finary_uapi import cryptocom crypto_transactions_record.csv --new Crypto.com
```* Import a generic CSV file (see tests directory for a sample) in a new crypto account on Finary.
Replace the filename and the account name.
```
python -m finary_uapi import crypto_csv cryptodump.csv --new MyLovelyExchange
```* Create a "Compte d'épargne' with a 1000€ balance at BNP Paribas
```
python -m finary_uapi holdings_accounts add checking testchecking "BNP Paribas" "Compte d'épargne" 1000
```* Print gross wealth
```
python -m finary_uapi dashboard gross all | jq '.result["total"]["amount"]'
```## TODO
* See [Issues](https://github.com/lasconic/finary/issues)
* Tests :smile:
* More typing hints
* CSV export. Use pandas ?
* Write, update, delete for Loans, Real estates, SCPIs are entirely TODO
* Precious metal update
* Interactive command line (it would make automation less fun, but manual use easier)### Remarks for finary devs
* Delete responses should be normalized, sometimes we get json back sometimes nothing but the 204 HTTP code.## Contributors ✨
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
Thanks go to these people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Nicolas Froment
📆 📣 💻 🐛 🤔 📖
Victor Quach
💻
NickFR
💻
Clémence Lesné
💻
OxyFlax
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!