Pular para o conteúdo

Receiving webhooks

Este conteúdo não está disponível em sua língua ainda.

The Webhook node POSTs a JSON to your address on every alert. That way your own systems, n8n, Make, Zapier or Home Assistant react to your chains; ready-made templates are under Automate, signals for trading bots under Trading bots. Webhooks are available from the Trader plan.

Your signing secret (whsec_…) is under Notifications → Webhooks → Show secret. Create new secret makes the old one invalid right away; then enter the new one at all receivers. To check whether a webhook arrives, select the node in the editor and click Send test in its properties.

If your receiver would rather check a fixed value than the signature, enter Header and Header value under More in the node, such as x-make-apikey for Make or the name from the header auth in n8n. The value stays empty when you export the chain. Headers Bellchain sets itself (Content-Type, User-Agent, anything starting with Bellchain-) cannot be replaced.

  • Method: POST, only to https addresses, without redirects, timeout 10 seconds.
  • Addresses in your own network (localhost, private IP ranges) are not accepted.
Headers
Content-Type: application/json; charset=utf-8
User-Agent: Bellchain-Webhook/1.0 (+https://bellchain.app)
Bellchain-Event: alert
Bellchain-Delivery: <id of the delivery, the same on retries>
Bellchain-Signature: t=1792243273,v1=9a7a…27cc2
Body
{
"id": "nEkQk4fzMqjbDEndm0N77E",
"type": "alert",
"version": 1,
"test": false,
"time": "2026-10-17T12:00:00.000Z",
"chain": { "id": "chain_456", "name": "BTC Dip Buyer" },
"action": "w1",
"message": "BTC Dip Buyer: RSI 14: 28.7 · Price: $117,234",
"pair": "BTC/USDT",
"timeframe": "1h",
"price": 117234,
"values": [{ "node": "r1", "pin": "out", "label": "RSI 14", "value": 28.7, "text": "28.7" }]
}

id is always the same for the same action on the same candle, so you can recognize a duplicate request. test is true for test messages.

time is the close of the candle on which the chain fired, always in UTC as ISO 8601 (the Z at the end stands for UTC), whatever time zone your account uses. timeframe names that candle’s timeframe: 1h with 2026-10-17T12:00:00.000Z is the candle from 11:00 to 12:00 UTC. Bellchain only checks closed candles, so a request never arrives in the middle of a candle. With Send test, time is the moment of the test.

For a scanner each coin sends a request of its own with its own id: pair names the coin that fired, and the body contains "scanner": true.

Bellchain-Signature contains the timestamp t (seconds) and v1, an HMAC-SHA256 over <t>.<body> with your signing secret (whsec_…). In Node.js:

verify.js
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verify(secret, rawBody, header) {
const parts = Object.fromEntries(header.split(',').map((part) => part.split('=')));
// Older than 5 minutes: reject, against replayed requests
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex');
return parts.v1?.length === expected.length && timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
}

Verify the signature over the unmodified body as it arrives, before parsing it as JSON.

Respond with a 2xx status as soon as you have accepted the request. The only exception are Google Apps Script web apps: they always answer with a redirect after the script ran, and that counts as delivered. On 408, 425, 429, 5xx or network errors Bellchain retries, five attempts in total: right away, after about 5 seconds, 25 seconds, 2 minutes and 10 minutes. If you send a wait time with Retry-After, at least that applies. Other 4xx responses and redirects count as permanently failed.

Muting doesn’t apply to webhooks: they keep running so that your automation misses nothing. If prices arrived more than 15 minutes late because of an outage, the alert doesn’t go to the webhook; it’s listed under Alerts as “Missed”.

Versão 2026.11.29.15 · Changelog