Skip to main content

Finary API client and command line tool to interact with your Finary account.

Project description

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
    finary_uapi me
    finary_uapi institution_connections
    finary_uapi dashboard net [all | 1w | 1m | ytd | 1y]
    finary_uapi dashboard gross [all | 1w | 1m | ytd | 1y]
    finary_uapi dashboard finary [all | 1w | 1m | ytd | 1y]
    finary_uapi portfolio [all | 1w | 1m | ytd | 1y]
    finary_uapi commodities [all | 1w | 1m | ytd | 1y]
    finary_uapi checking_accounts [all | 1w | 1m | ytd | 1y]
    finary_uapi fonds_euro [all | 1w | 1m | ytd | 1y]
    finary_uapi other_assets [all | 1w | 1m | ytd | 1y]
    finary_uapi saving_accounts [all | 1w | 1m | ytd | 1y]
    finary_uapi real_estates [all | 1w | 1m | ytd | 1y]
    finary_uapi startups
    finary_uapi investments
    finary_uapi cryptos
    finary_uapi cryptos add <code> <quantity> <price> <account_id>
    finary_uapi cryptos update <code> <quantity> <price> <account_id>
    finary_uapi cryptos delete <code> <account_id>
    finary_uapi precious_metals search QUERY
    finary_uapi precious_metals
    finary_uapi precious_metals add <name> <quantity> <price>
    finary_uapi precious_metals delete <commodity_id>
    finary_uapi holdings_accounts [crypto | stocks | <account_name>]
    finary_uapi holdings_accounts add (crypto | stocks) <account_name>
    finary_uapi holdings_accounts add (checking | saving) <account_name> <bank_name> <account_type> <balance>
    finary_uapi holdings_accounts delete <account_id>
    finary_uapi holdings_accounts update <account_id> <account_name> [<account_balance>]
    finary_uapi generic_asset_categories
    finary_uapi generic_assets
    finary_uapi generic_assets add <name> <category> <quantity> <buying_price> <current_price>
    finary_uapi generic_assets update <asset_id> <name> <category> <quantity> <buying_price> <current_price>
    finary_uapi generic_assets delete <asset_id>
    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 <code> <quantity> <price> <account_id>
    finary_uapi securities delete <security_id>
    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)]
    finary_uapi import stocks_json FILENAME [(--new=NAME | --edit=account_id | --add=account_id)]

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
  • 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

Thanks go to these people (emoji key):

Nicolas Froment
Nicolas Froment

📆 📣 💻 🐛 🤔 📖
Victor Quach
Victor Quach

💻
NickFR
NickFR

💻
Clémence Lesné
Clémence Lesné

💻
OxyFlax
OxyFlax

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finary_uapi-0.2.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

finary_uapi-0.2.1-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file finary_uapi-0.2.1.tar.gz.

File metadata

  • Download URL: finary_uapi-0.2.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

File hashes

Hashes for finary_uapi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d21e682b1464c2dc8f366515ae905be828b2ff341cfe0d4d675bdad9fab0edc8
MD5 288d8c5ea26e9662453126c073e21571
BLAKE2b-256 91dddb6b2d1835ba46988eb30ade15f7e9901d2f7f96139fbe45c0559046af31

See more details on using hashes here.

File details

Details for the file finary_uapi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: finary_uapi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

File hashes

Hashes for finary_uapi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 550dcd70bb21afa01f5c1fd1ba5e631c1f50e32a6e39f53e8dffe867fbfb146e
MD5 cbfb4454eecb840d59c43436a7c1415c
BLAKE2b-256 52462b8277d95ad85cc116f64a1997039565d61f6eaef485a5f5b19a2facd9c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page