{"progressModel":"stable path, module, and step IDs; no server-side learner state is stored","paths":[{"id":"first-ibkr-python-connection","slug":"first-ibkr-python-connection","title":"First IBKR Python connection","shortTitle":"First connection","description":"Prepare TWS or IB Gateway, connect from Python, verify a harmless response, and disconnect cleanly.","audience":"New IBKR API users who want a safe first localhost connection before requesting data or account values.","level":"Beginner","estimateMinutes":75,"outcome":"A documented paper-session connection that prints server time or connection status without placing orders.","prerequisites":["TWS or IB Gateway installed","Paper account access","Python environment with an IBKR client package"],"safetyNotes":["Start in paper mode and keep API access read-only for the first verification pass.","Use localhost and a unique client ID so the first test cannot collide with another running script."],"modules":[{"id":"workstation-readiness","title":"Prepare the local endpoint","summary":"Decide whether TWS or IB Gateway will own the first API session and record the environment.","steps":[{"id":"choose-endpoint","title":"Choose TWS or IB Gateway","kind":"setup","estimateMinutes":10,"outcome":"Selected endpoint, paper/live environment, and machine name recorded.","links":[{"label":"IBKR setup wizard","href":"/ibkr/setup-wizard"},{"label":"IB Gateway notes","href":"/ibkr/gateway"}]},{"id":"confirm-socket-settings","title":"Enable socket clients and confirm the port","kind":"verify","estimateMinutes":15,"outcome":"API socket access is enabled with the exact paper port documented.","links":[{"label":"Set up IBKR API access","href":"/ibkr/setup"}]}]},{"id":"python-smoke-test","title":"Run the first Python smoke test","summary":"Install a client package, connect to localhost, ask for a harmless value, and disconnect.","steps":[{"id":"install-client-package","title":"Install an IBKR Python client package","kind":"setup","estimateMinutes":10,"outcome":"Virtual environment can import the selected package.","links":[{"label":"Python environment setup","href":"/python/environment"},{"label":"Package reference","href":"/reference/packages"}]},{"id":"connect-read-only","title":"Connect with localhost, port, and client ID","kind":"code","estimateMinutes":20,"outcome":"Script connects, prints connection health or server time, and disconnects.","links":[{"label":"Connect to IBKR with ib_insync","href":"/ibkr/connect-to-ibkr"},{"label":"Snippet: connect to IBKR","href":"/snippets/connect-to-ibkr"}]},{"id":"troubleshoot-first-errors","title":"Handle the first connection errors","kind":"review","estimateMinutes":20,"outcome":"Wrong port, API disabled, and client ID conflicts have known next actions.","links":[{"label":"IBKR common errors","href":"/ibkr/common-errors"}]}]}],"capstone":{"title":"Connection record","prompt":"Create a short note containing endpoint, environment, host, port, client ID, package version, command, output, and disconnect result.","evidence":["Screenshot or text output from the harmless connection check","Saved notes with no account IDs or secrets"]}},{"id":"market-data-basics","slug":"market-data-basics","title":"Market data basics","shortTitle":"Market data","description":"Request historical and snapshot-style data with explicit contracts, permissions, pacing awareness, and quality checks.","audience":"Python users who can already connect to IBKR and want reliable first market-data requests.","level":"Beginner","estimateMinutes":95,"outcome":"A reproducible data request notebook or script with contract details, request parameters, and sanity checks.","prerequisites":["Completed first connection path","Market data permissions for the symbols being requested","Basic pandas familiarity"],"safetyNotes":["Market data can be delayed, unavailable, or permission-limited; label outputs before interpreting them.","Respect pacing limits and cache exploratory results instead of repeatedly polling the same request."],"modules":[{"id":"contract-and-permissions","title":"Define the request before asking for data","summary":"Make contracts, exchanges, currencies, and permissions explicit so data problems are diagnosable.","steps":[{"id":"write-contract-spec","title":"Write a contract specification","kind":"read","estimateMinutes":15,"outcome":"Symbol, security type, exchange, currency, and intended data source are documented.","links":[{"label":"IBKR common errors","href":"/ibkr/common-errors"}]},{"id":"verify-permissions","title":"Verify data permissions and delayed/live status","kind":"verify","estimateMinutes":15,"outcome":"Permission status and expected delayed/live behavior are known before analysis.","links":[{"label":"Request historical data","href":"/ibkr/request-historical-data"}]}]},{"id":"historical-bars","title":"Collect and inspect bars","summary":"Request small historical samples first, then inspect timestamps, missing bars, and pacing behavior.","steps":[{"id":"request-small-bars","title":"Request a small historical bar sample","kind":"code","estimateMinutes":25,"outcome":"A short historical request runs with explicit duration, bar size, and whatToShow values.","links":[{"label":"Snippet: request historical data","href":"/snippets/request-historical-data"}]},{"id":"inspect-time-series","title":"Inspect time zone, gaps, and bar conventions","kind":"review","estimateMinutes":20,"outcome":"Returned data has visible timestamp assumptions, row counts, and missing-data notes.","links":[{"label":"Time series basics","href":"/python/time-series"}]},{"id":"cache-sample-output","title":"Cache a sanitized sample for later comparison","kind":"report","estimateMinutes":20,"outcome":"Small sanitized CSV or fixture can be reused without repeating requests.","links":[{"label":"Export data to CSV","href":"/python/export-to-csv"}]}]}],"capstone":{"title":"Market data request card","prompt":"Produce a one-page request card with contract details, permission state, request parameters, row count, timestamp policy, and one saved sanitized sample.","evidence":["Recorded request parameters","Sanitized output sample","Notes on delayed/live status and data gaps"]}},{"id":"portfolio-reporting","slug":"portfolio-reporting","title":"Portfolio reporting","shortTitle":"Portfolio reporting","description":"Build read-only account and position reports that are useful for diagnostics without exposing private account data.","audience":"IBKR Python users who want recurring portfolio snapshots, exports, or dashboards without order automation.","level":"Intermediate","estimateMinutes":105,"outcome":"A read-only report pipeline that combines positions and account values into a sanitized table or file.","prerequisites":["Working IBKR Python connection","pandas installed","A private location for raw account outputs"],"safetyNotes":["Treat account identifiers, balances, and positions as private data; sanitize before sharing.","Keep the reporting client read-only and separate from any order-capable automation client."],"modules":[{"id":"read-account-state","title":"Read account state safely","summary":"Collect account summary and positions with clear boundaries around private data.","steps":[{"id":"account-summary-read","title":"Request account summary values","kind":"code","estimateMinutes":20,"outcome":"Selected summary fields print with account identifiers redacted from notes.","links":[{"label":"Get account summary","href":"/ibkr/get-account-summary"},{"label":"Snippet: get account summary","href":"/snippets/get-account-summary"}]},{"id":"positions-read","title":"Request positions into a table","kind":"code","estimateMinutes":25,"outcome":"Positions are normalized into explicit columns for symbol, type, currency, quantity, and average cost.","links":[{"label":"Get positions from IBKR","href":"/ibkr/get-positions"},{"label":"Snippet: get positions","href":"/snippets/get-positions"}]}]},{"id":"publishable-report-shape","title":"Shape a report you can trust","summary":"Normalize, validate, export, and document the report without leaking sensitive values.","steps":[{"id":"normalize-pandas-report","title":"Normalize the report DataFrame","kind":"report","estimateMinutes":25,"outcome":"Report columns have stable names, dtypes, currencies, and valuation timestamps.","links":[{"label":"pandas for research tables","href":"/python/pandas"}]},{"id":"sanitize-and-export","title":"Sanitize and export a sample report","kind":"safety","estimateMinutes":20,"outcome":"Public sample removes account IDs, private quantities if needed, and proprietary values.","links":[{"label":"Security notes","href":"/reference/security"},{"label":"Snippet: export to CSV","href":"/snippets/export-to-csv"}]},{"id":"schedule-read-only-run","title":"Plan a read-only recurring run","kind":"verify","estimateMinutes":15,"outcome":"Run frequency, storage location, and failure notification path are documented.","links":[{"label":"Code style","href":"/reference/code-style"}]}]}],"capstone":{"title":"Portfolio report runbook","prompt":"Write a runbook that explains how to run the report, where raw private outputs live, how sanitized samples are produced, and what failures require manual review.","evidence":["Read-only script or notebook","Sanitized sample report","Runbook with privacy boundaries"]}},{"id":"automation-safety","slug":"automation-safety","title":"Automation safety","shortTitle":"Automation safety","description":"Design automation boundaries, controls, logs, and review gates before any workflow can affect an account.","audience":"Developers moving from manual scripts toward scheduled services, alerts, or order-capable workflows.","level":"Advanced","estimateMinutes":120,"outcome":"A safety checklist and runbook that separates read-only automation from anything that can transmit orders.","prerequisites":["Stable read-only connection workflow","Paper-trading environment","Basic logging and configuration discipline"],"safetyNotes":["Do not run live order automation until paper checks, review gates, and stop procedures are proven.","Prefer explicit allowlists, small reversible actions, and human confirmation for any account-changing workflow."],"modules":[{"id":"boundaries-and-configuration","title":"Set hard boundaries","summary":"Separate environments, credentials, client IDs, and capabilities so accidental live effects are less likely.","steps":[{"id":"separate-paper-live-config","title":"Separate paper and live configuration","kind":"safety","estimateMinutes":20,"outcome":"Config names, ports, account labels, and client IDs make paper/live mixups obvious.","links":[{"label":"Order safety notes","href":"/ibkr/orders"}]},{"id":"define-capability-levels","title":"Define read-only, report-only, and order-capable modes","kind":"review","estimateMinutes":20,"outcome":"Each script has a declared capability level and forbidden actions list.","links":[{"label":"Security notes","href":"/reference/security"}]},{"id":"protect-secrets","title":"Protect secrets and private account data","kind":"safety","estimateMinutes":15,"outcome":"Secrets are outside source control and logs redact account identifiers.","links":[{"label":"Security notes","href":"/reference/security"}]}]},{"id":"operational-controls","title":"Add operational controls","summary":"Use logs, limits, dry runs, and stop procedures so automation behavior is inspectable and interruptible.","steps":[{"id":"dry-run-and-paper-tests","title":"Require dry-run and paper evidence","kind":"verify","estimateMinutes":25,"outcome":"Paper logs prove expected behavior before any live-capable deployment is considered.","links":[{"label":"Order safety notes","href":"/ibkr/orders"}]},{"id":"logging-and-alerting","title":"Log decisions and alert on failures","kind":"setup","estimateMinutes":25,"outcome":"Every run records inputs, actions considered, actions skipped, errors, and notification results.","links":[{"label":"Code style","href":"/reference/code-style"}]},{"id":"kill-switch-runbook","title":"Write the stop procedure","kind":"safety","estimateMinutes":15,"outcome":"A human can stop the process, disconnect the client, and verify no pending action remains.","links":[{"label":"IBKR common errors","href":"/ibkr/common-errors"}]}]}],"capstone":{"title":"Automation safety review","prompt":"Complete a pre-flight review covering environment separation, capability limits, logging, dry-run evidence, alerting, and a stop procedure.","evidence":["Paper-mode run log","Capability checklist","Stop procedure tested by a human"]}}]}