Merge pull request #1330 from freqtrade/feat/diff_order_types

Add support for different order types
This commit is contained in:
Matthias
2018-11-19 19:55:30 +01:00
committed by GitHub
13 changed files with 227 additions and 44 deletions

View File

@@ -12,6 +12,8 @@ DEFAULT_STRATEGY = 'DefaultStrategy'
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
DEFAULT_DB_DRYRUN_URL = 'sqlite://'
UNLIMITED_STAKE_AMOUNT = 'unlimited'
REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss']
ORDERTYPE_POSSIBILITIES = ['limit', 'market']
TICKER_INTERVAL_MINUTES = {
@@ -101,6 +103,15 @@ CONF_SCHEMA = {
'order_book_max': {'type': 'number', 'minimum': 1, 'maximum': 50}
}
},
'order_types': {
'type': 'object',
'properties': {
'buy': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'sell': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'stoploss': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES}
},
'required': ['buy', 'sell', 'stoploss']
},
'exchange': {'$ref': '#/definitions/exchange'},
'edge': {'$ref': '#/definitions/edge'},
'experimental': {