Skip to content

Commit

Permalink
add int() to avoid the str/int error
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcrab authored Jul 10, 2016
1 parent 2b1aeb3 commit a1191d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grapheneexchange/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ def returnTradeHistory(self, currencyPair="all", limit=25):
if f["op"]["account_id"] == self.myAccount["id"]:
if f["op"]["pays"]["asset_id"] == m["base"] :
data["type"] = "buy"
data["amount"] = f["op"]["receives"]["amount"] / 10 ** quote["precision"]
data["amount"] = int(f["op"]["receives"]["amount"]) / 10 ** quote["precision"]
else :
data["type"] = "sell"
data["amount"] = int(f["op"]["pays"]["amount"]) / 10 ** quote["precision"] #here to add int() because the f["op"]["pays"]["amount"] is wrongly returned a string from self.ws.get_fill_order_history
Expand Down

0 comments on commit a1191d9

Please sign in to comment.