Skip to content

africamonkey/StockDisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

133 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StockDisplay

A minimal iOS dashboard for tracking real-time stock prices with custom API support.

Stock.Display.New.iOS.App.mp4
Image Image

Features

  • Real-time stock prices - Track multiple stocks with live price updates
  • Custom API support - Use Yahoo Finance or configure your own API endpoint
  • Configurable refresh - Auto-refresh every 10s, 30s, 1min, 5min, or manual
  • Multiple data sources - Support different API providers for different stocks
  • Light/Dark theme - Follows system appearance or choose your preference
  • Adjustable font size - Small, Medium, Large, Extra Large
  • Keep screen on - Prevent screen dimming while viewing
  • Import/Export config - Backup and restore your stock list via JSON files

Installation

Build from Source

  1. Clone the repository
  2. Open StockDisplay.xcodeproj in Xcode
  3. Select an iOS Simulator (iOS 17.0+)
  4. Press Cmd + R to build and run

Requirements

  • iOS 17.0 or later
  • Xcode 15.0 or later

Usage

Adding a Stock

  1. Tap the gear icon in the top-right corner
  2. Tap + to add a new stock
  3. Select a Data Source (or create a new one)
  4. Enter the stock Name and Symbol/Code
  5. Choose a Refresh Interval
  6. Tap Save

Data Sources

StockDisplay uses Data Sources to fetch stock prices. Each data source defines:

  • API URL - The endpoint URL (use {code} as a placeholder for the stock symbol)
  • Price JSON Path - Dot-notation path to extract the price (e.g., chart.result[0].meta.regularMarketPrice)
  • Change JSON Path - Dot-notation path to extract the price change (e.g., chart.result[0].meta.regularMarketChangePercent)

Custom Data Source

To use a custom API:

  1. Go to Settings β†’ Data Sources
  2. Tap + to add a new data source
  3. Enter a Name for the data source
  4. Enter the full API URL (use {code} for the stock symbol)
  5. Enter the JSON paths for price and change values
  6. Save

Import/Export

Export your stock configuration to share or backup:

  1. Go to Settings β†’ Config File
  2. Tap Export to save your stocks and data sources as JSON
  3. Tap Import to load a previously exported configuration

Settings

Setting Description
Theme System, Light, or Dark
Font Size Small, Medium, Large, Extra Large
Keep Screen On Prevent screen dimming
Data Sources Manage API configurations
Stocks View, edit, delete stocks
About GitHub repo, Donation, App info

About

Item Description
GitHub africamonkey/StockDisplay
Donate Support development via in-app purchase (1元、10元、30元、100ε…ƒ)
Version Displayed in Settings β†’ About

Architecture

Built with native iOS technologies:

  • SwiftUI - Modern declarative UI framework
  • SwiftData - Persistent storage for stocks and settings
  • async/await - Asynchronous data fetching
  • URLSession - Network requests

File Structure

StockDisplay/
β”œβ”€β”€ StockDisplayApp.swift      # App entry point
β”œβ”€β”€ ContentView.swift          # Root view
β”œβ”€β”€ Views/
β”‚   β”œβ”€β”€ DashboardView.swift    # Main stock list
β”‚   β”œβ”€β”€ StockCardView.swift    # Individual stock card
β”‚   β”œβ”€β”€ SettingsView.swift     # Settings screen
β”‚   β”œβ”€β”€ AddEditStockView.swift # Add/edit stock form
β”‚   β”œβ”€β”€ AppearanceSettingsView.swift
β”‚   β”œβ”€β”€ ConfigFileSettingsView.swift
β”‚   β”œβ”€β”€ DataSourceEditorView.swift
β”‚   β”œβ”€β”€ AboutView.swift           # About screen
β”‚   └── DonationView.swift        # Donation sheet
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ StockConfig.swift      # Stock data model
β”‚   └── DataSourceConfig.swift # API configuration model
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ StockAPIService.swift  # API fetching logic
β”‚   └── DonationManager.swift   # StoreKit donation handling
└── Utils/
    β”œβ”€β”€ JSONPath.swift         # JSON path extraction
    β”œβ”€β”€ LocaleManager.swift    # Localization
    └── FontScale.swift        # Font scaling

License

MIT License - see LICENSE

About

Your Stocks, Your Way. Track prices with custom APIs, personalized themes, and real-time updates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages