Oracle3
Open-source trading engine and MCP server for prediction markets. Fee-aware no-arbitrage trading across related contracts, live on Kalshi, Polymarket and Solana or on paper.
Paper-trade crypto with AI-driven strategy suggestions and backtesting
AI summary · website content
FinanceJavaScript · CSSGitHub @aliuppalOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A small web app that trades Bitcoin on a paper (fake money) account, using the Jev (TypeSafe's decisions model on OpenRouter) to decide whether to BUY, SELL or HOLD. Free OpenRouter chat models and Google Gemini's free tier are also supported.
The bot trades the Inverse Fair Value Gap (IFVG) model with Jev making the call:
setup, risk_reward: "1:1", trades_today, the IFVG zone and the usual indicators.| Step | Rule |
|---|---|
| Zone | Active FVGs on 1h, 2h and 4h (2h / 4h built from 1h candles) |
| Tap | Bullish setups need price to tap a bullish HTF FVG, bearish setups a bearish one (within the last 3 hours) |
| Entry | A fresh IFVG in the same direction on 15m, 5m or 3m, confirmed on a closed candle, inverted within the last 3-7 candles (IFVG_MAX_AGE, default 5). 3m entries need a 1h FVG tap |
| Priority | 15m first. A 5m (or 3m) IFVG waits if a 15m (or 5m) IFVG in the same direction is still forming; otherwise it is taken directly |
| Review | While a trade is open, Jev reviews it every 30 min (3m / 5m entries) or 60 min (15m entries) and may close it early (HOLD or CLOSE) |
The risk/reward box on the chart and in the snapshots grows with the trade until the stop or target is hit.
If no AI key is set (or the AI errors), a simple rule-based strategy answers instead so the site keeps working.
Shorts work on both the built-in simulated account and the Binance demo futures account (BROKER=binance).
The UI follows the Obsidian Terminal design system in DESIGN.md.
npm install
cp .env.example .env # then add your OPENROUTER_API_KEY
npm start # http://localhost:3000
OPENROUTER_API_KEY in .env
(or set GEMINI_API_KEY from https://aistudio.google.com/apikey instead).BROKER | What it is | Setup |
|---|---|---|
local (default) | Built-in simulated account, $100k starting cash, 0.1% fee, saved to data/account.json | Nothing |
binance | Binance USD-M futures demo account, BTCUSDT perpetual: real order engine, demo money, longs and shorts | binance.com → Demo Trading → API Management, set BINANCE_API_KEY / BINANCE_API_SECRET |
it can't place live orders by accident.
.env)| Variable | Default | Meaning |
|---|---|---|
AI_PROVIDER | auto | jev, openrouter (free chat models) or gemini; if empty, jev when an OpenRouter key is set |
OPENROUTER_API_KEY | (none) | Key from openrouter.ai (used by jev and openrouter) |
JEV_MODEL | typesafe/jev-1.13 | Jev decisions model id |
OPENROUTER_MODEL | auto | auto = use OpenRouter's current free models (falls back to the next one if rate-limited), or a specific model id |
GEMINI_API_KEY | (none) | Free key from Google AI Studio |
GEMINI_MODEL | gemini-2.5-flash | Any Gemini model on your plan |
BROKER | local | local or binance |
STARTING_CASH | 100000 | Local account starting balance |
BOT_INTERVAL_MINUTES | 5 | How often the bot scans for IFVG setups |
CANDLE_GRANULARITY | 900 | Candle size in seconds (300, 900, 3600, 21600, 86400) |
MIN_CONFIDENCE | 0.6 | Ignore weaker AI calls |
MAX_POSITION_PCT | 50 | Max % of equity held in BTC |
MAX_TRADE_PCT | 10 | Max % of equity per buy |
MAX_TRADES_PER_DAY | 10 | New trades per UTC day (max 10) |
AUTO_START | true | Bot trades automatically; false to start stopped |
SUPABASE_URL / SUPABASE_SECRET_KEY | (none) |
Interval, candle size and risk limits can also be changed live from the dashboard.
Free OpenRouter models and the free Gemini tier both have per-minute and per-day request limits; an interval of 5–15 minutes stays well inside them.
The Express app deploys to Vercel as-is (server.js exports the app; public/ is served from the CDN).
Serverless functions don't keep files or timers, so:
SUPABASE_URL and SUPABASE_SECRET_KEY (Project Settings -> API Keys -> secret key)
on Vercel. The account, trades, snapshots and bot state live in the kv table (browse trades via the
trades view). Upstash Redis (KV_REST_API_URL / KV_REST_API_TOKEN) also works. Without either, data
lives in /tmp and is lost whenever the function cold-starts.CRON_SECRET env var on Vercel, then run supabase/cron.sql in the Supabase
SQL Editor: Supabase pg_cron calls /api/cron every minute. An open dashboard also drives the bot while it's open.OPENROUTER_API_KEY (and any settings from .env.example) in the Vercel project.server.js Express server + REST API
src/ifvg.js FVG / IFVG detection and the 1:1 bracket
src/snapshot.js SVG trade chart snapshots
src/store.js File, Supabase or Upstash Redis key/value storage
supabase/schema.sql Supabase table for storage
src/ai.js Jev decisions call, OpenRouter / Gemini chat calls, rule-based fallback
src/bot.js Scheduler + risk rules (planTrade)
src/indicators.js RSI / SMA / EMA / MACD / Bollinger
src/market.js Coinbase / Binance public market data
src/brokers/local.js Simulated paper account
public/ Dashboard (plain HTML/CSS/JS, no build step)
test/ node:test unit tests (npm test)
| Method | Path | |
|---|---|---|
| GET | /api/status | Bot state and settings |
| GET | /api/market?granularity=3600 | Candles + indicators |
| GET | /api/account | Cash, BTC, equity |
| GET | /api/orders | Order history |
| GET | /api/decisions | AI decision log |
| GET | /api/trades | IFVG trades (entry, stop, target, exit, R, P&L) |
| GET | /api/trades/:id/shots | Entry / exit chart snapshots (SVG) |
| GET/POST | /api/cron | Scheduler tick (Authorization: Bearer $CRON_SECRET) |
| POST | /api/bot/start, /api/bot/stop, /api/bot/run | Control the bot |
| POST | /api/settings | Update interval / risk limits |
| POST | /api/order | Manual trade { side: "buy", amount: <USD> } or { side: "sell", amount: <BTC> } |
| POST | /api/reset | Reset the local paper account |
⚠️ Educational project. Paper trading only. Not financial advice: AI trading decisions can be wrong, and paper results don't predict live results.
| Supabase storage (recommended on Vercel) |
KV_REST_API_URL / KV_REST_API_TOKEN | (none) | Upstash Redis storage (alternative) |
CRON_SECRET | (none) | Protects /api/cron |