From 468c7911ab028a68bc4940da21fb3019cf63aea9 Mon Sep 17 00:00:00 2001 From: Jacob Plaster Date: Mon, 3 Dec 2018 14:41:43 +0000 Subject: [PATCH] examples.rest: add get wallets --- bfxapi/examples/rest/get_wallets.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bfxapi/examples/rest/get_wallets.py diff --git a/bfxapi/examples/rest/get_wallets.py b/bfxapi/examples/rest/get_wallets.py new file mode 100644 index 0000000..c9ed271 --- /dev/null +++ b/bfxapi/examples/rest/get_wallets.py @@ -0,0 +1,23 @@ +import os +import sys +import asyncio +sys.path.append('../') + +from bfxapi import Client + +API_KEY=os.getenv("BFX_KEY") +API_SECRET=os.getenv("BFX_SECRET") + +bfx = Client( + API_KEY='zxXi3z6eMnRuW2mjvJSlJ08aqlHDCZbcKlqXWnzdXtF', + API_SECRET='WL6hp6eVboiTW0dYfvIpTrX8HFPioumBoJ1w1FbAEgF', + logLevel='DEBUG', + rest_host='https://test.bitfinex.com/v2' +) + +async def log_wallets(): + wallets = await bfx.rest.get_wallets() + print (wallets) + +t = asyncio.ensure_future(log_wallets()) +asyncio.get_event_loop().run_until_complete(t)