Ricette per webhook
Gli alert ti dicono cosa fa il mercato. Webhook e API sono il modo per agire, con i tuoi strumenti e i tuoi account. Non facciamo mai trading per te, non custodiamo mai fondi e non chiediamo mai chiavi API abilitate al trading.
Guida rapida
- Nella pagina Alert, aggiungi un webhook Custom JSON. È incluso da Pro Trader in su.
- Copia il segreto di firma. Viene mostrato una sola volta.
- Controlla la firma di ogni richiesta con uno degli esempi in Controlla la firma.
- Premi Invia test e controlla che il tuo endpoint lo riceva.
- Indirizza una regola verso la destinazione. Anche l'alert Default arriva lì finché è attivo.
Rispondi con un qualsiasi 2xx entro 8 secondi. Gli invii falliti vengono ritentati con lo stesso id, quindi deduplica su quello. Ogni snippet qui sotto è stato provato su una vera consegna firmata. Sei responsabile di tutto ciò che automatizzi a partire da questi eventi.
Header
Ogni consegna è un POST al tuo indirizzo https con questi header:
| Header | Valore |
|---|---|
| X-ArbitrageX-Event | L'id dell'evento, uguale a id nel body. Un nuovo tentativo lo mantiene, quindi deduplica su quello. |
| X-ArbitrageX-Timestamp | Secondi unix in cui è stato firmato questo tentativo. Ogni nuovo tentativo viene firmato di nuovo, con nuovi timestamp e firma. |
| X-ArbitrageX-Signature | sha256= e l'HMAC-SHA256 in esadecimale minuscolo del timestamp, un punto e il body grezzo. |
| Content-Type | application/json |
| User-Agent | ArbitrageX-Webhooks/1.0 |
Controlla la firma
Ogni richiesta contiene X-ArbitrageX-Timestamp e X-ArbitrageX-Signature, che è sha256= più l'HMAC-SHA256 esadecimale di timestamp.rawBody, con chiave l'intero segreto di firma, whsec_ compreso. Controllala sui byte grezzi, prima del parsing, perché un JSON letto e ricodificato non corrisponde, e confronta in tempo costante. Rifiuta i timestamp a più di 5 minuti da adesso, per bloccare i replay. Ogni esempio qui sotto fa tutto questo.
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(rawBody, headers, secret) {
const ts = headers["x-arbitragex-timestamp"];
if (!(Math.abs(Date.now() / 1000 - Number(ts)) <= 300)) return false;
const expected =
"sha256=" + createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");
const given = Buffer.from(String(headers["x-arbitragex-signature"]));
const wanted = Buffer.from(expected);
return given.length === wanted.length && timingSafeEqual(given, wanted);
}Vettore di test
Prima di andare live, controlla il tuo codice con questo esempio: firmando il timestamp e il body grezzo qui sotto con questo segreto devi ottenere la firma qui sotto. Il segreto vale solo per questa pagina. Il timestamp è vecchio, quindi il tuo controllo dei 5 minuti lo rifiuterà: prova il passaggio HMAC da solo.
whsec_docsExampleOnly0000000000000000000000000000
1793707200
{"id":"evt_0f2a4c6e8b0d2f4a6c8e0b2d","type":"alert.test","test":true,"sentAt":"2026-11-03T12:00:00.000Z","rule":null,"window":null,"opportunity":{"id":"TEST|TestBuy:spot|TestSell:spot","coin":"TEST","strategy":"spot","buy":{"venue":"TEST BUY","kind":"spot","symbol":"TESTUSDT","price":1,"sizeUsd":1000,"ageMs":0,"fundingBps8h":null,"nextFundingMs":null,"takerBps":25,"needs":"","withdrawUsd":null,"transferMin":null,"depth":null,"url":"https://arbitragex.io/docs#webhooks"},"sell":{"venue":"TEST SELL","kind":"spot","symbol":"TESTUSDT","price":1.01,"sizeUsd":1000,"ageMs":0,"fundingBps8h":null,"nextFundingMs":null,"takerBps":25,"needs":"","withdrawUsd":null,"transferMin":null,"depth":null,"url":"https://arbitragex.io/docs#webhooks"},"grossBps":100,"netBps":50,"netUsd":{"100":0.5,"1000":5,"10000":null,"100000":null,"1000000":null},"maxSizeUsd":1000,"exitBps":null,"transfer":"not_needed","network":null,"status":"verified","reasons":["TEST event, not market data"],"firstSeenMs":1793707200000,"updatedMs":1793707200000,"spark":[]},"routeId":"TEST|TestBuy:spot|TestSell:spot","links":[],"apiVersion":"2026-11-04","appUrl":"https://arbitragex.io/app/alerts","atSize":{"sizeUsd":1000,"netUsd":5,"netBps":50,"myTakerBps":null,"coins":null,"avgBuyPrice":null,"avgSellPrice":null,"parts":null,"lockedBps":null,"forecastBps":null,"forecast":null,"marginSell":false,"borrow":null,"hold":null,"capitalUsd":1000}}sha256=d062e683f11aa8bca4086d8d45ebe4ba6bcfc4e6457604f12c733083be7eeea8
Campi comuni
Ogni evento ha questi campi, oltre ai propri. Nomi e ordine non cambiano mai, e i nuovi campi vengono aggiunti solo dopo gli altri.
id: l'id dell'evento, mantenuto tra i tentativi.type: uno dei tipi qui sotto.test:truesolo da Invia test.sentAt: quando è stato inviato questo tentativo, come ora ISO 8601 in UTC.rule: la regola che è scattata, comeidename, con l'iddefaultper Alert predefinito. Null dove nessuna regola lo invia.routeId: l'id dell'opportunità come lo usa l'API, o null dove non c'è un'opportunità.links: le pagine di trading a cui punta l'alert, ciascuna conside,venueeurl.apiVersion: la versione di questo payload, ora2026-11-04.appUrl: la pagina dell'alert nell'app.atSize: solo suopportunity.alert,listing.alertealert.test, il netto all'importo con cui la regola l'ha valutato, comesizeUsd,netUsdenetBps.
Eventi
Ogni tipo che un webhook personalizzato può ricevere, con il piano richiesto e un body di esempio generato dallo stesso codice di una consegna reale. Un webhook personalizzato è incluso da Pro Trader in su, e alcuni tipi richiedono un piano superiore. Le cifre sono inventate.
- opportunity.alert
- opportunity.closed
- listing.alert
- position.alert
- notice.alert
- prediction.alert
- prediction.signal
- premium.alert
- liquidation.alert
- liquidation.cluster
- positioning.alert
- wallet.alert
- watch.alert
- polymarket.alert
- consensus.alert
- alert.test
opportunity.alertPro Trader e superiori
opportunity.alert: un'opportunità corrisponde a una regola o all'alert Default. rule.id è default per l'alert Default.
{
"id": "evt_3f9a1c7e2b8d4f6a0c5e9b1d",
"type": "opportunity.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "BTC over 0.15%"
},
"window": {
"sizeUsd": 1000,
"openMs": 95000,
"avgWindowMs": 240000,
"avgPeakNetBps": 22.1,
"windowSamples": 7
},
"opportunity": {
"id": "BTC|Binance:spot|OKX:spot",
"coin": "BTC",
"strategy": "spot",
"buy": {
"venue": "Binance",
"kind": "spot",
"symbol": "BTCUSDT",
"price": 64000.5,
"sizeUsd": 5000,
"ageMs": 120,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 10,
"needs": "Needs USDT on Binance to buy",
"withdrawUsd": 1.5,
"transferMin": null,
"depth": null,
"url": "https://www.binance.com/en/trade/BTC_USDT"
},
"sell": {
"venue": "OKX",
"kind": "spot",
"symbol": "BTC-USDT",
"price": 64210.25,
"sizeUsd": 5000,
"ageMs": 80,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 8,
"needs": "Needs BTC already on OKX: a spot sale cannot go short",
"withdrawUsd": null,
"transferMin": null,
"depth": null,
"url": "https://www.okx.com/trade-spot/btc-usdt"
},
"grossBps": 32.7,
"netBps": 18.4,
"netUsd": {
"100": 0.18,
"1000": 1.84,
"10000": 12.5,
"100000": null,
"1000000": null
},
"maxSizeUsd": 12345.6,
"exitBps": null,
"transfer": "open",
"network": "BTC",
"status": "verified",
"reasons": [],
"firstSeenMs": 1793707110000,
"updatedMs": 1793707110000,
"spark": [
17.9,
18.4
],
"avgWindowMs": 240000,
"medianWindowMs": 240000,
"windowSamples": 7
},
"routeId": "BTC|Binance:spot|OKX:spot",
"links": [
{
"side": "buy",
"venue": "Binance",
"url": "https://www.binance.com/en/trade/BTC_USDT"
},
{
"side": "sell",
"venue": "OKX",
"url": "https://www.okx.com/trade-spot/btc-usdt"
}
],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app?t=arb&route=BTC%7CBinance%3Aspot%7COKX%3Aspot",
"atSize": {
"sizeUsd": 1000,
"netUsd": 1.84,
"netBps": 18.4,
"myTakerBps": null,
"coins": null,
"avgBuyPrice": null,
"avgSellPrice": null,
"parts": null,
"lockedBps": null,
"forecastBps": null,
"forecast": null,
"marginSell": false,
"borrow": null,
"hold": null,
"capitalUsd": 1000
}
}opportunity.closedPro Trader e superiori
opportunity.closed: un'opportunità per cui hai ricevuto un alert si è chiusa, se la regola lo chiede.
{
"id": "evt_8c2e4a6f1b3d5c7e9a0b2d4f",
"type": "opportunity.closed",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "BTC over 0.15%"
},
"closed": {
"alertId": "evt_3f9a1c7e2b8d4f6a0c5e9b1d",
"alertedAt": 1793706600000,
"closedAt": 1793707170000
},
"opportunity": {
"id": "BTC|Binance:spot|OKX:spot",
"coin": "BTC",
"strategy": "spot",
"buy": {
"venue": "Binance",
"kind": "spot",
"symbol": "BTCUSDT",
"price": 64000.5,
"sizeUsd": 5000,
"ageMs": 120,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 10,
"needs": "Needs USDT on Binance to buy",
"withdrawUsd": 1.5,
"transferMin": null,
"depth": null,
"url": "https://www.binance.com/en/trade/BTC_USDT"
},
"sell": {
"venue": "OKX",
"kind": "spot",
"symbol": "BTC-USDT",
"price": 64210.25,
"sizeUsd": 5000,
"ageMs": 80,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 8,
"needs": "Needs BTC already on OKX: a spot sale cannot go short",
"withdrawUsd": null,
"transferMin": null,
"depth": null,
"url": "https://www.okx.com/trade-spot/btc-usdt"
},
"grossBps": 32.7,
"netBps": 18.4,
"netUsd": {
"100": 0.18,
"1000": 1.84,
"10000": 12.5,
"100000": null,
"1000000": null
},
"maxSizeUsd": 12345.6,
"exitBps": null,
"transfer": "open",
"network": "BTC",
"status": "verified",
"reasons": [],
"firstSeenMs": 1793707110000,
"updatedMs": 1793707110000,
"spark": [
17.9,
18.4
],
"avgWindowMs": 240000,
"medianWindowMs": 240000,
"windowSamples": 7
},
"routeId": "BTC|Binance:spot|OKX:spot",
"links": [
{
"side": "buy",
"venue": "Binance",
"url": "https://www.binance.com/en/trade/BTC_USDT"
},
{
"side": "sell",
"venue": "OKX",
"url": "https://www.okx.com/trade-spot/btc-usdt"
}
],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app?t=arb&route=BTC%7CBinance%3Aspot%7COKX%3Aspot"
}listing.alertPro Trader e superiori
listing.alert: un mercato appena quotato, con un evento per ogni quotazione.
{
"id": "evt_1a3c5e7b9d2f4a6c8e0b1d3f",
"type": "listing.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "BTC over 0.15%"
},
"listing": {
"venue": "Bybit",
"kind": "spot",
"symbol": "NEWUSDT",
"listedMs": 1793707140000,
"coin": "NEW"
},
"window": {
"sizeUsd": 1000,
"openMs": 4000,
"avgWindowMs": null,
"avgPeakNetBps": null,
"windowSamples": 0
},
"opportunity": {
"id": "NEW|Bybit:spot|Gate:spot",
"coin": "NEW",
"strategy": "spot",
"buy": {
"venue": "Bybit",
"kind": "spot",
"symbol": "NEWUSDT",
"price": 0.4812,
"sizeUsd": 5000,
"ageMs": 120,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 10,
"needs": "Needs USDT on Binance to buy",
"withdrawUsd": 1.5,
"transferMin": null,
"depth": null,
"url": "https://www.bybit.com/en/trade/spot/NEW/USDT"
},
"sell": {
"venue": "Gate",
"kind": "spot",
"symbol": "NEW_USDT",
"price": 0.4975,
"sizeUsd": 5000,
"ageMs": 80,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 8,
"needs": "Needs BTC already on OKX: a spot sale cannot go short",
"withdrawUsd": null,
"transferMin": null,
"depth": null,
"url": "https://www.gate.com/trade/NEW_USDT"
},
"grossBps": 338.7,
"netBps": 287.2,
"netUsd": {
"100": 2.87,
"1000": 24.1,
"10000": null,
"100000": null,
"1000000": null
},
"maxSizeUsd": 3410,
"exitBps": null,
"transfer": "open",
"network": "BEP20",
"status": "verified",
"reasons": [],
"firstSeenMs": 1793707110000,
"updatedMs": 1793707110000,
"spark": [
17.9,
18.4
],
"avgWindowMs": null,
"medianWindowMs": null,
"windowSamples": 0
},
"routeId": "NEW|Bybit:spot|Gate:spot",
"links": [
{
"side": "buy",
"venue": "Bybit",
"url": "https://www.bybit.com/en/trade/spot/NEW/USDT"
},
{
"side": "sell",
"venue": "Gate",
"url": "https://www.gate.com/trade/NEW_USDT"
}
],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app?t=arb&route=NEW%7CBybit%3Aspot%7CGate%3Aspot",
"atSize": {
"sizeUsd": 1000,
"netUsd": 24.1,
"netBps": 241,
"myTakerBps": null,
"coins": null,
"avgBuyPrice": null,
"avgSellPrice": null,
"parts": null,
"lockedBps": null,
"forecastBps": null,
"forecast": null,
"marginSell": false,
"borrow": null,
"hold": null,
"capitalUsd": 1000
}
}position.alertPro Trader e superiori
position.alert: è successo qualcosa su un trade monitorato.
{
"id": "evt_5b7d9f1a3c5e7b9d2f4a6c8e",
"type": "position.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": null,
"position": {
"id": "pos_4e2a9c",
"coin": "ETH",
"strategy": "spot",
"buyVenue": "Kraken",
"sellVenue": "Bybit",
"sizeUsd": 2500,
"entrySpreadBps": 41.2,
"targetBps": 10,
"spreadBps": 9.5,
"estPnlUsd": 7.93,
"estFundingUsd": 0,
"estimated": true,
"routeId": "ETH|Kraken:spot|Bybit:spot",
"buyUrl": "https://pro.kraken.com/app/trade/eth-usdt",
"sellUrl": "https://www.bybit.com/en/trade/spot/ETH/USDT"
},
"alert": {
"kind": "target",
"title": "ETH spread reached your target",
"detail": "Spread 0.10%, at or under your 0.10% target."
},
"routeId": "ETH|Kraken:spot|Bybit:spot",
"links": [
{
"side": "buy",
"venue": "Kraken",
"url": "https://pro.kraken.com/app/trade/eth-usdt"
},
{
"side": "sell",
"venue": "Bybit",
"url": "https://www.bybit.com/en/trade/spot/ETH/USDT"
}
],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/watchlist?tab=tracking"
}notice.alertPro Trader e superiori
notice.alert: un exchange ha annunciato un delisting, la sospensione di depositi o prelievi, una manutenzione o una quotazione, su Alert predefinito. tracked indica che riguarda un trade che monitori.
{
"id": "evt_9d1f3a5c7e9b2d4f6a8c0e1b",
"type": "notice.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "default",
"name": "Default alert"
},
"notice": {
"seq": 4812,
"venue": "Binance",
"kind": "delisting",
"market": "spot",
"coins": [
"XYZ"
],
"title": "Binance Will Delist XYZ on 2026-11-10",
"url": "https://www.binance.com/en/support/announcement",
"publishedMs": 1793703600000,
"seenMs": 1793703660000
},
"tracked": true,
"keywords": [
"delist"
],
"alert": {
"title": "Binance: delisting XYZ",
"detail": "On a tracked trade's leg."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/alerts?tab=fired"
}prediction.alertPro Trader e superiori
prediction.alert: un'opportunità su un mercato predittivo corrisponde alla tua regola.
{
"id": "evt_2c4e6a8b0d1f3a5c7e9b1d3f",
"type": "prediction.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "Fed markets"
},
"prediction": {
"id": "cross:5d0c6b1e8f2a4c7d9e3b1a0f6c2d8e4b",
"kind": "cross",
"title": "Fed cuts rates in December?",
"category": "economy",
"legs": [
{
"venue": "Polymarket",
"marketId": "0x8a3f",
"outcome": "Yes",
"side": "yes",
"avgPrice": 0.412,
"size": 500,
"url": "https://polymarket.com/event/fed-decision-in-december",
"rule": 0,
"readMs": null,
"deadlineMs": 1799755200000
},
{
"venue": "Kalshi",
"marketId": "KXFEDDECISION-26DEC-C25",
"outcome": "Cut",
"side": "no",
"avgPrice": 0.569,
"size": 500,
"url": "https://kalshi.com/markets/kxfeddecision",
"rule": 1,
"readMs": 1793707196000,
"deadlineMs": 1797768000000
}
],
"costPerSet": 0.981,
"payoutPerSet": 1,
"netBps": 193.7,
"netUsd": {
"100": 1.94,
"1000": null,
"10000": null,
"100000": null,
"1000000": null
},
"maxSizeUsd": 490.5,
"resolvesMs": 1797163200000,
"latestResolvesMs": 1799755200000,
"days": 40,
"yearlyBps": 1767.5,
"status": "caution",
"rules": [
{
"venue": "Polymarket",
"text": "Resolves Yes if the target range is lowered at the December meeting.",
"source": "federalreserve.gov"
},
{
"venue": "Kalshi",
"text": "Resolves to Cut if the upper bound is lowered at the December meeting.",
"source": "federalreserve.gov"
}
],
"reasons": [
"Two exchanges, each settling by its own rules: read both before trading.",
"Paired by title and resolution date, not by the exchanges."
],
"matrix": null,
"curve": {
"sets": 500,
"legs": [
{
"fee": 0,
"minQty": 1,
"asks": [
[
0.41,
300
],
[
0.415,
200
]
]
},
{
"fee": 0.07,
"minQty": 1,
"asks": [
[
0.565,
500
]
]
}
]
},
"firstSeenMs": 1793706600000,
"updatedMs": 1793707198000,
"checkedMs": 1793707198000
},
"alert": {
"title": "Prediction: Fed cuts rates in December? · +$9.50 (+1.94%) at $491",
"detail": "Buy YES Yes on Polymarket @ $0.4120\nBuy NO Cut on Kalshi @ $0.5690\n500 sets cost $490.50, fees in, and pay $500.00 at settlement\nPaid at resolution in 40 days, +17.68% a year"
},
"routeId": "cross:5d0c6b1e8f2a4c7d9e3b1a0f6c2d8e4b",
"links": [
{
"side": "buy",
"venue": "Polymarket",
"url": "https://polymarket.com/event/fed-decision-in-december"
},
{
"side": "buy",
"venue": "Kalshi",
"url": "https://kalshi.com/markets/kxfeddecision"
}
],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app?m=prediction&route=cross%3A5d0c6b1e8f2a4c7d9e3b1a0f6c2d8e4b",
"atSize": null,
"access": []
}prediction.signalPro Trader e superiori
prediction.signal: un mercato predittivo si è mosso come la tua regola osserva, per esempio nelle probabilità.
{
"id": "evt_6e8a0c2d4f6b8d0e2a4c6e8a",
"type": "prediction.signal",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "Fed markets"
},
"signal": {
"seq": 918204,
"kind": "odds_move",
"venue": "Kalshi",
"marketId": "KXFEDDECISION-26DEC-C25",
"title": "Fed decision in December",
"outcome": "Cut",
"url": "https://kalshi.com/markets/kxfeddecision",
"prob": 0.47,
"fromProb": 0.39,
"windowMs": 1800000,
"side": null,
"size": null,
"usd": null,
"atMs": 1793707195000
},
"alert": {
"title": "Odds moved: Fed decision in December: Cut",
"detail": "Kalshi · YES 39% → 47% within 30m"
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/odds"
}liquidation.alertPro Trader e superiori
liquidation.alert: una liquidazione corrisponde alla tua regola, per esempio una sopra un certo importo.
{
"id": "evt_4f6b8d0a2c4e6f8b0d2a4c6e",
"type": "liquidation.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "BTC liquidations over $1M"
},
"liquidation": {
"seq": 1793707200000000,
"venue": "Binance",
"coin": "BTC",
"contract": "BTCUSDT",
"market": "perp",
"side": "long",
"price": 63950.1,
"size": 23.456,
"valueUsd": 1500036.5,
"exchangeMs": 1793707199600,
"receivedMs": 1793707200000,
"url": "https://arbitragex.io/app/liquidations?coin=BTC"
},
"alert": {
"title": "BTC long liquidated: $1,500,037 on Binance",
"detail": "23.46 BTC at $63,950.10 · BTCUSDT · Nov 3, 11:59 UTC"
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/liquidations?coin=BTC"
}liquidation.clusterProp Syndicate e superiori
liquidation.cluster: il prezzo si avvicina a un cluster di posizioni che verrebbero liquidate, dal radar pre-squeeze.
{
"id": "evt_8a0c2e4b6d8f0a2c4e6b8d0f",
"type": "liquidation.cluster",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "BTC radar"
},
"cluster": {
"seq": 1793707200000000,
"coin": "BTC",
"side": "long",
"nearPx": 64600,
"farPx": 64100,
"usd": 40250000,
"positions": 37,
"markPx": 65780,
"markMs": 1793707200000,
"distance": 0.0179,
"atr": 0.012,
"reach": 1.49,
"oiUsd": 3100000000,
"oiShare": 0.013,
"readFromMs": 1793706660000,
"readToMs": 1793707198000,
"atMs": 1793707200000,
"url": "https://arbitragex.io/app/liquidations?coin=BTC"
},
"alert": {
"title": "BTC: $40,250,000 of longs liquidate 1.8% below price",
"detail": "37 positions between $64,600.00 and $64,100.00, mark $65,780.00.\n1.3% of Hyperliquid open interest, 1.5x a typical hour's move away.\nRead Nov 3, 11:51 to Nov 3, 11:59 UTC."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/liquidations?coin=BTC"
}positioning.alertProp Syndicate e superiori
positioning.alert: il posizionamento dei top trader su una moneta è cambiato come la tua regola osserva, per esempio quando la loro inclinazione si inverte.
{
"id": "evt_1c3e5a7d9f1b3d5f7a9c1e3b",
"type": "positioning.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "6f1c2b9e-4d3a-4e8b-9a7f-2c5d8e1b0a34",
"name": "ETH lean"
},
"positioning": {
"kind": "flip",
"coin": "ETH",
"url": "https://arbitragex.io/app/wallets/positioning?coin=ETH",
"atMs": 1793707170000,
"longShareUsd": 0.38,
"traders": 212,
"lean": "short",
"prevSinceMs": 1793613600000,
"movePts": null,
"address": null,
"size": null,
"markPx": null,
"liquidationPx": null,
"distance": null,
"valueUsd": null,
"group": null,
"side": null,
"eachUsd": null,
"wallets": null,
"totalUsd": null,
"avgEntryPx": null,
"reachedMs": null
},
"alert": {
"title": "Top traders flipped short on ETH",
"detail": "38% long by size among 212 ranked traders · leaned the other way since Nov 2, 10:00"
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/wallets/positioning?coin=ETH"
}wallet.alertProp Syndicate e superiori
wallet.alert: un trader che segui ha aperto, modificato o chiuso una posizione.
{
"id": "evt_5e7a9c1f3b5d7f9a1c3e5b7d",
"type": "wallet.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": null,
"wallet": {
"address": "0x7b4a1f0c9d2e3b5a6c8d0e1f2a3b4c5d6e7f8091",
"coin": "BTC",
"kind": "opened",
"size": 2,
"prevSize": 0,
"entryPx": 64000,
"valueUsd": 128000,
"atMs": 1793707195000,
"leverage": 5,
"liquidationPx": 51840
},
"alert": {
"title": "0x7b4a…8091 opened a BTC long",
"detail": "2 BTC at $64,000, about $128,000."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/wallets/0x7b4a1f0c9d2e3b5a6c8d0e1f2a3b4c5d6e7f8091"
}watch.alertProp Syndicate e superiori
watch.alert: un wallet che osservi ha ricevuto o inviato un trasferimento, su Alert predefinito. event.tx è null quando l'hash della transazione non è noto.
{
"id": "evt_9a1c3e5b7d9f1a3c5e7b9d1f",
"type": "watch.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": {
"id": "default",
"name": "Default alert"
},
"wallet": {
"chain": "ethereum",
"address": "0x1111111111111111111111111111111111111111",
"label": "Treasury"
},
"event": {
"tx": "0xabababababababababababababababababababababababababababababababab",
"kind": "token",
"token": "USDC",
"amount": 1000000,
"direction": "out",
"counterparty": "0x2222222222222222222222222222222222222222",
"usd": 1000000,
"atMs": 1793707185000
},
"alert": {
"title": "Treasury sent 1,000,000 USDC",
"detail": "To 0x2222…2222."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/alerts?tab=fired"
}polymarket.alertProp Syndicate e superiori
polymarket.alert: un trader di Polymarket che segui ha fatto un trade.
{
"id": "evt_3b5d7f9a1c3e5b7d9f1a3c5e",
"type": "polymarket.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": null,
"trader": {
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"market": {
"title": "Fed decision in December",
"outcome": "Yes",
"eventSlug": "fed-decision-in-december",
"condition": "0x8a3f"
},
"url": "https://polymarket.com/event/fed-decision-in-december",
"kind": "opened",
"size": 25000,
"prevSize": 0,
"avgPrice": 0.41,
"valueUsd": 10250,
"atMs": 1793707140000
},
"alert": {
"title": "Polymarket trader 0x5668…5839 bought Yes on Fed decision in December",
"detail": "25,000 shares. Average price $0.41. Worth about $10k."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/alerts?tab=fired"
}consensus.alertProp Syndicate e superiori
consensus.alert: diversi wallet che segui hanno preso lo stesso lato su una moneta in poco tempo.
{
"id": "evt_7d9f1b3c5e7a9d1f3b5c7e9a",
"type": "consensus.alert",
"test": false,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": null,
"consensus": {
"coin": "SOL",
"side": "long",
"wallets": [
"0x1f2e3d4c5b6a79880716253443526170f8e9d0c1",
"0x2a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d",
"0x9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b"
],
"windowMs": 3600000,
"atMs": 1793707180000
},
"alert": {
"title": "3 wallets you follow went long on SOL",
"detail": "Each added to SOL long within 1h of the others, as last read: 0x1f2e…d0c1, 0x2a3b…4c5d, 0x9c8b…1c0b."
},
"routeId": null,
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/alerts?tab=fired"
}alert.testPro Trader e superiori
alert.test: da Invia test, con "test": true e una moneta finta chiamata TEST.
{
"id": "evt_0f2a4c6e8b0d2f4a6c8e0b2d",
"type": "alert.test",
"test": true,
"sentAt": "2026-11-03T12:00:00.000Z",
"rule": null,
"window": null,
"opportunity": {
"id": "TEST|TestBuy:spot|TestSell:spot",
"coin": "TEST",
"strategy": "spot",
"buy": {
"venue": "TEST BUY",
"kind": "spot",
"symbol": "TESTUSDT",
"price": 1,
"sizeUsd": 1000,
"ageMs": 0,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 25,
"needs": "",
"withdrawUsd": null,
"transferMin": null,
"depth": null,
"url": "https://arbitragex.io/docs#webhooks"
},
"sell": {
"venue": "TEST SELL",
"kind": "spot",
"symbol": "TESTUSDT",
"price": 1.01,
"sizeUsd": 1000,
"ageMs": 0,
"fundingBps8h": null,
"nextFundingMs": null,
"takerBps": 25,
"needs": "",
"withdrawUsd": null,
"transferMin": null,
"depth": null,
"url": "https://arbitragex.io/docs#webhooks"
},
"grossBps": 100,
"netBps": 50,
"netUsd": {
"100": 0.5,
"1000": 5,
"10000": null,
"100000": null,
"1000000": null
},
"maxSizeUsd": 1000,
"exitBps": null,
"transfer": "not_needed",
"network": null,
"status": "verified",
"reasons": [
"TEST event, not market data"
],
"firstSeenMs": 1793707200000,
"updatedMs": 1793707200000,
"spark": []
},
"routeId": "TEST|TestBuy:spot|TestSell:spot",
"links": [],
"apiVersion": "2026-11-04",
"appUrl": "https://arbitragex.io/app/alerts",
"atSize": {
"sizeUsd": 1000,
"netUsd": 5,
"netBps": 50,
"myTakerBps": null,
"coins": null,
"avgBuyPrice": null,
"avgSellPrice": null,
"parts": null,
"lockedBps": null,
"forecastBps": null,
"forecast": null,
"marginSell": false,
"borrow": null,
"hold": null,
"capitalUsd": 1000
}
}I campi completi sono nella documentazione dei webhook.
Consegna e nuovi tentativi
- Rispondi con un qualsiasi 2xx entro 8 secondi. Una risposta più lenta conta come fallimento.
- Un timeout, un errore di connessione, 429 o qualsiasi 5xx viene ritentato, fino a 5 tentativi in tutto, attendendo 5 secondi, 20 secondi, 1 minuto, 5 minuti dopo ciascuno. Un
Retry-Afterin secondi può allungare un'attesa, fino a 5 minuti. - Qualsiasi altro 4xx non viene ritentato, e neppure un 3xx: i redirect non vengono seguiti, quindi dacci l'URL finale.
- 8 fallimenti di fila mettono in pausa la destinazione e annullano ciò che è in attesa per essa. Un 429 non conta, e un solo successo riporta il conteggio a zero.
- Prima di ogni tentativo controlliamo di nuovo che la destinazione sia attiva, che la regola esista ancora, che il tuo piano includa ancora il tipo e che non siano le tue ore di silenzio. Un alert di opportunità o di quotazione ancora in attesa quando l'opportunità è probabilmente chiusa viene scartato come scaduto.
- Al massimo 30 alert al minuto per account. Oltre, gli alert in più vengono saltati e il registro delle consegne lo indica.
- Una consegna può arrivare in ritardo, due volte o fuori ordine, quindi deduplica su
ide non agire su un alert che per te è già superato.
Strumenti di esecuzione
Ogni esempio qui sotto è il body che uno strumento si aspetta, scritto sul nostro payload standard: ogni valore tra parentesi angolari è il nostro campo da inserire lì. Costruiscilo in un passaggio di Zapier o Make dopo un catch webhook, o nel tuo relay come il ricevitore in Esegui il tuo script, e invialo all'URL webhook dello strumento. I valori in maiuscolo sono tuoi. Solo opportunity.alert e listing.alert devono arrivare a uno strumento: filtra test e ogni altro tipo, così un aggiornamento di chiusura non può aprire un trade. Non facciamo mai trading: cosa fa uno strumento con un messaggio dipende da te e dallo strumento.
Ogni strumento cambia i propri campi nel tempo. Controlla un esempio con la documentazione attuale dello strumento prima di farci affidamento.
3Commas signal bot
Per il webhook personalizzato di un signal bot 3Commas, con il suo secret e l'UUID del bot dalle impostazioni dei messaggi del bot. Un signal bot fa trading su un solo exchange, quindi limita la regola alle opportunità che acquistano lì con il filtro exchange della regola.
{
"secret": "YOUR_3COMMAS_SECRET",
"bot_uuid": "YOUR_BOT_UUID",
"max_lag": "300",
"timestamp": "<sentAt>",
"trigger_price": "<opportunity.buy.price>",
"tv_exchange": "<opportunity.buy.venue in capitals, e.g. BINANCE>",
"tv_instrument": "<opportunity.coin>USDT",
"action": "enter_long"
}Hummingbot
Hummingbot riceve comandi tramite le proprie interfacce invece che via webhook, quindi questo va a una tua piccola script strategy, o a un bridge verso la sua interfaccia MQTT. Usa il nome del tuo connettore.
{
"connector": "<opportunity.buy.venue in lower case, e.g. binance>",
"trading_pair": "<opportunity.coin>-USDT",
"side": "BUY",
"price": <opportunity.buy.price>,
"amount_usd": <atSize.sizeUsd>,
"hedge_connector": "<opportunity.sell.venue in lower case>",
"hedge_price": <opportunity.sell.price>,
"net_bps": <atSize.netBps>,
"event_id": "<id>"
}Cornix signal
Testo semplice nel formato dei segnali di Cornix, per l'indirizzo webhook che Cornix assegna a un bot TradingView. Imposta il tuo stop e controlla il formato con la guida attuale di Cornix.
#<opportunity.coin>/USDT Exchanges: <opportunity.buy.venue> Signal Type: Regular (Long) Entry Targets: 1) <opportunity.buy.price> Take-Profit Targets: 1) <opportunity.sell.price> Stop Targets: 1) YOUR_STOP_PRICE
TradingView-style JSON
I nomi dei campi che invia un alert TradingView, per gli strumenti fatti per ricevere alert TradingView.
{
"ticker": "<opportunity.coin>USDT",
"exchange": "<opportunity.buy.venue in capitals>",
"action": "buy",
"price": <opportunity.buy.price>,
"time": "<sentAt>",
"message": "<opportunity.coin> <opportunity.buy.venue> to <opportunity.sell.venue>, net <atSize.netBps> bps at $<atSize.sizeUsd>"
}Flat JSON
Ogni cifra al primo livello, per un foglio di calcolo, n8n o un database.
{
"id": "<id>",
"coin": "<opportunity.coin>",
"size_usd": <atSize.sizeUsd>,
"net_usd": <atSize.netUsd>,
"net_bps": <atSize.netBps>,
"max_size_usd": <opportunity.maxSizeUsd>,
"buy_exchange": "<opportunity.buy.venue>",
"buy_price": <opportunity.buy.price>,
"buy_url": "<opportunity.buy.url>",
"sell_exchange": "<opportunity.sell.venue>",
"sell_price": <opportunity.sell.price>,
"sell_url": "<opportunity.sell.url>"
}Altri canali
Ogni canale qui sotto si configura nella pagina Alert, ha un pulsante Invia test e riporta lo stesso testo di alert di ogni altro canale, nella lingua dell'account. Regole, limiti di ripetizione, ore di silenzio, limite di frequenza e pausa automatica funzionano allo stesso modo su tutti.
- Slack (Starter Quant e superiori): aggiungi l'app Incoming Webhooks a un canale Slack e incolla l'URL
hooks.slack.comche ti fornisce. - ntfy (Starter Quant e superiori): notifiche gratuite su telefono e desktop. Incolla l'URL di un topic come
https://ntfy.sh/your-topic, o uno sul tuo server, e iscriviti allo stesso topic nell'app ntfy. Chiunque conosca il nome di un topic pubblico può leggerlo, quindi scegline uno lungo e casuale, o aggiungi un token di accesso per un topic protetto. Ogni alert ha pulsanti per entrambi gli exchange. - Riepilogo email (Starter Quant e superiori): una mail all'indirizzo del tuo account con ogni alert dall'ultima, ogni ora allo scoccare dell'ora o ogni giorno alle 08:00 UTC. Non viene inviato nulla quando non c'è niente di nuovo.
WhatsApp non offre un modo gratuito per farti scrivere da un servizio, quindi non è disponibile. Per tutto il resto, un webhook personalizzato è semplice JSON su https.
Pubblica su Slack
Un Cloudflare Worker senza server da gestire. Imposta ARBITRAGEX_SECRET e SLACK_WEBHOOK_URL come secret, poi usa l'URL del Worker come destinazione. Lo stesso codice funziona ovunque ci sia Web Crypto.
async function verify(rawBody, headers, secret) {
const ts = headers.get("x-arbitragex-timestamp");
if (!(Math.abs(Date.now() / 1000 - Number(ts)) <= 300)) return false;
const encoder = new TextEncoder();
const key = await crypto.subtle.importKey(
"raw", encoder.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["verify"],
);
const given = (headers.get("x-arbitragex-signature") ?? "").replace("sha256=", "");
if (!/^[0-9a-f]{64}$/.test(given)) return false;
const bytes = Uint8Array.from(given.match(/../g), (pair) => parseInt(pair, 16));
return crypto.subtle.verify("HMAC", key, bytes, encoder.encode(`${ts}.${rawBody}`));
}
export default {
async fetch(request, env) {
const rawBody = await request.text();
if (!(await verify(rawBody, request.headers, env.ARBITRAGEX_SECRET))) {
return new Response("bad signature", { status: 401 });
}
const event = JSON.parse(rawBody);
if (event.type === "opportunity.alert" || event.type === "listing.alert") {
const { coin, buy, sell } = event.opportunity;
// The net at your size and taker fee, as the alert and the app state it.
const { sizeUsd, netBps } = event.atSize;
const net = netBps === null ? "not filled" : `${netBps.toFixed(1)} bps`;
await fetch(env.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: `${coin}: ${buy.venue} to ${sell.venue}, net ${net} at $${sizeUsd}`,
}),
});
}
return new Response(null, { status: 204 });
},
};Tieni un foglio di calcolo
Aggiunge una riga per alert a un CSV che puoi aprire in qualsiasi foglio di calcolo, con la sola libreria standard di Python. Mettilo dietro https: inviamo solo a indirizzi https pubblici.
import csv
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
import hashlib
import hmac
import time
def verify(raw_body: bytes, headers: dict, secret: str) -> bool:
ts = headers.get("x-arbitragex-timestamp", "")
try:
if abs(time.time() - int(ts)) > 300:
return False
except ValueError:
return False
signed = ts.encode() + b"." + raw_body
expected = "sha256=" + hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected.encode(), headers.get("x-arbitragex-signature", "").encode())
SECRET = "your signing secret"
seen = set()
class Receiver(BaseHTTPRequestHandler):
def do_POST(self):
raw_body = self.rfile.read(int(self.headers["Content-Length"]))
headers = {key.lower(): value for key, value in self.headers.items()}
if not verify(raw_body, headers, SECRET):
self.send_response(401)
self.end_headers()
return
self.send_response(204)
self.end_headers()
event = json.loads(raw_body)
if event["test"] or event["id"] in seen or "opportunity" not in event:
return
seen.add(event["id"])
row = event["opportunity"]
# The net at your size and taker fee, as the alert states it.
at = event.get("atSize") or {}
with open("alerts.csv", "a", newline="") as file:
csv.writer(file).writerow(
[event["sentAt"], event["type"], row["coin"], row["buy"]["venue"], row["sell"]["venue"], at.get("sizeUsd"), at.get("netUsd"), at.get("netBps")]
)
if __name__ == "__main__":
HTTPServer(("127.0.0.1", 8000), Receiver).serve_forever()Esegui il tuo script
Un ricevitore senza dipendenze, che risponde subito e passa ogni alert a una tua funzione. Cosa fa quella funzione lo scrivi tu e ne rispondi tu. Gli alert sono stime basate sui dati di mercato, e un'opportunità può chiudersi prima che arrivi qualsiasi cosa tu avvii.
import { createServer } from "node:http";
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(rawBody, headers, secret) {
const ts = headers["x-arbitragex-timestamp"];
if (!(Math.abs(Date.now() / 1000 - Number(ts)) <= 300)) return false;
const expected =
"sha256=" + createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");
const given = Buffer.from(String(headers["x-arbitragex-signature"]));
const wanted = Buffer.from(expected);
return given.length === wanted.length && timingSafeEqual(given, wanted);
}
const seen = new Set();
function onAlert(event) {
// Your code goes here. You decide what happens next, and we never see it.
// atSize is the net at your size and taker fee, as the alert states it.
console.log(event.type, event.opportunity.coin, event.atSize?.sizeUsd, event.atSize?.netBps);
}
export const server = createServer((req, res) => {
const parts = [];
req.on("data", (part) => parts.push(part));
req.on("end", () => {
const rawBody = Buffer.concat(parts).toString("utf8");
if (!verify(rawBody, req.headers, process.env.ARBITRAGEX_SECRET)) {
return res.writeHead(401).end();
}
const event = JSON.parse(rawBody);
// Answer first: anything slower than 8 seconds counts as a failed delivery.
res.writeHead(204).end();
if (event.test || seen.has(event.id)) return;
seen.add(event.id);
if (event.type === "opportunity.alert" || event.type === "listing.alert") onAlert(event);
});
});Zapier e Make
Un webhook personalizzato è un semplice POST JSON, quindi un URL catch webhook di uno dei due funziona come destinazione. Aggiungi un passaggio di filtro su type e test, poi mappa campi come opportunity.coin e opportunity.netBps. Questi passaggi non controllano la nostra firma per te, quindi tratta l'URL catch come una password e non avviare lì nulla che non lasceresti avviare a uno sconosciuto.
Telegram
Se vuoi solo gli alert sul telefono, salta tutto questo. Premi Collega Telegram nella pagina Alert e poi Avvia nella chat che si apre. Vedi la documentazione degli alert.