Set it up
- In a new scenario, add the Webhooks app's Custom webhook trigger.
- Choose Add, name the webhook Hyperodds alerts and choose Save. Copy the URL Make shows. Make now waits for a first request to learn the data structure.
- In Hyperodds, open Alerts and sign in. Paste the URL on the Webhook card and choose Add webhook. The test message arrives and Make reads its structure.
- Add the modules that should run, mapping fields such as title, market url and data edge_pts. Put a filter between modules that passes only when test is false and acts on the numbers, for example data edge_pts greater than 5.
- Turn the scenario on. In Hyperodds, choose Webhook on any alert.
Check the signature
The URL works as a password, so keep it private.
To check signatures, open the webhook's advanced settings and turn on Get request headers and JSON pass-through, so the body arrives as text. Add a filter that checks the Hyperodds-Signature header contains v1= followed by the result of Make's sha256 function, keyed with your signing secret and in hex, over the timestamp, a full stop and that text. Then read the fields with a Parse JSON module. The timestamp is the part of the header after t= and before the first comma; this formula reads it:
{{get(split(get(split(get(map(1.__IMTHEADERS__; "value"; "name"; "hyperodds-signature"); 1); ","); 1); "="); 2)}}Good to know
Make answers as soon as it queues a request, so Hyperodds counts an alert as delivered even if the scenario fails later.
When a scenario's queue is full, Make answers 400, and Hyperodds tries again later as it does after a server error.
The test message is an example edge alert, so Make learns an edge alert's fields from it. Other kinds add their own data fields, such as mid_price on a settling alert or changes on a rule change: choose Redetermine data structure on the webhook before one arrives, or map the field by its name from the Fields list on the webhooks page.