add a field to config for setting balance between trying to buy with ask price and last price

This commit is contained in:
Janne Sinivirta 2017-09-17 22:37:46 +03:00
parent f84c58c3eb
commit 989682457e
2 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,9 @@
"0": 0.02 "0": 0.02
}, },
"stoploss": -0.10, "stoploss": -0.10,
"bid_strategy": {
"ask_last_balance": 0.0
},
"bittrex": { "bittrex": {
"enabled": true, "enabled": true,
"key": "key", "key": "key",

13
misc.py
View File

@ -48,6 +48,18 @@ CONF_SCHEMA = {
'minProperties': 1 'minProperties': 1
}, },
'stoploss': {'type': 'number', 'maximum': 0, 'exclusiveMaximum': True}, 'stoploss': {'type': 'number', 'maximum': 0, 'exclusiveMaximum': True},
'bid_strategy': {
'type': 'object',
'properties': {
'ask_last_balance': {
'type': 'number',
'minimum': 0,
'maximum': 1,
'exclusiveMaximum': False
},
},
'required': ['ask_last_balance']
},
'bittrex': {'$ref': '#/definitions/exchange'}, 'bittrex': {'$ref': '#/definitions/exchange'},
'telegram': { 'telegram': {
'type': 'object', 'type': 'object',
@ -85,6 +97,7 @@ CONF_SCHEMA = {
'stake_amount', 'stake_amount',
'dry_run', 'dry_run',
'minimal_roi', 'minimal_roi',
'bid_strategy',
'telegram' 'telegram'
] ]
} }