From 989682457ea34c3ad90a2e1a33cf44b270405df0 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sun, 17 Sep 2017 22:37:46 +0300 Subject: [PATCH] add a field to config for setting balance between trying to buy with ask price and last price --- config.json.example | 3 +++ misc.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/config.json.example b/config.json.example index 411d2af87..a0b93c455 100644 --- a/config.json.example +++ b/config.json.example @@ -9,6 +9,9 @@ "0": 0.02 }, "stoploss": -0.10, + "bid_strategy": { + "ask_last_balance": 0.0 + }, "bittrex": { "enabled": true, "key": "key", diff --git a/misc.py b/misc.py index dcf0bfe86..be8cf71b9 100644 --- a/misc.py +++ b/misc.py @@ -48,6 +48,18 @@ CONF_SCHEMA = { 'minProperties': 1 }, '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'}, 'telegram': { 'type': 'object', @@ -85,6 +97,7 @@ CONF_SCHEMA = { 'stake_amount', 'dry_run', 'minimal_roi', + 'bid_strategy', 'telegram' ] }