sf-sdk-market-research — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sf-sdk-market-research (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
npm install @spfunctions/[email protected]
export SF_API_KEY="sf_..." # required for cost-bearing tools| SDK call | HTTP | CLI |
|---|---|---|
sf.markets.search({ query }) | GET /api/public/scan | sf scan "query" --json |
sf.markets.discover({ limit }) | GET /api/public/ideas | sf discover --quality --json (CLI broader) |
sf.markets.get(ticker) | GET /api/agent/inspect/{ticker} | sf inspect <ticker> --json |
sf.markets.history(ticker) | GET /api/public/market/{ticker}/history | sf history <ticker> --json |
import { SimpleFunctions } from "@spfunctions/sdk"
const sf = new SimpleFunctions({
apiKey: process.env.SF_API_KEY,
baseUrl: process.env.SF_API_URL ?? "https://simplefunctions.dev",
})
const results = await sf.markets.search({
query: "Fed CPI",
limit: 10,
venue: "all", // "kalshi" | "polymarket" | "all"
})
console.log(results.markets?.map(market => ({
ticker: market.ticker,
venue: market.venue,
price: market.price,
title: market.title,
})))const discovery = await sf.markets.discover({ limit: 5 })markets.discover returns the HTTP-backed /api/public/ideas slice — server-curated trade ideas with conviction, catalyst, and direction.
The CLI sf discover --quality --json is broader because it also aggregates local CLI sources (cross-venue pairs, contagion, etc.). For the same breadth via SDK, compose:
const [ideas, pairs, contagion] = await Promise.all([
sf.markets.discover({ limit: 5 }),
// Cross-venue pairs and contagion are HTTP-only currently:
fetch("https://simplefunctions.dev/api/public/cross-venue/pairs?preset=arb&limit=5", {
headers: { "Authorization": `Bearer ${process.env.SF_API_KEY}` },
}).then(r => r.json()),
fetch("https://simplefunctions.dev/api/public/contagion?window=6h&limit=5", {
headers: { "Authorization": `Bearer ${process.env.SF_API_KEY}` },
}).then(r => r.json()),
])const dossier = await sf.markets.get("KXRECESSION-26DEC31")
console.log({
ticker: dossier.ticker,
price: dossier.price,
spread: dossier.spread,
liquidity: { vol24h: dossier.volume24h, oi: dossier.openInterest },
regime: dossier.regime?.label,
indicators: {
iy: dossier.indicators?.iyYes,
cri: dossier.indicators?.cri,
vr: dossier.indicators?.vr,
residualVr: dossier.indicators?.residualVr,
},
crossVenue: dossier.crossVenue,
})See sf-inspect skill for indicator interpretation.
const history = await sf.markets.history("KXRECESSION-26DEC31")
console.log(history.indicatorHistory?.map(h => ({
at: h.at,
price: h.price,
delta: h.delta,
iy: h.iy,
})))Returns 7-day cached price + indicator history. Use this BEFORE citing any specific price in a published claim — the world-API price field can be stale.
async function research(topic: string) {
const [search, world] = await Promise.all([
sf.markets.search({ query: topic, limit: 5 }),
sf.world.get(),
])
const topMarkets = search.markets ?? []
const dossiers = await Promise.all(
topMarkets.slice(0, 3).map(m => sf.markets.get(m.ticker))
)
return {
topic,
regime: world.regime?.label,
salient: world.salient?.slice(0, 3),
candidates: dossiers.map(d => ({
ticker: d.ticker,
price: d.price,
spread: d.spread,
indicators: d.indicators,
})),
}
}
const result = await research("Fed rate cuts CPI")
console.log(JSON.stringify(result, null, 2))This is the SDK equivalent of sf-research workflow skill — parallel search + world + per-market inspect, returned as one structured packet.
search() to find the correct identifier.venue: "all".sf-sdk-quickstart — install + first callsf-sdk-world-read — world state patternsf-inspect — CLI-side ticker inspection workflow~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.