Skip to content

Commit ad5d2a3

Browse files
committed
feat: Further ENV recommendations to config schema
1 parent 1666746 commit ad5d2a3

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

build_helpers/schema.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,11 @@
610610
"type": "string"
611611
},
612612
"chat_id": {
613-
"description": "Telegram chat or group ID",
613+
"description": "Telegram chat or group ID. Recommended to be set via environment variable FREQTRADE__TELEGRAM__CHAT_ID",
614614
"type": "string"
615615
},
616616
"topic_id": {
617-
"description": "Telegram topic ID - only applicable for group chats",
617+
"description": "Telegram topic ID - only applicable for group chats. Recommended to be set via environment variable FREQTRADE__TELEGRAM__TOPIC_ID",
618618
"type": "string"
619619
},
620620
"authorized_users": {
@@ -773,9 +773,11 @@
773773
"type": "object",
774774
"properties": {
775775
"enabled": {
776+
"description": "Enable webhook notifications.",
776777
"type": "boolean"
777778
},
778779
"url": {
780+
"description": "Webhook URL. Recommended to be set via environment variable FREQTRADE__WEBHOOK__URL",
779781
"type": "string"
780782
},
781783
"format": {
@@ -853,6 +855,7 @@
853855
"type": "boolean"
854856
},
855857
"webhook_url": {
858+
"description": "Discord webhook URL. Recommended to be set via environment variable FREQTRADE__DISCORD__WEBHOOK_URL",
856859
"type": "string"
857860
},
858861
"exit_fill": {

freqtrade/config_schema/config_schema.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,16 @@
470470
},
471471
"token": {"description": "Telegram bot token.", "type": "string"},
472472
"chat_id": {
473-
"description": "Telegram chat or group ID",
473+
"description": (
474+
f"Telegram chat or group ID. {__VIA_ENV} FREQTRADE__TELEGRAM__CHAT_ID"
475+
),
474476
"type": "string",
475477
},
476478
"topic_id": {
477-
"description": "Telegram topic ID - only applicable for group chats",
479+
"description": (
480+
"Telegram topic ID - only applicable for group chats. "
481+
f"{__VIA_ENV} FREQTRADE__TELEGRAM__TOPIC_ID"
482+
),
478483
"type": "string",
479484
},
480485
"authorized_users": {
@@ -576,8 +581,11 @@
576581
"description": "Webhook settings.",
577582
"type": "object",
578583
"properties": {
579-
"enabled": {"type": "boolean"},
580-
"url": {"type": "string"},
584+
"enabled": {"description": "Enable webhook notifications.", "type": "boolean"},
585+
"url": {
586+
"description": f"Webhook URL. {__VIA_ENV} FREQTRADE__WEBHOOK__URL",
587+
"type": "string",
588+
},
581589
"format": {"type": "string", "enum": WEBHOOK_FORMAT_OPTIONS, "default": "form"},
582590
"retries": {"type": "integer", "minimum": 0},
583591
"retry_delay": {"type": "number", "minimum": 0},
@@ -589,7 +597,12 @@
589597
"type": "object",
590598
"properties": {
591599
"enabled": {"type": "boolean"},
592-
"webhook_url": {"type": "string"},
600+
"webhook_url": {
601+
"description": (
602+
f"Discord webhook URL. {__VIA_ENV} FREQTRADE__DISCORD__WEBHOOK_URL"
603+
),
604+
"type": "string",
605+
},
593606
"exit_fill": {
594607
"type": "array",
595608
"items": {"type": "object"},

0 commit comments

Comments
 (0)