Skip to content

Commit 1666746

Browse files
committed
feat: recommend setting secrets via environment variable
1 parent 3a74fc8 commit 1666746

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

build_helpers/schema.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,34 +1169,34 @@
11691169
"type": "string"
11701170
},
11711171
"key": {
1172-
"description": "API key for the exchange.",
1172+
"description": "API key for the exchange. Recommended to be set via environment variable FREQTRADE__EXCHANGE__KEY",
11731173
"type": "string",
11741174
"default": ""
11751175
},
11761176
"secret": {
1177-
"description": "API secret for the exchange.",
1177+
"description": "API secret for the exchange. Recommended to be set via environment variable FREQTRADE__EXCHANGE__SECRET",
11781178
"type": "string",
11791179
"default": ""
11801180
},
11811181
"password": {
1182-
"description": "Password for the exchange, if required.",
1182+
"description": "Password for the exchange, if required. Recommended to be set via environment variable FREQTRADE__EXCHANGE__PASSWORD",
11831183
"type": "string",
11841184
"default": ""
11851185
},
11861186
"uid": {
1187-
"description": "User ID for the exchange, if required.",
1187+
"description": "User ID for the exchange, if required. Recommended to be set via environment variable FREQTRADE__EXCHANGE__UID",
11881188
"type": "string"
11891189
},
11901190
"account_id": {
1191-
"description": "Account ID for the exchange, if required.",
1191+
"description": "Account ID for the exchange, if required. Recommended to be set via environment variable FREQTRADE__EXCHANGE__ACCOUNT_ID",
11921192
"type": "string"
11931193
},
11941194
"wallet_address": {
1195-
"description": "Wallet address for the exchange, if required. Usually used by DEX exchanges.",
1195+
"description": "Wallet address for the exchange, if required. Usually used by DEX exchanges. Recommended to be set via environment variable FREQTRADE__EXCHANGE__WALLET_ADDRESS",
11961196
"type": "string"
11971197
},
11981198
"private_key": {
1199-
"description": "Private key for the exchange, if required. Usually used by DEX exchanges.",
1199+
"description": "Private key for the exchange, if required. Usually used by DEX exchanges. Recommended to be set via environment variable FREQTRADE__EXCHANGE__PRIVATE_KEY",
12001200
"type": "string"
12011201
},
12021202
"pair_whitelist": {

freqtrade/config_schema/config_schema.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
__IN_STRATEGY = "\nUsually specified in the strategy and missing in the configuration."
2828

29+
__VIA_ENV = "Recommended to be set via environment variable"
30+
2931
CONF_SCHEMA = {
3032
"type": "object",
3133
"properties": {
@@ -807,35 +809,53 @@
807809
"properties": {
808810
"name": {"description": "Name of the exchange.", "type": "string"},
809811
"key": {
810-
"description": "API key for the exchange.",
812+
"description": (
813+
f"API key for the exchange. {__VIA_ENV} FREQTRADE__EXCHANGE__KEY"
814+
),
811815
"type": "string",
812816
"default": "",
813817
},
814818
"secret": {
815-
"description": "API secret for the exchange.",
819+
"description": (
820+
f"API secret for the exchange. {__VIA_ENV} FREQTRADE__EXCHANGE__SECRET"
821+
),
816822
"type": "string",
817823
"default": "",
818824
},
819825
"password": {
820-
"description": "Password for the exchange, if required.",
826+
"description": (
827+
"Password for the exchange, if required. "
828+
f"{__VIA_ENV} FREQTRADE__EXCHANGE__PASSWORD"
829+
),
821830
"type": "string",
822831
"default": "",
823832
},
824-
"uid": {"description": "User ID for the exchange, if required.", "type": "string"},
833+
"uid": {
834+
"description": (
835+
"User ID for the exchange, if required. "
836+
f"{__VIA_ENV} FREQTRADE__EXCHANGE__UID"
837+
),
838+
"type": "string",
839+
},
825840
"account_id": {
826-
"description": "Account ID for the exchange, if required.",
841+
"description": (
842+
"Account ID for the exchange, if required. "
843+
f"{__VIA_ENV} FREQTRADE__EXCHANGE__ACCOUNT_ID"
844+
),
827845
"type": "string",
828846
},
829847
"wallet_address": {
830848
"description": (
831849
"Wallet address for the exchange, if required. "
832-
"Usually used by DEX exchanges."
850+
"Usually used by DEX exchanges. "
851+
f"{__VIA_ENV} FREQTRADE__EXCHANGE__WALLET_ADDRESS"
833852
),
834853
"type": "string",
835854
},
836855
"private_key": {
837856
"description": (
838-
"Private key for the exchange, if required. Usually used by DEX exchanges."
857+
"Private key for the exchange, if required. Usually used by DEX exchanges. "
858+
f"{__VIA_ENV} FREQTRADE__EXCHANGE__PRIVATE_KEY"
839859
),
840860
"type": "string",
841861
},

0 commit comments

Comments
 (0)