Skip to main content
A webhook destination is an HTTPS URL that receives an event each time Darvas stores new data of the types you choose. Darvas sends the event as soon as it stores the data, usually within a second.

Create a destination

The answer carries the destination and its signing secret, whsec_.... The secret is shown this once; keep it with your server. GET /webhooks lists your destinations without secrets, DELETE /webhooks/{webhook_id} removes one, and POST /webhooks/{webhook_id}/test sends it a test event with livemode: false within a second. You can send one test event a minute. The account’s unified plan sets how many destinations can be active: 0 on Darvas Free, 5 on Darvas Pro ($20/mo, or free with an active OKX affiliate account generating positive commission in the trailing 180 days), 25 on Darvas Max, and 100 on Darvas Ultra. A destination over the limit is refused with 400 LIMIT_REACHED. The URL must use HTTPS and reach a public address: private, loopback and link-local addresses are refused when the destination is made and again at every delivery.

Events

url is the API request that answers the new rows: an event tells you what changed, and you fetch the data with your key. Statement events come only for filings of the last three days, so the nightly rebuild of older statements sends nothing. Darvas workspace webhooks (included in Darvas Pro, Max, and Ultra) receive these events too, along with alarm, schedule, economic calendar, ETF flow and connection events.

Deliveries

Each delivery is a POST of a JSON envelope:
The headers are Content-Type: application/json, User-Agent: Darvas-Webhook/1.0 and Darvas-Signature: t=<unix seconds>,v1=<hex>. A delivery succeeds on any 2xx answer within ten seconds; redirects are not followed. Each destination receives its events one at a time, oldest first, so a slow server delays only its own events. A failed delivery is tried again about a minute later and about ten minutes after that, then given up. A destination whose last 50 attempts failed is disabled: delete it and make a new one once your server answers. The same event can arrive twice and in any order, so use id to skip one you have seen.

Verify the signature

v1 is the HMAC-SHA256 of {t}.{raw body} under your secret. Compute it over the raw bytes you received, compare in constant time, and refuse a t more than five minutes from your clock.