Strategy webhooks

A strategy on the Strategies page is a magic number with a name, a webhook and a list of member terminals. POST a signal to the strategy's webhook and Atlaas places it on every enabled member terminal at once, sized per terminal. This is how a TradingView alert, or any script, trades on your MT5 terminals without holding a service key.

Create the strategy and attach terminals in the portal first. The Webhook dialog on each strategy shows its URL, its secret (shsec_...) and a ready-to-paste TradingView alert message.

Endpoint

POST {BASE_URL}/hooks/{slug}

The slug is the only addressing: the body never names a terminal or an account. Slugs are unique per account, and the secret picks the strategy, so two accounts may both own breakout.

Authentication is the strategy's own secret, in either place:

No portal session or service key is involved. Rotate the secret from the Webhook dialog; the old one stops working immediately.

Body

FieldTypeNotes
secretstringThe strategy secret, if not sent as a Bearer header.
actionbuy | sell | closeRequired.
symbolstringRequired for buy and sell. Optional for close: when given, only that symbol's positions close.
volumenumberLots, before sizing. Required unless every enabled member has a fixed volume.
sl, tpnumberOptional stop loss and take profit prices for buy and sell.

Per member terminal, the volume is its fixed volume if set, otherwise volume × multiplier rounded to 0.01. A terminal whose result is below 0.01 is skipped and reported in its result.

buy and sell place a market order on every enabled member with magic set to the strategy's magic number and the slug as the order comment, so the fills roll up on the Strategies page like any other trade carrying that magic. close closes every open position carrying the magic on each member (optionally narrowed to symbol).

TradingView

Set the alert's webhook URL to the endpoint above and use this as the alert message. TradingView replaces the placeholders when the alert fires:

{
  "secret": "shsec_...",
  "action": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "volume": 0.1
}

{{strategy.order.action}} resolves to buy or sell for strategy alerts. For a plain indicator alert, write the action literally. {{ticker}} is the chart symbol; if your broker names it differently (EURUSD.m, XAUUSDm), write the broker symbol instead.

Response

202 as soon as the signal is accepted, before any order goes out. The strategy's terminals are sent to right after the reply, and when the strategy is listed, the signal is queued for its followers. The HTTP status describes the request, not how each terminal did.

{
  "success": true,
  "data": {
    "accepted": true,
    "signalId": "5b0c...",
    "strategy": { "id": "f3a1...", "slug": "breakout", "name": "London breakout" },
    "action": "buy",
    "terminals": 2,
    "followers": 0
  }
}

What happened on each terminal arrives a moment later as a strategy.signal event: on Logs & events, on your notification channels, and to outbound webhooks that list it. The event's acceptedSignalId is the signalId above, and results has one entry per terminal:

[
  { "instanceId": "7c2e...", "name": "Alpha", "ok": true, "ticket": 123456789, "price": 1.0851 },
  { "instanceId": "9d10...", "name": "Bravo", "ok": false, "error": "Terminal is not running (STOPPED)" }
]

For close, each result carries closed (positions closed) instead of ticket.

StatusMeaning
400The body is not a signal: unknown action, missing symbol, missing volume with a member that has no fixed volume, or volume ≤ 0.
401Wrong or missing secret.
403A buy or sell while the account is suspended, inactive or out of credits. A close still goes through.
404No strategy with that slug.
409The strategy is paused in the portal, or this signal was already received (same id, or the same body moments ago).
429More than 60 signals a minute on one slug.

Every order placed this way appears on the event feed and in outbound webhooks as order.place or order.close with actor: "api" and actorLabel: "strategy:{slug}".

Notes