Goal
Produce a repeatable, machine-friendly market brief before placing a trade:- current market state
- liquidity and spread context
- execution impact estimate
- explicit go/no-go and constraints
Inputs
condition_id(required)- optional thesis horizon (
intraday,1d,1w,event_horizon) - planned side (
BUYorSELL) - intended size in USDC
Recommended tool sequence
1) Pull market and event context
get_marketwithcondition_idget_eventfrom the related event id when available
2) Pull batched market data
Use the canonical pluralized tools:get_order_booksget_pricesget_midpointsget_spreadsget_last_trade_prices
- spread regime (tight/normal/wide)
- visible depth near midpoint
- last trade versus current best price
3) Estimate execution impact
Runcalculate_market_price for the intended side and amount.
4) Gather execution metadata
get_fee_rate_bpsget_tick_sizeget_neg_risk
5) If execution is approved, hand off to trading wrappers
prepare_orderto locally prepare/sign a draft without postingplace_orderwithconfirm: trueonly at the final execution stepcancel_ordersif you need an explicit unwind/cancel path
Suggested output contract
Have the agent return a strict structure like:Optional: use the built-in prompt
You can bootstrap this workflow with promptmarket-analysis using:
condition_idhorizoninclude_orderbook_depthinclude_recent_trades

