API Reference

Auto-generated TypeDoc documentation for the three shared packages: @fxflow/types, @fxflow/shared, and @fxflow/db.


Generating API Docs Locally

To regenerate the API documentation from source:

pnpm docs:api

This runs TypeDoc across all three packages and outputs HTML to docs/api/. The GitHub Pages deployment workflow automatically runs this and copies the output into the site.

Key Exports

@fxflow/types

  • DaemonMessageType — 50+ discriminated WebSocket message types
  • ApiResponse<T> — Standard API response wrapper
  • AI_MODEL_OPTIONS — Available Claude models with per-token pricing
  • Trade, Position, Signal, Zone, Trend, Condition interfaces

@fxflow/shared

  • detectZones() / scoreZoneExtended() — Supply/demand zone detection and scoring
  • detectTrend() — Market structure and trend analysis
  • computeRSI(), computeMACD(), computeEMA() — Technical indicators
  • isMarketExpectedOpen() — Forex market hours utilities
  • getPipSize(), priceToPips() — Pip calculation helpers

@fxflow/db

  • 24 service files with domain-specific database operations
  • getDb() — Lazy-initialized Prisma client singleton
  • encrypt() / decrypt() — AES-256-GCM credential encryption
  • enrichSource() — Maps trade source to display labels