{"openapi":"3.1.0","info":{"title":"SML Risk Firewall","version":"1.0.0","description":"Evaluate proposed equity, spot and standard long option buys against caller-defined risk limits. Check combined batch outlay, exposure, buying power, daily loss and snapshot freshness. Live Tradier/Coinbase instrument checks before x402 payment. Signed decision receipts. Account snapshots come from the caller. The evaluation API itself never submits orders; a separate operator control API (bearer-key gated, not part of this paid API) can read the connected Tradier account and submit a reserved order only when live submission is operator-enabled AND authorized per call — live submission is off unless the operator enables it. Read /skill.md for the machine integration contract. Paid doors use x402 v2 (HTTP 402 + PAYMENT-REQUIRED; retry with PAYMENT-SIGNATURE). Catalog: https://risk-firewall.scriptmasterlabs.com/catalog","contact":{"name":"Script Master Labs LLC","url":"https://scriptmasterlabs.com"}},"servers":[{"url":"https://risk-firewall.scriptmasterlabs.com"}],"paths":{"/v1/risk/evaluate":{"post":{"operationId":"risk-evaluate","summary":"Order and batch risk evaluation","description":"Submit policy, timestamped account snapshot and 1–100 proposed orders. Returns PASS, REJECT or INSUFFICIENT_DATA, exact USD calculations and machine-readable rule codes. All money and quantity inputs are decimal strings. Live instrument validation and fresh provider quotes are required before payment. Account snapshot provenance remains explicit. Price $0.005 per call via x402.","tags":["risk","trading","options","pre-trade","agents"],"x-price-usd":0.005,"x-payment":"x402","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.005000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["policy","snapshot","orders"],"properties":{"policy":{"type":"object","required":["version","maxOrderUsd","maxExposureUsd","maxDailyLossUsd","maxSnapshotAgeSeconds","maxContractsPerOrder","expirationBufferMinutes"],"properties":{"version":{"type":"string","minLength":1,"maxLength":128},"maxOrderUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"maxExposureUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"maxDailyLossUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"maxQuoteAgeSeconds":{"type":"integer","minimum":1,"maximum":300,"description":"Defaults to maxSnapshotAgeSeconds"},"maxSnapshotAgeSeconds":{"type":"integer","minimum":1,"maximum":300},"maxContractsPerOrder":{"type":"integer","minimum":1,"maximum":100000},"expirationBufferMinutes":{"type":"integer","minimum":0,"maximum":10080}}},"snapshot":{"type":"object","required":["asOf","exposureUsd","reservedUsd","dailyLossUsd","buyingPowerUsd"],"properties":{"asOf":{"type":"string","format":"date-time","description":"UTC timestamp ending in Z"},"exposureUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"reservedUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"dailyLossUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"buyingPowerUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"}}},"orders":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["id","symbol","assetType","side","limitPriceUsd","quantity","feesUsd"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"symbol":{"type":"string"},"assetType":{"type":"string","enum":["equity","spot","option"]},"side":{"type":"string","enum":["buy"]},"limitPriceUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"quantity":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"feesUsd":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})(\\.[0-9]{1,6})?$"},"right":{"type":"string","enum":["call","put"]},"multiplier":{"type":"integer","const":100},"adjusted":{"type":"boolean","const":false},"positionEffect":{"type":"string","const":"open"},"expiresAt":{"type":"string","format":"date-time"},"optionSymbol":{"type":"string","description":"OCC symbol required for broker submission of an option order"}},"allOf":[{"if":{"properties":{"assetType":{"const":"option"}}},"then":{"required":["right","multiplier","adjusted","positionEffect","expiresAt","optionSymbol"]}}]}}}},"example":{"policy":{"version":"example","maxOrderUsd":"60","maxExposureUsd":"500","maxDailyLossUsd":"100","maxSnapshotAgeSeconds":30,"maxContractsPerOrder":10,"expirationBufferMinutes":60},"snapshot":{"asOf":"<current UTC timestamp>","exposureUsd":"0","reservedUsd":"0","dailyLossUsd":"0","buyingPowerUsd":"500"},"orders":[{"id":"order-1","symbol":"AMC","assetType":"option","side":"buy","limitPriceUsd":"0.32","quantity":"2","feesUsd":"0","multiplier":100,"adjusted":false,"positionEffect":"open","right":"call","expiresAt":"<contract expiry UTC timestamp>"}]}}}},"responses":{"200":{"description":"Result with signed receipt","content":{"application/json":{"example":{"verdict":"REJECT","reasons":[{"code":"ORDER_OUTLAY_LIMIT","orderId":"order-1","actual":"64.000000","limit":"60.000000"}],"dataSource":"live_instrument_validation_and_caller_account_snapshot"}}}},"402":{"description":"Payment required (x402 v2). Body lists accepts per rail; pick one."}}}},"/v1/risk/capabilities":{"get":{"summary":"Supported order types and decision contract","responses":{"200":{"description":"OK"}}}}}}