Vela, our next-generation charting platform, is live at vela.luxalgo.com.
LuxAlgo

Webhooks

Connect alert webhooks, select a built-in message format, and check delivery before using third-party automation.

View as Markdown

Webhook destinations send an alert's message to a URL you choose. They are available on Essential and above, for both Price Alerts and Custom Alerts. See Plans.

For Telegram, Discord or Slack notifications, use their dedicated destination setup.

Create a webhook

  1. Open Account Alerts, or choose Add a destination in an alert's Send to section.
  2. In Webhooks, enter the receiving URL and an optional name. The endpoint must be publicly reachable on port 80 or 443.
  3. For an automation endpoint, enable For bots and trade relays. This uses the faster delivery lane and skips events that could only be delivered late.
  4. Choose Add webhook. Copy the signing secret when it is shown; it is shown only once.
  5. Create or edit an alert and select this webhook under Send to.

Use a test endpoint or paper setup to check the message before connecting live automation. Send test sends a message to the configured endpoint, so first check how the receiver handles test messages.

Choose a message format

Expand the webhook's message in the alert editor and choose Format. Formats insert an editable template; they do not configure your account or trading bot on the receiving platform.

FormatWhat to check
TextUses the alert's default text message.
JSONIncludes the alert, market, price, event ID and chart link, with condition fields for a Price Alert or message fields for a Custom Alert.
3CommasChoose the action and replace YOUR_3COMMAS_SECRET and YOUR_BOT_UUID with the values from your signal bot.
TradersPostChoose buy, sell or exit. Add quantity if your receiving configuration does not size orders.
SignalStackChoose buy, sell or close, and include any quantity your receiving configuration needs.
Trade RelayChoose buy, sell or close. The template includes the event ID as signalId.

For a Custom Alert on a strategy, supported formats can use The strategy's order (buy or sell). Only choose that when the alert supplies the strategy order fields. Otherwise select an explicit action. The 3Commas format uses its own entry and exit actions.

Editing a template changes the format label to Your own. Choosing another format replaces the message; Undo restores a custom message that was replaced.

Placeholders and JSON

Use Insert placeholder to choose values supported by the alert, then review Preview and Message checks. For example, a message can include:

{{alert.name}} fired on {{market}} at {{close}}.
Event: {{event.id}}
{{chart_url}}

A body that parses as JSON is sent as application/json; other messages are sent as text. Keep required fields from your receiver's format and check its symbol, action and sizing conventions before saving.

Verify signatures

Each webhook request is signed with the destination's signing secret, so your receiver can confirm it came from LuxAlgo and was not changed on the way. Keep the secret private: anyone who has it can sign requests.

Every request carries this header:

X-LuxAlgo-Signature: t=<unix timestamp in seconds>,v1=<signature>

v1 is an HMAC-SHA256 of the timestamp, a period and the raw request body (<t>.<body>), written as lowercase hex. The key is the full signing secret as you copied it, including the whsec_ prefix.

To verify a request:

  1. Read the raw request body exactly as it arrived, before parsing any JSON. Parsing and re-serializing changes the bytes and the signature no longer matches.
  2. Split the header on , and read t and v1.
  3. Compute HMAC-SHA256 of <t>.<body> with your signing secret.
  4. Compare the result with v1 using a constant-time comparison.
  5. Reject the request if t is more than 5 minutes from your server's current time. Retries are signed again with a fresh timestamp, so they pass this check.
Node.js
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyLuxAlgoSignature(secret, header, rawBody) {
  const parts = Object.fromEntries(
    (header ?? "").split(",").map((part) => part.trim().split("=", 2)),
  );
  const t = Number(parts.t);
  if (!Number.isInteger(t) || !/^[0-9a-f]{64}$/.test(parts.v1 ?? "")) return false;
  if (Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${parts.t}.`).update(rawBody).digest();
  return timingSafeEqual(expected, Buffer.from(parts.v1, "hex"));
}
Python
import hashlib, hmac, time

def verify_luxalgo_signature(secret: str, header: str, raw_body: bytes) -> bool:
    try:
        parts = dict(part.strip().split("=", 1) for part in header.split(","))
        t = int(parts["t"])
        v1 = parts["v1"]
    except (AttributeError, KeyError, ValueError):
        return False
    if abs(time.time() - t) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, v1)

In Express, read the body with express.raw({ type: "*/*" }) on the webhook route so rawBody is the unparsed bytes. In Flask, use request.get_data().

Test your verifier

Check your code against this example before connecting a live alert. Skip the 5-minute check for this test, since the timestamp is in the past.

InputValue
Signing secretwhsec_test_example_secret
t1763000000
Body{"event":"alert.fired","symbol":"BTCUSDT"}
Expected v1fccc60c7cf6e59cfbf5bbcad7739ea423bdbc91ec77b04b9445398e086dc604f

The example body only demonstrates the signature. Real requests carry the message you set in the alert.

Handle retries

A failed delivery is retried, so a receiver can get the same alert more than once. Each request carries an X-LuxAlgo-Event-Id header that stays the same across retries of one alert. Store the IDs you have handled and ignore a request whose ID you have already seen, so a retried alert never acts twice.

Check delivery

Open the alert's History or the Alerts panel's Log to inspect delivery status, attempts and the HTTP response when available. Check the receiver's own logs separately: a successful HTTP response means it accepted the request, not that a trade executed.

Webhooks can be delayed, skipped or fail. Test your receiving configuration before relying on it. LuxAlgo does not guarantee delivery or execution by third-party platforms. See the disclaimer.

On this page