examples.rest: add get wallets

This commit is contained in:
Jacob Plaster
2018-12-03 14:41:43 +00:00
parent 4fedaee51c
commit 468c7911ab

View File

@@ -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)