Skip to content

calesthio/OptionsCanvas

v0.1.7 Feature

This release adds 3 notable features for engineering teams evaluating rollout.

Published 8d Self-Hosted
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

0dte algorithmic-trading alpaca charting day-trading fintech
+9 more
flask lightweight-charts local-first options options-trading python self-hosted trading-platform vanilla-js

Summary

AI summary

API now returns structured error messages when option contracts are unavailable.

Changes in this release

Performance Medium

Backend tracks per‑client stream subscriptions and stops polling symbols with no active subscribers, eliminating orphaned subscription leaks from closed tabs.

Backend tracks per‑client stream subscriptions and stops polling symbols with no active subscribers, eliminating orphaned subscription leaks from closed tabs.

Source: llm_adapter@2026-05-29

Confidence: low

Bugfix Medium

Frontend validates DTE selection against the current symbol before sending orders, showing a toast with valid DTEs if stale.

Frontend validates DTE selection against the current symbol before sending orders, showing a toast with valid DTEs if stale.

Source: llm_adapter@2026-05-29

Confidence: high

Bugfix Medium

`TradingPanel.loadValidContracts` discards responses if the symbol changes mid‑fetch, preventing stale options from leaking into dropdowns during fast switching.

`TradingPanel.loadValidContracts` discards responses if the symbol changes mid‑fetch, preventing stale options from leaking into dropdowns during fast switching.

Source: llm_adapter@2026-05-29

Confidence: high

Bugfix Medium

/api/open_position now returns structured error messages with valid_dtes and valid_strikes fields.

/api/open_position now returns structured error messages with valid_dtes and valid_strikes fields.

Source: llm_adapter@2026-05-29

Confidence: low

Bugfix Low

Upgrade instructions require restarting the launcher and refreshing the browser after pulling new code.

Upgrade instructions require restarting the launcher and refreshing the browser after pulling new code.

Source: llm_adapter@2026-05-29

Confidence: high

Full changelog

Four related fixes for trader-facing weirdness uncovered during live use today.

What's in this release

Smart error when a contract can't be found

/api/open_position used to return a single unhelpful string ('Could not find suitable option contract') when something was wrong. Now it distinguishes the failure modes:

  • DTE not in chain"DTE=6 not available for MU. Valid DTEs: 3, 10, 17, 23."
  • Strike not at this DTE"Strike $885 not available for MU CALL DTE=10. Nearest valid: $880."
  • No options for this symbol"No options found for SYMBOL."

Backend also returns structured valid_dtes + valid_strikes fields so future UI can auto-correct.

Frontend DTE pre-flight

When you click Buy, the panel now validates the selected DTE against the current symbol's actual chain before sending the order. If your selection is stale (carried over from a previous symbol that had it but the current one doesn't), you get an immediate toast naming valid DTEs and the nearest one — no 10-second timeout, no broker-rejected order.

Stale-response guard on symbol switching

TradingPanel.loadValidContracts now captures the requested symbol at request time and discards the response if you switched symbols mid-fetch. Stops the previous symbol's options leaking into the new symbol's dropdown during fast switching.

Ref-counted stream subscriptions

The big perf fix:

  • Backend now tracks subscriptions per-client (sidset of (symbol, timeframe)). handle_disconnect releases all of the disconnecting client's claims; if no other client wants the same (symbol, timeframe), the streaming loop stops polling that symbol.
  • Frontend unsubscribeChart now updates its local subscription set even when the WebSocket is disconnected, so a reconnect-then-resubscribe doesn't replay stale subscriptions.

Previously: every closed browser tab leaked entries into streaming_symbols permanently. The background loop kept fetching bars for symbols nobody was watching. Verified by inspecting logs: on a clean boot you should now only see Fetching bars for <current_symbol>, no orphaned symbols accumulating.

How to upgrade

git pull
# restart the launcher, refresh the browser tab

The streaming-symbol cleanup needs a backend restart to clear the in-memory leaked entries from the previous session.

What's next

A proper refactor is queued for v0.2.0: applying AbortController + correlation-ID guards uniformly across every symbol-scoped async path (frontend ApiClient, TradingPanel, ChartManager, OrderPanelOnChart), plus splitting the backend's strike-increment cache so heuristic fallbacks don't poison the long-TTL verified cache. That's the architectural fix for the entire class of "I switched symbols and the panel showed stale data" bugs — these v0.1.x patches reduce the surface area, v0.2.0 eliminates the class.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track calesthio/OptionsCanvas

Get notified when new releases ship.

Sign up free

About calesthio/OptionsCanvas

All releases →

Related context

Related tools

Earlier breaking changes

  • v0.1.1 External scripts must read and include the CSRF token in X-CSRF-Token header for POST/PUT/PATCH/DELETE calls.

Beta — feedback welcome: [email protected]