feat: more config schema descriptions

This commit is contained in:
Matthias
2024-07-25 20:25:08 +02:00
parent d42b5b7733
commit abde1a1c39
+76 -16
View File
@@ -330,22 +330,55 @@ CONF_SCHEMA = {
"default": 0.02, "default": 0.02,
}, },
"order_types": { "order_types": {
"description": "Configuration of order types.",
"type": "object", "type": "object",
"properties": { "properties": {
"entry": {"type": "string", "enum": ORDERTYPE_POSSIBILITIES}, "entry": {
"exit": {"type": "string", "enum": ORDERTYPE_POSSIBILITIES}, "description": "Order type for entry (e.g., limit, market).",
"force_exit": {"type": "string", "enum": ORDERTYPE_POSSIBILITIES}, "type": "string",
"force_entry": {"type": "string", "enum": ORDERTYPE_POSSIBILITIES}, "enum": ORDERTYPE_POSSIBILITIES,
},
"exit": {
"description": "Order type for exit (e.g., limit, market).",
"type": "string",
"enum": ORDERTYPE_POSSIBILITIES,
},
"force_exit": {
"description": "Order type for forced exit (e.g., limit, market).",
"type": "string",
"enum": ORDERTYPE_POSSIBILITIES,
},
"force_entry": {
"description": "Order type for forced entry (e.g., limit, market).",
"type": "string",
"enum": ORDERTYPE_POSSIBILITIES,
},
"emergency_exit": { "emergency_exit": {
"description": "Order type for emergency exit (e.g., limit, market).",
"type": "string", "type": "string",
"enum": ORDERTYPE_POSSIBILITIES, "enum": ORDERTYPE_POSSIBILITIES,
"default": "market", "default": "market",
}, },
"stoploss": {"type": "string", "enum": ORDERTYPE_POSSIBILITIES}, "stoploss": {
"stoploss_on_exchange": {"type": "boolean"}, "description": "Order type for stop loss (e.g., limit, market).",
"stoploss_price_type": {"type": "string", "enum": STOPLOSS_PRICE_TYPES}, "type": "string",
"stoploss_on_exchange_interval": {"type": "number"}, "enum": ORDERTYPE_POSSIBILITIES,
},
"stoploss_on_exchange": {
"description": "Whether to place stop loss on the exchange.",
"type": "boolean",
},
"stoploss_price_type": {
"description": "Price type for stop loss (e.g., last, mark, index).",
"type": "string",
"enum": STOPLOSS_PRICE_TYPES,
},
"stoploss_on_exchange_interval": {
"description": "Interval for stop loss on exchange in seconds.",
"type": "number",
},
"stoploss_on_exchange_limit_ratio": { "stoploss_on_exchange_limit_ratio": {
"description": "Limit ratio for stop loss on exchange.",
"type": "number", "type": "number",
"minimum": 0.0, "minimum": 0.0,
"maximum": 1.0, "maximum": 1.0,
@@ -354,26 +387,53 @@ CONF_SCHEMA = {
"required": ["entry", "exit", "stoploss", "stoploss_on_exchange"], "required": ["entry", "exit", "stoploss", "stoploss_on_exchange"],
}, },
"order_time_in_force": { "order_time_in_force": {
"description": "Time in force configuration for orders.",
"type": "object", "type": "object",
"properties": { "properties": {
"entry": {"type": "string", "enum": ORDERTIF_POSSIBILITIES}, "entry": {
"exit": {"type": "string", "enum": ORDERTIF_POSSIBILITIES}, "description": "Time in force for entry orders.",
"type": "string",
"enum": ORDERTIF_POSSIBILITIES,
},
"exit": {
"description": "Time in force for exit orders.",
"type": "string",
"enum": ORDERTIF_POSSIBILITIES,
},
}, },
"required": REQUIRED_ORDERTIF, "required": REQUIRED_ORDERTIF,
}, },
"coingecko": { "coingecko": {
"description": "Configuration for CoinGecko API.",
"type": "object", "type": "object",
"properties": { "properties": {
"is_demo": {"type": "boolean", "default": True}, "is_demo": {
"api_key": {"type": "string"}, "description": "Whether to use CoinGecko in demo mode.",
"type": "boolean",
"default": True,
},
"api_key": {"description": "API key for accessing CoinGecko.", "type": "string"},
}, },
"required": ["is_demo", "api_key"], "required": ["is_demo", "api_key"],
}, },
"exchange": {"$ref": "#/definitions/exchange"}, "exchange": {
"edge": {"$ref": "#/definitions/edge"}, "description": "Exchange configuration.",
"freqai": {"$ref": "#/definitions/freqai"}, "$ref": "#/definitions/exchange",
"external_message_consumer": {"$ref": "#/definitions/external_message_consumer"}, },
"edge": {
"description": "Edge configuration.",
"$ref": "#/definitions/edge",
},
"freqai": {
"description": "FreqAI configuration.",
"$ref": "#/definitions/freqai",
},
"external_message_consumer": {
"description": "Configuration for external message consumer.",
"$ref": "#/definitions/external_message_consumer",
},
"experimental": { "experimental": {
"description": "Experimental configuration.",
"type": "object", "type": "object",
"properties": {"block_bad_exchanges": {"type": "boolean"}}, "properties": {"block_bad_exchanges": {"type": "boolean"}},
}, },