From 835e0e69fcabadc658327950baac6fcb3c4dcfc5 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 19 Sep 2021 02:23:05 -0600 Subject: [PATCH] removed leverage from create order api call --- docs/leverage.md | 4 ++++ freqtrade/exchange/binance.py | 11 ++--------- freqtrade/exchange/ftx.py | 10 ++-------- freqtrade/exchange/kraken.py | 11 ++--------- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/docs/leverage.md b/docs/leverage.md index c4b975a0b..9448c64c3 100644 --- a/docs/leverage.md +++ b/docs/leverage.md @@ -15,3 +15,7 @@ For longs, the currency which pays the interest fee for the `borrowed` will alre Rollover fee = P (borrowed money) * R (quat_hourly_interest) * ceiling(T/4) (in hours) I (interest) = Opening fee + Rollover fee [source](https://support.kraken.com/hc/en-us/articles/206161568-What-are-the-fees-for-margin-trading-) + +# TODO-lev: Mention that says you can't run 2 bots on the same account with leverage, + +#TODO-lev: Create a huge risk disclaimer \ No newline at end of file diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 69d781395..7d83e971b 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -107,15 +107,8 @@ class Binance(Exchange): rate = self.price_to_precision(pair, rate) - order = self._api.create_order( - symbol=pair, - type=ordertype, - side=side, - amount=amount, - price=rate, - params=params, - leverage=leverage - ) + order = self._api.create_order(symbol=pair, type=ordertype, side=side, + amount=amount, price=rate, params=params) logger.info('stoploss limit order added for %s. ' 'stop price: %s. limit: %s', pair, stop_price, rate) self._log_exchange_response('create_stoploss_order', order) diff --git a/freqtrade/exchange/ftx.py b/freqtrade/exchange/ftx.py index eaf9a0477..0f572dee9 100644 --- a/freqtrade/exchange/ftx.py +++ b/freqtrade/exchange/ftx.py @@ -81,14 +81,8 @@ class Ftx(Exchange): params['stopPrice'] = stop_price amount = self.amount_to_precision(pair, amount) - order = self._api.create_order( - symbol=pair, - type=ordertype, - side=side, - amount=amount, - leverage=leverage, - params=params - ) + order = self._api.create_order(symbol=pair, type=ordertype, side=side, + amount=amount, params=params) self._log_exchange_response('create_stoploss_order', order) logger.info('stoploss order added for %s. ' 'stop price: %s.', pair, stop_price) diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index d6a816c9e..ec49c963f 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -114,15 +114,8 @@ class Kraken(Exchange): try: amount = self.amount_to_precision(pair, amount) - order = self._api.create_order( - symbol=pair, - type=ordertype, - side=side, - amount=amount, - price=stop_price, - leverage=leverage, - params=params - ) + order = self._api.create_order(symbol=pair, type=ordertype, side=side, + amount=amount, price=stop_price, params=params) self._log_exchange_response('create_stoploss_order', order) logger.info('stoploss order added for %s. ' 'stop price: %s.', pair, stop_price)