Giter VIP home page Giter VIP logo

dexbot's People

Contributors

bitphage avatar bitprofessor avatar codapetri avatar disturbedtk avatar dls-cipher avatar dominic22 avatar froooze avatar g3d avatar gabev avatar ihaywood3 avatar joelvai avatar juhanihaapala avatar kristerv avatar markopaasila avatar mauritsvdvijgh avatar mikakoi avatar nikolaybaychenko avatar permiebts avatar slade991 avatar svdev avatar thehapax avatar xeroc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dexbot's Issues

Crash on pause worker

Version 0.1.2, run from cli with python3 ./app.py

I created a new worker (Add bot) normally with:

  • an existing account with both assets (BTS and USD)
  • active private key
  • dynamic price
  • 2.0% spread

The bot created orders successfully. It crashed when I tried to pause worker with the message: Muistialueen ylitys (luotiin core-tiedosto), which apparently translates to segmentation fault.

Next run it started successfully, and on "edit worker" it crashed with the message:

Traceback (most recent call last):
  File "/home/marko/localsoftware/DEXBot/dexbot/views/bot_item.py", line 95, in handle_edit_bot
    edit_bot_dialog = EditBotView(controller, self.botname, self.config)
  File "/home/marko/localsoftware/DEXBot/dexbot/views/edit_bot.py", line 25, in __init__
    center_price_dynamic = self.controller.get_target_center_price_dynamic(bot_data)
AttributeError: 'CreateBotController' object has no attribute 'get_target_center_price_dynamic'
Keskeytetty (luotiin core-tiedosto)

Using Archlinux with Gnome. Installed python dependencies manually with --user switch

General considerations about Market Making strategies.

The purpose of this software

This bot should help any user provide liquidity in any market on the BitShares Exchange free of any additional cost. This has a few implications:

  1. Some users can be online only seldom. The bot should serve them, in order to benefit from the liquidity they can provide.
  2. Some users can have their bots run all the time. They should be able to make use of the on-time.
  3. The bot should serve users that don't know how to use a command line (pc users).
  4. The bot should serve users that only have a command line interface (server use).
  5. As users hold multiple assets, the bot should have the ability to run multiple "bots"; that is, provide liquidity in multiple markets using different accounts for each market.
  6. The strategies provided should ship with conservative and sane defaults, so the casual user can get started with minimal risk.

The Worker Proposal itself imposes some restrictions. Since the project is payed for collectively by BTS holders, the work should not benefit some limited group, but the whole: even those who do not use the software! A typical trading (non-market-making) strategy takes available liquidity off the market. This (possibly) benefits the trader in question, but reduces value from the rest; reduced liquidity is reduced value of the market, and thus the platform sustaining it. Therefore, the software cannot provide strategies that don't add liquidity to markets at all times. The ones left are not many.

Profitability

It can be assumed that no-one will use a Market Making Strategy if it makes a loss. Making a profit will increase the Market Maker's assets and the liquidity he can provide. Therefore all the strategies provided by the software can be described as a "Strategy that attempts to profit by making markets". The different strategies can be classified by how they attempt to make the profit:

  1. Profiting from the inherent spread between lowest sell-price and highest buy-price. Take the spread.
  2. Profiting from the ever-present volatility, especially in cryptocurrencies.

These two require almost no assumptions at all about the future. One benefit of these strategies is that they don't necessarily require constant on-time. They can be successfully maintained a few times a day, or even a week. These strategies therefore suit the purpose of the software perfectly. They can be run by users on laptops or desktops.

Many trading strategies that try to predict the future can also be executed by simultaneously making markets. If you think the value of an asset will dip a little and then rise, you can place buy orders and once they have filled place sell orders at a profit. That way they don't reduce liquidity but increase it. However they require software that is always on, thus practically limited to servers. They are also more risky because they rely on predictions.

Strategies

These strategies will initially be included in the software:

  1. Relative Orders, which tries to benefit from the spread and cope with volatility.
  2. Staggered Orders, which is similar to the Mean Reversal and Order Grid strategies, but designed with cryptocurrencies' massive range in mind. It attempts to benefit from the volatility, (and spread as a side effect)

Both strategies will be tailor suited to BitShares. The strategies will be shipped with sane and conservative defaults.

Allow any Asset as Base

One of the most interesting features of the BitShares DEX is the possibility to trade directly between any two assets. Demand for such markets will likely increase in the future. Once Market Makers can easily bootstrap any market, the possibility might even be exposed in the reference client. Remittance is one example where users might have the need to exchange from some smartcoin to another, where neither is one of the current "base" assets. Another example is a cryptocurrency enthusiast who wants to profit from the fluctuation between two promising coins without circulating over BTC or USD.

DEXBot should also allow the Market Maker to provide liquidity in any market.

Add bot log to the GUI

The GUI should have a place where all the logged messages are displayed.
Timestamp, bot name and the message should be displayed on a single log message.

Error when worker is started (windows version)

First I successfully downloaded the latest version of the windows package (DEXBot-win64.zip version 1.0.6) and replaced the 2 executables. Then I manually created the config.yml with the default content:

node: wss://bitshares.openledger.info/ws

workers: {}

After starting the Dexbot-gui.exe and creating a worker, this was the content of the config.yml:

node: wss://bitshares.openledger.info/ws

workers: {Worker 1: {account: xxxxxx, market: SMART/BTC, module: dexbot.strategies.relative_orders,
strategy: Relative Orders, target: {amount: 5.0, center_price: 0.0, center_price_dynamic: true,
spread: 2.0}}}

Now when i start the worker via the play button, i get the following error in the command screen:

image

Create basic GUI with Qt

GUI should include basic functionality. It should include the ability to create a single bot with set market, account and strategy.

  • Create bot list view
  • Add logic for handling actions (Button presses and such)
  • Create process queue
  • Style the layout based on feedback
  • Add password input dialog
  • Add confirmation dialogs
  • Finish bot adding view and logic

Global settings dialog for GUI

Have a separate page for program-wide configuration. To begin with this is just for issue #47 , but in the future it would contain other options also.

Worker stops placing orders

here is a copy of the log and the terminal, the terminal seems to be repeating the same thing over and over so i havnt copied it all:
dexbot.log

self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 159, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in
[getattr(self.events, callbackname)(x) for x in data["params"][1]]
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 159, in process_market
bitshares_instance=self.bitshares
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/worker.py", line 136, in on_market
self.workers[worker_name].error_onMarketUpdate(e)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/dexbot/dexbot/worker.py", line 134, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
self.update_orders()
File "/home/cryptokong/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
self.cancel_all()
File "/home/cryptokong/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
account=self.account
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
return self.finalizeOp(op, account["name"], "active", **kwargs)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
return self.txbuffer.broadcast()
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
raise e
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
ret, api="network_broadcast")
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
r = self.rpcexec(query)
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
return self.rpc.rpcexec(self, payload)
File "/home/cryptokong/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

Don't allow accounts to have more than 1 private key

The easiest fix for this is to just remove the private key from the database when a worker is removed in the GUI.

This should be temporal fix, later we should add a key/account manager in the GUI

The CLI version can be for now since the keys can be managed in it with uptick.

Let user add a API node

In case the user has a local node, there should be a place to enter it. This could be done in a conf file, but if there are other configuration options in the future, it is natural to have this in the GUI.

can not add worker

Traceback (most recent call last):
File "/home/hiquanta/Documents/git/DEXBot/dexbot/views/create_worker.py", line 90, in handle_save
if not self.validate_form():
File "/home/hiquanta/Documents/git/DEXBot/dexbot/views/create_worker.py", line 75, in validate_form
if not self.validate_account():
File "/home/hiquanta/Documents/git/DEXBot/dexbot/views/create_worker.py", line 54, in validate_account
return self.controller.is_account_valid(account, private_key)
File "/home/hiquanta/Documents/git/DEXBot/dexbot/controllers/create_worker_controller.py", line 63, in is_account_valid
pubkey = format(PrivateKey(private_key).pubkey, self.bitshares.prefix)
AttributeError: 'BitShares' object has no attribute 'prefix'

Multi-OS packaging & CI / Release autobuild

Multi-OS packaging

Implement multi-OS packaging mechanism for:

  • Windows (64-bit)
  • Linux
  • Mac OSX

We will make use of pyinstaller to configure the multi-OS release.

The packaging mechanism should work correctly for each environment using:

$ pyinstaller app.spec -> DEXBot-gui
$ pyinstaller cli.spec -> DEXBot-cli

Continuous Integration & Release autobuild

Implement CI and automatic release build using Travis (for OSX & Linux releases) and Appveyor (for the windows release).

  • Automatic tests should be triggered every time a feature branch is pushed
  • Automatic Github releases' artifacts should be pushed by Travis / Appveyor when a new tagged branch is pushed.

Notifications

  • Pull Request's / branches / tags CI notifications should be sent to the slack's #ci channel

GUI Freeze

Ubuntu 16.04, DEXBot 0.1.12, two Workers.

I paused one Worker (the first). dexbot.log records "Canceling all orders", after which nothing happens. The pointer in in a "clicking hand" over the whole window. Must force window to close, but something still remains running as command prompt doesn't reappear. Here dexbot.info output:

2018-04-12 18:43:44,259 - BTSUSD-2 using account btsusd-2 on unknown - ERROR - Worker initialisation
Traceback (most recent call last):
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 74, in init_workers
    view=self.view
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 37, in __init__
    self.check_orders()
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
    self.update_orders()
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 100, in update_orders
    returnOrderId="head"
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/market.py", line 436, in buy
    tx = self.bitshares.finalizeOp(order, account["name"], "active")
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
    return self.txbuffer.broadcast()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 382, in broadcast
    ret, api="network_broadcast")
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
    r = self.rpcexec(query)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
    return self.rpc.rpcexec(self, payload)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 135, in rpcexec
    reply = self.ws.recv()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_core.py", line 300, in recv
    opcode, data = self.recv_data()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_core.py", line 317, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_core.py", line 330, in recv_data_frame
    frame = self.recv_frame()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_core.py", line 364, in recv_frame
    return self.frame_buffer.recv_frame()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_abnf.py", line 361, in recv_frame
    self.recv_header()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_abnf.py", line 309, in recv_header
    header = self.recv_strict(2)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_abnf.py", line 396, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_core.py", line 434, in _recv
    return recv(self.sock, bufsize)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/websocket_client-0.47.0-py3.5.egg/websocket/_socket.py", line 81, in recv
    bytes_ = sock.recv(bufsize)
KeyboardInterrupt

Order fills just before it is cancelled. Worker jams.

When using a small spread (0.40%) orders get filled very quickly. It happened that an order was filled, and the bot attempted to cancel the opposite order. The opposite order was filled before the "cancel order" reached the blockchain, and the bot couldn't cancel it.

This can be reproduced easily in an active market (BTS:USD) with a small spread (<0.4%).

Console output:

Error in on_market: Assert Exception: maybe_found != nullptr: Unable to find Object

Traceback (most recent call last):
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
    return self.rpc.rpcexec(self, payload)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
    raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 134, in on_market
    self.workers[worker_name].onMarketUpdate(data)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 149, in check_orders
    self.update_orders()
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 81, in update_orders
    self.cancel_all()
  File "/home/dexbotmake/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
    account=self.account
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
    return self.finalizeOp(op, account["name"], "active", **kwargs)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
    return self.txbuffer.broadcast()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
    raise e
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
    ret, api="network_broadcast")
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
    r = self.rpcexec(query)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
    raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 54, in rpcexec
    return self.rpc.rpcexec(self, payload)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 173, in rpcexec
    raise RPCError(ret['error']['message'])
grapheneapi.exceptions.RPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in on_message
    [getattr(self.events, callbackname)(x) for x in data["params"][1]]
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/websocket.py", line 276, in <listcomp>
    [getattr(self.events, callbackname)(x) for x in data["params"][1]]
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/notify.py", line 164, in process_market
    bitshares_instance=self.bitshares
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 136, in on_market
    self.workers[worker_name].error_onMarketUpdate(e)
  File "/home/dexbotmake/dexbot/dexbot/strategies/relative_orders.py", line 70, in error
    self.cancel_all()
  File "/home/dexbotmake/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
    account=self.account
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
    return self.finalizeOp(op, account["name"], "active", **kwargs)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 293, in finalizeOp
    return self.txbuffer.broadcast()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 388, in broadcast
    raise e
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 386, in broadcast
    ret, api="network_broadcast")
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/graphenelib-0.6.1-py3.5.egg/grapheneapi/graphenewsrpc.py", line 213, in method
    r = self.rpcexec(query)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitsharesapi/bitsharesnoderpc.py", line 64, in rpcexec
    raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: Assert Exception: maybe_found != nullptr: Unable to find Object

At this point I forced the bot to close:

^CTraceback (most recent call last):
  File "/home/dexbotmake/dexbot/dexbot/views/worker_item.py", line 61, in pause_worker
    self.main_ctrl.stop_worker(self.worker_name)
  File "/home/dexbotmake/dexbot/dexbot/controllers/main_controller.py", line 35, in stop_worker
    self.worker_manager.stop(worker_name)
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 169, in stop
    self.remove_market(worker_name)
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 194, in remove_market
    with self.config_lock:
KeyboardInterrupt
The X11 connection broke (error 1). Did the X11 server die?

Here's the dexbot.log snippet:

2018-04-12 13:08:37,295 - Worker 2 using account dexbot.info on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:08:42,207 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a buy order for 4.733755 USD @ 0.13882062645248552
2018-04-12 13:08:45,785 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a sell order for 46.864547 BTS @ 0.13937702174888825
2018-04-12 13:08:45,939 - Worker 2 using account dexbot.info on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:08:45,962 - Worker 2 using account dexbot.info on BTS/USD - INFO - Canceling all orders
2018-04-12 13:08:51,239 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a buy order for 5.03871 USD @ 0.1388194300564363
2018-04-12 13:08:54,420 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a sell order for 44.6740135 BTS @ 0.13937582055766448
2018-04-12 13:08:57,631 - Worker 1 using account btsusd-2 on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:08:57,653 - Worker 1 using account btsusd-2 on BTS/USD - INFO - Canceling all orders
2018-04-12 13:09:04,200 - Worker 1 using account btsusd-2 on BTS/USD - INFO - Placed a buy order for 23.551810000000003 USD @ 0.13665240179045424
2018-04-12 13:09:09,636 - Worker 1 using account btsusd-2 on BTS/USD - INFO - Placed a sell order for 78.57081500000001 BTS @ 0.13941305637207957
2018-04-12 13:09:09,720 - Worker 2 using account dexbot.info on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:09:09,748 - Worker 2 using account dexbot.info on BTS/USD - INFO - Canceling all orders
2018-04-12 13:09:16,993 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a buy order for 4.7867750000000004 USD @ 0.13778997115947592
2018-04-12 13:09:21,505 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a sell order for 46.488539 BTS @ 0.13834223557294076
2018-04-12 13:09:21,642 - Worker 2 using account dexbot.info on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:09:21,669 - Worker 2 using account dexbot.info on BTS/USD - INFO - Canceling all orders
2018-04-12 13:09:28,272 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a buy order for 5.1081650000000005 USD @ 0.13847404289614598
2018-04-12 13:09:30,148 - Worker 2 using account dexbot.info on BTS/USD - INFO - Placed a sell order for 44.163795 BTS @ 0.13902904908009847
2018-04-12 13:09:30,209 - Worker 1 using account btsusd-2 on BTS/USD - INFO - Canceling all orders
2018-04-12 13:09:30,259 - Worker 2 using account dexbot.info on BTS/USD - INFO - Change detected, updating orders
2018-04-12 13:09:30,287 - Worker 2 using account dexbot.info on BTS/USD - INFO - Canceling all orders
2018-04-12 13:09:36,769 - Worker 2 using account dexbot.info on BTS/USD - INFO - Worker "Worker 2" is disabled
2018-04-12 13:09:36,773 - Worker 2 using account dexbot.info on BTS/USD - INFO - Worker "Worker 2" is disabled
2018-04-12 13:09:36,777 - Worker 2 using account dexbot.info on BTS/USD - INFO - Worker "Worker 2" is disabled
2018-04-12 13:09:36,780 - Worker 2 using account dexbot.info on BTS/USD - INFO - Worker "Worker 2" is disabled

error: [Errno 2] No such file or directory: 'README.md'

Ubuntu 17.10
python setup.py install

Writing /tmp/easy_install-7gmvfh06/click-datetime-0.2/setup.cfg
Running click-datetime-0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7gmvfh06/click-datetime-0.2/egg-dist-tmp-4pfgk04_
error: [Errno 2] No such file or directory: 'README.md'
~/DEXBot$ ls
app.py	app.spec  build  cli.py  config.yml  dexbot  dexbot.egg-info  dist  docs  hooks  LICENSE.txt  Makefile	MANIFEST.in  README.md	setup.cfg  setup.py

Fix the need to install dependencies manually with "pip"

There are several dependencies that must be manually installed with pip because the compile script does not detect the dependencies installed with the system's package manager.

I am trying to compile the code in Xubuntu 16.04 LTS, but after seeing problem #13, I think this is common in distributions based on Debian.

These problems are also detected in xeroc/stakemachine repository.

Dependencies detected so far:

  • click-datetime
  • pyqt5

One possible solution is to include pip3 install --user PACKAGES in the compile script.

No new order created at filled order

The bot successfully placed orders on both sides of Center Price, but as one order filled a new one wasn't created. There was sufficient funds.

Message in terminal:

Insufficient buy balance, needed 12.76107892... USD
disabled
disabled
disabled
disabled
...

Market was Base=USD Quote=BTS. Order size 100 (this is apparently BTS and actual order sizes were 50 BTS). The filled order was a sell BTS for USD, and it was completely filled. There was 99 USD left on the account.

I paused the bot, and it successfully canceled the remaining order. However on resume (play button), only a sell BTS was created.

Profit Calculation for Relative Orders

Using the first in first out (FIFO) model, we can calculate the profit as "positions close". A position opens when the trader buys an asset and closes when he sells it all. The difference is profit. Using this model in traditional markets is simple, because a position is considered open as long as the trader holds the quote asset and he is expected to close it sooner or later. In crypto it's a little different, as the trader might want to accumulate also quote asset, never to actually "close" the position.

Let's have two variables:

  1. Base_surplus, where we sum up all traded base asset
  2. Quote_surplus, where we sum up all traded quote asset

If our first trade sells 100 USD and buys 800 BTS, the Base_surplus variable would be -100 and the quote_surplus would be 800. Then our next trade buys 102 USD and sells 790 BTS, after which base_surplus=2 and quote_surplus=10.

We then report profit by converting both to base asset using latest price and summing up.

All states should be recorded, so we can calculate profit over different time periods (24h/7d/30d/365d).

Account total value should also be recorded simultaneously, because then we can calculate and report relative profit over the same time periods.


Discussion

The value of generated profit is calculated at the price of the time of calculation, even though the profit may have been made at a completely different point price. In this case, capital gains will be attributed to the bot even no profit has been made. Also the opposite is true. This will give the user a wrong impression about the profitability, and he might make unnecessary adjustments or choose not to adjust even if there had been reason to do so.

Staggered Orders - trying to profit from volatility.

Make sure to read and understand the purpose of this software before reading this.

This is a strategy well suited for computers inconsistently online - as it never makes a loss (depends on how it's calculated), but only suffers from decreased performance when offline. The essence of the strategy is to harvest profit from volatility. It always has an order waiting to be filled no matter which direction the price moves and how far it moves. When an order fills, the idea is to use gained funds to place an opposite order at a profit. So if a sell order is filled, a buy order is placed at x% cheaper.

In order to continue making profit from volatility, there should always be at least one order left on both sides. If the price moves too much in one direction, one of the assets can be sold out, and the strategy ceases to function. Therefore orders must be spread over a range that can be expected to never be exceeded. The wider the range, the smaller the order size or the greater the increment.

Because the profit of each trade is small, the power of this strategy comes from the fact that it never makes a loss (sells at a loss), but makes lots of small profits. Even taken as separate, the profits are meaningful, but the real power comes by reinvesting profits to get a compounding effect.

Apart from the price range, most methods and parameters of this strategy will result in more profit or less profit. It can't be forced to make a loss.

Minimum viable strategy

Initiate strategy by spreading buy and sell orders at 5% increments and a 10% difference between lowest sell and highest buy orders, over a range of -99% to +10,000%. Let order size increase by sqrt(1.05) from lowest to highest. When an order fills (partially or fully) use gained funds to add a new order to opposite side according to initial plan. Let profits accumulate.

Advanced version

Variables

Examples use the MILK:USD market.
Base Currency: Unit of account and one of the assets to be traded. (Example: USD)

Quote Currency: The "asset of interest" (Example: MILK)

Initial Center Price: A price assumed to be the most accurate reference price for a market, reported as Base Currency (Example: 2.25 USD)

Range Minimum: How low can the price of Quote Asset be expected to ever go (Example: 0.01 USD)

Range Maximum: How high a price of the Quote Asset do we want to prepare for (Example: 100 USD)

Increment: At what intervals are orders made to fill the range (Example 0.5 %)

Spread: How much higher should the lowest sell price be compared to highest buy price (Example: 1.8 %. Another example: 5,000 %)

Reinvest Percentage: How much of profit to reinvest (Example: 50%)

Profit Bias: How much of the collected profit should be in Quote Asset (Example: 100%)

Basic setup

Maintenance

Dynamical properties to adapt to changing market conditions

Defaults

We might assume that a user leaving the defaults is using a laptop and will check the situation once a week. Bigger increments and bigger spread will result in fewer trades, but in significantly more profit per trade. The optimum would be two opposite trades per week. Maybe a 10% increment and 20% spread would work. With a 100x - infinite range, two opposite trades would result in about 2% profit.

Barebones Staggered Orders strategy

Implement the most simple possible viable version of Staggered Orders. If possible it should be such that the methods for determining each parameter can be chosen by the user when configuring the strategy -although there will only be one choice per parameter to begin with (so the user explicitly selects the only possible choice). Later on the strategy can be enhanced with multiple different methods for each parameter, making the strategy flexible and more dynamic, allowing the user to fine-tune for more profit.

Description of parameters and logic

Parameters

SPREAD: How much profit to make per order; minimum difference between lowest sell and highest buy price. Can be input as a percentage, and means how much higher the lowest sell price is than the highest buy price. (Examples: 2.8%, 20%, 5000%). Default value 5%.

INCREMENT: At which intervals should order be placed to fill the whole range. Input as a percentage. Default value 1%.

LOWER_BOUND: What is the lowest price of MILK the user wants to prepare for. (Example: 0.1 USD). Default value 0.00000001

UPPER_BOUND: What is the highest price of MILK the user wants to prepare for. (Example: 100 USD). Default value 1,000,000,000.

Prepare strategy

This might be best done by iterating until desired values are reached.

  1. Get current center price
  2. Define highest buy price with: CENTER_PRICE / sqrt( 1 + SPREAD )
  3. Define lowest sell price with: CENTER_PRICE * sqrt( 1 + SPREAD)
  4. Define price points downward by starting from highest buy price and dividing the price by INCREMENT until LOWER_BOUND is exceeded. Record each point and number of points. Store for later use. (note that the absolute increments will decrease going downward)
  5. Do the same upward by starting from lowest sell price and multiplying each price point with INCREMENT until UPPER_BOUND is exceeded, recording each price point and total number of points. Store for later use. (note that absolute increments keep getting bigger going upward).
  6. Find order sizes by iterating. (unless you figure out an easier way). Multiply the amount of both assets with INCREMENT. (With a 5% increment you should get balance * 0.05). Assign the result as the order size of the order closest to center price. Calculate and assign the next order size by dividing previous order size by sqrt( 1 + INCREMENT). Do this until an amount is defined for each order (price point) both ways. Sum up all orders for both sides separately. Calculate ratio: total_asset_balance / previously_calculated_orders_sum. Since there are two assets, take the results and increase order sizes on both sides by the smaller of calculated ratios. Now we should end up with a plan for a symmetric market strategy, which makes full use of the the more restricting balance of both assets.
  7. Keep all the price points and order sizes for future reference, including center price. Buy and sell "sides" are no different, so they can all be combined into a single list Because SPREAD is not necessarily a multiple of INCREMENT, price points don't necessarily match. Therefore two lists of price points right from the bottom to the top should be stored for future use. One for sell orders and one for buy orders.

Note: if spread is smaller than increment, strategy will make a loss. This should probably be made impossible.

Initiate Strategy

  1. Place orders according to the plan
  2. Record asset totals and center price for performance monitoring

Maintain Strategy

I expect it to be the easiest to reinvest profits, so I proceed with that assumption.

Whatever funds are aquired when orders fill, place a new order with all the funds (If asset it BTS leave at least 1 BTS for fee's) at a SPREAD profit:

  1. If a sell order is filled either partially or fully, place a new buy order with "all" the available funds at filled order price / ( 1 + SPREAD).
  2. If a buy order is filled either partially or fully, place a new sell order with "all" the available funds at filled order price * ( 1 + SPREAD).

That's about it if the bot can process one filled order at a time. What still needs to be thought out is if several orders fill at the same time or if the bot is offline for a while and several orders fill before getting back.

Over time this strategy as such will reallocate orders very unevenly over the range where trades have happened. It is unclear whether this is good or not. Future enhancements will include mechanisms to even out order sizes and distribute profits more evenly over several nearby orders.

What also needs to be thought out is the excess funds after allocating "all". If there are additional funds after the strategy is initiated, the defined logic will allocate all excess funds opposite to the first filled order. That isn't desirable. Could we somehow let the user know how much of each asset the strategy needs according to the values he has input? EDIT: We decided to inform the user at time of creating Worker about how much of each asset the strategy needs. The user must tune the parameters to suit his balances, and send the account the necessary funds.

Relative Order Size

To be used in the Relative Orders strategy.

In stead of having the order size defined in absolute terms, it should be a percentage of the total balance of the asset in question. The percentage can be set by the user, and 10% can be the default.

The benefits of this are:

  1. Order size will automatically increase with profits - effectively reinvesting them, and without any additional mechanisms
  2. The bot will never completely sell out all of the asset. Order size will decrease as an asset is sold out
  3. The order sizes will always be equal to the asset's proportions in ones account, and attempt to keep them in balance
  4. It's very simple. One parameter and many benefits.

Derive Center Price from closest opposite orders - making the center price dynamic.

This is almost the simplest way to get a dynamic price for a market. It will work well in already active markets, but in quiet market it can be easily manipulated.

  1. Get lowest sell order price (bid). Exclude own orders.
  2. Get lowest highest buy order price (ask). Exclude own orders.
  3. Calculate Center Price.

The bot should keep an eye on the price and reset orders if price has changed more than 1/4 of the spread. A filled order can work as a trigger to recalculate Center Price.

Relative Orders: The strategy trying profit from the spread

Make sure to read and understand the purpose of this software before reading this.

This strategy hopes to sell for more than it buys and vice-versa, as much as possible at as much profit as possible. The bigger the difference between buy and sell order the more profit. The more volume the more profit. So far so good.

When the spread is too great very little trading happens. Orders aren't filled and no profit is made.

In order to make any profit according to the strategy, both assets are needed. There needs to be both sell and buy orders. If the price moves enough in one direction, one of the assets can be sold out, and the strategy ceases to function.

Most of the adjustable parameters of this strategy are for either tuning the spread for maximum profit or coping with price movements for keeping assets somewhat balanced. This strategy must constantly react to changes in market conditions (mainly price), so is mostly suited for a computer constantly online, but can be tuned to better survive some downtime.

So let's define the logic:

Simplest possible strategy

Variables

Examples use the MILK:USD market.
Base Currency: Unit of account and one of the assets to be traded. (Example: USD)

Quote Currency: The "asset of interest" (Example: MILK)

Center Price: A price assumed to be the most accurate reference price for a market, reported as Base Currency (Example: 2.25 USD)

Spread: The combined distance in percents from center price to lowest own sell order and center price to own highest buy order. It can be assumed that a sensible spread is always less than 20%. (Example: 4.5 %)

Offset: An additional variable for helping keep the assets balanced. (Example: 1.115 %)

Relative Order Size: Issue 29. Portion of asset holdings to use for an order. (Example: 10% of USD, 10% of MILK). Note that this will change the actual order size after every filled order. The bigger the Relative Order Size the more profit, but the less resilience in case of downtime or quick price swings.

Basic setup

A sell order is placed at center price + offset + (spread / 2) with amount Total MILK * Relative Order Size
A buy order is placed at center price + offset - (spread / 2) with amount of Total USD * Relative Order Size

Maintenance

It should be assumed that the bot isn't constantly online. Every time the situation is checked and found to have changed, orders are simply cancelled and new ones added according to the strategy.

More sophistication to improve performance and tolerance

Defining Center Price

Of the following mechanisms the bot can use only one at a time, so these alternatives should be represented in the GUI with radio buttons.

Manual Center Price [DONE]

The user can type in the center price for the strategy to be used. This is suitable for markets where prices are practically stable, like USD:EUR or BitBTC:OPEN.BTC.

Last Own Filled Order

Use the last filled order of one's own as the center price. This effectively halves the spread from profit making perspective. It also automatically helps balance the portfolio. This is the strategy used at the moment by ihaywood/dexbot.

External Price Feed

This suits markets where prices are mostly discovered elsewhere, and the prices on BitShares are expected to follow with a small lag. For instance BTC:USD prices on Coinbase are likely to be reflected on BitShares. As a byproduct orders might be filled by the bot, which would reduce liquidity. A "Don't Fill Orders" option is necessary.

Calculating from Closest Market Orders [DONE]

Excluding own orders. Usually the closest opposite orders are dust orders (insignificant amounts left over from other trades). The center price derived from these orders might or might not represent the actual center price. Issue 30

Calculating from Market Depth

This bypasses the problem of dust orders. First we figure out at what price we could buy x MILK and at what price we could sell x MILK, then calculate the center price from those prices. This might be more meaningful than the previous method. This method can easily be manipulated in low-participation markets, and a "Don't Fill Orders" option would decrease risk.

Calculating from Last Opposite Filled Orders

This information is from actual trades. The method should exclude dust trades because they would skew the price too much.

MPA Price Feeds from the BitShares Blockchain

All Market Pegged Assets and similar algorithmic assets on the BitShares Blockchain rely on price feeds from witnesses (and others). They are automatically averaged into a single "Feed Price", which can be obtained by the API. This price feed can be used in [SHORT]:[BACK] -markets, where [SHORT]is the MPA and [BACK] is the asset used as collateral.

Adding (Weighted) Moving Average to any of the Above Methods

This helps filter out noise from signal, but adds some lag to the reaction. It is to be used in combination with one of the above mechanisms. It would be nice to have several different tunable parameters for this method.

The problem with estimating center price from other orders on the books is that bots will cascade information without knowing where it is derived from in the first place. A Center Price derived from actual filled orders is probably more relevant information.

Adjusting Spread

In order to find the sweet spot between volume and spread for maximal profit. The user must choose only one of the following methods. Averaging can be used in addition to any one chosen.

Manual [DONE]

The user sets a percentage manually and adjusts it at will.

Estimate Current Spread and Beat it

Since the closest orders get filled first, it's worth trying to be there. If several bots do the same, they will compete to close the spread, which is bad for profits but good for the whole. A minimum spread should be given to avoid zero profit

Estimate Spread from Actual Market Depth

Find out at what price a certain amount can be bought or sold, calculate the spread from that, and decide own spread accordingly. The amount used should be in relation to one's own order sizes.

Adding Moving Average to the above

This would help filter out noise, and also avoid constand updating of orders for no real reason. It could add some additional stability to the market.

Maintaining Balance

Relative Order Size [In progress]

If order size is defined as a certain percentage of portfolio, the strategy will automatically resist massive imbalance. A few additional mechanisms can be used to add bias in either direction.

Automatically Adjust Offset by Portfolio Balance

Increase offset if we have less MILK than USD, to encourage the market to sell us some MILK rather then buy from us.

Improving Tolerance for Price Swings and time offline

Adding additional staggered orders

Several orders placed at defined increments further from the Center Price. Order sizes decrease starting from the middle using: Remaining assets * Relative Order Size. A good increment is Spread / 2. This feature adds resilience in case of sudden price spikes or lengthy off-time.

Defaults

We might assume that a user leaving the defaults is using a laptop and will check the situation once a day. The best way to prepare for price swings while offline is to add staggered orders from -25% to +33% or something similar. So this should be default.

For the Center Price and the Spead, the default method should be the most robust one implemented, verified by actual tests in real markets.

Order fill by a force settlement confuses bot to a halt

This might be hard to reproduce as you need a force settlement. Maybe with a test function?

I ran the bot successfully for some 6 hours, when an order was filled by Unknown market update type: {'id': '1.4.4546', 'owner': '1.2.594058', 'balance': {'asset_id': '1.3.121', 'amount': 2080000}, 'settlement_date': '2018-04-12T01:22:12'}. After this the other order was left open and no further actions were made.

error: Could not find suitable distribution for Requirement.parse('pyqt5')

Install on Debian 9:

Installed /usr/local/lib/python3.5/dist-packages/dexbot-0.1.0-py3.5.egg
Processing dependencies for dexbot==0.1.0
Searching for pyqt5
Reading https://pypi.python.org/simple/pyqt5/
No local packages or working download links found for pyqt5
error: Could not find suitable distribution for Requirement.parse('pyqt5')
dex@Frankfurt-Deb9-2GB:~/DEXBot$ voltron
-su: voltron: command not found

How to fix?

can not start work

Traceback (most recent call last):
File "/home/hiquanta/.local/bin/dexbot-gui", line 11, in
load_entry_point('dexbot==0.1.13', 'console_scripts', 'dexbot-gui')()
File "/home/hiquanta/.local/lib/python3.6/site-packages/dexbot-0.1.13-py3.6.egg/dexbot/gui.py", line 37, in main
File "/home/hiquanta/.local/lib/python3.6/site-packages/dexbot-0.1.13-py3.6.egg/dexbot/gui.py", line 18, in init
TypeError: 'NoneType' object is not subscriptable

Python.h: No such file or directory

Debian 9:

Running ruamel.yaml-0.15.35/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7nqpukbj/ruamel.yaml-0.15.35/egg-dist-tmp-zzq159uc
sys.argv ['/tmp/easy_install-7nqpukbj/ruamel.yaml-0.15.35/setup.py', '-q', 'bdist_egg', '--dist-dir', '/tmp/easy_install-7nqpukbj/ruamel.yaml-0.15.35/egg-dist-tmp-zzq159uc']
ext/_ruamel_yaml.c:4:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.

Export history in a csv

After DEXBot has been running for multiple hours, one would want to analyze the trades made. To make that possible in the most simple fashion, would be just to save all trades (under "my trades" section) to a xls/csv file.

Change the text "bot" to "Worker" to improve terminology

This is based on a short discussion in the community and dev chat. "Bot" refers to the whole software and "Worker" means the individual combination of account, strategy, parameters and history. So the user will run only one Bot but the Bot can contain several Workers.

Compiled GUI executable crashes on wallet creation

Executable created with pyinstaller compiles but crashes on wallet creation.
This is the error message:

Traceback (most recent call last):
  File "dexbot/views/create_wallet.py", line 19, in validate_form
  File "dexbot/controllers/wallet_controller.py", line 14, in create_wallet
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/wallet.py", line 170, in create
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/wallet.py", line 177, in newWallet
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/storage.py", line 393, in __init__
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/storage.py", line 414, in saveEncrytpedMaster
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/storage.py", line 438, in getEncryptedMaster
  File "site-packages/bitshares-0.1.11b0-py3.5.egg/bitshares/aes.py", line 33, in encrypt
  File "site-packages/pycryptodome-3.4.7-py3.5-linux-x86_64.egg/Crypto/Cipher/AES.py", line 202, in new
  File "site-packages/pycryptodome-3.4.7-py3.5-linux-x86_64.egg/Crypto/Cipher/__init__.py", line 55, in _create_cipher
  File "site-packages/pycryptodome-3.4.7-py3.5-linux-x86_64.egg/Crypto/Cipher/_mode_cbc.py", line 247, in _create_cbc_cipher
  File "site-packages/pycryptodome-3.4.7-py3.5-linux-x86_64.egg/Crypto/Cipher/_mode_cbc.py", line 95, in __init__
AttributeError: 'NoneType' object has no attribute 'CBC_start_operation'
Aborted (core dumped)

openssl/aes.h no such file cant install

im getting the following, anyone have any ideas

scrypt-1.2.1/libcperciva/crypto/crypto_aes.c(6): fatal error C1083: Cannot open include file: 'openssl/aes.h': No such file or directory
error: Setup script exited with error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2

Can't delete one of the Workers

Had 2 Workers. After a freeze and kill I started the bot and tried to delete the first worker. No success. Terminal output below:

QApplication: invalid style override passed, ignoring it.
Traceback (most recent call last):
  File "/home/dexbotmake/dexbot/dexbot/views/worker_item.py", line 92, in remove_widget_dialog
    self.remove_widget()
  File "/home/dexbotmake/dexbot/dexbot/views/worker_item.py", line 96, in remove_widget
    self.main_ctrl.remove_worker(self.worker_name)
  File "/home/dexbotmake/dexbot/dexbot/controllers/main_controller.py", line 51, in remove_worker
    WorkerInfrastructure.remove_offline_worker(config, worker_name)
  File "/home/dexbotmake/dexbot/dexbot/worker.py", line 207, in remove_offline_worker
    strategy.purge()
  File "/home/dexbotmake/dexbot/dexbot/basestrategy.py", line 272, in purge
    self.cancel_all()
  File "/home/dexbotmake/dexbot/dexbot/basestrategy.py", line 266, in cancel_all
    account=self.account
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 1202, in cancel
    return self.finalizeOp(op, account["name"], "active", **kwargs)
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/bitshares.py", line 292, in finalizeOp
    self.txbuffer.sign()
  File "/home/dexbotmake/.local/lib/python3.5/site-packages/bitshares-0.1.13-py3.5.egg/bitshares/transactionbuilder.py", line 345, in sign
    raise MissingKeyError
bitshares.exceptions.MissingKeyError

After this I successfully deleted the second Worker and tried the first again with no success. It should probably be noted that I had just wiped the wallet with uptick wipewallet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.