GET /orders, your program is told. This page covers the webhook object and the calls that manage it; the Webhooks guide covers events, signatures and retries.
Each path sits under the test base path or the production base path:
Neither scope is on a key by default: ask for
webhooks:read and webhooks:write when you ask for the key (see the Scope reference). Every webhook call counts against the key’s read budget (see Rate limits).
A webhook belongs to one environment. One created on the test path receives only test events and is visible only on the test path. One created on the production path receives only production events (your real orders and limit orders, from every channel) and is visible only there. The id of a webhook from the other environment answers 404 webhook_not_found.
The webhook object
200 OK
Create a webhook
POST /webhooks takes:
201 Created with the webhook and its signing secret:
201 Created
409 webhook_limit_reached.
URL rules
The URL is checked when you create or change a webhook, and the address it resolves to is checked again on every delivery. It must:- use
https; - carry no user name, password or
#fragment; - resolve, and resolve only to public internet addresses: private, loopback, link-local, shared and cloud-metadata addresses are refused, as are local network names.
422 invalid_webhook_url. Put any token of your own in the path or query string, not in a user name or password.
List and read
GET /webhooks returns items, every webhook of your account in the calling environment, oldest first, and total. GET /webhooks/{webhook_id} returns one.
200 OK
Change or pause a webhook
PATCH /webhooks/{webhook_id} changes url, events, description or active. Send only the fields to change; a new url is checked against the URL rules again.
200 OK
active back to true.
Delete a webhook
DELETE /webhooks/{webhook_id} answers 204 No Content. The webhook is gone, and so is every delivery it was still owed.
Send a test event
POST /webhooks/{webhook_id}/test queues one webhook.test event to that webhook, signed and retried like any other delivery, whatever its events list. Use it to check your receiver end to end. A paused webhook answers 409 webhook_inactive. At most 5 test events per minute per webhook; more answer 429 rate_limited with Retry-After.
202 Accepted
event_id is the id your endpoint receives in the body, and delivery_id the X-Bullionwale-Delivery header.
Rotate the signing secret
POST /webhooks/{webhook_id}/rotate-secret replaces the signing secret at once and returns the webhook with the new secret, shown only in this response. Every delivery signed from then on, including retries of earlier events, uses the new secret; the old one stops verifying immediately, with no overlap. Switch your receiver to the new secret straight away.
secret and secret_last4.
Errors
The full list is in the Error reference.