Skip to main content
This recipe shows the shape of a guarded SDK execution path. It is intentionally conservative: read runtime and portfolio state, enforce a local budget, require a limit price, then call execution.place.

Guard function

Call it

Why this shape

  • runtime.ensure happens before order creation.
  • The second execution.place call uses startIfNeeded: false because the runtime was already checked.
  • The local budget is independent from server risk gates.
  • Kalshi and Polymarket execution stay explicit and limit-priced.
  • Polymarket applications can require jurisdiction before calling this helper.

Next steps

Execution intents API

Server-side intent semantics.

Agent trader loop

Add Agent SDK policy gates.