Skip to main content
POST
POST /v1/webhook/price · Free Creates a price webhook: the callbackUrl we call, the secret that signs every message, and optionally its first triggers (up to 1,000, on up to 100 distinct tokens). Give it your own id, or omit it and we generate one (wh_ + 16 hex characters). Omit secret and we generate one (whsec_…): it is in this response only, keep it. A new webhook answers 201. Creating an id you already have adds the triggers to it (created: false, status 200), as long as callbackUrl is the same, and secret and name too when you send them; a different value answers 400 on that field and nothing is written. Change them with /endpoint. Each trigger is { "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 (conditions, USD or native). armed lists the triggers armed by this call with their direction, alreadyIn those already there with the same condition, rejected the others with their index and error. Free; your account must be able to pay for the triggers it arms (1 credit per trigger sent to your URL).
At most 1,000 active triggers across your price webhooks (contact us for more) and 100 price webhooks per account. A call that would go past a cap is refused whole (429 RATE_LIMITED, details.limit priceTriggers or priceWebhooks, with max and current): nothing is written.

Authorizations

Authorization
string
header
required

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

Body

application/json
callbackUrl
string
required

The URL we POST to: https:// on port 443, a public host, no credentials, at most 2,048 characters. Redirects are never followed.

Example:

"https://example.com/hooks/price"

id
string

1 to 64 characters among A-Z a-z 0-9 _ . : -, not starting with a dot. Omitted: we generate one.

Example:

"tpsl"

secret
string

16 to 256 printable ASCII characters without spaces, used to sign every message. Omitted: we generate one (whsec_…) and return it once.

name
any

1 to 128 characters, or null for none.

triggers
any[]

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.