Kraken meet AI - Try it
Place trades on Kraken with AI. Make trade orders in natural language (e.g. “Buy 1 ETH if a 10+ ETH sell prints”).
Evaluate live data against your condition and execute the order when matched.
View walk-through here: External link to Loom
- Batch pipeline:
- Parse incoming websocket messages, sort newest-first, then filter against the LRU in
bufferTrades(parsed). - Accumulate accepted trades until the next rAF tick, then flush once to the store with
scheduleFlush.
- Parse incoming websocket messages, sort newest-first, then filter against the LRU in
- Store flush:
- Merge batch with existing trades and cap to
MAX_TRADES_HISTORY. - Compute
filteredTradeswithinfilterRangeand update only if IDs changed.
- Merge batch with existing trades and cap to
- Minimal re-render strategy:
- Avoid notifying subscribers when visible data is unchanged, reducing React work under bursty traffic.
- Uses zustand:
- Great for WebSocket-driven stores as there's no provider and minimal overhead.
- Module-level refs buffer and coalesce updates between renders (e.g.,
pendingTrades,seenIds). - Stable subscriptions via use-sync-external-store under the hood.
- Deterministic natural language:
- generateObject + zod makes outputs predictable. If there's no schema match, then no trade.