diff --git a/config_full.json.example b/config_full.json.example index b0719bcc6..3e7f4bc3b 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -38,6 +38,10 @@ "sell": "limit", "stoploss": "market" }, + "order_time_in_force": { + "buy": "gtc", + "sell": "gtc", + }, "exchange": { "name": "bittrex", "key": "your_exchange_key", diff --git a/freqtrade/constants.py b/freqtrade/constants.py index 055fee3b2..c6b8519c8 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -15,6 +15,7 @@ DEFAULT_DB_DRYRUN_URL = 'sqlite://' UNLIMITED_STAKE_AMOUNT = 'unlimited' REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss'] ORDERTYPE_POSSIBILITIES = ['limit', 'market'] +ORDERTIF_POSSIBILITIES = ['gtc', 'aon', 'fok', 'ioc'] TICKER_INTERVAL_MINUTES = { @@ -113,6 +114,14 @@ CONF_SCHEMA = { }, 'required': ['buy', 'sell', 'stoploss'] }, + 'order_time_in_force': { + 'type': 'object', + 'properties': { + 'buy': {'type': 'string', 'enum': ORDERTIF_POSSIBILITIES}, + 'sell': {'type': 'string', 'enum': ORDERTIF_POSSIBILITIES} + }, + 'required': ['buy', 'sell'] + }, 'exchange': {'$ref': '#/definitions/exchange'}, 'edge': {'$ref': '#/definitions/edge'}, 'experimental': {