Security
Last updated 28 November 2026.
Stockrules reads your investments so it can check them against the rules you set. This page says, in plain English, what we store, how your broker keys are protected, and what you can do about it. The privacy policy has the full legal detail.
What we store
- Your account: your email address and a salted hash of your password (PBKDF2-SHA-256), never the password itself. Signing in sets one HttpOnly cookie; only a hash of its token is stored, and it expires after 30 days.
- Your portfolio: the holdings, trades, dividends, cash and prices you import or type in, and your own thesis, plans, goal, rules, alerts and decision log.
- Broker and data keys, if you connect them: the Trading 212 API key and secret, the Interactive Brokers Flex token and query ID, or your own market data key. These are always encrypted (below).
- Claude connection, if you connect your own Claude: its access tokens, stored only as hashes.
We never ask for your broker password or login, your bank details or your National Insurance number.
How broker keys are encrypted
- Every key is encrypted before it is saved, with AES-256-GCM and a fresh random value for each one. There is no unencrypted copy in the database.
- The encryption key is a separate secret held by our hosting provider (Cloudflare) outside the database, kept for nothing else. A copy of the database on its own can’t open your keys.
- A key is only decrypted on our server, at the moment it is used to read your account. It is never sent back to your browser: the app shows only its last four characters (for example ••••a1b2) so you can tell which key is connected.
- Error messages from your broker are cleaned of your key before they are saved or shown, and keys are left out of your data export.
- Nightly backups of the database are encrypted too, and kept for 30 days.
Use read-only keys
Stockrules only ever reads. It never places trades, cancels orders or moves money, so it never needs a key that can.
- Trading 212: when you create the API key, allow only Account data, History and Portfolio. Don’t allow any permission that places or cancels orders.
- Interactive Brokers: a Flex Web Service token can only fetch the reports you set up in a Flex Query. It can’t trade.
- Market data keys (EODHD, Alpaca): Stockrules uses these only to fetch prices for the shares you hold.
How to revoke a key
- In Stockrules, open Connections and choose Disconnect. The encrypted key is deleted straight away. What was already imported stays in your portfolio until you remove it.
- At your broker, delete the key as well: in the Trading 212 app, under Settings → API (Beta); in Interactive Brokers Client Portal, under Performance & Reports → Flex Queries → Flex Web Service Configuration, where you can turn the service off or generate a new token. Once you do this, the old key stops working everywhere, including any copy in a backup.
Export or delete your data
Under Account and privacy you can download everything we hold about you as a file (without passwords, keys or token hashes), and delete your account. Deleting removes your data straight away. Encrypted backups are kept for up to 30 days, so deleted data disappears from them within 30 days. You can also disconnect Claude there; its tokens stop working at once.
Other protections
- Everything is sent over HTTPS.
- Sign-in and sign-up attempts are rate-limited.
- Your own Claude, if you connect it, can read your account and save reviews, plans, rules and decisions you ask it to. It can’t touch broker connections, trades, imports or deletes.
Not financial advice
Stockrules shows your portfolio against the rules and thesis you set yourself. It doesn’t tell you what to buy or sell, and tax figures are estimates, not tax advice.
Reporting a problem
If you think you’ve found a security issue, or that your account or a key has been misused, email admin@greenlanecorporation.com with “Security” in the subject. Please don’t test against other people’s accounts. We reply as soon as we can, and if a breach puts your data at risk we tell you and the ICO, as the privacy policy describes.