Unfilled Order timeout - better documentation and variable naming

This commit is contained in:
Stephen Dade
2018-01-04 10:35:57 +11:00
parent 7169ad557f
commit b5d2cfecc7
5 changed files with 6 additions and 6 deletions

View File

@@ -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:

View File

@@ -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': {

View File

@@ -25,7 +25,7 @@ def default_conf():
"0": 0.04
},
"stoploss": -0.10,
"opentradetimeout": 600,
"unfilledtimeout": 600,
"bid_strategy": {
"ask_last_balance": 0.0
},