Delivery
Webhooks
Paid plans can receive events instead of polling: we send a POST to your HTTPS address the moment something happens. Add the address and pick events in the developer console.
Plans
| Plan | Events | Addresses |
|---|---|---|
| Builder | 3: flows.day_complete, flows.day_final, flows.record | 1 |
| Commercial | all 9 | up to 5 |
Events
| Event | When it fires |
|---|---|
flows.fund_reported | A fund publishes a new or corrected daily figure |
flows.day_complete | Every fund has a figure for the day; the total is preliminary |
flows.day_final | The day is settled: 14:00 UTC on the second business day |
flows.record | A day sets a record inflow or outflow |
fund.launched | A new spot crypto ETF starts trading |
fund.closed | A fund closes |
filing.new | A new spot crypto ETF filing appears at the SEC |
filing.status_changed | A tracked filing changes status |
cefi.zone_changed | The CEFI index moves into another zone |
Preliminary or final
flows.day_completecomes first, withstatus: "preliminary". The number can still change.flows.day_finalcomes later, withstatus: "final", the settled total and the difference from the early figure.- If a figure changes after that,
flows.day_finalis sent again with a higherrevision.
Subscribe to the first for speed, to the second for accuracy, or to both.
What a delivery looks like
A JSON POST with the body { id, type, createdAt, data } and three headers:
| Header | Value |
|---|---|
X-CryptoETF-Event | Event type, e.g. flows.day_final |
X-CryptoETF-Delivery | Delivery id |
X-CryptoETF-Signature | t=<unix seconds>,v1=<hex> |
Verifying the signature
v1 is HMAC-SHA256 of <t>.<raw body> with your endpoint secret. Compute it over the body exactly as received, before parsing, and reject requests older than five minutes:
import crypto from 'node:crypto';
// rawBody: the request body exactly as received, before JSON.parse
function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const hex = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return crypto.timingSafeEqual(Buffer.from(hex), Buffer.from(v1));
}Responses and retries
- Reply with any
2xxwithin 10 seconds. - Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours.
- An address that fails for 24 hours is switched off. Switch it back on in the developer console.