Practical Guides Β· knowledge base from X

24/7 HFT bot with Jev: the model does not trade, it answers typed questions in 70-500 ms (open-source repo)

Rebuild of an open-source trading bot (github.com/bl888m/jev-bot) around TypeSafe's Jev: not an LLM that writes paragraphs, but typed decisions with probabilities (Noul 0-1, Choice, Score) in parallel at 70-500 ms and $0.042/M input tokens (output free). Split: code computes state, Jev judges, code applies rules, execution places. Paper by default, 17 tests, zero dependencies. No P&L: architecture. Bookmark/like β‰ˆ 1.7.

✍️ bl888m · @bl888m_eth
πŸ”— Read the original on X Β· X Article Β· published 11 Oct 2026
πŸ“Š 30 likes Β· 51 bookmarks Β· 22.5k views
Summary and adaptation in English; content and results belong to the author.

Part of the manual Trading and investing β€” the complete manual

Claimed result

No P&L. The author rebuilt AI trading bots after seeing the same mistake everywhere: send the order book to a chat model, ask "what should I do with BTC", wait 8 seconds for a paragraph, parse broken JSON β€” by then the book has moved forty times. With Jev he published an open-source repo. Engagement: 51 bookmarks, 30 likes, about 22,500 views.

Proof: framework. Repo + latency/cost reasoning; no trading results.

The key idea

The model should not trade. It should answer narrow questions, fast, with a probability. Jev is not an LLM: it does not write text and does not explain itself. LLM = state in, text out. Jev = state in, typed decision with a probability out. Three question types cover almost everything: - Noul β€” number 0-1 (e.g. "is this flow toxic?" β†’ 0.83); - Choice β€” picks from a list (regime: trending 0.63 / mean reverting 0.22 / chaotic 0.15); - Score β€” rates the state on a scale you define (setup 0-3 β†’ 2.3).

All three can go in one call; every question is evaluated in parallel: six questions β‰ˆ latency of one.

Step-by-step playbook

1. Why speed matters

A chat model decodes one token at a time β†’ seconds. Jev computes the probability across every answer option in parallel β†’ responses in about 70-500 ms, at $0.042 per million input tokens, output free. On-chain order books move at block speed (a few hundred ms): a chat model cannot keep up; Jev can answer inside a single block with time left to place the order. Where it does not belong: microsecond equities (FPGA/C++ at big market makers). Do not bring a 300 ms loop to a microsecond fight.

2. The split that makes it work

  • Code calculates the state (mid, spread, imbalance, volatility, inventory, drawdown). Never spend a model call on arithmetic.
  • Jev interprets the state (trending vs chopping? informed flow vs noise? setup worth taking?).
  • Code applies the rules and thresholds.
  • Execution places the order.

Keep each question small: if it needs to weigh five things at once, split into five and combine in code. When priorities change, you edit a number, not a prompt.

3. How jev-bot is wired

Repo: github.com/bl888m/jev-bot. Covers stocks, crypto and memes (e.g. HOOD, NVDA, BTC, ETH, GME, DOGE). Paper mode by default, offline mode without an API key, real-Jev mode when ready. 17 tests, zero dependencies. Paper by default is not a disclaimer: it is the point β€” find out whether the logic holds before real money.

4. The battery: six reads, one call

Instead of "buy or sell", ask everything a trader would check at once: regime, flow toxicity, setup quality, etc. Six judgments, one round trip; then your code decides. Thresholds live in your code, not in the model.

5. Risk layer: the model gets no vote

Hard limits checked before every order, with no model vote. Plus a fallback ladder for when things go wrong (and they will): without the ladder you do not have a 24/7 bot, you have a bot that works until the first network hiccup at 2am.

6. What Jev can and cannot do

Can: return typed decisions in milliseconds; answer dozens of questions at single-question latency; fit inside a block-speed loop; replace piles of hand-written heuristics and slow LLM classification.

Cannot: design your strategy; chain dependent questions in one call; compete at microsecond speed; replace your data feeds or risk controls; turn a losing strategy into a winning one.

Calibration: if it says 80%, do those events actually happen around 80% of the time on your market? Log every state, answer and outcome, and plot it. That log is the only thing that tells you whether the confidence numbers mean anything for you.

Tools and costs

  • Jev (TypeSafe): $0.042/M input tokens, output free.
  • Open-source jev-bot repo (paper default).
  • Market feeds and broker separate (not replaced by Jev).
  • No runtime dependencies claimed in the bot.

Limitations

  • No published trading results.
  • Modest engagement (51 bookmarks).
  • Battery and risk-ladder code blocks sit in screenshots in the raw: this guide reports the structure, not every line.
  • Jev does not "create edge": without your strategy and data it remains a fast classifier.
← More guides in β€œTrading and investing (method and risk management)”