Trading
Register a webhook
POST
https://api.slay.money/api/predict/api-keys/webhooksRequires an API key: Authorization: Bearer spk_…Limit: 10 changes / hour per account
Slay POSTs the account's order.filled and position.settled events to this HTTPS URL, checked once a minute on both venues. The response has the signing secret, shown only this once. Up to 3 per account. Each POST is one event, { id, type, createdAt, data }, oldest first, signed: Slay-Signature: t=<unix seconds>,v1=<hex> where hex = HMAC-SHA256(secret, <t>.<raw body>). Answer 2xx within 10 s. Anything else is retried every minute from the same event (same id); after 10 failures over 12 hours the webhook pauses.
Request
curl -X POST 'https://api.slay.money/api/predict/api-keys/webhooks' \
-H 'Authorization: Bearer $SLAY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"url":"https://bot.example.com/slay"}'Body
urlstringrequiredPublic https URL.
Responses
201The webhook, with its
secret.idstringurlstringsecretHintstringstatusstring One of
active, failing, pausedfailuresintegerlastErrorstring | nulllastDeliveredAtstring | nullcreatedAtstring201 response
{
"id": "string",
"url": "string",
"secretHint": "string",
"status": "active",
"failures": 0,
"lastError": "string",
"lastDeliveredAt": "string",
"createdAt": "string"
}400Not a public https URL.
409Already 3 webhooks.