Skip to main content

Quick Setup Guide

Get your portfolio up and running in just a few minutes.

Step 1: Get Your Finnhub API Key

1

Register

Go to Finnhub.io and sign up for a free account
2

Get API Key

After logging in, copy your API key from the dashboard

Step 2: Configure the API Key

Add your Finnhub API key to the .env.docker file (or .env if running locally):
.env.docker
FINNHUB_API_KEY=your_api_key_here
The .env.docker file already has a placeholder for the API key.

Step 3: Deploy/Restart the Application

If you’re already running the application, restart it to load the new environment variable:
docker compose down
docker compose up -d
For first-time deployment:
./deploy.sh

Step 4: Apply Database Schema

The portfolio holdings table needs to be created in your database:
# Access the database container
docker compose exec postgres psql -U trading_user -d mining_wood

# Run the schema file
\i /docker-entrypoint-initdb.d/portfolio_schema.sql

# Or run it directly from the host
docker compose exec -T postgres psql -U trading_user -d mining_wood < database_init/portfolio_schema.sql

Step 5: Access the Portfolio Page

1

Open your browser

Navigate to http://localhost:8080
2

Go to Portfolio

You should be redirected to the Portfolio Management page (now the default landing page)
3

Check for errors

If you see an error, check the application logs:
docker compose logs -f trading_app

Step 6: Add Your First Holding

Option A: Manual Entry

1

Click Add Holding

Click the “Add Holding” button
2

Fill in the form

  • Symbol: Enter a stock ticker (e.g., AAPL)
  • Type: Select “stock”, “etf”, or “mutual_fund”
  • Shares: Enter the number of shares you own
  • Average Cost: Enter your average cost per share
  • Notes: (Optional) Add any notes
3

Save

Click “Save”

Option B: CSV Upload

1

Prepare CSV file

Create a CSV file with your holdings:
symbol,type,shares,average_cost,notes
AAPL,stock,100,150.50,Apple Inc
MSFT,stock,50,300.00,Microsoft
VOO,etf,25,400.00,S&P 500 ETF
2

Upload

  • Click the “Upload CSV” button
  • Select your CSV file
  • Click “Upload”

Step 7: Refresh Prices

Click the “Refresh Prices” button to fetch current market prices from Finnhub for all your holdings.

Troubleshooting

Solution: Verify your API key is set correctly in .env.docker and you’ve restarted the containers.
# Check if environment variable is loaded
docker compose exec trading_app env | grep FINNHUB
Solution: Run the portfolio schema script:
docker compose exec -T postgres psql -U trading_user -d mining_wood < database_init/portfolio_schema.sql
Solution: Make sure your CSV file has the correct format with columns: symbol, type, shares, average_cost, notes
Solution: Check the logs for errors:
docker compose logs -f trading_app

Next Steps