mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
feat: Add initial descriptions for config schema
This commit is contained in:
parent
08ed99d20c
commit
4e51140506
|
@ -29,66 +29,198 @@ __MESSAGE_TYPE_DICT: Dict[str, Dict[str, str]] = {x: {"type": "object"} for x in
|
||||||
CONF_SCHEMA = {
|
CONF_SCHEMA = {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"max_open_trades": {"type": ["integer", "number"], "minimum": -1},
|
"max_open_trades": {
|
||||||
"new_pairs_days": {"type": "integer", "default": 30},
|
"description": "Maximum number of open trades. -1 for unlimited.",
|
||||||
"timeframe": {"type": "string"},
|
"type": ["integer", "number"],
|
||||||
"stake_currency": {"type": "string"},
|
"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",
|
||||||
|
},
|
||||||
"stake_amount": {
|
"stake_amount": {
|
||||||
|
"description": "Amount to stake per trade.",
|
||||||
"type": ["number", "string"],
|
"type": ["number", "string"],
|
||||||
"minimum": 0.0001,
|
"minimum": 0.0001,
|
||||||
"pattern": UNLIMITED_STAKE_AMOUNT,
|
"pattern": UNLIMITED_STAKE_AMOUNT,
|
||||||
},
|
},
|
||||||
"tradable_balance_ratio": {"type": "number", "minimum": 0.0, "maximum": 1, "default": 0.99},
|
"tradable_balance_ratio": {
|
||||||
|
"description": "Ratio of balance that is tradable.",
|
||||||
|
"type": "number",
|
||||||
|
"minimum": 0.0,
|
||||||
|
"maximum": 1,
|
||||||
|
"default": 0.99,
|
||||||
|
},
|
||||||
"available_capital": {
|
"available_capital": {
|
||||||
|
"description": "Total capital available for trading.",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
},
|
},
|
||||||
"amend_last_stake_amount": {"type": "boolean", "default": False},
|
"amend_last_stake_amount": {
|
||||||
|
"description": "Whether to amend the last stake amount.",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": False,
|
||||||
|
},
|
||||||
"last_stake_amount_min_ratio": {
|
"last_stake_amount_min_ratio": {
|
||||||
|
"description": "Minimum ratio for the last stake amount.",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"minimum": 0.0,
|
"minimum": 0.0,
|
||||||
"maximum": 1.0,
|
"maximum": 1.0,
|
||||||
"default": 0.5,
|
"default": 0.5,
|
||||||
},
|
},
|
||||||
"fiat_display_currency": {"type": "string", "enum": SUPPORTED_FIAT},
|
"fiat_display_currency": {
|
||||||
"dry_run": {"type": "boolean"},
|
"description": "Fiat currency for display purposes.",
|
||||||
"dry_run_wallet": {"type": "number", "default": DRY_RUN_WALLET},
|
"type": "string",
|
||||||
"cancel_open_orders_on_exit": {"type": "boolean", "default": False},
|
"enum": SUPPORTED_FIAT,
|
||||||
"process_only_new_candles": {"type": "boolean"},
|
},
|
||||||
|
"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",
|
||||||
|
},
|
||||||
"minimal_roi": {
|
"minimal_roi": {
|
||||||
|
"description": "Minimum return on investment.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"patternProperties": {"^[0-9.]+$": {"type": "number"}},
|
"patternProperties": {"^[0-9.]+$": {"type": "number"}},
|
||||||
},
|
},
|
||||||
"amount_reserve_percent": {"type": "number", "minimum": 0.0, "maximum": 0.5},
|
"amount_reserve_percent": {
|
||||||
"stoploss": {"type": "number", "maximum": 0, "exclusiveMaximum": True},
|
"description": "Percentage of amount to reserve.",
|
||||||
"trailing_stop": {"type": "boolean"},
|
"type": "number",
|
||||||
"trailing_stop_positive": {"type": "number", "minimum": 0, "maximum": 1},
|
"minimum": 0.0,
|
||||||
"trailing_stop_positive_offset": {"type": "number", "minimum": 0, "maximum": 1},
|
"maximum": 0.5,
|
||||||
"trailing_only_offset_is_reached": {"type": "boolean"},
|
},
|
||||||
"use_exit_signal": {"type": "boolean"},
|
"stoploss": {
|
||||||
"exit_profit_only": {"type": "boolean"},
|
"description": "Value (as ratio) to use as Stoploss value.",
|
||||||
"exit_profit_offset": {"type": "number"},
|
"type": "number",
|
||||||
"fee": {"type": "number", "minimum": 0, "maximum": 0.1},
|
"maximum": 0,
|
||||||
"ignore_roi_if_entry_signal": {"type": "boolean"},
|
"exclusiveMaximum": True,
|
||||||
"ignore_buying_expired_candle_after": {"type": "number"},
|
},
|
||||||
"trading_mode": {"type": "string", "enum": TRADING_MODES},
|
"trailing_stop": {
|
||||||
"margin_mode": {"type": "string", "enum": MARGIN_MODES},
|
"description": "Enable or disable trailing stop.",
|
||||||
"reduce_df_footprint": {"type": "boolean", "default": False},
|
"type": "boolean",
|
||||||
"minimum_trade_amount": {"type": "number", "default": 10},
|
},
|
||||||
"targeted_trade_amount": {"type": "number", "default": 20},
|
"trailing_stop_positive": {
|
||||||
"lookahead_analysis_exportfilename": {"type": "string"},
|
"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",
|
||||||
|
},
|
||||||
"startup_candle": {
|
"startup_candle": {
|
||||||
|
"description": "Startup candle configuration.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"uniqueItems": True,
|
"uniqueItems": True,
|
||||||
"default": [199, 399, 499, 999, 1999],
|
"default": [199, 399, 499, 999, 1999],
|
||||||
},
|
},
|
||||||
"liquidation_buffer": {"type": "number", "minimum": 0.0, "maximum": 0.99},
|
"liquidation_buffer": {
|
||||||
|
"description": "Buffer ratio for liquidation.",
|
||||||
|
"type": "number",
|
||||||
|
"minimum": 0.0,
|
||||||
|
"maximum": 0.99,
|
||||||
|
},
|
||||||
"backtest_breakdown": {
|
"backtest_breakdown": {
|
||||||
|
"description": "Breakdown configuration for backtesting.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {"type": "string", "enum": BACKTEST_BREAKDOWNS},
|
"items": {"type": "string", "enum": BACKTEST_BREAKDOWNS},
|
||||||
},
|
},
|
||||||
"bot_name": {"type": "string"},
|
"bot_name": {
|
||||||
|
"description": "Name of the trading bot. Passed via API to a client.",
|
||||||
|
"type": "string",
|
||||||
|
},
|
||||||
"unfilledtimeout": {
|
"unfilledtimeout": {
|
||||||
|
"description": "Timeout configuration for unfilled orders.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entry": {"type": "number", "minimum": 1},
|
"entry": {"type": "number", "minimum": 1},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user