diff --git a/pycryptobot.py b/pycryptobot.py index 6438f94a..8b59b129 100644 --- a/pycryptobot.py +++ b/pycryptobot.py @@ -71,7 +71,7 @@ state.last_buy_size = float(df[df.action == 'buy']['size']) state.last_buy_filled = float(df[df.action == 'buy']['filled']) state.last_buy_price = float(df[df.action == 'buy']['price']) - state.last_buy_fee = float(df[df.action == 'buy']['fees']) + state.last_buy_fee = round(float(df[df.action == 'buy']['filled']) * float(df[df.action == 'buy']['price']) * app.getTakerFee(), 2) else: state.last_action = 'SELL' state.last_buy_price = 0.0