All projects

Chainlink Runtime Environment (CRE) x Prediction Bot – Polymarket Up/Down BTC/ETH/SOL

an AI-powered prediction bot system focused on predict UP/DOWN BTC/ETH/SOL markets on Polymarket.

CRE & AI Prediction Markets

What it is

Chainlink Runtime Environment (CRE) x Prediction Bot – Polymarket Up/Down BTC/ETH/SOL is an AI-powered prediction bot system focused on predict UP/DOWN BTC/ETH/SOL markets on Polymarket. It enables:

  1. Users to connect their wallets user can use their metamask to connect to website
  2. Users to request predictions (e.g. BTC) from the frontend.
  3. The backend to call a PolymarketUpDownAgent:
    • Fetches market data from TAAPI (short-term / long-term indicators).
    • Fetches the corresponding UP/DOWN market from Polymarket Gamma API.
    • Sends a snapshot + context to OpenRouter LLM and receives a decision UP / DOWN / NO_BET with reasoning.
  4. Results are stored in PostgreSQL (via Prisma) and displayed on the frontend.
  5. Users can place virtual bets based on predictions, using an internal balance in the DB.
  6. A cron job runs periodically (every 60s) and calls Polymarket Gamma API to check whether markets have closed and which side won (UP or DOWN), then:
    • Updates bet status (WON/LOST) + PnL.
    • Credits user balances if they won.

How it Works

It build with:

  • Express + PostgreSQL + Prisma backend
  • Vite + React + Tailwind + TanStack Query frontend
  • A decision agent for UP/DOWN powered by TAAPI (technical indicators) + OpenRouter LLM
  • Off-chain settlement via Polymarket Gamma API

Links

Created by

  • Sofia Anderson