Inspiration

When you watch a live game, you react to every play. You feel the odds swing.

But trading that feeling on a prediction market means finding the right contract, typing a price, typing a size, and doing it all again every time the game swings. By the time you're done, the moment is gone.

I wanted trading a live game to be as quick as the game itself.

What it does

TapLine turns a live game's odds into a line moving across a grid.

  • Every square is a price and a deadline.

  • Tap above the line if you think the odds will rise there in time, or below if you think they'll fall.

  • A hit pays the moment the price gets there.

  • A miss sells at the market price when time runs out, so you lose the move, not your whole stake.

  • The lobby lists every game trading on Gemini right now, with live odds and volume.

  • You choose how to size a tap: Win (the amount is what a hit pays), Size (the amount is what you put in), or 1.0x (shows the multiplier).

  • Max per square stops anyone from risking a big amount by accident.

  • Every game has its own live chat, so fans can talk and share their hits.

  • Summary tracks your balance, hit rate, streaks and badges.

How I built it

  • Games and markets come from Gemini's prediction markets REST API.

  • Every contract's best bid and ask stream in live over Gemini's WebSocket.

  • The browser talks to Gemini directly, so the hosted app needs no server.

  • Each tap becomes a bracket of ordinary Gemini orders: buy now, with a sell waiting at your square.

  • When the deadline passes, it cancels the waiting sell and exits at the market price.

  • The trading engine is written in TypeScript with unit tests.

  • The grid is a custom HTML canvas renderer with the live line, countdowns, hit and miss effects, and sound.

  • It works on phones and desktop.

  • Chat runs on Supabase Realtime, one room per game.

  • It's hosted on Vercel and deploys from GitHub on every push.

Challenges I ran into

  • Live prediction markets often go one-sided for a moment. An early version paid out on prices nobody would actually trade at.

  • Now hits are judged on the real bid and ask, never the midpoint, and the grid pauses with a "Thin market" notice instead of offering bad trades.

  • Contracts settle at the end of the game, not in 30 seconds. The bracket design is what makes a 10-second square possible.

  • Winning a small amount on a square close to the line can need a big position, so I added the Win / Size switch and a max per square.

Accomplishments that I'm proud of

  • It runs on real, live Gemini data, including real hits and misses. It's not a mock-up.

  • One tap does what normally takes a contract search, a price, a size and an order.

  • It works on a phone as well as a laptop.

What I learned

  • How prediction market order books behave during live games: spreads, gaps and one-sided books.

  • How to design a fast, fun interface that stays honest about the real prices underneath.

What's next for TapLine

  • Real Gemini orders. The engine is already built for it. Today it runs on paper trading at Gemini's live prices.

  • Log in with Gemini.

  • Leaderboards for each game.

Built With

Share this project:

Updates

Submission history