Skip to content

Limit max balance to be used per asset, insufficient balance error #649

@thehapax

Description

@thehapax

Expected Behavior

handle insufficient balance thrown exception more gracefully.
Also requested add method to limit max balance to be used per asset.

Actual Behavior

Digital Lucife®, [4 Aug 2019 at 8:42:51 AM]:
Can you limit max balance to be used per asset ?

Traceback (most recent call last):
File "site-packages\grapheneapi\api.py", line 168, in func
File "site-packages\grapheneapi\rpc.py", line 138, in method
File "site-packages\grapheneapi\rpc.py", line 106, in parse_response
grapheneapi.exceptions.RPCError: Assert Exception: d.get_balance( *_seller, *_sell_asset ) >= op.amount_to_sell: insufficient balance

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "dexbot\worker.py", line 125, in on_block
File "site-packages\events\events.py", line 95, in call
File "dexbot\strategies\staggered_orders.py", line 2009, in tick
File "dexbot\strategies\staggered_orders.py", line 239, in maintain_strategy
File "dexbot\orderengines\bitshares_engine.py", line 479, in execute
File "site-packages\graphenecommon\transactionbuilder.py", line 504, in broadcast
File "site-packages\graphenecommon\transactionbuilder.py", line 498, in broadcast
File "site-packages\grapheneapi\api.py", line 176, in func
File "site-packages\bitsharesapi\bitsharesnoderpc.py", line 24, in post_process_exception
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: d.get_balance( *_seller, *_sell_asset ) >= op.amount_to_sell: insufficient balance

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions