Skip to content

Commit

Permalink
Merge pull request #125 from Codaone/misc-fixes
Browse files Browse the repository at this point in the history
Misc fixes
  • Loading branch information
mikakoi committed May 18, 2018
2 parents baf6fd7 + d356463 commit 188185e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dexbot/__init__.py
Expand Up @@ -3,7 +3,7 @@
from appdirs import user_config_dir

APP_NAME = "dexbot"
VERSION = '0.1.26'
VERSION = '0.1.27'
AUTHOR = "codaone"
__version__ = VERSION

Expand Down
5 changes: 3 additions & 2 deletions dexbot/basestrategy.py
@@ -1,5 +1,6 @@
import logging
import time
import math

from .storage import Storage
from .statemachine import StateMachine
Expand Down Expand Up @@ -151,7 +152,7 @@ def calculate_center_price(self):
)
self.disabled = True
else:
center_price = (highest_bid['price'] + lowest_ask['price']) / 2
center_price = highest_bid['price'] * math.sqrt(lowest_ask['price'] / highest_bid['price'])
return center_price

def calculate_relative_center_price(self, spread, order_ids=None):
Expand Down Expand Up @@ -300,7 +301,7 @@ def _cancel(self, orders):
self.bitshares.txbuffer.clear()
return False
else:
raise
self.log.exception("Unable to cancel order")
return True

def cancel(self, orders):
Expand Down

0 comments on commit 188185e

Please sign in to comment.