Discussions

Ask a Question
Back to All

Trying deposit & withdraw code

Hello Bluefin Team,

I copy the deposit & withdraw code and run. But it response error as belows. Need help to fix it

Traceback (most recent call last):
  File "/home/bluefin/deposit_n_withdraw.py", line 45, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/bluefin/deposit_n_withdraw.py", line 26, in main
    resp = await client.get_margin_bank_balance()
  File "/usr/local/lib/python3.10/dist-packages/bluefin_v2_client/client.py", line 760, in get_margin_bank_balance
    raise (Exception("Failed to get balance, Exception: {}".format(e)))
Exception: Failed to get balance, Exception: 'data'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdafd58e6e0>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdafd58e980>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fdafd575960>, 2071.017588417)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fdafd58e860>