The engine room

The substrate.
Exposed.

The architecture page lists what we have. This one shows how the engine actually runs - the real-time pipeline, the flow verbs, the sharding map, the heartbeat. Same backend that prices BTC also pulls Fed policy rates.

1,308
WS gateway lines
100ms
Aggregation worker
60s
Heartbeat tick
32,767
Shard slots
Real-time data layer

Hot data in 100ms.
Cold data in 5-minute batches.

Two pipelines, one engine. Aggregations stream out every 100ms; persistence flushes 5,000-row batches every five minutes. The WebSocket gateway batches per-connection so price feeds scale linearly.

WebSocket gateway

A 1,308-line gateway with an 806-line topic manager. 3-level subscription tree, 100ms batched push per connection. Watch lifecycle stays consistent across reconnects.

Pending
Committed
RePending
Unwatched

Aggregation pipeline

A two-phase ingestion: a hot path that aggregates every 100ms in memory, and a cold path that batches 5,000 rows to PostgreSQL every five minutes - so live charts feel instant and the database does not drown.

Hot 100ms aggregation worker · 500ms broadcast
Cold 5min persistence worker · 5,000-row batches
Digest 60s eager / 5min lazy · auto-switching
Flow engine

Every multi-step move
runs through one engine.

4,852 lines, seven verbs. Every buy, sell, convert, transfer, rebalance, deposit, and reprice flows through the same orchestrator - with per-step progress, idempotent retries, and a full audit trail. The AI calls the same verbs you do.

buy

Acquire base against quote, with limit / market / TWAP execution and a maker-only path.

sell

Release base for quote, same strategy menu, with an inventory-aware sizing helper.

cancel-orders

Bulk-cancel by venue, market, side, or strategy tag - each cancel survives a venue restart.

convert

Swap asset A to asset B via a best-route path across spot + bridges; idempotent on retry.

reprice

Move open orders to a new price tier without losing queue position when the venue allows.

transfer

Move balance between sub-accounts on the same venue; whitelist-checked, audit-trailed.

deposit-address

Generate or recover a deposit address for an asset+venue pair; tracked through to confirmation.

Sharding & state

32,767 slots.
One hash. Zero rebalancing.

Every record lands in one of 32,767 deterministic slots via XXHash. The same algorithm runs in the proxy, the application, and the database - so adding a server routes new traffic with no code change, no rebalancing dance.

XXHash slot range [1, 32767] · sample 320 cells · warm cells track an asset's deterministic landing slot
01 Platform
02 Feature
03 Application-feature
04 Application
Application state · 16 transitions
InitDeployingDeployedRunningPausingPausedStoppingStoppedReconfiguringReconfiguredUndeployingUndeployedParkedErrorExitedWaiting
Observability

When something cracks,
we see it.

No Prometheus, no Grafana, no external dependency. Every backend process reports CPU, memory, and event-loop lag every minute to the platform's own snapshot manager - 4,364 lines of self-hosted time-series engine.

5
fails / 60s
Circuit breaker trip
Per-provider and per-model; half-open after 30 seconds.
1,000
max retries
Replay table
Durable _replays table. 20 retries per tick, 5s initial delay, 15s graceful drain.
30d
retention
Cost ledger
Per-stage AI billing; hourly sweeper, 10,000-row batches.
Self-host

Run it yourself.

Every layer is open-source. Spin up a node on your own machine, point it at the platform, and operate the same surface our hosted users see. We don't gate the binary behind a contract.

Heads up Self-hosting is for technical operators - the platform still mediates venue connectivity, vault custody, and AI orchestration. Self-hosted nodes ride the same wire protocol the managed fleet uses.
Read the deployment guide
# docker-compose.yaml - minimal node profile
services:
  tm-node:
    image: ghcr.io/trademire/node:latest
    environment:
      TM_PLATFORM_URL: "wss://platform.trademire.ai"
      TM_NODE_KEY:     "${TM_NODE_KEY}"
      TM_VENUE_KEYS:   "binance,bybit,okx"
      TM_LOG_LEVEL:    "info"
    volumes:
      - ./certs:/etc/tm/certs:ro
      - ./data:/var/lib/tm
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "tm-node", "health"]
      interval: 30s
      timeout:  5s
      retries:  3
Read further

The full capability map.

Architecture page covers all 65 business + 70 technical capabilities grouped by domain. AI compliance page covers governance, data flows, and regulatory posture.