Package: python-nexo
Unofficial Nexo API Wrapper (Python)✨ A Python wrapper for the Nexo Pro API ✨Report Bug·Request FeatureAbout Nexo 💸Nexo is a crypto lending platform that lets you borrow crypto or cash by placing your crypto as collateral. They offer high APY on holdings based on loyalty tier (the more Nexo token you hold the higher your tier). You can earn your interests in the same kind of your holding or as Nexo tokens. As an example, stablecoins can earn up to 12% APY. Bitcoin and Ethereum, 8%.Unfortunately, Nexo doesn't offer some automated way of buying periodically. All you can do is setup a bank transfer and then convert/buy manually. This API Wrapper aims to offer a way of automating your purchases. You'd just have to setup your periodic bank transfer to Nexo, and then buy at spot price the coins that you want in an automated way by using the wrapped API calls.Description 📰This is an unofficial Python wrapper for the Nexo Pro exchange REST API v1. I am in no way affiliated with Nexo, use at your own risk.If you came here looking for the Nexo exchange to purchase cryptocurrencies, then go to the official Nexo website. If you want to automate interactions with Nexo, stick around.Click here to register a Nexo accountHeavily influenced bypython-binanceYou can check which endpoints are currently functionalhere✨ Work in Progress🎌 Built with Python🐋 Docker Available🍻 Actively MaintainedRoadmap 🌱See it on Issuehttps://github.com/guilyx/python-nexo/issues/2Checkout theChangelogPreparation 🔎Register a Nexo Account.hereGenerate an API Key in Nexo Pro with the permissions you want.AdvicePriviledge Async Client. The advantage of async processing is that we don’t need to block on I/O which is every action that we make when we interact with the Nexo Pro servers.By not blocking execution we can continue processing data while we wait for responses or new data from websockets.Set it up 💾PIPInstall the pip package:python3 -m pip install python-nexoExplore the API:#### Syncimportnexoimportosfromdotenvimportload_dotenv# Loads your API keys from the .env file you createdload_dotenv()key=os.getenv("NEXO_PUBLIC_KEY")secret=os.getenv("NEXO_SECRET_KEY")# Instantiate Client and grab account balancesc=nexo.Client(key,secret)balances=c.get_account_balances()print(balances)#### Asyncimportnexoimportosimportasynciofromdotenvimportload_dotenvload_dotenv()key=os.getenv("NEXO_PUBLIC_KEY")secret=os.getenv("NEXO_SECRET_KEY")asyncdefmain():client=awaitnexo.AsyncClient.create(key,secret)print(awaitclient.get_account_balances())awaitclient.close_connection()if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())Docker (source)Clone the Project:git clone -b master https://github.com/guilyx/python-nexo.gitMove to the Repository:cd python-nexoCreate a copy of.env.exampleand name it.envFill up your API Key/SecretBuild and Compose the Docker:docker-compose -f docker/docker-compose.yml up- The container should keep running so that you can explore the APIAttach to the docker:docker exec -it $(docker ps -qf "name=docker_python-nexo") /bin/bashRun python in the docker's bash environment:python3From there, copy the following snippet to instantiate a Client:importnexoimportosnexo_key=os.getenv("NEXO_PUBLIC_KEY")nexo_secret=os.getenv("NEXO_SECRET_KEY")assert(nexo_key)assert(nexo_secret)c=nexo.Client(nexo_key,nexo_secret)You can now explore the client's exposed endpoints, for instance:balances=c.get_account_balances()print(balances)Contribute 🆘Open an issue to state clearly the contribution you want to make. Upon aproval send in a PR with the Issue referenced. (Implement Issue #No / Fix Issue #No).Maintainers Ⓜ️Erwin LejeuneBuy me a CoffeeERC-20 / EVM:0xcC1C1E8F5fD3c832d970C8d5A62Ff9dD74259B1fBTC:bc1q0c45w3jvlwclvuv9axlwq4sfu2kqy4w9xx225jDOT:1Nt7G2igCuvYrfuD2Y3mCkFaU4iLS9AZytyVgZ5VBUKktjXDAG:DAG7rGLbD71VrU6nWPrepdzcyRS6rFVvfWjwRKg5LUNC:terra12n3xscq5efr7mfd6pk5ehtlsgmaazlezhypa7g