Added minor changes from lev-exchange review

This commit is contained in:
Sam Germain
2021-09-10 13:39:42 -06:00
parent 1fa318c52a
commit b0e05b92d3
6 changed files with 51 additions and 38 deletions

View File

@@ -57,11 +57,11 @@ class Ftx(Exchange):
Limit orders are defined by having orderPrice set, otherwise a market order is used.
"""
limit_price_pct = order_types.get(
'stoploss_on_exchange_limit_ratio',
0.99 if side == "sell" else 1.01
)
limit_rate = stop_price * limit_price_pct
limit_price_pct = order_types.get('stoploss_on_exchange_limit_ratio', 0.99)
if side == "sell":
limit_rate = stop_price * limit_price_pct
else:
limit_rate = stop_price * (2 - limit_price_pct)
ordertype = "stop"