Unfilled Order timeout - better documentation and variable naming
This commit is contained in:
@@ -98,7 +98,7 @@ def _process(nb_assets: Optional[int] = 0) -> bool:
|
||||
# Check if we can sell our current pair
|
||||
state_changed = handle_trade(trade) or state_changed
|
||||
|
||||
if 'opentradetimeout' in _CONF and trade.open_order_id:
|
||||
if 'unfilledtimeout' in _CONF and trade.open_order_id:
|
||||
# Check and handle any timed out trades
|
||||
check_handle_timedout(trade)
|
||||
|
||||
@@ -125,7 +125,7 @@ def check_handle_timedout(trade: Trade) -> bool:
|
||||
:param trade: Trade instance
|
||||
:return: True if the trade is timed out, false otherwise
|
||||
"""
|
||||
timeoutthreashold = datetime.utcnow() - timedelta(minutes=_CONF['opentradetimeout'])
|
||||
timeoutthreashold = datetime.utcnow() - timedelta(minutes=_CONF['unfilledtimeout'])
|
||||
order = exchange.get_order(trade.open_order_id)
|
||||
|
||||
if trade.open_date < timeoutthreashold:
|
||||
|
@@ -218,7 +218,7 @@ CONF_SCHEMA = {
|
||||
'minProperties': 1
|
||||
},
|
||||
'stoploss': {'type': 'number', 'maximum': 0, 'exclusiveMaximum': True},
|
||||
'opentradetimeout': {'type': 'integer', 'minimum': 0},
|
||||
'unfilledtimeout': {'type': 'integer', 'minimum': 0},
|
||||
'bid_strategy': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
|
@@ -25,7 +25,7 @@ def default_conf():
|
||||
"0": 0.04
|
||||
},
|
||||
"stoploss": -0.10,
|
||||
"opentradetimeout": 600,
|
||||
"unfilledtimeout": 600,
|
||||
"bid_strategy": {
|
||||
"ask_last_balance": 0.0
|
||||
},
|
||||
|
Reference in New Issue
Block a user