DOCUMENTATION

Hyperodds alerts in n8n

Start an n8n workflow from any Hyperodds alert with the Webhook node.

Set it up

  1. Add a Webhook node. Set HTTP Method to POST and Respond to Immediately.
  2. Copy the Production URL and publish the workflow, so the URL answers. The Test URL only listens while you choose Listen for test event.
  3. In Hyperodds, open Alerts and sign in. Paste the Production URL on the Webhook card and choose Add webhook. The test message shows up in the workflow's Executions.
  4. Add the nodes that should run after the Webhook node. The alert is under body, so the edge is body.data.edge_pts.

Check the signature

To check signatures, add a Crypto node after the Webhook node: action Hmac, type SHA256, your signing secret, encoding hex, property name expected, and this value:

{{ $json.headers["hyperodds-signature"].split(",")[0].slice(2) }}.{{ JSON.stringify($json.body) }}

Then add an If node with this condition, and continue only when it is true:

{{ $json.headers["hyperodds-signature"].split(",").includes("v1=" + $json.expected)
  && Math.abs($now.toSeconds() - Number($json.headers["hyperodds-signature"].split(",")[0].slice(2))) < 300 }}

Good to know

JSON.stringify of the body gives back the exact bytes Hyperodds signed, because Hyperodds sends compact JSON.

The URL has to be public and served over HTTPS. A workflow on your own computer needs a tunnel to be reachable.

THE PAYLOAD, RETRIES AND OTHER TOOLS

Open a market.
Review the costs.

Compare live prices, settlement rules and the cost of your order.