Torn Stock Alerts
← Back to app

Docs & Terms

What this app does with your Torn API key, what gets shared with other visitors, and the terms for using this site. Written in plain language on purpose — no legal team, just an honest account of how it works.

Overview

Torn Stock Alerts is a free, unofficial companion tool for the browser game Torn. By default, it checks prices in your browser while the page is open. You can optionally deploy your own Cloudflare Worker for scheduled checks and alerts while the page is closed; this project does not operate that Worker for you.

Two outside services are used, both directly from your own browser:

Torn's developers have approved this website for publication and use. It is independently developed and operated, not an official Torn service.

Get started

Once Torn confirms your API key, this guide walks through the basic setup. The app only reads game data; it never makes trades or other in-game changes.

  1. Connect a key. Open the key menu in the app and paste a Torn API key. A Public Only key is enough for stock prices and alerts. Choose Build a key for this app if you also want bank rates, automatic holdings, and your player-name greeting.
  2. Choose stocks and set alerts. Check a stock to watch it, then enter a price threshold or a percentage move. The percentage baseline is the current price when you set it.
  3. Choose how often to check. In Settings, set the polling interval. The tab must stay open for live checks; background browser tabs may be throttled.
  4. Turn on notifications. Allow browser notifications from the app if you want alerts while you're looking at another tab.
  5. For alerts while the page is closed, follow Background alerts to deploy your own Worker and connect it in Settings.
  6. Back up your watchlist. Copy its backup code or display a QR code to transfer it to another device. Your settings and watchlist are otherwise saved only in this browser.

You can optionally sync owned shares with a key that includes user: stocks, load real historical prices from Tornsy, and set a cash budget for buy suggestions.

Background alerts

The optional Worker polls Torn every five minutes and can send fixed-price and percentage threshold alerts while the site is closed. It does not run trades. Session high/low and dividend reminders still require the app to be open. The first setup and any later watchlist changes must be synced from the app.

  1. Install Node.js on your computer, open this repository in a terminal, and run npm install.
  2. Create push keys. Run npx web-push generate-vapid-keys --json. Keep the private key secret. Set VAPID_SUBJECT in wrangler.toml to a real mailto: address.
  3. Create Cloudflare storage. Run npx wrangler login, then npx wrangler kv namespace create BACKGROUND_STATE. Copy the returned namespace ID into wrangler.toml, replacing REPLACE_WITH_KV_NAMESPACE_ID.
  4. Prepare secrets locally. Run npx web-push generate-vapid-keys --json and keep both values private. Generate an access token with node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))". Create a local .env.production file with one dotenv entry per line named exactly TORN_API_KEY, VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, and BACKGROUND_TOKEN. Copy the VAPID values from the JSON's publicKey and privateKey properties into the corresponding uppercase names; do not paste the raw JSON object into this file. This filename is ignored by Git. Never commit or share it.
  5. Deploy with secrets. Run npm run worker:deploy -- --secrets-file .env.production. This uploads the code and secrets together. Copy the workers.dev URL shown by Wrangler.
  6. Connect the app. Open Settings and select Enable alerts while closed, then allow notifications. By default this uses the shared service with a secret generated on your device; only if you deployed your own Worker, open Advanced: use my own worker first and enter that Worker URL and token. The app uploads your watch thresholds and this device's push subscription to your Worker.

Your Torn key is not uploaded by the website; the Worker uses the separate key you entered as a Cloudflare secret. Cloudflare stores the watchlist and push subscription in your KV namespace. The Worker token is saved in this browser's local storage. Use Disable background alerts in the app to remove the remote watchlist and subscriptions. You can also revoke the Torn key from Torn and delete the Worker/KV resources from Cloudflare.

App guide

All the “?” help in the app leads here. These notes explain the controls and the information shown in each section.

The app is split into tabs: Stocks for watchlists and price checks, Portfolio for holdings and bank comparisons, Compare for relative price charts, Backup for moving your watchlist between devices, and Alerts for the alert log.

API key

A Public Only key is enough for stock prices and alerts. The app-specific key builder selects stock prices, bank rates, your stock holdings, and your basic profile name. The website stores its key on this device and sends it only to Torn's API. If you separately enable the optional Worker, you must add a Torn key as a Cloudflare secret so scheduled checks can reach Torn. Logging out of the website does not remove that Worker secret or stop its background checks.

Watching stocks and reading the list

Check a stock to watch it. Fixed “Notify below/above” prices trigger alerts at those prices. A percentage drop or rise uses the current price as its baseline when set, and alerts once it moves by that percentage. Leave fields blank to skip them.

Use Compare stocks to overlay up to five stocks as percentage changes over the selected graph range. Each line starts at that stock's first available price in the range, so different history coverage can mean different start times.

“This session” is the low and high observed by live checks since this tab was opened; it resets in a new session. The graph can include this browser's history, shared history, and (if loaded) Tornsy history, so its range can differ from the session range. “% of this session” describes where the current price falls between the session low and high; it is not a forecast.

“Watched only” filters out unchecked stocks. “Since last visit” compares the current price with the last saved visit. A new low/high badge means this check set a new record in the app's recorded data. Investor benefits are estimates based on Torn's descriptions and the shares entered. Active benefits pay out in increments; passive benefits require holding the needed shares for seven days. Enter your average buy price to see profit/loss, and “Last collected” to track the next active payout.

When a watched stock is near its session low and you have entered a budget, the app can suggest an affordable share count. Owned shares near a session high may show a “consider selling” signal. These are informational heuristics, not financial advice.

Prices, graphs, and alerts

Prices are requested directly from Torn's official API using your key in your browser. Nothing is sent anywhere else for the price check. “Sync my holdings” makes an additional call using the user: stocks selection to read your share counts; this is optional, and you can enter “You own” manually instead.

The session high/low shows the range observed since you started tracking in this app, not the stock's full history. Each stock's line graph shows price points recorded by the app, not Torn's full historical chart. If shared history is enabled, visitors' price points can be combined; otherwise the graph uses this browser's checks (plus any real history you manually loaded from Tornsy). The “Latest point recorded” timestamp is the time of the newest point in the graph; it does not mean a new price was recorded at every check.

Select Expand graph beneath a stock's sparkline to open a larger, touch-friendly chart. Move across the chart or use the left and right arrow keys to inspect a timestamp, price, and change from the first plotted point; tap or click to pin a point. The chart uses the graph range selected in Settings.

Buy suggestions are simple heuristics based on where the price sits in the range recorded here, not financial advice. Torn's stock market can move against any pattern. Alerts fire once when a threshold is crossed and re-arm after the price moves back between thresholds. Closing the app tab pauses price checks.

Settings

Holdings, backups, and alerts

Sync my holdings reads your share counts from Torn and fills in “You own.” It requires the user: stocks key selection; otherwise the app reports the issue and you can enter holdings manually.

In a watched stock's “Alerts & position” panel, choose a snooze duration to pause that stock's notifications and alert-log entries. Snoozing is local to that stock and saved with the watchlist; resume early at any time. Price thresholds still update while snoozed, so a threshold crossed during the pause won't send a delayed notification afterward.

Your watchlist is local to this browser. Copy a backup code or QR code to transfer it to another device. QR scanning requires camera permission and HTTPS.

Alert history lists the latest 50 price, percentage, session high/low, and dividend alerts; clearing the history does not change your alert settings.

Payout per increment is the cash amount paid each time an active investor benefit pays out. The app may suggest an amount based on Torn's description, but verify it in-game; this value feeds the income summary and “what to buy next” ranking.

API key usage

Your Torn API key is what lets this app read live data from Torn on your behalf. Here's exactly what it's used for and how it's handled.

Where it's stored

The website saves its key only in this browser's local storage and sends it only to api.torn.com. If you enable background alerts, you separately add a Torn key as a Cloudflare Worker secret; the website does not upload its saved key. Clearing browser data or using "Log out" removes the website's saved key, but does not remove a separately configured Worker secret.

What it's used to fetch

SelectionWhat it's used for
torn: stocksLive prices for every stock, shown in the list and used for alerts.
torn: bankCurrent city bank interest rates, shown in the bank comparator.
user: stocksYour own share holdings, to auto-fill "shares owned" instead of typing it in.
user: basicYour player name, only to show a "Welcome back" message.

A Public Only key covers prices, bank rates, and alerts — that's all most people need. The "Build a key for this app" button in the key menu creates a key with exactly these four selections and nothing more, rather than a broader key with access this app doesn't use.

What it's never used for

Data & sharing

The price graphs on each stock can pull from two extra sources beyond your own browser's history, in addition to real historical data:

Shared price history (Firebase)

Every browser using this app can contribute price checks to a shared pool, so graphs fill in faster than any one person could alone. Only a timestamp and a price are ever written — never your name, your key, your holdings, or any other identifying information. The database's rules enforce this at the server level: any submission with extra fields is rejected outright, and nothing outside the shared price-history path is readable or writable by anyone.

Real historical prices (Tornsy)

The "Load real price history" button in Settings fetches historical prices from Tornsy.com, a free, public, community-run API that requires no key. This only happens when you click that button — nothing is fetched automatically or on a schedule. It's purely reading already-published price data.

What stays local only

If you enable background alerts, the selected watch thresholds and browser push subscription are sent to the Worker and stored in your Cloudflare KV namespace. They are not shared with other visitors or with this app's developer.

Terms of Service

No warranty, no guarantees

This is a free, unofficial hobby project. It's provided "as is," with no guarantee it will be accurate, available, or error-free. Prices, alerts, projections, and calculations may be wrong, delayed, or missing. Don't rely on it as your only source for decisions involving real in-game money.

Your responsibility

Independent project and approval

Torn's developers have approved this website for publication and use. The app remains independently developed and operated; this approval does not mean Torn operates or warrants the service.

Changes

This app, its features, and these terms may change at any time without notice, since it's maintained as a free hobby project rather than a commercial product.

Contact

This is a personal project without a formal support channel. Use the source repository for issues or questions.

License

© 2026 Bagobo [3009144]. The Torn Stock Alerts source code is licensed under the GNU General Public License, version 3 only. You may copy, distribute, and modify it under the terms in the GNU GPL v3 license text.

The license is provided as-is, without warranty. Torn Stock Alerts is independently developed and operated; Torn's approval for publication and use does not make Torn responsible for the app or its availability.