From ed12cddf3fc4c5e250fe504b821b50d8b8d190af Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 7 Oct 2022 20:45:15 +0200 Subject: [PATCH] Update docs with new wording for webhook settings --- docs/configuration.md | 14 +++++----- docs/deprecated.md | 14 +++++----- docs/strategy_migration.md | 12 ++++----- docs/telegram-usage.md | 2 ++ docs/webhook-config.md | 53 +++++++++++++++++++------------------- 5 files changed, 48 insertions(+), 47 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 8fe6b7620..e773e1878 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -219,13 +219,13 @@ Mandatory parameters are marked as **Required**, which means that they are requi | | **Webhook** | `webhook.enabled` | Enable usage of Webhook notifications
**Datatype:** Boolean | `webhook.url` | URL for the webhook. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookentry` | Payload to send on entry. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookentrycancel` | Payload to send on entry order cancel. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookentryfill` | Payload to send on entry order filled. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookexit` | Payload to send on exit. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookexitcancel` | Payload to send on exit order cancel. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookexitfill` | Payload to send on exit order filled. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String -| `webhook.webhookstatus` | Payload to send on status calls. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.entry` | Payload to send on entry. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.entry_cancel` | Payload to send on entry order cancel. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.entry_fill` | Payload to send on entry order filled. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.exit` | Payload to send on exit. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.exit_cancel` | Payload to send on exit order cancel. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.exit_fill` | Payload to send on exit order filled. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String +| `webhook.status` | Payload to send on status calls. Only required if `webhook.enabled` is `true`. See the [webhook documentation](webhook-config.md) for more details.
**Datatype:** String | `webhook.allow_custom_messages` | Enable the sending of Webhook messages from strategies via the dataprovider.send_msg() function.
**Datatype:** Boolean | | **Rest API / FreqUI / Producer-Consumer** | `api_server.enabled` | Enable usage of API Server. See the [API Server documentation](rest-api.md) for more details.
**Datatype:** Boolean diff --git a/docs/deprecated.md b/docs/deprecated.md index beceb12ab..3b5b28b81 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -66,11 +66,11 @@ We will keep a compatibility layer for 1-2 versions (so both `buy_tag` and `ente #### Naming changes -Webhook terminology changed from "sell" to "exit", and from "buy" to "entry". +Webhook terminology changed from "sell" to "exit", and from "buy" to "entry", removing "webhook" in the process. -* `webhookbuy` -> `webhookentry` -* `webhookbuyfill` -> `webhookentryfill` -* `webhookbuycancel` -> `webhookentrycancel` -* `webhooksell` -> `webhookexit` -* `webhooksellfill` -> `webhookexitfill` -* `webhooksellcancel` -> `webhookexitcancel` +* `webhookbuy`, `webhookentry` -> `entry` +* `webhookbuyfill`, `webhookentryfill` -> `entry_fill` +* `webhookbuycancel`, `webhookentrycancel` -> `entry_cancel` +* `webhooksell`, `webhookexit` -> `exit` +* `webhooksellfill`, `webhookexitfill` -> `exit_fill` +* `webhooksellcancel`, `webhookexitcancel` -> `exit_cancel` diff --git a/docs/strategy_migration.md b/docs/strategy_migration.md index ac65abff4..b971b81ea 100644 --- a/docs/strategy_migration.md +++ b/docs/strategy_migration.md @@ -50,12 +50,12 @@ Note : `forcesell`, `forcebuy`, `emergencysell` are changed to `force_exit`, `fo * `force_sell` -> `force_exit` * `emergency_sell` -> `emergency_exit` * Webhook terminology changed from "sell" to "exit", and from "buy" to entry - * `webhookbuy` -> `webhookentry` - * `webhookbuyfill` -> `webhookentryfill` - * `webhookbuycancel` -> `webhookentrycancel` - * `webhooksell` -> `webhookexit` - * `webhooksellfill` -> `webhookexitfill` - * `webhooksellcancel` -> `webhookexitcancel` + * `webhookbuy` -> `entry` + * `webhookbuyfill` -> `entry_fill` + * `webhookbuycancel` -> `entry_cancel` + * `webhooksell` -> `exit` + * `webhooksellfill` -> `exit_fill` + * `webhooksellcancel` -> `exit_cancel` * Telegram notification settings * `buy` -> `entry` * `buy_fill` -> `entry_fill` diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md index 055512f26..db4a309d0 100644 --- a/docs/telegram-usage.md +++ b/docs/telegram-usage.md @@ -77,6 +77,7 @@ Example configuration showing the different settings: "enabled": true, "token": "your_telegram_token", "chat_id": "your_telegram_chat_id", + "allow_custom_messages": true, "notification_settings": { "status": "silent", "warning": "on", @@ -115,6 +116,7 @@ Example configuration showing the different settings: `show_candle` - show candle values as part of entry/exit messages. Only possible values are `"ohlc"` or `"off"`. `balance_dust_level` will define what the `/balance` command takes as "dust" - Currencies with a balance below this will be shown. +`allow_custom_messages` completely disable strategy messages. `reload` allows you to disable reload-buttons on selected messages. ## Create a custom keyboard (command shortcut buttons) diff --git a/docs/webhook-config.md b/docs/webhook-config.md index 2793bd1eb..00c369919 100644 --- a/docs/webhook-config.md +++ b/docs/webhook-config.md @@ -10,37 +10,37 @@ Sample configuration (tested using IFTTT). "webhook": { "enabled": true, "url": "https://maker.ifttt.com/trigger//with/key//", - "webhookentry": { + "entry": { "value1": "Buying {pair}", "value2": "limit {limit:8f}", "value3": "{stake_amount:8f} {stake_currency}" }, - "webhookentrycancel": { + "entry_cancel": { "value1": "Cancelling Open Buy Order for {pair}", "value2": "limit {limit:8f}", "value3": "{stake_amount:8f} {stake_currency}" }, - "webhookentryfill": { + "entry_fill": { "value1": "Buy Order for {pair} filled", "value2": "at {open_rate:8f}", "value3": "" }, - "webhookexit": { + "exit": { "value1": "Exiting {pair}", "value2": "limit {limit:8f}", "value3": "profit: {profit_amount:8f} {stake_currency} ({profit_ratio})" }, - "webhookexitcancel": { + "exit_cancel": { "value1": "Cancelling Open Exit Order for {pair}", "value2": "limit {limit:8f}", "value3": "profit: {profit_amount:8f} {stake_currency} ({profit_ratio})" }, - "webhookexitfill": { + "exit_fill": { "value1": "Exit Order for {pair} filled", "value2": "at {close_rate:8f}.", "value3": "" }, - "webhookstatus": { + "status": { "value1": "Status: {status}", "value2": "", "value3": "" @@ -57,7 +57,7 @@ You can set the POST body format to Form-Encoded (default), JSON-Encoded, or raw "enabled": true, "url": "https://.cloud.mattermost.com/hooks/", "format": "json", - "webhookstatus": { + "status": { "text": "Status: {status}" } }, @@ -88,30 +88,30 @@ Optional parameters are available to enable automatic retries for webhook messag "url": "https://", "retries": 3, "retry_delay": 0.2, - "webhookstatus": { + "status": { "status": "Status: {status}" } }, ``` -Custom messages can be sent to Webhook endpoints via the dataprovider.send_msg() function. To enable this, set the `allow_custom_messages` option to `true`: +Custom messages can be sent to Webhook endpoints via the `self.dp.send_msg()` function from within the strategy. To enable this, set the `allow_custom_messages` option to `true`: ```json "webhook": { "enabled": true, "url": "https://", "allow_custom_messages": true, - "webhookstatus": { - "status": "Status: {status}" + "strategy_msg": { + "status": "StrategyMessage: {msg}" } }, ``` Different payloads can be configured for different events. Not all fields are necessary, but you should configure at least one of the dicts, otherwise the webhook will never be called. -### Webhookentry +### Entry -The fields in `webhook.webhookentry` are filled when the bot executes a long/short. Parameters are filled using string.format. +The fields in `webhook.entry` are filled when the bot executes a long/short. Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -131,9 +131,9 @@ Possible parameters are: * `current_rate` * `enter_tag` -### Webhookentrycancel +### Entry cancel -The fields in `webhook.webhookentrycancel` are filled when the bot cancels a long/short order. Parameters are filled using string.format. +The fields in `webhook.entry_cancel` are filled when the bot cancels a long/short order. Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -152,9 +152,9 @@ Possible parameters are: * `current_rate` * `enter_tag` -### Webhookentryfill +### Entry fill -The fields in `webhook.webhookentryfill` are filled when the bot filled a long/short order. Parameters are filled using string.format. +The fields in `webhook.entry_fill` are filled when the bot filled a long/short order. Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -173,9 +173,9 @@ Possible parameters are: * `current_rate` * `enter_tag` -### Webhookexit +### Exit -The fields in `webhook.webhookexit` are filled when the bot exits a trade. Parameters are filled using string.format. +The fields in `webhook.exit` are filled when the bot exits a trade. Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -197,9 +197,9 @@ Possible parameters are: * `open_date` * `close_date` -### Webhookexitfill +### Exit fill -The fields in `webhook.webhookexitfill` are filled when the bot fills a exit order (closes a Trade). Parameters are filled using string.format. +The fields in `webhook.exit_fill` are filled when the bot fills a exit order (closes a Trade). Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -222,9 +222,9 @@ Possible parameters are: * `open_date` * `close_date` -### Webhookexitcancel +### Exit cancel -The fields in `webhook.webhookexitcancel` are filled when the bot cancels a exit order. Parameters are filled using string.format. +The fields in `webhook.exit_cancel` are filled when the bot cancels a exit order. Parameters are filled using string.format. Possible parameters are: * `trade_id` @@ -247,9 +247,9 @@ Possible parameters are: * `open_date` * `close_date` -### Webhookstatus +### Status -The fields in `webhook.webhookstatus` are used for regular status messages (Started / Stopped / ...). Parameters are filled using string.format. +The fields in `webhook.status` are used for regular status messages (Started / Stopped / ...). Parameters are filled using string.format. The only possible value here is `{status}`. @@ -293,7 +293,6 @@ You can configure this as follows: } ``` - The above represents the default (`exit_fill` and `entry_fill` are optional and will default to the above configuration) - modifications are obviously possible. Available fields correspond to the fields for webhooks and are documented in the corresponding webhook sections.