Skip to content

Commit

Permalink
Merge pull request #222 from rattlehead12/master
Browse files Browse the repository at this point in the history
Fix help options
  • Loading branch information
yasinkuyu authored Mar 27, 2018
2 parents b5710e7 + d760c52 commit 50465f7
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 144 deletions.
4 changes: 2 additions & 2 deletions app/Messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class Messages():

@staticmethod
def get(msg):
print('m: ' + msg)
exit(1)
print('Message : ' + msg)
exit(1)
15 changes: 8 additions & 7 deletions app/Orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def cancel_order(symbol, orderId):
return True

except Exception as e:
print('co: %s' % e)
print('cancel_order Exception: %s' % e)
return False

@staticmethod
Expand All @@ -79,7 +79,7 @@ def get_order_book(symbol):
return lastBid, lastAsk

except Exception as e:
print('ob: %s' % e)
print('get_order_book Exception: %s' % e)
return 0, 0

@staticmethod
Expand All @@ -89,13 +89,14 @@ def get_order(symbol, orderId):
order = client.query_order(symbol, orderId)

if 'msg' in order:
return False
#import ipdb; ipdb.set_trace()
Messages.get(order['msg']) # TODO
return False

return order

except Exception as e:
print('go: %s' % e)
print('get_order Exception: %s' % e)
return False

@staticmethod
Expand All @@ -110,7 +111,7 @@ def get_order_status(symbol, orderId):
return order['status']

except Exception as e:
print('gos: %s' % e)
print('get_order_status Exception: %s' % e)
return None

@staticmethod
Expand All @@ -121,7 +122,7 @@ def get_ticker(symbol):

return float(ticker['lastPrice'])
except Exception as e:
print('gt: %s' % e)
print('Get Ticker Exeption: %s' % e)

@staticmethod
def get_info(symbol):
Expand All @@ -135,4 +136,4 @@ def get_info(symbol):
return info

except Exception as e:
print('gi: %s' % e)
print('get_info Exception: %s' % e)
Loading

0 comments on commit 50465f7

Please sign in to comment.