Webhooks Integration

For algorithmic traders and community managers, standard notifications may not be enough. PolyOrbit provides a robust Webhook system that allows you to pipe real-time event data directly into your own applications, Discord servers, Slack channels, or custom logging infrastructure.

What are Webhooks?

Webhooks are user-defined HTTP callbacks. Instead of your application continuously polling PolyOrbit for data, our system pushes data to you the instant an event occurs. This ensures zero latency in your reporting or secondary automation systems.

Supported Events

You can subscribe to the following event topics.

  • chain.created: Triggered when a new automation chain is deployed.

  • chain.executed: Triggered when a condition is met and a trade is successfully executed on-chain.

  • chain.failed: Triggered when an execution attempt fails (e.g., due to slippage or gas errors).

  • market.resolved: Triggered when a watched Source Market finalizes its outcome.

Step 1: Destination Setup

Before configuring PolyOrbit, you need a destination URL to receive the POST requests.

Discord Setup

  1. Open your Discord Server settings.

  2. Navigate to Integrations > Webhooks.

  3. Click New Webhook.

  4. Copy the "Webhook URL" provided by Discord.

Slack Setup

  1. Create a "Incoming Webhook" app in your Slack workspace.

  2. Select the channel where you want messages to appear.

  3. Copy the "Webhook URL".

Step 2: PolyOrbit Configuration

  1. Log in to the PolyOrbit Dashboard.

  2. Navigate to Settings > API & Webhooks.

  3. Click Add Endpoint.

  4. Paste your destination URL.

  5. Select the specific events you wish to subscribe to (e.g., only chain.failed for error monitoring).

  6. Click Save & Test to send a dummy payload.

Payload Format

PolyOrbit sends events as JSON objects via HTTP POST. Below is an example of a chain.executed payload.

JSON

Security Verification

To ensure the request is genuinely from PolyOrbit, we include a signature in the headers.

  • Header: X-PolyOrbit-Signature

  • Method: HMAC SHA256 hash of the request body using your private API Secret. You should verify this signature in your backend code to prevent spoofing attacks.

Last updated