2024-07-23 16:14:31 +00:00
|
|
|
# Required json-schema for user specified config
|
|
|
|
from typing import Dict
|
|
|
|
|
|
|
|
from freqtrade.constants import (
|
|
|
|
AVAILABLE_DATAHANDLERS,
|
|
|
|
AVAILABLE_PAIRLISTS,
|
|
|
|
AVAILABLE_PROTECTIONS,
|
|
|
|
BACKTEST_BREAKDOWNS,
|
|
|
|
DRY_RUN_WALLET,
|
|
|
|
EXPORT_OPTIONS,
|
|
|
|
MARGIN_MODES,
|
|
|
|
ORDERTIF_POSSIBILITIES,
|
|
|
|
ORDERTYPE_POSSIBILITIES,
|
|
|
|
PRICING_SIDES,
|
|
|
|
REQUIRED_ORDERTIF,
|
|
|
|
STOPLOSS_PRICE_TYPES,
|
|
|
|
SUPPORTED_FIAT,
|
|
|
|
TELEGRAM_SETTING_OPTIONS,
|
|
|
|
TIMEOUT_UNITS,
|
|
|
|
TRADING_MODES,
|
|
|
|
UNLIMITED_STAKE_AMOUNT,
|
|
|
|
WEBHOOK_FORMAT_OPTIONS,
|
|
|
|
)
|
|
|
|
from freqtrade.enums import RPCMessageType
|
|
|
|
|
|
|
|
|
|
|
|
__MESSAGE_TYPE_DICT: Dict[str, Dict[str, str]] = {x: {"type": "object"} for x in RPCMessageType}
|
|
|
|
|
|
|
|
CONF_SCHEMA = {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"max_open_trades": {
|
|
|
|
"description": "Maximum number of open trades. -1 for unlimited.",
|
|
|
|
"type": ["integer", "number"],
|
|
|
|
"minimum": -1,
|
|
|
|
},
|
|
|
|
"new_pairs_days": {
|
|
|
|
"description": "Download data of new pairs for given number of days",
|
|
|
|
"type": "integer",
|
|
|
|
"default": 30,
|
|
|
|
},
|
|
|
|
"timeframe": {
|
|
|
|
"description": (
|
|
|
|
"The timeframe to use (e.g `1m`, `5m`, `15m`, `30m`, `1h` ...)."
|
|
|
|
"Usually missing in configuration and specified in the strategy."
|
|
|
|
),
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"stake_currency": {
|
|
|
|
"description": "Currency used for staking.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"stake_amount": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Amount to stake per trade.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": ["number", "string"],
|
|
|
|
"minimum": 0.0001,
|
|
|
|
"pattern": UNLIMITED_STAKE_AMOUNT,
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"tradable_balance_ratio": {
|
|
|
|
"description": "Ratio of balance that is tradable.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 1,
|
|
|
|
"default": 0.99,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"available_capital": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Total capital available for trading.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"amend_last_stake_amount": {
|
|
|
|
"description": "Whether to amend the last stake amount.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": False,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"last_stake_amount_min_ratio": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Minimum ratio for the last stake amount.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 1.0,
|
|
|
|
"default": 0.5,
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"fiat_display_currency": {
|
|
|
|
"description": "Fiat currency for display purposes.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": SUPPORTED_FIAT,
|
|
|
|
},
|
|
|
|
"dry_run": {
|
|
|
|
"description": "Enable or disable dry run mode.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"dry_run_wallet": {
|
|
|
|
"description": "Initial wallet balance for dry run mode.",
|
|
|
|
"type": "number",
|
|
|
|
"default": DRY_RUN_WALLET,
|
|
|
|
},
|
|
|
|
"cancel_open_orders_on_exit": {
|
|
|
|
"description": "Cancel open orders when exiting.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": False,
|
|
|
|
},
|
|
|
|
"process_only_new_candles": {
|
|
|
|
"description": "Process only new candles.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"minimal_roi": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Minimum return on investment.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"patternProperties": {"^[0-9.]+$": {"type": "number"}},
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"amount_reserve_percent": {
|
|
|
|
"description": "Percentage of amount to reserve.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 0.5,
|
|
|
|
},
|
|
|
|
"stoploss": {
|
|
|
|
"description": "Value (as ratio) to use as Stoploss value.",
|
|
|
|
"type": "number",
|
|
|
|
"maximum": 0,
|
|
|
|
"exclusiveMaximum": True,
|
|
|
|
},
|
|
|
|
"trailing_stop": {
|
|
|
|
"description": "Enable or disable trailing stop.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"trailing_stop_positive": {
|
|
|
|
"description": "Positive offset for trailing stop.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 1,
|
|
|
|
},
|
|
|
|
"trailing_stop_positive_offset": {
|
|
|
|
"description": "Offset for trailing stop to activate.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 1,
|
|
|
|
},
|
|
|
|
"trailing_only_offset_is_reached": {
|
|
|
|
"description": "Use trailing stop only when offset is reached.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"use_exit_signal": {
|
|
|
|
"description": "Use exit signal for trades.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"exit_profit_only": {
|
|
|
|
"description": (
|
|
|
|
"Exit only when in profit. Exit signals are ignored as "
|
|
|
|
"long as profit is < exit_profit_offset."
|
|
|
|
),
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"exit_profit_offset": {
|
|
|
|
"description": "Offset for profit exit.",
|
|
|
|
"type": "number",
|
|
|
|
},
|
|
|
|
"fee": {
|
|
|
|
"description": "Trading fee percentage. Can help to simulate slippage in backtesting",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 0.1,
|
|
|
|
},
|
|
|
|
"ignore_roi_if_entry_signal": {
|
|
|
|
"description": "Ignore ROI if entry signal is present.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"ignore_buying_expired_candle_after": {
|
|
|
|
"description": "Ignore buying after candle expiration time.",
|
|
|
|
"type": "number",
|
|
|
|
},
|
|
|
|
"trading_mode": {
|
|
|
|
"description": "Mode of trading (e.g., spot, margin).",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TRADING_MODES,
|
|
|
|
},
|
|
|
|
"margin_mode": {
|
|
|
|
"description": "Margin mode for trading.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": MARGIN_MODES,
|
|
|
|
},
|
|
|
|
"reduce_df_footprint": {
|
|
|
|
"description": "Reduce DataFrame footprint by casting columns to float32/int32.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": False,
|
|
|
|
},
|
|
|
|
"minimum_trade_amount": {
|
|
|
|
"description": "Minimum amount for a trade - only used for lookahead-analysis",
|
|
|
|
"type": "number",
|
|
|
|
"default": 10,
|
|
|
|
},
|
|
|
|
"targeted_trade_amount": {
|
|
|
|
"description": "Targeted trade amount for lookahead analysis.",
|
|
|
|
"type": "number",
|
|
|
|
"default": 20,
|
|
|
|
},
|
|
|
|
"lookahead_analysis_exportfilename": {
|
|
|
|
"description": "csv Filename for lookahead analysis export.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"startup_candle": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Startup candle configuration.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
|
|
|
"uniqueItems": True,
|
|
|
|
"default": [199, 399, 499, 999, 1999],
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"liquidation_buffer": {
|
|
|
|
"description": "Buffer ratio for liquidation.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 0.99,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"backtest_breakdown": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Breakdown configuration for backtesting.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {"type": "string", "enum": BACKTEST_BREAKDOWNS},
|
|
|
|
},
|
2024-07-25 18:13:58 +00:00
|
|
|
"bot_name": {
|
|
|
|
"description": "Name of the trading bot. Passed via API to a client.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"unfilledtimeout": {
|
2024-07-25 18:13:58 +00:00
|
|
|
"description": "Timeout configuration for unfilled orders.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"entry": {
|
|
|
|
"description": "Timeout for entry orders in unit.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
|
|
|
"exit": {
|
|
|
|
"description": "Timeout for exit orders in unit.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
|
|
|
"exit_timeout_count": {
|
|
|
|
"description": "Number of times to retry exit orders before giving up.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"default": 0,
|
|
|
|
},
|
|
|
|
"unit": {
|
|
|
|
"description": "Unit of time for the timeout (e.g., seconds, minutes).",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TIMEOUT_UNITS,
|
|
|
|
"default": "minutes",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
"entry_pricing": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Configuration for entry pricing.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"price_last_balance": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Balance ratio for the last price.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 1,
|
|
|
|
"exclusiveMaximum": False,
|
|
|
|
},
|
2024-07-25 18:18:53 +00:00
|
|
|
"price_side": {
|
|
|
|
"description": "Side of the price to use (e.g., bid, ask, same).",
|
|
|
|
"type": "string",
|
|
|
|
"enum": PRICING_SIDES,
|
|
|
|
"default": "same",
|
|
|
|
},
|
|
|
|
"use_order_book": {
|
|
|
|
"description": "Whether to use the order book for pricing.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"order_book_top": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Top N levels of the order book to consider.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "integer",
|
|
|
|
"minimum": 1,
|
|
|
|
"maximum": 50,
|
|
|
|
},
|
|
|
|
"check_depth_of_market": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Configuration for checking the depth of the market.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"enabled": {
|
|
|
|
"description": "Enable or disable depth of market check.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"bids_to_ask_delta": {
|
|
|
|
"description": "Delta between bids and asks to consider.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"required": ["price_side"],
|
|
|
|
},
|
|
|
|
"exit_pricing": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Configuration for exit pricing.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"price_side": {
|
|
|
|
"description": "Side of the price to use (e.g., bid, ask, same).",
|
|
|
|
"type": "string",
|
|
|
|
"enum": PRICING_SIDES,
|
|
|
|
"default": "same",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"price_last_balance": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Balance ratio for the last price.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 1,
|
|
|
|
"exclusiveMaximum": False,
|
|
|
|
},
|
2024-07-25 18:18:53 +00:00
|
|
|
"use_order_book": {
|
|
|
|
"description": "Whether to use the order book for pricing.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"order_book_top": {
|
2024-07-25 18:18:53 +00:00
|
|
|
"description": "Top N levels of the order book to consider.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "integer",
|
|
|
|
"minimum": 1,
|
|
|
|
"maximum": 50,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"required": ["price_side"],
|
|
|
|
},
|
2024-07-25 18:18:53 +00:00
|
|
|
"custom_price_max_distance_ratio": {
|
|
|
|
"description": "Maximum distance ratio between current and custom entry or exit price.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 1,
|
|
|
|
"default": 0.02,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"order_types": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Configuration of order types.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"entry": {
|
|
|
|
"description": "Order type for entry (e.g., limit, market).",
|
|
|
|
"type": "string",
|
|
|
|
"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,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"emergency_exit": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Order type for emergency exit (e.g., limit, market).",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": ORDERTYPE_POSSIBILITIES,
|
|
|
|
"default": "market",
|
|
|
|
},
|
2024-07-25 18:25:08 +00:00
|
|
|
"stoploss": {
|
|
|
|
"description": "Order type for stop loss (e.g., limit, market).",
|
|
|
|
"type": "string",
|
|
|
|
"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",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"stoploss_on_exchange_limit_ratio": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Limit ratio for stop loss on exchange.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
"maximum": 1.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"required": ["entry", "exit", "stoploss", "stoploss_on_exchange"],
|
|
|
|
},
|
|
|
|
"order_time_in_force": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Time in force configuration for orders.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"entry": {
|
|
|
|
"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,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": REQUIRED_ORDERTIF,
|
|
|
|
},
|
|
|
|
"coingecko": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Configuration for CoinGecko API.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"is_demo": {
|
|
|
|
"description": "Whether to use CoinGecko in demo mode.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": True,
|
|
|
|
},
|
|
|
|
"api_key": {"description": "API key for accessing CoinGecko.", "type": "string"},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["is_demo", "api_key"],
|
|
|
|
},
|
2024-07-25 18:25:08 +00:00
|
|
|
"exchange": {
|
|
|
|
"description": "Exchange configuration.",
|
|
|
|
"$ref": "#/definitions/exchange",
|
|
|
|
},
|
|
|
|
"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",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"experimental": {
|
2024-07-25 18:25:08 +00:00
|
|
|
"description": "Experimental configuration.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {"block_bad_exchanges": {"type": "boolean"}},
|
|
|
|
},
|
|
|
|
"pairlists": {
|
2024-07-25 18:37:00 +00:00
|
|
|
"description": "Configuration for pairlists.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:37:00 +00:00
|
|
|
"method": {
|
|
|
|
"description": "Method used for generating the pairlist.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": AVAILABLE_PAIRLISTS,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["method"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"protections": {
|
2024-07-25 18:37:00 +00:00
|
|
|
"description": "Configuration for various protections.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:37:00 +00:00
|
|
|
"method": {
|
|
|
|
"description": "Method used for the protection.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": AVAILABLE_PROTECTIONS,
|
|
|
|
},
|
|
|
|
"stop_duration": {
|
|
|
|
"description": (
|
|
|
|
"Duration to lock the pair after a protection is triggered, "
|
|
|
|
"in minutes."
|
|
|
|
),
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
},
|
|
|
|
"stop_duration_candles": {
|
|
|
|
"description": (
|
|
|
|
"Duration to lock the pair after a protection is triggered, in "
|
|
|
|
"number of candles."
|
|
|
|
),
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
},
|
|
|
|
"trade_limit": {
|
|
|
|
"description": "Minimum number of trades required during lookback period.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
|
|
|
"lookback_period": {
|
|
|
|
"description": "Period to look back for protection checks, in minutes.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
|
|
|
"lookback_period_candles": {
|
|
|
|
"description": (
|
|
|
|
"Period to look back for protection checks, in number " "of candles."
|
|
|
|
),
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["method"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"telegram": {
|
2024-07-25 18:52:05 +00:00
|
|
|
"description": "Telegram settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"enabled": {
|
|
|
|
"description": "Enable Telegram notifications.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"token": {"description": "Telegram bot token.", "type": "string"},
|
|
|
|
"chat_id": {
|
|
|
|
"description": "Telegram chat ID",
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"allow_custom_messages": {
|
|
|
|
"description": "Allow sending custom messages from the Strategy.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": True,
|
|
|
|
},
|
|
|
|
"balance_dust_level": {
|
|
|
|
"description": "Minimum balance level to consider as dust.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"notification_settings": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"description": "Settings for different types of notifications.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"default": {},
|
|
|
|
"properties": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"status": {
|
|
|
|
"description": "Telegram setting for status updates.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
|
|
|
"warning": {
|
|
|
|
"description": "Telegram setting for warnings.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
|
|
|
"startup": {
|
|
|
|
"description": "Telegram setting for startup messages.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
|
|
|
"entry": {
|
|
|
|
"description": "Telegram setting for entry signals.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"entry_fill": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"description": "Telegram setting for entry fill signals.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
"default": "off",
|
|
|
|
},
|
|
|
|
"entry_cancel": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"description": "Telegram setting for entry cancel signals.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
|
|
|
"exit": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"description": "Telegram setting for exit signals.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": ["string", "object"],
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"exit_fill": {
|
2024-07-25 18:42:40 +00:00
|
|
|
"description": "Telegram setting for exit fill signals.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
"default": "on",
|
|
|
|
},
|
2024-07-25 18:42:40 +00:00
|
|
|
"exit_cancel": {
|
|
|
|
"description": "Telegram setting for exit cancel signals.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
},
|
2024-07-25 18:42:40 +00:00
|
|
|
"protection_trigger": {
|
|
|
|
"description": "Telegram setting for protection triggers.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
"default": "on",
|
|
|
|
},
|
2024-07-25 18:42:40 +00:00
|
|
|
"protection_trigger_global": {
|
|
|
|
"description": "Telegram setting for global protection triggers.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": TELEGRAM_SETTING_OPTIONS,
|
|
|
|
"default": "on",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-07-25 18:42:40 +00:00
|
|
|
"reload": {
|
|
|
|
"description": "Add Reload button to certain messages.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["enabled", "token", "chat_id"],
|
|
|
|
},
|
|
|
|
"webhook": {
|
2024-07-25 18:52:05 +00:00
|
|
|
"description": "Webhook settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {"type": "boolean"},
|
|
|
|
"url": {"type": "string"},
|
|
|
|
"format": {"type": "string", "enum": WEBHOOK_FORMAT_OPTIONS, "default": "form"},
|
|
|
|
"retries": {"type": "integer", "minimum": 0},
|
|
|
|
"retry_delay": {"type": "number", "minimum": 0},
|
|
|
|
**__MESSAGE_TYPE_DICT,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"discord": {
|
2024-07-25 18:52:05 +00:00
|
|
|
"description": "Discord settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {"type": "boolean"},
|
|
|
|
"webhook_url": {"type": "string"},
|
|
|
|
"exit_fill": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {"type": "object"},
|
|
|
|
"default": [
|
|
|
|
{"Trade ID": "{trade_id}"},
|
|
|
|
{"Exchange": "{exchange}"},
|
|
|
|
{"Pair": "{pair}"},
|
|
|
|
{"Direction": "{direction}"},
|
|
|
|
{"Open rate": "{open_rate}"},
|
|
|
|
{"Close rate": "{close_rate}"},
|
|
|
|
{"Amount": "{amount}"},
|
|
|
|
{"Open date": "{open_date:%Y-%m-%d %H:%M:%S}"},
|
|
|
|
{"Close date": "{close_date:%Y-%m-%d %H:%M:%S}"},
|
|
|
|
{"Profit": "{profit_amount} {stake_currency}"},
|
|
|
|
{"Profitability": "{profit_ratio:.2%}"},
|
|
|
|
{"Enter tag": "{enter_tag}"},
|
|
|
|
{"Exit Reason": "{exit_reason}"},
|
|
|
|
{"Strategy": "{strategy}"},
|
|
|
|
{"Timeframe": "{timeframe}"},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"entry_fill": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {"type": "object"},
|
|
|
|
"default": [
|
|
|
|
{"Trade ID": "{trade_id}"},
|
|
|
|
{"Exchange": "{exchange}"},
|
|
|
|
{"Pair": "{pair}"},
|
|
|
|
{"Direction": "{direction}"},
|
|
|
|
{"Open rate": "{open_rate}"},
|
|
|
|
{"Amount": "{amount}"},
|
|
|
|
{"Open date": "{open_date:%Y-%m-%d %H:%M:%S}"},
|
|
|
|
{"Enter tag": "{enter_tag}"},
|
|
|
|
{"Strategy": "{strategy} {timeframe}"},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"api_server": {
|
2024-07-25 18:51:39 +00:00
|
|
|
"description": "API server settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:51:39 +00:00
|
|
|
"enabled": {"description": "Whether the API server is enabled.", "type": "boolean"},
|
|
|
|
"listen_ip_address": {
|
|
|
|
"description": "IP address the API server listens on.",
|
|
|
|
"format": "ipv4",
|
|
|
|
},
|
|
|
|
"listen_port": {
|
|
|
|
"description": "Port the API server listens on.",
|
|
|
|
"type": "integer",
|
|
|
|
"minimum": 1024,
|
|
|
|
"maximum": 65535,
|
|
|
|
},
|
|
|
|
"username": {
|
|
|
|
"description": "Username for API server authentication.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"description": "Password for API server authentication.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"ws_token": {
|
|
|
|
"description": "WebSocket token for API server.",
|
|
|
|
"type": ["string", "array"],
|
|
|
|
"items": {"type": "string"},
|
|
|
|
},
|
|
|
|
"jwt_secret_key": {
|
|
|
|
"description": "Secret key for JWT authentication.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"CORS_origins": {
|
|
|
|
"description": "List of allowed CORS origins.",
|
|
|
|
"type": "array",
|
|
|
|
"items": {"type": "string"},
|
|
|
|
},
|
|
|
|
"x": {
|
|
|
|
"description": "Logging verbosity level.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": ["error", "info"],
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["enabled", "listen_ip_address", "listen_port", "username", "password"],
|
|
|
|
},
|
2024-07-25 18:51:55 +00:00
|
|
|
"db_url": {
|
|
|
|
"description": "Database connection URL.",
|
|
|
|
"type": "string",
|
|
|
|
},
|
|
|
|
"export": {
|
|
|
|
"description": "Type of data to export.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": EXPORT_OPTIONS,
|
|
|
|
"default": "trades",
|
|
|
|
},
|
|
|
|
"disableparamexport": {
|
|
|
|
"description": "Disable parameter export.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"initial_state": {
|
|
|
|
"description": "Initial state of the system.",
|
|
|
|
"type": "string",
|
|
|
|
"enum": ["running", "stopped"],
|
|
|
|
},
|
|
|
|
"force_entry_enable": {
|
|
|
|
"description": "Force enable entry.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"disable_dataframe_checks": {
|
|
|
|
"description": "Disable checks on dataframes.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"internals": {
|
2024-07-25 18:51:55 +00:00
|
|
|
"description": "Internal settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"default": {},
|
|
|
|
"properties": {
|
2024-07-25 18:51:55 +00:00
|
|
|
"process_throttle_secs": {
|
|
|
|
"description": "Throttle time in seconds for processing.",
|
|
|
|
"type": "integer",
|
|
|
|
},
|
|
|
|
"interval": {
|
|
|
|
"description": "Interval time in seconds.",
|
|
|
|
"type": "integer",
|
|
|
|
},
|
|
|
|
"sd_notify": {
|
|
|
|
"description": "Enable systemd notify.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
"dataformat_ohlcv": {
|
2024-07-25 18:51:55 +00:00
|
|
|
"description": "Data format for OHLCV data.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": AVAILABLE_DATAHANDLERS,
|
|
|
|
"default": "feather",
|
|
|
|
},
|
|
|
|
"dataformat_trades": {
|
2024-07-25 18:51:55 +00:00
|
|
|
"description": "Data format for trade data.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "string",
|
|
|
|
"enum": AVAILABLE_DATAHANDLERS,
|
|
|
|
"default": "feather",
|
|
|
|
},
|
2024-07-25 18:52:05 +00:00
|
|
|
"position_adjustment_enable": {
|
|
|
|
"description": "Enable position adjustment.",
|
|
|
|
"type": "boolean",
|
|
|
|
},
|
|
|
|
"max_entry_position_adjustment": {
|
|
|
|
"description": "Maximum entry position adjustment allowed.",
|
|
|
|
"type": ["integer", "number"],
|
|
|
|
"minimum": -1,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
"orderflow": {
|
2024-07-25 18:52:05 +00:00
|
|
|
"description": "Settings related to order flow.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:52:05 +00:00
|
|
|
"cache_size": {
|
|
|
|
"description": "Size of the cache for order flow data.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
"default": 1500,
|
|
|
|
},
|
|
|
|
"max_candles": {
|
|
|
|
"description": "Maximum number of candles to consider.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 1,
|
|
|
|
"default": 1500,
|
|
|
|
},
|
|
|
|
"scale": {
|
|
|
|
"description": "Scale factor for order flow data.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
},
|
|
|
|
"stacked_imbalance_range": {
|
|
|
|
"description": "Range for stacked imbalance.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
},
|
|
|
|
"imbalance_volume": {
|
|
|
|
"description": "Volume threshold for imbalance.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0,
|
|
|
|
},
|
|
|
|
"imbalance_ratio": {
|
|
|
|
"description": "Ratio threshold for imbalance.",
|
|
|
|
"type": "number",
|
|
|
|
"minimum": 0.0,
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"max_candles",
|
|
|
|
"scale",
|
|
|
|
"stacked_imbalance_range",
|
|
|
|
"imbalance_volume",
|
|
|
|
"imbalance_ratio",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"definitions": {
|
|
|
|
"exchange": {
|
2024-07-25 18:56:26 +00:00
|
|
|
"description": "Exchange configuration settings.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-25 18:56:26 +00:00
|
|
|
"name": {"description": "Name of the exchange.", "type": "string"},
|
|
|
|
"enable_ws": {
|
|
|
|
"description": "Enable WebSocket connections to the exchange.",
|
|
|
|
"type": "boolean",
|
|
|
|
"default": True,
|
|
|
|
},
|
|
|
|
"key": {
|
|
|
|
"description": "API key for the exchange.",
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
},
|
|
|
|
"secret": {
|
|
|
|
"description": "API secret for the exchange.",
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"description": "Password for the exchange, if required.",
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
},
|
|
|
|
"uid": {"description": "User ID for the exchange, if required.", "type": "string"},
|
2024-07-23 16:14:31 +00:00
|
|
|
"pair_whitelist": {
|
2024-07-25 18:56:26 +00:00
|
|
|
"description": "List of whitelisted trading pairs.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
2024-07-25 18:56:26 +00:00
|
|
|
"items": {"type": "string"},
|
2024-07-23 16:14:31 +00:00
|
|
|
"uniqueItems": True,
|
|
|
|
},
|
|
|
|
"pair_blacklist": {
|
2024-07-25 18:56:26 +00:00
|
|
|
"description": "List of blacklisted trading pairs.",
|
2024-07-23 16:14:31 +00:00
|
|
|
"type": "array",
|
2024-07-25 18:56:26 +00:00
|
|
|
"items": {"type": "string"},
|
2024-07-23 16:14:31 +00:00
|
|
|
"uniqueItems": True,
|
|
|
|
},
|
2024-07-25 18:56:26 +00:00
|
|
|
"unknown_fee_rate": {
|
|
|
|
"description": "Fee rate for unknown markets.",
|
|
|
|
"type": "number",
|
|
|
|
},
|
|
|
|
"outdated_offset": {
|
|
|
|
"description": "Offset for outdated data in minutes.",
|
|
|
|
"type": "integer",
|
|
|
|
"minimum": 1,
|
|
|
|
},
|
|
|
|
"markets_refresh_interval": {
|
|
|
|
"description": "Interval for refreshing market data in minutes.",
|
|
|
|
"type": "integer",
|
|
|
|
"default": 60,
|
|
|
|
},
|
|
|
|
"ccxt_config": {"description": "CCXT configuration settings.", "type": "object"},
|
|
|
|
"ccxt_async_config": {
|
|
|
|
"description": "CCXT asynchronous configuration settings.",
|
|
|
|
"type": "object",
|
|
|
|
},
|
2024-07-23 16:14:31 +00:00
|
|
|
},
|
|
|
|
"required": ["name"],
|
|
|
|
},
|
|
|
|
"edge": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {"type": "boolean"},
|
|
|
|
"process_throttle_secs": {"type": "integer", "minimum": 600},
|
|
|
|
"calculate_since_number_of_days": {"type": "integer"},
|
|
|
|
"allowed_risk": {"type": "number"},
|
|
|
|
"stoploss_range_min": {"type": "number"},
|
|
|
|
"stoploss_range_max": {"type": "number"},
|
|
|
|
"stoploss_range_step": {"type": "number"},
|
|
|
|
"minimum_winrate": {"type": "number"},
|
|
|
|
"minimum_expectancy": {"type": "number"},
|
|
|
|
"min_trade_number": {"type": "number"},
|
|
|
|
"max_trade_duration_minute": {"type": "integer"},
|
|
|
|
"remove_pumps": {"type": "boolean"},
|
|
|
|
},
|
|
|
|
"required": ["process_throttle_secs", "allowed_risk"],
|
|
|
|
},
|
|
|
|
"external_message_consumer": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {"type": "boolean", "default": False},
|
|
|
|
"producers": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"name": {"type": "string"},
|
|
|
|
"host": {"type": "string"},
|
|
|
|
"port": {
|
|
|
|
"type": "integer",
|
|
|
|
"default": 8080,
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 65535,
|
|
|
|
},
|
|
|
|
"secure": {"type": "boolean", "default": False},
|
|
|
|
"ws_token": {"type": "string"},
|
|
|
|
},
|
|
|
|
"required": ["name", "host", "ws_token"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"wait_timeout": {"type": "integer", "minimum": 0},
|
|
|
|
"sleep_time": {"type": "integer", "minimum": 0},
|
|
|
|
"ping_timeout": {"type": "integer", "minimum": 0},
|
|
|
|
"remove_entry_exit_signals": {"type": "boolean", "default": False},
|
|
|
|
"initial_candle_limit": {
|
|
|
|
"type": "integer",
|
|
|
|
"minimum": 0,
|
|
|
|
"maximum": 1500,
|
|
|
|
"default": 1500,
|
|
|
|
},
|
|
|
|
"message_size_limit": { # In megabytes
|
|
|
|
"type": "integer",
|
|
|
|
"minimum": 1,
|
|
|
|
"maximum": 20,
|
|
|
|
"default": 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"required": ["producers"],
|
|
|
|
},
|
|
|
|
"freqai": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {"type": "boolean", "default": False},
|
|
|
|
"keras": {"type": "boolean", "default": False},
|
|
|
|
"write_metrics_to_disk": {"type": "boolean", "default": False},
|
|
|
|
"purge_old_models": {"type": ["boolean", "number"], "default": 2},
|
|
|
|
"conv_width": {"type": "integer", "default": 1},
|
|
|
|
"train_period_days": {"type": "integer", "default": 0},
|
|
|
|
"backtest_period_days": {"type": "number", "default": 7},
|
|
|
|
"identifier": {"type": "string", "default": "example"},
|
|
|
|
"feature_parameters": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"include_corr_pairlist": {"type": "array"},
|
|
|
|
"include_timeframes": {"type": "array"},
|
|
|
|
"label_period_candles": {"type": "integer"},
|
|
|
|
"include_shifted_candles": {"type": "integer", "default": 0},
|
|
|
|
"DI_threshold": {"type": "number", "default": 0},
|
|
|
|
"weight_factor": {"type": "number", "default": 0},
|
|
|
|
"principal_component_analysis": {"type": "boolean", "default": False},
|
|
|
|
"use_SVM_to_remove_outliers": {"type": "boolean", "default": False},
|
|
|
|
"plot_feature_importances": {"type": "integer", "default": 0},
|
|
|
|
"svm_params": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"shuffle": {"type": "boolean", "default": False},
|
|
|
|
"nu": {"type": "number", "default": 0.1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"shuffle_after_split": {"type": "boolean", "default": False},
|
|
|
|
"buffer_train_data_candles": {"type": "integer", "default": 0},
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"include_timeframes",
|
|
|
|
"include_corr_pairlist",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"data_split_parameters": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"test_size": {"type": "number"},
|
|
|
|
"random_state": {"type": "integer"},
|
|
|
|
"shuffle": {"type": "boolean", "default": False},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"model_training_parameters": {"type": "object"},
|
|
|
|
"rl_config": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"drop_ohlc_from_features": {"type": "boolean", "default": False},
|
|
|
|
"train_cycles": {"type": "integer"},
|
|
|
|
"max_trade_duration_candles": {"type": "integer"},
|
|
|
|
"add_state_info": {"type": "boolean", "default": False},
|
|
|
|
"max_training_drawdown_pct": {"type": "number", "default": 0.02},
|
|
|
|
"cpu_count": {"type": "integer", "default": 1},
|
|
|
|
"model_type": {"type": "string", "default": "PPO"},
|
|
|
|
"policy_type": {"type": "string", "default": "MlpPolicy"},
|
|
|
|
"net_arch": {"type": "array", "default": [128, 128]},
|
|
|
|
"randomize_starting_position": {"type": "boolean", "default": False},
|
|
|
|
"progress_bar": {"type": "boolean", "default": True},
|
|
|
|
"model_reward_parameters": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"rr": {"type": "number", "default": 1},
|
|
|
|
"profit_aim": {"type": "number", "default": 0.025},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"enabled",
|
|
|
|
"train_period_days",
|
|
|
|
"backtest_period_days",
|
|
|
|
"identifier",
|
|
|
|
"feature_parameters",
|
|
|
|
"data_split_parameters",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
SCHEMA_TRADE_REQUIRED = [
|
|
|
|
"exchange",
|
|
|
|
"timeframe",
|
|
|
|
"max_open_trades",
|
|
|
|
"stake_currency",
|
|
|
|
"stake_amount",
|
|
|
|
"tradable_balance_ratio",
|
|
|
|
"last_stake_amount_min_ratio",
|
|
|
|
"dry_run",
|
|
|
|
"dry_run_wallet",
|
|
|
|
"exit_pricing",
|
|
|
|
"entry_pricing",
|
|
|
|
"stoploss",
|
|
|
|
"minimal_roi",
|
|
|
|
"internals",
|
|
|
|
"dataformat_ohlcv",
|
|
|
|
"dataformat_trades",
|
|
|
|
]
|
|
|
|
|
|
|
|
SCHEMA_BACKTEST_REQUIRED = [
|
|
|
|
"exchange",
|
|
|
|
"stake_currency",
|
|
|
|
"stake_amount",
|
|
|
|
"dry_run_wallet",
|
|
|
|
"dataformat_ohlcv",
|
|
|
|
"dataformat_trades",
|
|
|
|
]
|
|
|
|
SCHEMA_BACKTEST_REQUIRED_FINAL = SCHEMA_BACKTEST_REQUIRED + [
|
|
|
|
"stoploss",
|
|
|
|
"minimal_roi",
|
|
|
|
"max_open_trades",
|
|
|
|
]
|
|
|
|
|
|
|
|
SCHEMA_MINIMAL_REQUIRED = [
|
|
|
|
"exchange",
|
|
|
|
"dry_run",
|
|
|
|
"dataformat_ohlcv",
|
|
|
|
"dataformat_trades",
|
|
|
|
]
|
|
|
|
SCHEMA_MINIMAL_WEBSERVER = SCHEMA_MINIMAL_REQUIRED + [
|
|
|
|
"api_server",
|
|
|
|
]
|