Giter Site home page Giter Site logo

finary_uapi's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar lasconic avatar madeinpierre avatar nmathey avatar varal7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

finary_uapi's Issues

Add tests for create, delete and update resources

Currently, there is no tests for the create, delete and update calls to the API. We need to add those.
It might require another test account where we can safely create, update and delete resources.

Can't signing anymore ?

Hi,

Someone reported me this issue that I'm also able to reproduce.

abc@82ddd3721216:~/workspace/finary_uapi$ python -m finary_uapi signin
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/config/workspace/finary_uapi/finary_uapi/__main__.py", line 452, in <module>
    sys.exit(main())
  File "/config/workspace/finary_uapi/finary_uapi/__main__.py", line 155, in main
    result = signin(args["MFA_CODE"])
  File "/config/workspace/finary_uapi/finary_uapi/signin.py", line 50, in signin
    if xjson["response"]["status"] == "complete":
KeyError: 'response'
abc@82ddd3721216:~/workspace/finary_uapi$ 

Crowdlendings

Bonjour
Serait-il possible de récupérer les données de la section Crowdlending ?

Get dividends

Finary+ users can get dividend calendar. Let's search for the API endpoint and add a function.

Access to shared portfolio

The "share your portfolio" feature implementation has changed and so it doesn't work anymore. I will remove it and I open this issue to track interest for a new implementation.

Apparently, the new implementation will pass the sharing_link_id and optionally the access_code to all API calls. The access_code can be validated with a GET https://api.finary.com/users/me/sharing_links/{SHARING_LINK_ID}/validate?access_code={ACCESS_CODE}

START-UPS / PME / PRIVATE EQUITY

Hello,

Thanks again for the work done on CROWDFUNDING implementation.
It would be great to do the same with start-ups / PME / PRIVATE-EQUITY investments. With the possibility to delete/update the same way.

Regarding fractionnal real estate like Bricks or RealT. What do you think ? How should we take it into account in Finary ? Through regular estate investment with a % or through crowdlending/crowdfunding just like I've been doing so far.

Thanks !

Add better currency support in checking/saving accounts

Currently, when we create an account we use the following:
https://github.com/lasconic/finary/blob/0097c080a6da0f181594a05cc3407e298d0c93c9/finary_api/holdings_accounts.py#L30

 "currency" : {"code": "EUR"}

It works (even with "USD" for example) but the Web UI currently uses:

 "currency" : {"id": 1}

where id is the id of the currency as returned by the currency API.

