POST to your HTTPS endpoint, with the same IDs and shapes as the REST reads.
Webhook payloads shows each type. Trade and feed events cover only traders whose signals and messages are both public and who are not excluded from the feed for editorial reasons.
Register an endpoint
You need an active partner account. Register endpoints under Settings > Webhooks in the Centaur app, or with an API key that has thewebhooks.manage scope:
Terminal
secret from the response. It is shown only once. The API reference lists every field and the URL rules.
Choose events and filters
Filters narrow trade and feed events. Positioning events ignore them. Every filter you set must match, withassetIds and assetClasses on the same asset. A feed item matches through its current or removed events. Filter changes apply to events detected afterward.
Verify signatures
Verify every delivery on the raw body, before parsing. Deliveries have no fixed IP addresses. TheCentaur-Signature header holds a timestamp t and one or more v1 signatures:
Header
- Reject the delivery when
tis more than 300 seconds from your clock. - For each secret you accept, compute the lowercase hex HMAC-SHA256 of
<t>.<raw body>, keyed by the whole secret string,whsec_included. - Accept when any result equals any
v1, compared in constant time.
express.raw() or Flask’s request.get_data().
After you rotate the secret, deliveries carry a v1 for both the old and the new secret for 24 hours. Accept both while you deploy.
Test vectors
Setnow to 1759658400 (1759658400000 in Node.js). Both samples then accept the header below with either secret, and reject it if one body byte changes.
Header
Terminal
Send a test delivery
POST /v2/webhooks/{id}/test queues the trade_event.created example to that endpoint, whatever its event types and filters, with test: true in the signed body. Real events never carry test. The response gives the test’s eventId, deliveryId and status, which is HELD while the endpoint is paused or disabled.
Receive deliveries
- Answer 2xx within 10 seconds, including DNS and connection, then process. Redirects are not followed.
- Deduplicate on the event
id. Delivery is at least once. - Do not assume order. Deliveries run in parallel and retry later. For feed items,
currentis the message’s state after the change. - Ignore unknown fields. Payloads can gain fields without a
schemaVersionchange.
id and sequence and a new signature timestamp t. After six failed attempts the delivery is dead.
Answer 410 Gone to make Centaur disable the endpoint. Centaur also disables an endpoint after at least 50 failed attempts in a row with no success for about two hours (sustained_failure). Enabling or resuming it restarts the clock. An endpoint whose host starts resolving to a private address is disabled at once (unsafe_url). A disabled endpoint holds new deliveries for seven days: after you fix it, re-enable it and replay the range you need. Replay also resends dead deliveries.
The API reference documents every endpoint route:
GETandPOST /v2/webhooks: list and register endpoints.GET,PATCHandDELETE /v2/webhooks/{id}: read, update and delete one.POST /v2/webhooks/{id}/pause,/resume,/disable,/enable,/rotate-secret,/testand/replay.GET /v2/webhooks/{id}/deliveriesand/deliveries/{deliveryId}: list deliveries and read one.
Limitations
- Trade and feed changes are detected every 30 seconds. Positioning views recalculate at most every 1 to 15 minutes, depending on the view.
- An endpoint receives only changes detected after it was created, so it can get an update or deletion for an item it never saw created.
- Webhooks deliver positions of 60 seconds or less, which REST reads hide.
- Source edits, source deletions, and trader visibility changes send no events. Reconcile with REST reads.
- Feed item events ignore the feed’s seven-day window, but cover only messages posted in about the last 30 days: once the feed has pruned an older message, a correction to it sends its
trade_eventchanges but nofeed_itemevent for that message. The same correction can still sendfeed_item.updatedfor newer messages. - Trade prices can be null, and a later price sends no follow-up. Partial price failures can change Early Opportunities membership: check
coverageandmissingPriceGroups. - A history correction deletes the trader’s later events and recreates them, often unchanged, with new event and position IDs.
- Corrections arrive in bursts:
origin: replacementpairs, sometimesorigin: new, andfeed_item.updated.maxInFlight(1 to 50, default 5, set on the endpoint) caps how many reach you at once.originis not an old-to-new ID map. - Subscribe to feed items only if you want fewer correction events.