CLOUDFLARE EDGE
SYS: ONLINE|LATENCY: 22ms|PEERS: 275+|UPTIME: 99.99%
LATENCY42ms

Zero-Latency Algorithmic Trading at the Edge

A modular, production-ready trading framework engineered for Cloudflare Workers. Execute algorithmic strategies across major exchanges with sub-50ms response times from 275+ global edge locations.

[0+]
operational

Edge Locations

[<50ms]
operational

Global Latency

[0]
operational

Edge Services

[$0]
operational

Monthly Cost

100% Open Source
Zero Infrastructure Cost
TypeScript Native
[ SCROLL ▼ ]
01 / Core Capabilities

THE EDGE ADVANTAGE

Hoox reimagines algorithmic trading infrastructure. By leveraging Cloudflare's edge network, your strategies execute closer to exchange servers than any traditional VPS setup, with the resilience of a globally distributed system. Every feature — from the multi-provider AI gateway to the RAG-powered Telegram assistant, from the Durable Objects idempotency store to the Web3 DeFi wallet integration — is designed to give you institutional-grade trading infrastructure at zero cost.

[ 01 // EXECUTION ]

Edge-Native Trading

Deploy your trading logic across 10 specialized edge services running on Cloudflare's global network of 275+ data centers. Your algorithms execute milliseconds from exchange APIs in Tokyo, Singapore, London, and New York simultaneously. Uses Durable Objects for idempotent trade execution — prevents duplicate orders even on webhook retries.

  • <50ms global latency
  • 275+ edge locations
  • 10 edge services
  • Idempotent execution
[ 02 // INTELLIGENCE ]

AI Risk Manager

Autonomous agent runs on 5-minute cron cycles, continuously monitoring open positions. Implements dynamic trailing stops based on volatility, triggers emergency kill-switches on max drawdown thresholds, and generates real-time market intelligence summaries via multi-provider LLM gateway. 5 AI providers with automatic fallback.

  • 5-min monitoring cycles
  • 5 AI providers w/ fallback
  • Vectorize RAG
  • Dynamic position sizing
[ 03 // SECURITY ]

Zero Trust Architecture

Internal workers have no public HTTP endpoints. Communication flows exclusively through Cloudflare Service Bindings with microsecond overhead. API keys are injected directly into V8 isolate runtime, never exposed in environment variables or logs.

  • No public endpoints
  • V8 isolate secrets
  • Service Binding mesh
[ 04 // EXCHANGES ]

Multi-Exchange Support

Execute orders across MEXC, Binance, and Bybit through a unified API abstraction. Dynamic routing via CONFIG_KV allows runtime exchange selection. Automatic failover between exchanges ensures order execution even during exchange downtime.

  • 3 exchanges supported
  • Dynamic routing
  • Automatic failover
[ 05 // COST ]

Zero Infrastructure Cost

Built entirely on Cloudflare's generous free tier. 100,000 Worker requests/day, 1GB D1 database storage, 1GB R2 object storage, and 10,000 KV operations included. Run a complete algorithmic trading operation at zero monthly cost.

  • $0/month possible
  • 100K requests/day free
  • 1GB D1 storage free
[ 06 // TOOLING ]

Developer Experience

Modern TypeScript codebase with full type safety. Interactive TUI for deployment management, Bun runtime for blazing-fast local development, comprehensive CLI tooling, and detailed documentation for every component.

  • Full TypeScript
  • Interactive TUI
  • Bun-powered
[ 07 // DURABLE ]

Idempotency Store

Every trade signal carries a unique idempotency key. Before executing an order, trade-worker checks the IdempotencyStore Durable Object. If the key exists, the order was already executed — the duplicate is silently dropped.

  • Durable Objects
  • Idempotent execution
  • Webhook-safe
[ 08 // RAG ]

Telegram AI Assistant

The telegram-worker embeds a RAG-powered assistant with three commands powered by Cloudflare Vectorize. /search queries documentation semantically, /ask answers questions with source citations, and /latest retrieves recent market intelligence summaries. All generated via the multi-provider LLM gateway with automatic fallback across 5 AI providers.

  • /search
  • /ask
  • /latest
  • Vectorize RAG
[ 09 // DEFI ]

Web3 Wallet Integration

Manage an ethers.js wallet for on-chain operations directly from your edge workers. Execute token swaps on DEXes, interact with smart contracts, and manage DeFi positions — all through the same Service Binding mesh that handles your CEX trading. Private keys stored securely in Cloudflare Secrets Store.

  • ethers.js wallet
  • On-chain swaps
  • Browser Rendering
  • Secrets Store
Comparison

[HOOX VS TRADITIONAL]

Every aspect of Hoox is engineered to outperform legacy VPS-based trading infrastructure. From latency and cost to deployment workflow and security, Hoox eliminates the operational overhead of traditional server management while delivering superior performance at a fraction of the cost — zero, to be precise. With features like Durable Objects idempotency, multi-provider AI fallback, Browser Rendering PDF generation, and DeFi wallet integration, Hoox provides capabilities that would require a team of DevOps engineers to replicate in a traditional setup.

LatencyHoox
~22ms global average
VPS
100-300ms+
InfrastructureHoox
Zero cost (Cloudflare Free)
VPS
$10-100+/month VPS
DeploymentHoox
hoox deploy all --auto
VPS
Manual server setup + Docker
ScalingHoox
Global edge (275+ locations)
VPS
Single region
SecurityHoox
Zero Trust (no public endpoints)
VPS
Open ports, firewall management
AI Risk ManagerHoox
Built-in autonomous agent
VPS
Manual monitoring or third-party
Exchange RoutingHoox
Dynamic via KV config
VPS
Hardcoded per instance
MaintenanceHoox
Automatic Cloudflare updates
VPS
Manual OS + security patches
Cold StartHoox
<5ms
VPS
30-60s+
UptimeHoox
99.99% SLA
VPS
Depends on VPS provider
PDF ReportsHoox
Auto-generated via Browser Rendering
VPS
Manual reporting or third-party tools
Email SignalsHoox
Mailgun webhook + regex parsing
VPS
Custom SMTP server setup
DeFi TradingHoox
ethers.js wallet via edge workers
VPS
Dedicated node + Web3 provider
AI Fallback ChainHoox
5 providers with automatic failover
VPS
Single API key, no redundancy
IdempotencyHoox
Durable Objects key store
VPS
Manual dedup or database-level

Hoox performance measured across Cloudflare's global edge network.

AI Gateway

[AI GATEWAY]

Multi-provider LLM gateway with automatic fallback. Requests are routed to the optimal provider based on capability, latency, and availability. If the primary fails, the next is tried — transparently, with zero additional latency overhead.

Core Orchestrator

AI ROUTER

Routes requests to the optimal provider based on capability, latency, and availability.

agent-worker
telegram-worker
hoox
Capabilities
[Text Generation][Vision][Reasoning][Embeddings][SSE Streaming][Vectorize RAG][AI Summarization]

Automatic fallback chain ensures AI-powered features never degrade. Failover happens at the worker level with no user-visible interruption.

Provider Chain

Workers AI

Primary
01
fallback

OpenAI

Fallback 1
02
fallback

Anthropic (Claude)

Fallback 2
03
fallback

Google AI (Gemini)

Fallback 3
04
fallback

Azure OpenAI

Fallback 4
05
04_DIMENSIONAL_GEOMETRY
ENGINE: SCALES_3D_WIRE
02 / System Design

EDGE SERVICES

Each worker is an independent V8 isolate with dedicated responsibilities. If one fails, the others continue operating. Service Bindings enable microsecond inter-worker communication without public internet routing.

CommunicationService BindingsMicrosecond overhead / No TLS / No DNS
All Systems
MESH_TOPOLOGY_V4.2.0 // LIVE_ROUTING
01_GATEWAY02_EXECUTION03_INFRASTRUCTUREHOOXGATEWAY & FIREWALLV8_RUNTIME // <1msTRADEEXECUTIONV8_RUNTIME // <1msAGENTAI RISKV8_RUNTIME // <1msTELEGRAMNOTIFICATIONV8_RUNTIME // <1msWEB3DEFI EXECV8_RUNTIME // <1msEMAILSIGNAL PARSERV8_RUNTIME // <1msD1DATA OPSV8_RUNTIME // <1msANALYTICSOBSERVABILITYV8_RUNTIME // <1msREPORTGENERATORV8_RUNTIME // <1msDASHBOARDCMD CENTERV8_RUNTIME // <1ms
TOPOLOGY_LOG: SYSTEM_READY

Mesh Topology v4.2.0: All inter-worker communication uses Cloudflare Service Bindings — direct function invocation with microsecond overhead. Logic layer is fully isolated from the public internet via the hoox ingress gateway. Persistence is maintained via globally distributed D1 SQL and KV stores.

COREGateway & Firewall

hoox

Routes authenticated signals to the execution layer via Service Bindings, with Queue failover for reliability. Uses Durable Objects for idempotent trade execution — prevents duplicate orders even on webhook retries. Validates TradingView webhook signatures, enforces IP allowlists, and applies rate limiting.

Webhook validationIP allowlistRate limitingService Binding router
binding:hoox
01
COREExecution Engine

trade-worker

Receives validated signals and executes market/limit orders across MEXC, Binance, and Bybit. Implements dynamic position sizing, handles partial fills, maintains full order state in D1, and streams execution confirmations to Telegram.

Multi-exchange APIPosition sizingOrder state management
binding:trade-worker
02
INTELLIGENCEAI Risk Manager

agent-worker

Autonomous AI agent on 5-minute cron schedules. Monitors all open positions, calculates real-time PnL, adjusts trailing stops. Generates market intelligence via multi-provider LLM gateway with Vectorize RAG for semantic search across trade history. Triggers emergency kill-switches when drawdown exceeds thresholds.

Cron-scheduledTrailing stopsKill-switchLLM gateway
binding:agent-worker
03
CORECommand Center

dashboard

Next.js 15 React dashboard deployed to Cloudflare Pages. Real-time portfolio monitoring, position management, risk parameter configuration, and comprehensive trade history visualization.

Next.js 15Real-time updatesCloudflare Pages
binding:dashboard
04
CORENotification Service

telegram-worker

Instant trade confirmations and AI-generated market analysis delivered directly to Telegram. Supports rich formatting, position updates, and emergency alerts. Configurable notification preferences per trade type.

Telegram Bot APIRich formattingAlert preferences
binding:telegram-worker
05
INFRAData Operations Layer

d1-worker

Handles all SQL operations against Cloudflare D1. Manages trade history persistence, aggregates performance metrics via Analytics Engine, maintains audit logs, and provides query endpoints for the dashboard and report-worker.

Cloudflare D1SQL operationsPerformance metrics
binding:d1-worker
06
INFRAConfiguration Store

config-kv

Cloudflare KV namespace storing runtime configuration. Exchange credentials, IP allowlists, risk parameters, and feature flags. Changes propagate globally within seconds.

Cloudflare KVGlobal propagationRuntime config
binding:config-kv
07
INFRAObject Storage

r2-storage

Cloudflare R2 bucket for large object storage. Trade logs, backtest results, and historical market data archived for analysis and compliance.

Cloudflare R2S3-compatibleArchive storage
binding:r2-storage
08
INTELLIGENCEDeFi Execution Engine

web3-wallet-worker

Manages an ethers.js wallet for on-chain operations. Supports DApp interaction via Browser Rendering, executes token swaps, and interacts with smart contracts. Private key or mnemonic stored securely in Cloudflare Secrets Store.

ethers.jsOn-chain swapsBrowser RenderingSecrets Store
binding:web3-wallet-worker
09
COREEmail Signal Parser

email-worker

Parses incoming trading signals from email via Mailgun webhooks. Configurable regex patterns for coin/signal detection stored in KV. Direct JSON endpoint also available for programmatic access. Forwards validated signals to the execution layer.

Mailgun webhookRegex parsingKV configurable
binding:email-worker
10
INFRAObservability Layer

analytics-worker

Tracks trades, API calls, worker performance, signals, and notifications as time-series data via Cloudflare Analytics Engine. Powers the dashboard with real-time metrics and historical performance data.

Time-series dataAnalytics EngineDashboard metrics
binding:analytics-worker
11
INFRACompliance Reporter

report-worker

Generates detailed trade reports via Browser Rendering with scheduled delivery via Cron Triggers (06:00, 18:00 UTC). Streams PDF reports to R2 for compliance archiving and notifies via Email Worker when finalized. Uses Analytics Engine for historical performance aggregation.

Audit logsPDF generationR2 streamingCompliance
binding:report-worker
12
Service Bindings
[19]

Direct function calls between workers

Smart Placement
[9/10]

Sub-ms latency via proximity routing

Cold Start
[<5ms]

V8 isolate initialization

Isolation
[100%]

Each worker runs in separate V8 isolate

03 / Design Philosophy

[WHY HOOX]

Every architectural decision in Hoox serves a single purpose: execute trades faster, more reliably, and more securely than any traditional trading infrastructure.

[ 01 ] / ZERO

ZERO LATENCY

Traditional VPS setups route every request through centralized servers. Hoox deploys your trading logic to Cloudflare's 275+ edge locations, executing milliseconds from exchange APIs worldwide. When markets move fast, milliseconds determine profit or loss. Smart Placement automatically routes each worker to the optimal data center nearest to its target exchange API, reducing latency by an additional 30-60% compared to standard edge routing.

Your algorithms run in V8 isolates that cold-start in under 5ms, with requests routed to the nearest edge node automatically. No server provisioning, no capacity planning, no single point of failure. The platform supports sub-50ms latency to every major exchange endpoint globally — Tokyo, Singapore, London, New York, and Frankfurt simultaneously.

[ 02 ] / SERVICE

SERVICE BINDINGS

Forget HTTP overhead between services. Cloudflare Service Bindings enable direct function invocation between Workers with microsecond latency. No public internet routing, no TLS handshakes, no DNS resolution delays. All 10 workers communicate through a mesh of 11 Service Bindings — every internal call completes in under 1ms with zero network overhead.

The hoox gateway calls trade-worker directly via binding, not HTTP. This architectural choice eliminates the latency penalty of traditional microservice communication. Internal workers have zero public endpoints — they simply can't be reached from the internet, eliminating entire categories of attack vectors. The only public-facing endpoint is the hoox gateway itself, which validates every request before forwarding via bindings.

[ 03 ] / AUTONOMOUS

AUTONOMOUS AI

The agent-worker isn't just monitoring — it's actively managing risk. Running on 5-minute cron cycles, it analyzes positions, adjusts trailing stops based on real-time volatility, and triggers kill-switches before catastrophic drawdowns. The RAG-powered Telegram assistant lets you query your entire trading history with natural language — /search, /ask, and /latest commands powered by Vectorize semantic search across 5 AI providers.

Multi-provider LLM gateway with automatic fallback: Workers AI, OpenAI, Anthropic, Google, Azure, Groq. AI-generated market summaries delivered to Telegram in real-time. No single point of failure in the intelligence pipeline — if the primary provider is down, the next is tried transparently. Vectorize embeddings enable semantic search across trade history, market data, and documentation for context-aware answers.

[ 04 ] / BULLETPROOF

BULLETPROOF SECURITY

Zero Trust from the ground up. Internal workers have no public HTTP endpoints — they're accessible only via Service Bindings from authorized workers. API keys are injected directly into V8 isolate runtime, never exposed in environment variables or request logs. WAF rules managed via hoox waf command, IP allowlists stored in CONFIG_KV propagate globally within seconds.

The hoox gateway validates webhook signatures, enforces IP allowlists from CONFIG_KV, and rate-limits before any request reaches the execution layer. Secrets are managed through Cloudflare's encrypted Secrets Store. Email signals are validated through Mailgun webhook signatures. Every external entry point — webhook, email, Telegram command, API call — is authenticated, authorized, and audited before any trade execution occurs.

[ 05 ] / FAULT

FAULT TOLERANCE

Each worker is an independent isolate. If telegram-worker fails, trade execution continues unaffected. If d1-worker experiences latency, the gateway queues operations. Graceful degradation is built into every service boundary. The analytics-worker tracks every failure for post-mortem analysis, and the report-worker generates compliance-ready PDFs of all system activity.

Automatic retries with exponential backoff, circuit breakers for external APIs, and comprehensive error logging to R2 storage. Durable Objects provide idempotent trade execution — no duplicate orders on webhook retries. Queue failover ensures signals are never lost even during transient worker failures. Email-worker supports multiple signal parsing patterns configurable via KV. Every component has a redundant fallback path designed to keep the system operational.

Global Coverage

[275+ EDGE LOCATIONS]

Your trading logic executes across Cloudflare's global network of data centers. Leverage Smart Placement to automatically route workloads to the optimal data center nearest to your exchange API endpoints for minimum latency (30-60% reduction). With 12 edge locations mapped across 4 continents — North America, South America, Europe, Middle East, and Asia-Pacific — your strategies run closer to exchange APIs than any VPS could ever achieve. Smart Placement ensures that trade-worker routes to Tokyo for Bybit, London for MEXC, and Singapore for Binance automatically, with sub-10ms overhead to each exchange.

NAM

3

San Francisco, Chicago, New York

3/3 operational

SAM

1

São Paulo

1/1 operational

EUR

3

London, Frankfurt, Paris

3/3 operational

ME

1

Dubai

1/1 operational

APAC

4

Singapore, Tokyo, Sydney, Hong Kong

4/4 operational
Operational
Degraded
Offline
Click a location to pin it
12+Global Edge Locations

Average latency

21ms

Average Latency~22ms

Weighted average across all edge nodes

Smart PlacementEnabled

Dynamic routing based on API proximity

Uptime SLA99.99%

Guaranteed availability

Cold Start<5ms

V8 isolate initialization time

Regions Covered5

NAM, SAM, EUR, ME, APAC

Data Centers275+

Total Cloudflare global network

ProtocolHTTP/3

QUIC-based edge communication

DNS Resolution<1ms

Cloudflare authoritative DNS

FREE TIER DAILY LIMIT100K

Worker requests per day included

LATENCY REDUCTION~45%

Smart Placement routes workers near exchange APIs

DEPLOYMENT OPTIONS2

Cloudflare Workers or self-hosted Bun runtime

EDGE STORAGED1 + KV + R2

SQL + config + blob storage at edge

Ecosystem

[FULL ECOSYSTEM]

Beyond the core trading engine, Hoox ships with a complete ecosystem of developer tools, automation pipelines, and integration points — all wired through the Service Binding mesh.

[ 01 // CLI ]

15 Command Groups

Terminal toolbelt for managing every aspect of your infrastructure. From init to deploy, config to monitoring.

initclonedevdeployinfraconfigdbmonitorrepairlogstestwafsecretsdashboardupdate
[ 02 // TUI ]

Terminal Dashboard

Full-screen interactive terminal UI with 9 keyboard-driven views, live SSE streaming, and Zustand state.

9 keyboard viewsSSE streamingTrade monitorPnL trackerAgent metricsLog viewerHealth status
[ 03 // RAG ]

Vectorize Semantic Search

RAG pipeline with 384-dim Vectorize embeddings. Telegram assistant provides context-aware answers with citations.

/search docs/ask Q&A/latest intel384-d embeddings5 AI providersSource citations
[ 04 // REPORTS ]

Browser Rendering PDFs

Cron-triggered PDF reports via Browser Rendering. A4 format with charts, streamed to R2, delivered via Telegram + email.

Cron 06/18 UTCA4 chartsR2 streamingEmail deliveryConfigurable scopeCompliance archiving
[ 05 // DEFI ]

Web3 Wallet Agent

ethers.js wallet managed via Secrets Store. Swap tokens on DEXes, interact with contracts, unify CeFi + DeFi.

ethers.js v6Secrets StoreDEX swapsContract callsBrowser RenderingCeFi+DeFi unified
[ 06 // EMAIL ]

Email Signal Parser

Mailgun webhook parsing with KV-configurable regex patterns. Extract coin, direction, price, SL/TP from inbox signals.

Mailgun webhookKV patternsRegex extractionJSON endpointSignal validationPipeline forward
[ 07 // ANALYTICS ]

Observability Stack

Time-series tracking of every trade, API call, and signal via Analytics Engine. Dashboard + Grafana-compatible API.

Time-seriesLatency trackingSignal attributionReal-time vizHistory aggregationGrafana API
[ 08 // TESTING ]

381+ CLI Tests

Full test suite against local D1/KV/Queue emulators. Covers every CLI command and worker integration.

381+ testsLocal emulatorsIntegration testsE2E CLI testsWatch modeCI coverage
CLI Commands15

Groups across 7 categories

CLI Tests381+

Automated test coverage

TUI Views9

Keyboard-first dashboard

AI Providers5

LLM fallback with auto-failover

04 / Deploy in Minutes

GET STARTED

Clone the repository, configure your exchange credentials, and deploy to Cloudflare's global edge network.

terminal — hoox-setup
~$

CLI — 15 Command Groups

[ init ]
[ clone ]
[ dev ]
[ deploy ]
[ infra ]
[ config ]
[ db ]
[ monitor ]
[ repair ]
[ logs ]
[ test ]
[ waf ]
[ secrets ]
[ dashboard ]
[ update ]

hoox init → hoox deploy all --auto → Trading Live

Community

381+ CLI Tests 10 Workers 100% Open Source

TUI — Terminal Operations Center

[ 9 Views ][ Keyboard-first ][ Live SSE ][ Zustand ]

Real-time terminal dashboard for monitoring trades, positions, agents, and system health.

$ ./hoox-tui or $ hoox tui

01Clone[ DONE ]
  • git clone --recursive
  • github.com/jango-blockchained/hoox-setup
  • cd hoox-setup
02Install[ DONE ]
  • bun install
  • bun run hoox init
  • Interactive setup wizard
03Configure[ READY ]
  • Exchange API keys
  • Telegram bot token
  • Risk parameters
04Deploy[ NEXT ]
  • hoox workers deploy
  • or ./hoox-tui
  • One command, all workers

Tech Stack

  • TypeScript
  • Cloudflare Workers
  • Bun Runtime
  • D1 / KV / R2
  • Next.js 15
  • Durable Objects
  • Analytics Engine
  • Vectorize
  • Browser Rendering

Prerequisites

Cloudflare AccountFree tier is sufficient
Bun v1.0+curl -fsSL bun.sh | bash
Exchange API KeysMEXC, Binance, or Bybit
MEXC12ms
Binance8ms
Bybit15ms

Technology & Compliance Badges

Platform
Cloudflare WorkersBun RuntimeNext.js 16TypeScript
Security
Zero TrustV8 IsolateSecrets StoreWAFIP AllowlistWebhook Signatures
Storage & Data
D1 SQLKV ConfigR2 ObjectsDurable ObjectsVectorizeAnalytics Engine
Integrations
MEXCBinanceBybitTelegramMailgunOpenAIAnthropicGoogle AI
381+ CLI Tests100% TypeScriptMIT LicenseFree ForeverOpen SourceNo Vendor Lock-in

Self-Hosted Runtime

Don't want to use Cloudflare? Hoox ships with a Bun-based self-hosted runtime. A single server.js file mirrors all worker endpoints and runs on any VPS or bare metal. All the same features, same CLI tooling, same TypeScript codebase — just deploy it anywhere you want. The self-hosted runtime maintains API compatibility with the Cloudflare deployment, so switching between hosting options requires zero code changes.

$ bun run hoox init --self-hosted
$ cd my-trading-bot
$ bun run dev
  → Hoox self-hosted running on http://localhost:3000
  → 10 worker endpoints ready
  → D1 emulator connected
  → KV emulator connected
v1.0.0381+ CLI Tests10 Workers11 Service Bindings15 CLI Commands5 AI Providers99.99% Uptime

Built on the Cloudflare Edge Network

CC BY 4.0 License / Open Source / Free Forever

[Trade at the speed of light.]