open-source · composable · AI-native

OpenWhale

The programmable layer for composable, AI-native economic strategies.

the core idea

AI is the
programmer,
not the oracle.

We don't ask the LLM to guess buy/sell every tick.
We ask it to write the strategy, compile it with esbuild, and hot-reload at runtime.
.ts
strategies as code
git
diff · review · revert
Strategies diff, they code-review, they live in git. Audit trail without a logging stack.
a strategy in ~10 lines
class MomentumStrategy extends BaseStrategy {
  readonly strategyId = 'momentum'

  async evaluate(context: StrategyContext) {
    const { symbol, threshold } = this.params.base
    const tick = context.getData('price', symbol)
    if (!tick || tick.price < threshold) return []
    return [this.instruction('perp', 'placeOrder',
      { symbol, side: 'buy', type: 'market', amount: 0.01 })]
  }
}
context.getData() — pull from any Monitor. The strategy never touches exchange APIs.
this.instruction() — return intent, not a call. Swap the Executor without touching this code.
this.params.base — typed params auto-rendered as a form in the Dashboard.
architecture

Four layers.
Every one replaceable.

Swap any layer without rewriting the others. The AI layer is just one node in the graph.

Monitor          ─▶  data collection  (WS / poll → JSONL)
TriggerManager   ─▶  Cron + Monitor AND, time-windowed
Strategy         ─▶  AI inference / rule-based decision
Executor         ─▶  trade execution
monitor
WS + Poll
→ JSONL stream
trigger
AND-logic
time-windowed
strategy
LLM ✕ code
hot-reload
executor
multi-venue
paired orders
vs general agents

Trading-native by design.

🐋
OpenWhale
  • · role — programmer
  • · output — TypeScript code
  • · audit — git diff
  • · LLM call — on recompile
  • · scope — vertical (trade)
🤖
OpenClaw · Hermes
  • · role — agent runtime / loop
  • · output — tool calls
  • · audit — logs
  • · LLM call — every tick
  • · scope — horizontal

tl;dr — they ask AI to make a trade. We ask AI to write a trader.

in the wild

Real strategies, shipped.

copy-trading

Mirror any wallet, proportionally.

Monitor a target address. Mirror trades at a configurable ratio with position caps. One strategy, any exchange.

cross-exchange-arb

Hyperliquid ↔ Binance

Spread AND funding rate — both must align within 60s. Paired orders, two account instances.

llm-news-react

News → structured output → trade.

Schema-validated. Acts only on { confidence > 0.7, action != hold }.

on-chain events

Contract event → action.

Listen to smart contract events. Trigger on-chain or off-chain actions automatically.

nft sniping

Mempool → milliseconds.

Monitor launchpad events. Execute within milliseconds of a trigger.

manifesto · v0.1
// written by humans, executed by code.

1.  AI is a programmer, not an oracle.
2.  Strategies are source code, not black boxes.
3.  Every layer is replaceable.
4.  Audit lives in git, not in logs.
5.  Open source. Open whale.
join

Sign the manifesto.

5 steps · ~2 minutes · NFT raffle on completion.

© 2026 OpenWhale · open source · open whale