{"openapi":"3.1.0","info":{"title":"FinzData Workspace","version":"1.3.2","description":"A persistent workspace for AI agents with FinzData built in: keep files, run JavaScript next to point-in-time market data, and call any FinzData dataset with your key."},"servers":[{"url":"https://workspace.finzdata.com"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"Bearer":{"type":"http","scheme":"bearer"}}},"security":[{"ApiKey":[]},{"Bearer":[]}],"paths":{"/v1/data":{"post":{"operationId":"finzdataGet","summary":"Call a FinzData API endpoint","description":"Read-only GET request to the FinzData REST API (docs: https://finzdata.com/docs) with your key (for example /v1/prices/daily, /v1/futures/daily, /v1/gex/daily, /v1/cot, /v1/pulse/{name}, /v1/model/latest). Optionally save the result into your workspace with save_to.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"params":{"type":"object"},"save_to":{"type":"string"}},"required":["path"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/run":{"post":{"operationId":"workspaceRun","summary":"Run JavaScript in the workspace","description":"Run a JavaScript (ES module) program inside your workspace. It must `export default async function (input) { ... }` and return JSON. Use `import { get } from \"codemode:finzdata\"` for data and `import fs from \"node:fs/promises\"` for files under /workspace. No other network access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"input":{"type":"object","description":"JSON value passed to your default export."},"timeout_ms":{"type":"number"}},"required":["code"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/strategies":{"get":{"operationId":"strategyList","summary":"List FinzData strategies","description":"List public FinzData Hub strategies (momentum, trend, mean reversion, value, factor, AI Tournament). sort: robust (deflated Sharpe), forward, new, forks. Every listed strategy is free to re-run on its full history with strategy_run.","parameters":[{"name":"sort","in":"query","schema":{"type":"string","enum":["robust","forward","new","forks"]}},{"name":"family","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/strategies/run":{"post":{"operationId":"strategyRun","summary":"Re-run a listed strategy free on full history","description":"Re-run a listed FinzData strategy exactly as published, on its full point-in-time history through end (default today), on the FinzData servers. Free on every plan. Saves spec.json and result.json to /workspace/strategies/<slug>/ so you can analyse them with workspace_run. Changing the strategy or testing your own idea over full history needs a FinzData purchase; the free window still applies there.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"end":{"type":"string"},"save":{"type":"boolean","description":"Default true."}},"required":["slug"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/files/list":{"get":{"operationId":"workspaceList","summary":"List a workspace directory","parameters":[{"name":"path","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/files/read":{"get":{"operationId":"workspaceRead","summary":"Read a workspace file","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/files/write":{"post":{"operationId":"workspaceWrite","summary":"Write a workspace file","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}},"/v1/files/delete":{"post":{"operationId":"workspaceDelete","summary":"Delete a workspace file or directory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid FinzData key"}}}}}}