After a run, the exporter sends net P&L, return, maximum drawdown, the number of trades, the win rate and the profit factor, with the instrument, timeframe and period, to a webhook you set up: your own service or an automation tool (generic JSON), a Discord channel or a Slack channel. The trades go along only when you switch them on.
Nothing leaves your machine by accident. You enter the webhook's host as a setting of its own, so you see where the summary goes, and the URL has to be on exactly that host and use HTTPS. While Send is off, which is the default, an export sends nothing: it shows the payload, the host it would go to and whether the settings are complete. Switch Send on once that looks right. The webhook URL is a secret, so neither the preview nor the plugin's log shows more of it than the host.
The generic JSON says "format": "orionquant-webhook-summary", "formatVersion": 1 and "hypothetical": true, with the blocks run and summary, and trades (at most 500, the rest counted in tradesOmitted) when switched on. Discord and Slack get a short text message; trades that do not fit their length limit are counted at the end.
Where to get a webhook URL: Discord, in a channel's settings under Integrations, Webhooks (https://docs.discord.com/developers/resources/webhook); Slack, with an app that has incoming webhooks (https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks). Their terms apply to what you post: Discord's developer terms and Slack's API terms. Slack allows about one message per second per webhook; each export sends one.
Configuration
Field
Type
Default
Description
formatPayload format
select
"generic"
generic: a JSON object for your own service. discord: a Discord webhook message (mentions switched off). slack: a Slack incoming webhook message.Options: generic, discord, slack
hostWebhook host (where it goes)
string
""
The one host this plugin may send to, like discord.com or hooks.slack.com. The webhook URL must be on it.
includeTradesInclude the trades
boolean
false
Send the trades too (time, side, symbol, prices, lots, net, exit reason). Off sends the summary only.
labelMessage title
string
"OrionQuant backtest"
The title of the message, so you can tell runs apart in a channel.
sendSend (off shows a preview)
boolean
false
Off: an export only shows what it would send and where. On: an export posts it.
webhookUrlWebhook URL (secret)
string
""
The webhook's full https:// URL from Discord, Slack or your service. Treat it like a password: whoever has it can post to your channel.
Use it in a strategy
Not called from a strategy: after a run, choose it in the result's export menu. Exports are part of the plans that include CSV export.
What it provides
POST <webhook URL>Payload
One HTTPS POST with a JSON body in the chosen format, when Send is on. The export answers with the host and the HTTP status.
previewPayload
While Send is off: the payload, the host it would go to, and whether the settings are ready, as text. Nothing is sent.
Limits
It sends to the host of the URL you enter, which can be any HTTPS host; the host setting has to name the same host, so you see it before anything is sent.
The webhook URL is kept in the plugin's settings on this machine, in plain text like every plugin setting.
One attempt per export, no retry and no redirect: a webhook that is down or moved means the export fails and says why.
The figures are those of a hypothetical backtest; every message says so.