Skip to main content

Overview

The Trading Analysis Dashboard exposes a RESTful API for accessing trading data, portfolio holdings, and performance metrics programmatically. The API powers the web interface and can be used to build custom integrations or automation tools.

Live Application

Visit the Trading Analysis Dashboard at performance.miningwood.com

Base URL

For local development:

Authentication

All API endpoints require authentication via Google OAuth 2.0. The API uses session-based authentication with HTTP-only cookies set after successful OAuth login.
See the Authentication guide for details on the OAuth flow and session management.

API Categories

Trading Data

Access monthly trading data, P&L reports, and individual trade details

Symbols

Get symbol lists, trading statistics, and detailed performance data

Calendar

View daily trading activity, export reports, and market metrics

Portfolio

Manage portfolio holdings and trigger price updates

Data Import

Upload CSV files and view import history

Timeframe Analysis

Query trading performance across custom date ranges

Authentication

OAuth endpoints and session management

Health Checks

Monitor application health and readiness

Response Format

All API responses return JSON with a consistent structure:

Success Response

Error Response

Common Response Fields

HTTP Status Codes

The API uses standard HTTP status codes:

Rate Limiting

The API does not currently implement rate limiting, but the Finnhub price refresh endpoint is subject to Finnhub’s API rate limits (60 requests/minute for free tier).

Data Types

Date Formats

  • Months: YYYY-MM format (e.g., "2024-08")
  • Dates: YYYY-MM-DD format (e.g., "2024-08-15")
  • Timestamps: ISO 8601 format (e.g., "2024-08-15T14:30:00Z")

Numeric Values

  • Prices: Decimal with 2-4 decimal places
  • Shares: Integer or decimal (supports fractional shares)
  • P&L Values: Decimal with 2 decimal places (can be negative)
  • Percentages: Decimal (e.g., 0.1523 for 15.23%)

Example Usage

Fetch Available Trading Months

Get Portfolio Holdings

Analyze Custom Timeframe

Client Libraries

The API can be accessed using any HTTP client library:

Data Models

Trade Object

Holding Object

Month Summary Object

Error Handling

Always check the success field before processing response data:

Next Steps

Health Checks

Application monitoring and health endpoints

Authentication

Learn about OAuth flow and session management

Trading Data

Explore trading data endpoints

Symbols

Symbol lists and performance data

Portfolio API

Manage portfolio holdings

Calendar

Daily activity and export reports

Data Import

Upload and track CSV imports

Timeframe Analysis

Query custom date ranges