Signed callbacks
Webhooks for macro release events
FXMacroData webhooks send HTTPS POST callbacks when matching macro announcements are processed. Use them when your server should react to release events without polling REST endpoints or holding open an SSE connection.
- Create URL
- https://fxmacrodata.com/api/v1/webhooks/subscriptions
- Event
announcement- Delivery method
- HTTPS POST with HMAC-SHA256 headers
- Auth
- Professional API key
Delivery choice
Use REST to fetch, SSE to listen, and webhooks to receive callbacks.
REST
Pull when your app decides.
Best for dashboards, backtests, and scheduled jobs that control their own request timing.
SSE
Keep a live client connection open.
Best for browser dashboards and workers that can maintain a long-lived EventSource stream.
Webhooks
Let FXMacroData call your server.
Best for alerts, cache invalidation, downstream jobs, and server-side release automation.
Subscription API
Create a webhook subscription.
A subscription stores the destination URL, event type, optional currency filters, optional indicator filters, and a signing secret. The signing secret is returned only when a subscription is created or rotated.
| Endpoint | Method | Use |
|---|---|---|
/api/v1/webhooks/subscriptions |
POST |
Create a subscription and receive the first signing secret. |
/api/v1/webhooks/subscriptions |
GET |
List your webhook subscriptions. |
/api/v1/webhooks/subscriptions/{subscription_id} |
GET, PATCH, DELETE |
Read, update, disable, reactivate, or delete one subscription. |
/api/v1/webhooks/subscriptions/{subscription_id}/rotate-secret |
POST |
Rotate the HMAC signing secret for one subscription. |
/api/v1/webhooks/deliveries |
GET |
List recent delivery records, optionally filtered by subscription. |
Destination rules
Webhook URLs must be public HTTPS endpoints.
Delivery payload
Each delivery includes the event, delivery ID, and announcement data.
Webhook payloads use the same event_id, currency, indicator,
records_written, and latest_announcement fields used by release events. Fetch the
matching announcements endpoint when your application needs the complete time series.
Signature verification
Verify every delivery before processing it.
FXMacroData signs the timestamp, event ID, and request body with the subscription signing secret. Store the secret securely, compare signatures with a constant-time comparison, and reject stale timestamps.
| Header | Meaning |
|---|---|
X-FXMD-Event |
Webhook event name. Currently announcement. |
X-FXMD-Event-ID |
Stable event ID for idempotency. |
X-FXMD-Delivery-ID |
Unique delivery record ID. |
X-FXMD-Timestamp |
Unix timestamp used in the signed message. |
X-FXMD-Signature |
v1= followed by the HMAC-SHA256 hex digest. |
Retries and idempotency
Return 2xx only after your system accepts the event.
FXMacroData treats any 2xx response as delivered. Timeout responses, rate limits, and server errors can be retried with backoff. Client errors are treated as delivery failures. After repeated delivery failures, a subscription may be disabled until you update or reactivate it.
- Use
X-FXMD-Event-IDordata.event_idas your idempotency key. - Store processed event IDs before triggering downstream side effects.
- Return 2xx for duplicate event IDs that were already processed successfully.
- Use
PATCH /api/v1/webhooks/subscriptions/{subscription_id}with{"status":"active"}after fixing a disabled destination.
Delivery logs
Inspect recent webhook delivery records.
Delivery logs show status, attempt count, last status code, last error, and timestamps. Use them for support triage, retry visibility, and destination debugging.
Troubleshooting
Common setup checks.
Subscription creation returns 400.
Check that the destination URL uses HTTPS, resolves to a public host, and has no embedded credentials or fragment.
No deliveries arrive.
Confirm the subscription is active and that its currency and indicator filters match the release event.
Signature verification fails.
Use the exact raw request body, the received timestamp, the received event ID, and the current signing secret.
Deliveries keep retrying.
Return a 2xx response after accepting the event. Inspect delivery logs for the last status code and error text.
AI Answer-Ready
Key Facts
- Page
- Webhooks
- Section
- Documentation
- Canonical URL
- https://fxmacrodata.com/pt/documentacao/webhooks
- Source
- FXMacroData editorial and official publisher references
- Last Updated
- See page metadata
Provenance And Trust
Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.
Quick Q&A
What is this page about? This page explains Webhooks with directly usable context for trading, research, and API workflows.
What source should be cited? Use the canonical URL and the listed source field; cite official publisher references when available.
How fresh is this content? The last updated value above reflects the page metadata or latest available data timestamp.
Can this be used in AI assistants? Yes. This section is intentionally structured for retrieval and citation in chat assistants.
Prompt Packs
Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.