Skip to main content
POST
POST /v1/webhook/price/{id}/add · Free Arms up to 1,000 triggers on a price webhook, on up to 100 distinct tokens per call. Idempotent: a trigger already there with the same id, token and condition comes back in alreadyIn with its status, whatever it is; the same id with another condition comes back in rejected (details.reason: "idTaken": an id stays taken for 30 days after its trigger ends). A trigger you removed is not armed again: it comes back in alreadyIn with status: "removed", so check status, and arm it again under a new id. A condition already true fires at once. The response never carries the token’s price. rejected gives each trigger that was not armed, with its index and error: a malformed field (INVALID_PARAM or INVALID_CHAIN, details.param names it), a token not covered (details.reason nativeCoin, wrappedNative or stablecoin), an unknown token (NOT_FOUND), an eq on a token with no price yet in the level’s unit (details.reason: "noPrice"), an id used twice in the call (duplicateId), a trigger with both priceUsd and priceNative (INVALID_PARAM: set one). The others are armed. Free; your account must be able to pay for the triggers it arms (1 credit per trigger sent to your URL).

Authorizations

Authorization
string
header
required

Your raw API key (not needed on the demo server).

Path Parameters

id
string
required

The price webhook id: yours, or the wh_… id we generated.

Body

application/json
triggers
any[]
required

1 to 1,000 triggers per call, on up to 100 distinct tokens: { "id"?, "name"?, "chain", "address", "priceUsd": { "gt" | "gte" | "lt" | "lte" | "eq": "<level>" } }, the level in USD, or the same with priceNative, the level in the native coin of the chain (one of the two; a decimal string of at most 32 characters, or a JSON number). An invalid trigger comes back in rejected with its index; the others are armed.

Response

200

Standard { data, meta } envelope.