Inspiration

Most "AI market analysis" tools produce confident-sounding summaries with no way to tell what's an observed fact versus a guess. MyPosition (myposition.dev) already surfaces a lot of raw crypto market data — kimchi premium, liquidation maps, funding rates, open interest — so the missing piece wasn't more charts, it was a way to synthesize that data into a brief that's honest about what it does and doesn't support.

What it does

Pick a coin, and GPT-5.6 turns MyPosition's current data for it into a structured evidence brief:

  • Conclusion — a short, direct read of the current situation
  • Reasoning — how the model got there, referencing the actual numbers
  • Supporting evidence — the data points that back the conclusion
  • Counter-evidence — data that complicates or contradicts it
  • Unknowns — what's missing or unverifiable from the available data

The model only sees the evidence bundle we construct server-side and is instructed to flag gaps rather than invent numbers. This isn't a chatbot — there's no free-text prompt box, just a coin picker and a brief.

How I built it

The API route fetches live data sources in parallel (kimchi premium, 24h liquidation stats, open interest with a 24h trend, funding rate), assembles them into a structured JSON evidence bundle with per-source timestamps and error markers, and sends that bundle to gpt-5.6-luna via the Chat Completions API using a strict json_schema response format, so the output is always shaped as { conclusion, reasoning, supporting_evidence, counter_evidence, unknowns }, never free text.

The frontend is a searchable coin picker (live Binance websocket prices) plus a single "Analyze" action — no chat history, no follow-up questions, by design.

How I used Codex

Codex built the feature end to end across several sessions: reading the existing codebase conventions first, scaffolding the API route and page, then iterating on real product feedback — a full-symbol searchable coin picker with live prices, per-IP rate limiting with an admin whitelist and a UI countdown timer, an open-interest trend signal the model was initially missing, and several rounds of UI/readability fixes based on screenshots of the running app.

Challenges I ran into

The first attempt at improving output readability (asking the model to write short, one-line sentences) backfired — it made answers noticeably shorter and less substantive. The fix: sentence-splitting for display is a presentation concern, not a generation concern — the frontend now splits on sentence boundaries itself, and the system prompt just asks for thorough, honest reasoning.

Also had to explicitly tell the model not to leak implementation details — it was initially quoting raw null values and full ISO-8601 timestamps straight from the JSON evidence bundle.

Accomplishments I'm proud of

The evidence bundle is genuinely structured, not a wrapper around a text prompt — every claim traces back to a specific field in the bundle, and adding a new source (like OI trend) visibly sharpens the model's counter-evidence and unknowns.

What's next

  • Extend the evidence bundle with historical price/funding trends
  • Let users compare two coins side by side
  • Surface a "confidence" signal based on how many sources returned data

Built With

Share this project:

Updates