Took liquidation price out of order completely
This commit is contained in:
@@ -148,7 +148,6 @@ def migrate_orders_table(decl_base, inspector, engine, table_back_name: str, col
|
||||
decl_base.metadata.create_all(engine)
|
||||
leverage = get_column_def(cols, 'leverage', '1.0')
|
||||
is_short = get_column_def(cols, 'is_short', 'False')
|
||||
liquidation_price = get_column_def(cols, 'liquidation_price', 'False')
|
||||
with engine.begin() as connection:
|
||||
connection.execute(text(f"""
|
||||
insert into orders ( id, ft_trade_id, ft_order_side, ft_pair, ft_is_open, order_id,
|
||||
@@ -157,7 +156,7 @@ def migrate_orders_table(decl_base, inspector, engine, table_back_name: str, col
|
||||
select id, ft_trade_id, ft_order_side, ft_pair, ft_is_open, order_id,
|
||||
status, symbol, order_type, side, price, amount, filled, null average, remaining, cost,
|
||||
order_date, order_filled_date, order_update_date,
|
||||
{leverage} leverage, {is_short} is_short, {liquidation_price} liquidation_price
|
||||
{leverage} leverage, {is_short} is_short
|
||||
from {table_back_name}
|
||||
"""))
|
||||
|
||||
|
@@ -134,7 +134,6 @@ class Order(_DECL_BASE):
|
||||
|
||||
leverage = Column(Float, nullable=True, default=1.0)
|
||||
is_short = Column(Boolean, nullable=True, default=False)
|
||||
# liquidation_price = Column(Float, nullable=True)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -511,9 +510,6 @@ class LocalTrade():
|
||||
self.amount = float(safe_value_fallback(order, 'filled', 'amount'))
|
||||
if 'leverage' in order:
|
||||
self.leverage = order['leverage']
|
||||
if 'liquidation_price' in order:
|
||||
self.liquidation_price = order['liquidation_price']
|
||||
self.set_stop_loss(self.stop_loss)
|
||||
self.recalc_open_trade_value()
|
||||
if self.is_open:
|
||||
payment = "SELL" if self.is_short else "BUY"
|
||||
|
Reference in New Issue
Block a user