Skip to content
ChartDeck Developer API docs Account Get an API key

Endpoints and events

Signed POSTs to your server when a calendar figure is released or revised, or one of your own alerts fires.

A webhook endpoint is an https URL on your server. ChartDeck POSTs a JSON event to it when something you subscribed to happens. Webhooks are part of the Developer and Business tiers and of Elite's included tier; manage endpoints with the /v1/webhooks operations (scope webhooks:write).

#Events

TypeWhen
calendar.releasea calendar event's actual figure is published
calendar.reviseda published figure is revised
alert.firedone of your own ChartDeck alerts fires
usage.thresholdyour account passes 80 % or 100 % of its monthly units
pingyou asked for a test (POST /v1/webhooks/{id}/test)

#The delivery

Text
POST <your URL>
Content-Type: application/json
User-Agent: ChartDeck-Webhooks/1
ChartDeck-Event-Id: evt_...
ChartDeck-Event-Type: calendar.release
ChartDeck-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256>
JSON
{ "id": "evt_...", "type": "calendar.release", "created": 1793548800, "data": { "...": "..." }, "attribution": [ { "id": "...", "text": "...", "url": null } ] }
  • Verify the signature before trusting the body: Verify signatures.
  • Answer 2xx quickly (do the work after answering). Anything else, a redirect or a timeout (10 s) is a failure.
  • Retries: after 1 m, 5 m, 30 m, 2 h, 6 h, 12 h and 24 h; the 8th failure gives up. An endpoint that only fails for 3 days is turned off and you are told in the notification centre; fix it, then turn it back on with POST /v1/webhooks/{id}/enable (its waiting deliveries are sent and a ping follows).
  • Dedupe on id: it stays the same on every retry.
  • Only public https URLs are accepted; ChartDeck never follows redirects.

#Managing endpoints

Shell
curl -X POST https://api.chartdeck.trade/v1/webhooks \
  -H "Authorization: Bearer $CHARTDECK_API_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: setup-1" \
  -d '{ "url": "https://example.com/chartdeck-hook", "events": ["calendar.release"] }'

The answer holds the endpoint and its secret (whsec_cd_...), shown once: store it with your server's secrets. GET /v1/webhooks/{id} shows the last 50 deliveries.

The Developer API documentation is in English.