Pocket PortfolioPocket Portfolio.

How to Use Google Drive as a Stock Database

Pocket Portfolio's Sovereign Sync turns your Google Drive into a personal database for your portfolio. Own your data, sync bidirectionally, and edit trades in JSON or Excel—all with zero vendor lock-in.

What is Sovereign Sync?

Sovereign Sync is Pocket Portfolio's bidirectional Google Drive integration that gives you complete control over your financial data. Instead of storing your portfolio in a proprietary database, your trades live in a JSON file on your Google Drive—making it your database.

Key Features

  • Bidirectional Sync: Changes in Pocket Portfolio sync to Drive, and edits in Drive sync back to the app—in real-time.
  • JSON Data Ownership: Your portfolio is stored as pocket_portfolio_db.json—a human-readable, developer-friendly format.
  • Zero Vendor Lock-in: Your data lives in your Drive. Export, edit, or migrate anytime—no proprietary formats.
  • Developer-Friendly: Edit trades programmatically, use version control, or integrate with other tools.
  • Privacy-First: We only access files created by Pocket Portfolio. Your data remains private.

How It Works

  1. Connect Google Drive: In Settings, click "Connect Google Drive" and authorize Pocket Portfolio to create a folder in your Drive.
  2. Automatic Sync: Your portfolio data is stored in pocket_portfolio_db.json. Changes sync every 5 seconds.
  3. Edit Anywhere: Open the JSON file in VS Code, Notepad++, or any text editor. Make changes, save, and they sync back to Pocket Portfolio.
  4. Multi-Device Access: Open Pocket Portfolio on another device, and it automatically pulls the latest data from Drive.
⚠️

Important: JSON File Format

Do not open pocket_portfolio_db.json with Google Sheets or Excel. These tools will convert the file and break the sync. Always use a text editor (VS Code, Sublime, Notepad++) for editing.

Use Cases

🛠️ Developer Workflow

Edit trades programmatically, use Git for version control, or integrate with your own tools via the JSON API.

📊 Bulk Editing

Make bulk changes to trades in a text editor, then sync back to Pocket Portfolio instantly.

🔄 Multi-Device Sync

Access your portfolio from any device. Changes sync automatically across all your devices.

🔐 Data Sovereignty

Your data lives in your Google Drive. No vendor lock-in, no proprietary formats—complete ownership.

Getting Started

Sovereign Sync is available for Corporate Sponsors and Founders Club members. Upgrade to unlock this feature and take control of your financial data.

Upgrade to Unlock →Go to Settings

Frequently Asked Questions

Can I edit the JSON file directly?

Yes! That's the whole point. Open pocket_portfolio_db.json in any text editor, make changes, and they'll sync back to Pocket Portfolio within 5 seconds.

What happens if I break the JSON syntax?

Pocket Portfolio will detect invalid JSON and pause syncing to protect your local data. You'll see a warning message, and your local trades remain safe. Fix the JSON syntax in Drive, and sync will resume automatically.

Can I use Excel instead of JSON?

The primary sync file is JSON. However, you can optionally enable Excel export (pocket_view.xlsx) for viewing in Google Sheets—but this is read-only. To edit trades, use the JSON file.

Is my data secure?

Yes. Pocket Portfolio only accesses files it creates in your Google Drive. Your data remains private and is stored in your own Drive account. We never see your portfolio data.

How do I get started?

Upgrade to Corporate Sponsor or Founders Club, then go to Settings → Data Sovereignty & Sync → Connect Google Drive. The setup takes less than a minute.