fx-chartingDocs
Webhooks

Webhooks overview

Send trading events and alerts as JSON to any URL — trading bots, Discord / Telegram relays, your backend.

  • Trading webhooks (Max): Trading panel → Webhook tab — URL, which events, optional JSON template, test button and delivery log. Or preset them with the webhook prop.
  • Alert webhooks: tick "Send a webhook" in an alert; a JSON message is sent as the body.
Preset the trading webhook
<FxChart
  webhook={{
    url: "https://hooks.example.com/trades",
    events: { opened: true, closed: true, placed: false, cancelled: false, modified: false },
    template: '{"action":"{{side}}","symbol":"{{ticker}}","qty":{{lots}}}',
  }}
/>
Browsers block requests to servers that don't allow cross-origin calls (CORS). Most webhook receivers don't — send webhooks through your own server with onWebhook.