We need to provide a way to search a currency by code, get the ID and use it. The command line should get an argument with a code (and we do the lookup) or an id (and we check if it's a numeric value ?).

Import/update real estate data?

Hi,

Thinking about making a POC for integrating RealT data into Finary.
Do you think it is feasible via your work and your knowledge of Finary API?

Add crowdlending projects

Bonjour,

je souhaiterais ajouter des entrées liées à des projets crowdfunding ou crowdlending présentés dans un tableur Excel. Quelle fonction dois-je utiliser ?

Merci.

Stef

Add CRUD support for the generic assets

  • Get the "others" assets
    Via views, like the web UI
GET https://api.finary.com/users/me/views/other_assets?period=all

Via the CRUD endpoint ?

GET https://api.finary.com/users/me/generic_assets
  • Get the "others" assets categories
GET https://api.finary.com/generic_asset_categories/autocomplete 
  • Create a generic asset
POST  https://api.finary.com/users/me/generic_assets
{
  "name": "test",
  "category": "real_estate_crowdfunding",
  "quantity": "1",
  "buying_price": "1",
  "current_price": "1"
}
  • Update a generic asset
PUT https://api.finary.com/users/me/generic_assets/<asset_id>
{
  "name": "test",
  "category": "g3f",
  "quantity": "2",
  "buying_price": "2",
  "current_price": "2",
  "id": <asset_id>
}
  • Delete a generic asset
DELETE https://api.finary.com/users/me/generic_assets/24862

return HTTP code 204 if successful (and no json)

3rd party platform integration: via importer or separate project integrating finary_uapi?

Hi

Thinking about next step of using finary_uapi to sync (add/update/delete) a RealT wallet with Finary.
From your point of view, what would be the best: handling it via creating a specific importer like you did for CSV file import or would be better to start a separate project depending on finary_uapi?

Basically interactions with RealT ecosystems will be with RealT Community API to get latest token data (monthly rent, value, etc.) and the Gnosis blockchain to get current RealT Token list own.

Add tests for utils/convenience functions

There are several utils functions in the project such as

get_cryptocurrency_by_code
get_bank_account_type_per_name
guess_security
add_user_security_by_symbol
add_user_security_by_symbol_to_account
add_user_security_to_account
add_imported_securities_to_account
get_holdings_account_per_name_or_id
add_checking_saving_account
add_user_crypto_by_code
get_user_crypto_by_code
update_user_crypto_by_code
delete_user_crypto_by_code

They need to be tested. The GET ones can be tested on the share demo account. The POST/add ones... to be defined.

`/auth/signin` will soon be retired

The eng lead at Finary just announced on the community forum that /auth/signin will soon be retired in favor of a new system. I open this issue to gather information about the new system in place.

Add support for Organisation

With the introduction of family mode and soon the holding/enterprise feature, Finary changed all the calls in the webUI and probably the app (I didn't test) from /users/me/XXX to organisations/<organisation_id>/XXX. We would need a nice way to handle that in the API wrapper and on the command line. So far /users/me/XXXis not deprecated but Finary could decide to remove it anytime

The not nice solutions I can think of :

  • Adding --org-id as an option for all the command. Command line user will call finary_uapi organisations to get org id and then call the functions they want...
  • For each user_ functions do a call a first call to users/me/organizations to get the main org and do the call with its id. (not nice because we can't get the results for other orgs)

A first step:

Add "supported crypto chains" command

GET https://api.finary.com/crypto/chains

{
  "result": [
    {
      "id": "eth",
      "community_id": 1,
      "name": "Ethereum",
      "native_token_id": "eth",
      "logo_url": "https://static.debank.com/image/chain/logo_url/eth/42ba589cd077e7bdd97db6480b0ff61d.png",
      "wrapped_token_id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
    },
    {
      "id": "bsc",
      "community_id": 56,
      "name": "BSC",
      "native_token_id": "bsc",
      "logo_url": "https://static.debank.com/image/chain/logo_url/bsc/7c87af7b52853145f6aa790d893763f1.png",
      "wrapped_token_id": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
    },
    {
      "id": "xdai",
      "community_id": 100,
      "name": "Gnosis",
      "native_token_id": "xdai",
      "logo_url": "https://static.debank.com/image/chain/logo_url/xdai/8b5320523b30bd57a388d1bcc775acd5.png",
      "wrapped_token_id": "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d"
    },
    {
      "id": "matic",
      "community_id": 137,
      "name": "Polygon",
      "native_token_id": "matic",
      "logo_url": "https://static.debank.com/image/chain/logo_url/matic/d3d807aff1a13e9ba51a14ff153d6807.png",
      "wrapped_token_id": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"
    },
    {
      "id": "ftm",
      "community_id": 250,
      "name": "Fantom",
      "native_token_id": "ftm",
      "logo_url": "https://static.debank.com/image/chain/logo_url/ftm/700fca32e0ee6811686d72b99cc67713.png",
      "wrapped_token_id": "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83"
    },
    {
      "id": "okt",
      "community_id": 66,
      "name": "OEC",
      "native_token_id": "okt",
      "logo_url": "https://static.debank.com/image/chain/logo_url/okt/1228cd92320b3d33769bd08eecfb5391.png",
      "wrapped_token_id": "0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15"
    },
    {
      "id": "heco",
      "community_id": 128,
      "name": "HECO",
      "native_token_id": "heco",
      "logo_url": "https://static.debank.com/image/chain/logo_url/heco/db5152613c669e0cc8624d466d6c94ea.png",
      "wrapped_token_id": "0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f"
    },
    {
      "id": "avax",
      "community_id": 43114,
      "name": "Avalanche",
      "native_token_id": "avax",
      "logo_url": "https://static.debank.com/image/chain/logo_url/avax/4d1649e8a0c7dec9de3491b81807d402.png",
      "wrapped_token_id": "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"
    },
    {
      "id": "op",
      "community_id": 10,
      "name": "Optimism",
      "native_token_id": "op",
      "logo_url": "https://static.debank.com/image/chain/logo_url/op/01ae734fe781c9c2ae6a4cc7e9244056.png",
      "wrapped_token_id": "0x4200000000000000000000000000000000000006"
    },
    {
      "id": "arb",
      "community_id": 42161,
      "name": "Arbitrum",
      "native_token_id": "arb",
      "logo_url": "https://static.debank.com/image/chain/logo_url/arb/f6d1b236259654d531a1459b2bccaf64.png",
      "wrapped_token_id": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
    },
    {
      "id": "celo",
      "community_id": 42220,
      "name": "Celo",
      "native_token_id": "celo",
      "logo_url": "https://static.debank.com/image/chain/logo_url/celo/41da5c1d3c0945ae822a1f85f02c76cf.png",
      "wrapped_token_id": "0x471ece3750da237f93b8e339c536989b8978a438"
    },
    {
      "id": "movr",
      "community_id": 1285,
      "name": "Moonriver",
      "native_token_id": "movr",
      "logo_url": "https://static.debank.com/image/chain/logo_url/movr/4b0de5a711b437f187c0d0f15cc0398b.png",
      "wrapped_token_id": "0x98878b06940ae243284ca214f92bb71a2b032b8a"
    },
    {
      "id": "cro",
      "community_id": 25,
      "name": "Cronos",
      "native_token_id": "cro",
      "logo_url": "https://static.debank.com/image/chain/logo_url/cro/44f784a1f4c0ea7d26d00acabfdf0028.png",
      "wrapped_token_id": "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23"
    },
    {
      "id": "boba",
      "community_id": 288,
      "name": "Boba",
      "native_token_id": "boba",
      "logo_url": "https://static.debank.com/image/chain/logo_url/boba/e43d79cd8088ceb3ea3e4a240a75728f.png",
      "wrapped_token_id": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000"
    },
    {
      "id": "metis",
      "community_id": 1088,
      "name": "Metis",
      "native_token_id": "metis",
      "logo_url": "https://static.debank.com/image/chain/logo_url/metis/b289da32db4d860ebf6fb46a6e41dcfc.png",
      "wrapped_token_id": "0x75cb093e4d61d2a2e65d8e0bbb01de8d89b53481"
    },
    {
      "id": "btt",
      "community_id": 199,
      "name": "BitTorrent",
      "native_token_id": "btt",
      "logo_url": "https://static.debank.com/image/chain/logo_url/btt/2130a8d57ff2a0f3d50a4ec9432897c6.png",
      "wrapped_token_id": "0x197a4ed2b1bb607e47a144b9731d7d34f86e9686"
    },
    {
      "id": "aurora",
      "community_id": 1313161554,
      "name": "Aurora",
      "native_token_id": "aurora",
      "logo_url": "https://static.debank.com/image/chain/logo_url/aurora/c7590fd2defb8e7d7dc071166838c33a.png",
      "wrapped_token_id": ""
    },
    {
      "id": "mobm",
      "community_id": 1284,
      "name": "Moonbeam",
      "native_token_id": "mobm",
      "logo_url": "https://static.debank.com/image/chain/logo_url/mobm/a8442077d76b258297181c3e6eb8c9cc.png",
      "wrapped_token_id": "0xacc15dc74880c9944775448304b263d191c6077f"
    },
    {
      "id": "sbch",
      "community_id": 10000,
      "name": "SmartBch",
      "native_token_id": "sbch",
      "logo_url": "https://static.debank.com/image/chain/logo_url/sbch/d78ac780803e7f0a17b73558f423502e.png",
      "wrapped_token_id": "0x3743ec0673453e5009310c727ba4eaf7b3a1cc04"
    },
    {
      "id": "fuse",
      "community_id": 122,
      "name": "Fuse",
      "native_token_id": "fuse",
      "logo_url": "https://static.debank.com/image/chain/logo_url/fuse/ea4c9e12e7f646d42aa8fb07ab8dfec8.png",
      "wrapped_token_id": "0x0be9e53fd7edac9f859882afdda116645287c629"
    },
    {
      "id": "hmy",
      "community_id": 1666600000,
      "name": "Harmony",
      "native_token_id": "hmy",
      "logo_url": "https://static.debank.com/image/chain/logo_url/hmy/734c003023531e31c636ae25d5a73172.png",
      "wrapped_token_id": "0xcf664087a5bb0237a0bad6742852ec6c8d69a27a"
    },
    {
      "id": "klay",
      "community_id": 8217,
      "name": "Klaytn",
      "native_token_id": "klay",
      "logo_url": "https://static.debank.com/image/chain/logo_url/klay/1df018b8493cb97c50b7e390ef63cba4.png",
      "wrapped_token_id": "0xe4f05a66ec68b54a58b17c22107b02e0232cc817"
    },
    {
      "id": "astar",
      "community_id": 592,
      "name": "Astar",
      "native_token_id": "astar",
      "logo_url": "https://static.debank.com/image/chain/logo_url/astar/398c7e0014bdada3d818367a7273fabe.png",
      "wrapped_token_id": "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720"
    },
    {
      "id": "sdn",
      "community_id": 336,
      "name": "Shiden",
      "native_token_id": "sdn",
      "logo_url": "https://static.debank.com/image/chain/logo_url/sdn/0baaa4ee7cb16feed71119b062ccd277.png",
      "wrapped_token_id": "0x0f933dc137d21ca519ae4c7e93f87a4c8ef365ef"
    },
    {
      "id": "palm",
      "community_id": 11297108109,
      "name": "Palm",
      "native_token_id": "palm",
      "logo_url": "https://static.debank.com/image/chain/logo_url/palm/ece828c59e643b8a8a13aa99145ae7d7.png",
      "wrapped_token_id": "0xf98cabf0a963452c5536330408b2590567611a71"
    },
    {
      "id": "iotx",
      "community_id": 4689,
      "name": "IoTeX",
      "native_token_id": "iotx",
      "logo_url": "https://static.debank.com/image/chain/logo_url/iotx/d3be2cd8677f86bd9ab7d5f3701afcc9.png",
      "wrapped_token_id": "0xa00744882684c3e4747faefd68d283ea44099d03"
    },
    {
      "id": "rsk",
      "community_id": 30,
      "name": "RSK",
      "native_token_id": "rsk",
      "logo_url": "https://static.debank.com/image/chain/logo_url/rsk/2958b02ef823097b70fac99f39889e2e.png",
      "wrapped_token_id": "0x542fda317318ebf1d3deaf76e0b632741a7e677d"
    },
    {
      "id": "wan",
      "community_id": 888,
      "name": "Wanchain",
      "native_token_id": "wan",
      "logo_url": "https://static.debank.com/image/chain/logo_url/wan/f3aa8b31414732ea5e026e05665146e6.png",
      "wrapped_token_id": "0xdabd997ae5e4799be47d6e69d9431615cba28f48"
    },
    {
      "id": "kcc",
      "community_id": 321,
      "name": "KCC",
      "native_token_id": "kcc",
      "logo_url": "https://static.debank.com/image/chain/logo_url/kcc/3a5a4ef7d5f1db1e53880d70219d75b6.png",
      "wrapped_token_id": "0x4446fc4eb47f2f6586f9faab68b3498f86c07521"
    },
    {
      "id": "sgb",
      "community_id": 19,
      "name": "Songbird",
      "native_token_id": "sgb",
      "logo_url": "https://static.debank.com/image/chain/logo_url/sgb/619f46d574d62a50bdfd9f0e2f47ddc1.png",
      "wrapped_token_id": "0x02f0826ef6ad107cfc861152b32b52fd11bab9ed"
    },
    {
      "id": "evmos",
      "community_id": 9001,
      "name": "EvmOS",
      "native_token_id": "evmos",
      "logo_url": "https://static.debank.com/image/chain/logo_url/evmos/26e038b4d5475d5a4b92f7fc08bdabc9.png",
      "wrapped_token_id": "0xd4949664cd82660aae99bedc034a0dea8a0bd517"
    },
    {
      "id": "dfk",
      "community_id": 53935,
      "name": "DFK",
      "native_token_id": "dfk",
      "logo_url": "https://static.debank.com/image/chain/logo_url/dfk/233867c089c5b71be150aa56003f3f7a.png",
      "wrapped_token_id": "0xccb93dabd71c8dad03fc4ce5559dc3d89f67a260"
    },
    {
      "id": "tlos",
      "community_id": 40,
      "name": "Telos",
      "native_token_id": "tlos",
      "logo_url": "https://static.debank.com/image/chain/logo_url/telos/f9f7493def4c08ed222540bebd8ce87a.png",
      "wrapped_token_id": "0xd102ce6a4db07d247fcc28f366a623df0938ca9e"
    },
    {
      "id": "swm",
      "community_id": 73772,
      "name": "Swimmer",
      "native_token_id": "swm",
      "logo_url": "https://static.debank.com/image/chain/logo_url/swm/361526e901cb506ef7074c3678ce769a.png",
      "wrapped_token_id": "0x9c765eee6eff9cf1337a1846c0d93370785f6c92"
    }
  ],
  "message": "OK",
  "error": null
}

All 'annual_yield' are null

Did it even work before or Finary change is API on this reported data?
Reported null on all modules results: Holdings, investments, portfolio, etc.

Add Nexo support

Import from Nexo is not supported by Finary while there's an option to dump all transactions in one single CSV file.
I propose the support in #209

Fetch checking account transactions

Hello!

J'aurais préféré t'envoyer une PR directement, mais looks like I'm stuck...

J'aimerais récupérer les nouvelles transactions dispo sur Finary, mon navigateur utilise l'URL suivante :

https://api.finary.com/organizations/***/users/***/portfolio/checking_accounts/transactions?page=1&per_page=50&institution_id=***

J'ai donc essayé de créer un nouveau fichier user_transactions.py dans finary_uapi en prenant les valeurs utilisées par le call dans le navigateur :

import json
import logging
import requests

from .constants import API_ROOT

def get_transactions_from_account_id(
        session: requests.Session, 
        organization_id: str, 
        user_id: str, 
        institution_id: str, 
        page: int = 1, 
        per_page: int = 50,
    ):
    url = f"{API_ROOT}/organizations/{organization_id}/users/{user_id}/portfolio/checking_accounts/transactions?{page=}&{per_page=}&{institution_id=}"
    x = session.get(url, params={})
    logging.debug(json.dumps(x.json(), indent=4))
    return x.json()

Mais je récupère une réponse vide, alors que le navigateur reçoit bien la liste de transactions :

{'result': [], 'message': 'OK', 'error': None}

J'ai une session valide juste avant le call. Any ideas? 🙏

Minor finary_uapi versioning for bug fix update?

Hi @lasconic ,

Sorry for my ignorance as I'm still learning here :)
While I'm developing an app client to finary_uapi I would liek to keep using the most updated version of it, and especially when there was some bug fixes (mine actually :p)

I think poetry update on my application is focusing on the dependencies version number: if not new version number = not updating.
So I guess we should have minor versioning number updated here for each PR raised/approved/merge?

For instance, finary_uapi current version = "0.1.8" should be update to version = "0.1.8.1" in order me to get the package updated localy?

As a work around for now I updated my pyproject.toml file with
finary-uapi = { git = "https://github.com/lasconic/finary_uapi.git" }

Thanks for your help :)

Handling currencies while adding/updating real estates?

Hi,

I'm trying to figure out how do you handle different currencies while add a security value for instance.
It looks there is a currency json object but API doesn't seem to accept forcing/modifying it.

Reviewing your code for securities, you are requesting holding account (which also has a currency json object) for each securities you want to add.
Can you confirm you are already able to add securities other than your main Finary currency?
If so can you point me the right direction to (try to) adapt it to real estates :)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.