mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Unfilled Order timeout - better documentation and variable naming
This commit is contained in:
parent
7169ad557f
commit
b5d2cfecc7
|
@ -11,7 +11,7 @@
|
|||
"0": 0.04
|
||||
},
|
||||
"stoploss": -0.10,
|
||||
"opentradetimeout": 600,
|
||||
"unfilledtimeout": 600,
|
||||
"bid_strategy": {
|
||||
"ask_last_balance": 0.0
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@ The table below will list all configuration parameters.
|
|||
| `dry_run` | true | Yes | Define if the bot must be in Dry-run or production mode.
|
||||
| `minimal_roi` | See below | Yes | Set the threshold in percent the bot will use to sell a trade. More information below.
|
||||
| `stoploss` | -0.10 | No | Value of the stoploss in percent used by the bot. More information below.
|
||||
| `opentradetimeout` | 0 | No | The number of minutes until an open trade will be cancelled.
|
||||
| `unfilledtimeout` | 0 | No | How long (in minutes) the bot will wait for an unfilled order to complete, after which the order will be cancelled.
|
||||
| `bid_strategy.ask_last_balance` | 0.0 | Yes | Set the bidding price. More information below.
|
||||
| `exchange.name` | bittrex | Yes | Name of the exchange class to use.
|
||||
| `exchange.key` | key | No | API key to use for the exchange. Only required when you are in production mode.
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user