Create Webhook
Register a webhook endpoint to receive real-time notifications when orders are filled, deposits are received, or withdrawals complete.
POST
/api/v1/webhooksRequires authenticationStore the secret immediately
The secret is only returned once, in the creation response. Store it securely - you need it to verify webhook signatures.
Request body
urlstringREQUIREDHTTPS endpoint URL to receive webhook payloads
eventsstring[]REQUIREDEvents to subscribe to (minimum 1)One of:
order.filledorder.faileddeposit.receivedwithdrawal.completedRequest examples
curl -X POST https://merx.exchange/api/v1/webhooks \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/merx",
"events": ["order.filled", "order.failed"]
}'Response
201Webhook created
{
"id": "wh_abc123",
"user_id": "usr_xyz",
"url": "https://example.com/webhooks/merx",
"events": ["order.filled", "order.failed"],
"secret": "a1b2c3d4...64_hex_chars...",
"is_active": true,
"created_at": "2026-03-29T12:00:00Z"
}Response fields
idstringUnique webhook identifieruser_idstringOwner user identifierurlstringRegistered endpoint URLeventsstring[]Subscribed event typessecretstringHMAC signing secret (64 hex characters) - shown only onceis_activebooleanWhether the webhook is activecreated_atstringISO 8601 creation timestamp