SYS: ONLINE/ULL 22ms
H
H
H
O
O
O
O
O
O
X
X
X
ULL42ms

Edge-native Algorithmic Trading Framework

A production-grade stack built on Cloudflare Workers. Signals are validated and executed in V8 isolates colocated with exchange APIs, delivering median signal-to-ack latencies of 22 ms from 330+ global points of presence.

[330+]

Edge Locations

[<50ms]

Global Latency

[12x]

Edge Components

[$0]

Monthly Cost

Ultra Low Latency
100% Open Source
[ SCROLL ▼ ]
01 / The Edge Advantage

[THE EDGE ADVANTAGE]

An edge-native trading architecture that collapses the traditional signal-to-execution path. All inter-component communication occurs via Cloudflare Service Bindings with sub-millisecond overhead; no public internet traversal, no TLS handshakes, no DNS resolution between microservices.

EXECUTION
01

Edge-Native Trading

Ten specialized V8 isolates deployed across Cloudflare's 330+ points of presence. Smart Placement collocates workers with the nearest exchange PoP, yielding 30–60% reduction in geographic round-trip time at zero marginal cost.

  • ~22 ms median signal-to-ack
  • 330+ points of presence
  • 10 cooperating isolates
  • Smart Placement optimization
EXECUTION
02

Microsecond Inter-Worker Calls

Workers call each other via Cloudflare Service Bindings — direct V8 isolate invocations with no public internet routing, no TLS handshakes, and no DNS resolution. Internal calls complete in under 1ms.

  • <1ms internal latency
  • No TLS overhead
  • No DNS resolution
  • Zero public endpoints
INTELLIGENCE
03

AI Risk Manager

The agent-worker executes on a fixed 5-minute cron. It maintains portfolio state, applies trailing-stop logic, enforces drawdown limits via the Global Kill Switch, and invokes a multi-provider LLM gateway (5 endpoints) with automatic failover and Vectorize-backed retrieval over historical trades.

  • 5-minute cron execution
  • 5-provider LLM gateway
  • Autonomous risk controls
  • Vectorize RAG (384-d)
EXECUTION
04

Durable Object Dedup

Every trade signal is assigned a unique trace ID. The IdempotencyStore Durable Object — backed by SQLite with TTL-based cleanup — checks if that ID was already processed. Duplicate webhooks are silently dropped even across cold starts.

  • SQLite-backed DO
  • TTL auto-cleanup
  • Trace IDs end-to-end
  • Cold-start safe
EXECUTION
05

Async Delivery & Retry

Cloudflare Queues provide guaranteed-delivery fallback when the fast-path Service Binding is unavailable. Failed messages retry with exponential backoff — 30 seconds to 15 minutes — ensuring no signal is lost during exchange downtime.

  • Guaranteed delivery
  • 30s → 15min backoff
  • Exchange downtime safe
  • Rate-limit resilient
SECURITY
06

KV-Backed Rate Limiter

A 10-trades-per-minute rate limiter persisted in CONFIG_KV, surviving worker cold starts. When KV is unreachable the limiter falls back to in-memory state without dropping requests. Prevents API bans from misconfigured strategies.

  • 10 trades/min limit
  • KV-persisted across restarts
  • In-memory fallback
  • API ban prevention
SECURITY
07

Zero Trust Architecture

trade-worker and d1-worker have zero public HTTP endpoints — accessible only via Service Bindings from the hoox gateway. API keys are injected directly into the V8 isolate at runtime, never stored in plaintext or logs.

  • No public endpoints
  • V8 isolate secrets
  • WAF IP allowlist
  • CSP + HSTS headers
EXECUTION
08

Multi-Exchange Routing

Execute across Binance, Bybit, and MEXC through a unified ExchangeRouter abstraction. Routing is stored in CONFIG_KV — redirect any symbol to a different exchange instantly without code deployment or downtime.

  • Binance · Bybit · MEXC
  • KV-based live routing
  • No redeploy required
  • Typed IExchangeProvider
DATA
09

Zero Infrastructure Cost

Built entirely on Cloudflare's free tier: 100K Worker requests/day, 1GB D1 global SQLite, 1GB R2 object storage, 1M KV reads/day, 10 min/day Browser Rendering, and unlimited Analytics Engine writes. $0/month.

  • $0/month possible
  • 100K requests/day free
  • 1GB D1 + 1GB R2 free
  • Analytics Engine free
INTELLIGENCE
10

Telegram AI Copilot

The telegram-worker embeds a RAG-powered assistant backed by Cloudflare Vectorize (384-dimensional embeddings). /search queries documentation semantically, /ask provides answers with citations, /latest retrieves market intelligence summaries.

  • /search semantic docs
  • /ask with citations
  • /latest intel
  • 384-d Vectorize
DEFI
11

Web3 Wallet Agent

Manage an ethers.js v6 wallet for on-chain operations directly from the edge. Execute DEX swaps, call smart contracts, and interact with DApps via Cloudflare Browser Rendering — all through the same Service Binding mesh as CEX trading.

  • ethers.js v6 on-chain
  • DEX swaps + contract calls
  • Browser Rendering DApps
  • Secrets Store keys
DATA
12

Real-Time Observability

Every API call, trade execution, and worker health event is tracked as a time-series event via Cloudflare Analytics Engine — free on all plans. R2 offloads verbose logs to preserve D1 write limits for critical financial data.

  • Analytics Engine free
  • Latency + error tracking
  • R2 log offloading
  • Dashboard-powered
TOOLING
13

Developer Experience

Bun monorepo with 28 CLI command groups and 100+ subcommands covering onboard, dev, deploy, infra, config, secrets, check, repair, test, db, monitor, trace, perf, waf, and more. Interactive TUI hot-reloads all 10 workers simultaneously. 58 CLI test files, 1,000+ assertions.

  • 28 CLI command groups
  • 100+ subcommands
  • 58 CLI test files
  • 1,000+ assertions
13 modules in viewHOOX::EDGE_STACK / v1
[Loading section]
[Loading section]
[Loading section]
[Loading section]
[Loading section]