Skip to main content
This document details the public REST API endpoints exposed by the Hoox gateway (workers/hoox). These endpoints are used to ingest automated trade signals, register Telegram bots, query AI metrics, and check serverless V8 isolate health status.

🔒 Request Headers & Security Policy

Every public HTTP request submitted to the Hoox gateway must include the following headers:

CORS & Origin Policies

For security, Cross-Origin Resource Sharing (CORS) is disabled by default on the /webhook route—it only accepts direct server-to-server POST requests (e.g. from TradingView or custom server scripts). To interact with the dashboard, the gateway verifies active authorization cookies and tokens inside the V8 engine context.

🎯 1. Ingest Trade Signal Webhook

Receives, validates, and routes trade orders to exchange APIs.
  • Endpoint: /webhook
  • Method: POST

Request Payload (JSON Schema)

Response Models

A. Success Path (Order Filled Instantly - 200 OK)

B. Queue Failover Path (Exchange Offline / Rate-limited - 202 Accepted)

If the exchange is down, the signal is enqueued for guaranteed asynchronous delivery.

🟢 2. System Health Check

Probes the gateway isolate, validating connections to D1 databases and CONFIG_KV caches.
  • Endpoint: /health
  • Method: GET

Success Response (200 OK)


🤖 3. Conversational AI Chat & Telemetry

Integrates with the agent-worker Multi-Provider AI Gateway.

A. Conversational Chat Stream

  • Endpoint: /agent/chat
  • Method: POST
  • Headers: Accept: text/event-stream (Supports Server-Sent Events)

Request Payload


B. AI Gateway Telemetry

  • Endpoint: /agent/usage
  • Method: GET

Response Payload (200 OK)


🚨 4. Standard Platform Error Models

When an API check fails, the gateway uses the shared @jango-blockchained/hoox-shared package to return a standardized JSON error format:

A. 400 Bad Request (Payload Validation Failure)

B. 401 Unauthorized (Invalid API Key / IP Address)

C. 409 Conflict (Duplicate Request Intercepted)

D. 503 Service Unavailable (Kill Switch Engaged)


Every error code is designed to map directly to a readable prompt in the Telegram bot and Next.js dashboard UI, allowing you to instantly diagnose execution problems.

🔗 Next Steps

Last modified on July 5, 2026