Create an intent
| Field | Meaning |
|---|---|
action | buy or sell |
venue | kalshi or polymarket |
marketId | Kalshi ticker or Polymarket CLOB token id |
marketTitle | Human-readable title |
direction | yes or no |
targetQuantity | Contract quantity |
maxPrice, executionStyle, triggerType, triggerPrice, triggerAt, softCondition, source, sourceId, and autoExecute.
SDK and Agent wrappers:
autoExecute defaults to false on raw intent creation. sf.execution.place defaults to autoExecute: true and first ensures a runtime by checking cloud and configured SDK runtime candidates. If no runtime is running, it starts or wakes one when allowed. Polymarket execution requires a CLOB token id and explicit limit price. Use runtime: { mode: "none" } for an explicit intent-only workflow.
This is a governed workflow path, not the fastest possible venue client. Use raw Kalshi or Polymarket APIs for high-frequency market making, direct orderbook subscription, venue-native order lifecycle handling, and immediate replace/cancel loops. Use SimpleFunctions SDK/Agent execution when you need policy gates, runtime readiness checks, trace, intent state, monitoring, and reconciliation.
List intents
| Status | Meaning |
|---|---|
pending | Created and waiting for the runtime to arm it |
armed | Runtime has accepted it and is evaluating triggers |
triggered | Hard trigger fired; waiting for confirmation or execution |
executing | Runtime has submitted or is submitting an order |
partial | Some quantity filled; remaining quantity is still active |
filled | Target quantity filled |
expired | Trigger window expired before completion |
cancelled | User or runtime cancelled the intent |
rejected | Runtime rejected execution due to a permanent local/config/risk failure |
Detail/update/cancel
PATCH accepts controlled status transitions (armed, triggered, executing, expired, cancelled, rejected) and positive fill reports. Invalid lifecycle transitions return 409 with the current and requested status.
Runtime
/api/runtime/exec; local or self-hosted runtime integrations use SDK runtimeControllers. Hosted status checks the runtime daemon, not just the cloud machine state, before treating execution as usable.
Hosted runtime exec forwards the authenticated SF_API_KEY into the runtime process. Live Kalshi and Polymarket order routing still requires exchange credentials in that runtime context, such as encrypted cloud secrets or a local/self-hosted runtime controller. Polymarket global CLOB access is subject to Polymarket’s current geographic and terms restrictions; applications should set Agent policy guardrails such as allowedVenues, blockedJurisdictions, requireJurisdiction, max quantity, max cost, required limit prices, and confirmation tokens.