FIELD NOTES / PREDICTION MARKETS

Minutes to decide.
One candle to act.

An automated prediction-market trading platform for short-duration candle markets — market discovery, candle timing, strategy state, sizing, execution, settlement and drawdown controls, run continuously across multiple assets and timeframes.

PREDICTION MARKET CASE STUDY

Candle Desk

Candle-bound execution.
On-chain settlement.

Automated strategy operations
Candle Desk / Live market and positionsACTUAL PRODUCT INTERFACE
Candle Desk live market view with price candles and active positions
THE TIMING PROBLEMThe candle does not wait.

A strategy may have only minutes to identify the instrument, size capital, execute and prepare for the next candle.

Follow the execution ↗
DiscoverTimeSizeExecuteSettle
DOMAIN

Prediction-market trading

WHAT WE BUILT

Automated execution platform

OUR ROLE

Architecture, execution & Web3 engineering

01 / THE REAL ENGINEERING PROBLEM

A valid market
can still be the wrong market.

On Polymarket, crypto “Up or Down” markets continuously resolve around the direction of individual price candles. A strategy may have only minutes to identify the correct instrument, determine its position, size capital, execute, track settlement, update strategy state, and prepare for the next candle.

That workflow becomes considerably harder when several strategies run simultaneously across multiple assets and timeframes.

Polymarket exposes many events with similar titles and overlapping metadata, so a keyword-only search can identify a different instrument entirely — and a technically valid but incorrect market will still accept an order.

01

The system can look fine while trading the wrong thing

Market-selection errors are particularly dangerous: an incorrect but valid market accepts the order, so the platform appears to function normally.

02

Daylight saving breaks naive scheduling

Hourly and four-hour boundaries follow US Eastern wall-clock time. Adding a fixed number of seconds skips or misaligns markets across DST transitions — errors that only appear twice a year.

03

On a blockchain venue, a timeout is ambiguous

A failed request does not mean a failed trade. The outcome has to be established from the chain, not assumed from the response.

02 / INSIDE THE PRODUCT

Configure the strategy.
Let the candle close.

Four views of the delivered platform.
Each shows another part of the automated trading loop.

Candle Desk live market view with candles and open positions

The instrument and the clock.

Live market state sits beside open positions, entry price and unrealised P&L — the context a candle-bound decision depends on.

Candle Desk live market view with candles and open positions
THE CANDLE LOOP

Discover marketAlign to boundarySize positionExecuteReconcileSettleUpdate state

03 / AMBIGUITY AND RECOVERY

A timeout is not
evidence of failure.

On a blockchain venue, an order that appears to fail may already have gone through. The platform verifies the on-chain outcome-token balance before deciding whether an ambiguous order actually failed.

Strategy state has to survive process restarts too, so the desk resumes from where it actually is rather than from where it last remembered being.

Look under the hood ↘
01

Filter the market precisely

Discovery applies asset keywords, negative keywords, excluded tags, required market-type tags, timeframe tags and expected candle boundaries.

BALANCE CONFIRMS FILL

Treated as executed

The position is recorded and strategy state advances, even though the original request appeared to fail.

NO BALANCE CHANGE

Treated as failed

Only then is the order considered unfilled, so a retry cannot duplicate a position that already exists.

02

Align to the real boundary

Timezone-aware boundary logic handles US Eastern wall-clock intervals, with regression tests covering both daylight-saving transitions.

03

Verify before concluding

An ambiguous order is resolved against the on-chain outcome-token balance rather than the request result.

04 / THE TECHNOLOGY & THE REASON

Small stack.
Strict about time and state.

The platform is deliberately modest in its dependencies, because the difficulty here is not scale — it is correctness around timing, ambiguity and recovery.

EXECUTION ENGINE

Python + FastAPI

Runs market discovery, candle scheduling, strategy evaluation, sizing and the execution path.

Why one engine?

Discovery, timing and execution all depend on the same strategy state; separating them adds ways for them to disagree.

OPERATOR INTERFACE

React

The desk: live market state, strategy configuration, executions and performance analytics.

Why an interface at all?

An automated strategy still needs an operator who can see what it is doing and stop it.

VENUE

Polymarket CLOB v2

The order book the platform trades against, with its own market metadata and settlement behaviour.

Why filter so hard?

Many events carry similar titles; the wrong market will still accept an order.

SETTLEMENT

Polygon

The chain the outcome tokens live on, and the source of truth for whether an ambiguous order filled.

Why check the chain?

The balance is the only thing that actually knows whether the trade happened.

STRATEGY STATE

SQLite

Persists strategy state, positions and execution history so the desk survives restarts.

Why persist state?

A strategy that forgets its position on restart will size the next trade against the wrong picture.

OPERATIONS

AWS EC2, systemd & nginx

Runs the engine as a supervised long-lived service, restarted automatically and fronted for the operator interface.

Why supervised?

A candle strategy is only useful if it is actually running when the candle closes.

The architecture and product narrative reproduce the supplied project documentation. Interface values are product screen data and are not presented as investment results or evidence of future performance.

Explore the documented platform stack

Execution engine
Python · FastAPI · DST-aware candle scheduling · strategy state machine
Operator interface
React · market, strategy, execution and analytics views
Venue & settlement
Polymarket CLOB v2 · Polygon · on-chain outcome-token verification
State
SQLite · persisted strategy state, positions and execution history
Operations
AWS EC2 · systemd supervision · nginx

Technology names identify the documented implementation, not partnerships or endorsements.

A CONVERSATION ABOUT YOUR EXECUTION WORKFLOW

What does your system do
when the answer is unclear?

Bring one automated execution path. In 20 minutes, we will map where timing, ambiguity and recovery have to be handled explicitly rather than assumed.

20 minutes · Your venue, strategy and constraints

CONTACT PREVIEW

Contact destination

No message has been sent. The destination will be connected before outreach.