trade.completed; surface and route failures on trade.failed.
Deliveries are HTTPS POSTs from the addresses listed under Source IPs. Each one carries an
x-bitnob-signature header: an HMAC SHA-512 of the raw request body, keyed with your webhook secret. Verify it before you parse the body, comparing in constant time, as shown in Verifying events.
Payloads
reference is your join key back to the order you submitted; reason on failures carries the cause, for example Quote expired or Insufficient balance.
Delivery, retries and ordering
- Return a
200as soon as the signature checks out, then process. A slow handler times out, and a timeout counts as a failed delivery. - A
2xxresponse marks the event delivered.400,404,410,422, and451are final and not retried. Anything else, including a timeout, is retried with increasing delays, up to the retry count set on your webhook (1 to 5 attempts in total). After that, delivery stops. See Retries and duplicates. - The same event can arrive more than once. De-duplicate on
event_id. - Events can arrive in any order, because a retried delivery may land after a later one. Each trade ends in exactly one terminal event:
trade.completedortrade.failed. - Retries are finite, so an endpoint that is down for long enough misses events for good. Reconcile anything you still hold as pending with Get order.
Handler checklist
- Match
referenceagainst your ledger before mutating anything. - Log every event with delivery timestamp and processing outcome.
- Reconcile on a schedule, so a missed delivery never strands a trade as pending. List orders returns crypto-pair orders only; fetch NGN orders one at a time with Get order.
- Alert internally when
trade.failedvolume spikes; a burst usually means a systemic cause, not user error.