Version 2.0.3.7 Released
Date: 30th November 2026
This release lets the OpenAlgo mobile and TV apps sign in with a short code you approve on the web instead of your API key, adds Admin, Device sign-in and Connected devices to control them, syncs your /trading chart setup to signed-in devices, and fixes master contract refreshes for Angel, Zerodha and Fyers, tick sizes on Flattrade and the Dhan feed.
This is the first release after 2.0.3.6, with 7 commits since that bump, excluding automated frontend build commits and including this release. Device sign-in and chart sync landed as one squashed commit (#2526) of 112. Run cd upgrade && uv run migrate_all.py as usual: it adds the device sign-in and chart sync tables. An install that only restarts gets the same tables at startup. Device sign-in is off after the upgrade until an admin turns it on, and nothing is added to .env.
Highlights
- Device sign-in for the mobile and TV apps (
2d9f2fc1a, #2526) - an app shows a short code such asBDKF-QRTWand a QR code; you approve it at/deviceon the OpenAlgo web and tick what the device may do: Market data, Account, Trading (never ticked for you) and Charts. The device never sees your API key. Approving needs a password check within the last 10 minutes, and a request from a different network than your browser must have its code typed in, so a link someone sends you is a dead end. A signed-in device gets 15-minute access tokens that work on/api/v1and on the WebSocket feed, renewed with rotating refresh tokens that OpenAlgo keeps only as digests keyed toAPI_KEY_PEPPER. Every/api/v1endpoint has a permission, and anything unlisted is refused. Your API key keeps working exactly as before for TradingView, Amibroker, ChartInk, Excel, Python and everything else. - Admin, Device sign-in (
2d9f2fc1a, #2526) -/admin/device-sign-inturns device sign-in on and off, allows or stops devices trading, and sets the trusted proxies and client IP header for an install behind nginx, Docker or a tunnel. The settings live in the database and apply without a restart. It is off on a new install and after an upgrade. Turning it off closes every device's live feed at once but signs no device out, so they carry on when it is turned back on. An app that finds it off says so and points the admin to this page. - Connected devices (
2d9f2fc1a, #2526) -/deviceslists every signed-in device with its permissions and when and from where it was last used, and signs out one device or all of them. A password change or reset, on the web or withupgrade/reset_admin_password.py, also signs out every device, and so doesupgrade/rotate_pepper.py. - Chart sync (
2d9f2fc1a, #2526) -/tradingsaves its chart setup to the server a moment after you change it: studies and their settings, chart settings, drawings and OpenScript studies, for the preset grid and each named workspace. A device given Charts reads it each time its app opens. Custom JavaScript indicators stay on the web in this release. A saved setup is checked for credentials before a device can read it, and a module whose bytes hold an API key is never listed. - The order logs never store an API key (
2d9f2fc1a, #2526). - Angel master contract (
00cc90076, #2515) - a failed download, a non-200 reply or an empty file now keeps the existing symbols instead of parsing a stale file, the delete and insert run in one transaction so a live refresh never shows an empty table, and the status reads error instead of success. CDS, MCX and BFO option symbols keep a decimal strike (EURUSD 1.05 was read as 15), and CDS tick sizes are right (USDINR 0.0025 read as 250). - Zerodha and Fyers master contracts (
31a37b789, #2516) - a failed refresh keeps the existing symbols and reports error, with the delete and insert in one transaction. Fyers reads every segment file before anything is deleted, and 46 older indices no longer carry a blank expiry. - Flattrade tick sizes (
702153110, #2508) - Flattrade's symbol files have no tick size, so every contract got a fixed one and a contract that ticks in 0.10, such as NATGASMINI on MCX, was offered prices Flattrade rejected. Tick sizes now come from Shoonya's symbol files, which run on the same OMS. - Dhan feed no longer freezes (
f83592a0b, #2509, issue #2502) - a padding packet shorter than its own header made the feed's receive thread spin forever, freezing prices and blocking the reconnect. The parser now stops on it. - nginx HTTP/2 directive (
517340b83, #2519) - the installers writehttp2 on;on nginx 1.25.1 and later, songinx -tand reloads no longer print a deprecation warning for every site; older nginx keeps the old syntax.
Upgrade notes
- Run
cd upgrade && uv run migrate_all.py.migrate_device_auth.pyis required: the upgrade stops if it fails.migrate_chart_sync.pyis not, because OpenAlgo creates its tables at startup. Both only add new tables, so nothing is backfilled and they are safe to run again. - To use the mobile or TV app, turn device sign-in on in Admin, Device sign-in. Inside Docker behind the installer's nginx, the page offers to trust the Docker gateway with one button; until then every device appears to come from the gateway's address.
- The Admin page needs you logged in to OpenAlgo with a broker session, like every Admin page. Approving a device at
/deviceneeds only your OpenAlgo login. .envlinesDEVICE_AUTH_ENABLED,DEVICE_AUTH_WRITE_ENABLED,DEVICE_AUTH_TRUSTED_PROXIESandDEVICE_AUTH_CLIENT_IP_HEADERfrom a pre-release build are ignored and may be deleted.- Rotating
API_KEY_PEPPERnow also signs out every device; each signs in again from its app.
Dependencies
- No dependencies changed.
Contributors
- @marketcalls - device sign-in, Admin, Device sign-in, Connected devices and chart sync (#2526), and the release.
- @Kalaiviswa - Flattrade tick sizes (#2508), Angel master contract and CDS values (#2515), and Zerodha and Fyers master contract refreshes (#2516).
- @santhiprakash (Santhi Prakash) - the Dhan feed parser (#2509, issue #2502).
- @aravindgandavadi (Aravind Gandavadi) - the nginx HTTP/2 directive in the installers (#2519).
Links