Skip to content

Commit

Permalink
add custom discord schema
Browse files Browse the repository at this point in the history
  • Loading branch information
stash86 committed Aug 1, 2024
1 parent c080c8a commit e3b4eae
Showing 1 changed file with 125 additions and 23 deletions.
148 changes: 125 additions & 23 deletions freqtrade/configuration/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,41 +614,143 @@
"type": "object",
"properties": {
"enabled": {"type": "boolean"},
"webhook_url": {"type": "string"},
"exit_fill": {
"webhook_url": {"type": "array", "items": {"type": "string"}},
"allow_custom_messages": {"type": "boolean", "default": True},
"entry_cancel": {
"type": "array",
"items": {"type": "object"},
"default": [
{"Trade ID": "{trade_id}"},
{"Exchange": "{exchange}"},
{"Pair": "{pair}"},
# {"Exchange": "{exchange}"},
# {"Strategy": "{strategy}"},
{"Open Date": "{open_date}"},
{"Enter Tag": "{enter_tag}"},
{"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}"},
{"Entry Rate": "{open_rate}"},
{"Current Rate": "{current_rate}"},
{"Reason": "{reason}"},
],
},
"entry_fill": {
"type": "object",
"properties": {
"enabled": {"type": "boolean", "default": False},
"rows": {
"type": "array",
"items": {"type": "object"},
"default": [
# {"Exchange": "{exchange}"},
{"Direction": "{direction}"},
{"Leverage": "{leverage}"},
{"Open Rate": "{open_rate}"},
{"Amount": "{amount}"},
{"Stake Amount": "{stake_amount} {stake_currency}"},
{"Open Date": "{open_date:%Y-%m-%d %H:%M:%S}"},
{"Enter Tag": "{enter_tag}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
],
},
"rows_sub_trade": {
"type": "array",
"items": {"type": "object"},
"default": [
{"Open Rate": "{open_rate}"},
{"Additional Entry Amount": "{amount}"},
{"Total Stake Amount": "{stake_amount} {stake_currency}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
],
},
},
},
"exit_cancel": {
"type": "array",
"items": {"type": "object"},
"default": [
# {"Exchange": "{exchange}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
{"Enter Tag": "{enter_tag}"},
{"Direction": "{direction}"},
{"Entry Rate": "{open_rate}"},
{"Exit Reason": "{exit_reason}"},
{"Exit Rate": "{limit}"},
{"Profit": "{profit_amount} {stake_currency}"},
{"Profit %": "{profit_ratio:.2%}"},
{"Current Rate": "{current_rate}"},
{"Reason": "{reason}"},
],
},
"exit_fill": {
"type": "object",
"properties": {
"enabled": {"type": "boolean", "default": True},
"rows": {
"type": "array",
"items": {"type": "object"},
"default": [
# {"Exchange": "{exchange}"},
{"Direction": "{direction}"},
{"Leverage": "{leverage}"},
{"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}"},
{"Profit %": "{profit_ratio:.2%}"},
{"Min Profit %": "{min_profit:.2%}"},
{"Max Profit %": "{max_profit:.2%}"},
{"Enter Tag": "{enter_tag}"},
{"Exit Reason": "{exit_reason}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
],
},
"rows_sub_trade": {
"type": "array",
"items": {"type": "object"},
"default": [
{"Open Rate": "{open_rate}"},
{"Close Rate": "{close_rate}"},
{"Partial Exit Amount": "{amount}"},
{"Partial Exit Date": "{close_date:%Y-%m-%d %H:%M:%S}"},
{"Remaining Stake Amount": "{stake_amount} {stake_currency}"},
{"Profit": "{profit_amount} {stake_currency}"},
{"Profit %": "{profit_ratio:.2%}"},
{"Cumulative Profit": "{cumulative_profit} {stake_currency}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
],
},
},
},
"rows_status": {
"type": "array",
"items": {"type": "object"},
"default": [
{"Exchange": "{exchange}"},
{"Strategy": "{strategy}"},
{"Timeframe": "{timeframe}"},
{"Status": "{status}"},
{"Strategy Version": "{strategy_version}"},
],
},
"entry_fill": {
"rows_wallet": {
"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}"},
{"Message": "{msg}"},
],
},
"rows_strategy_msg": {
"type": "array",
"items": {"type": "object"},
"default": [
# {"Exchange": "{exchange}"},
# {"Strategy": "{strategy}"},
# {"Timeframe": "{timeframe}"},
{"Message": "{msg}"},
],
},
},
Expand Down

0 comments on commit e3b4eae

Please sign in to comment.