API Reference
Auto-generated TypeDoc documentation for the three shared packages:
@fxflow/types, @fxflow/shared, and @fxflow/db.
@fxflow/types
Shared TypeScript contracts — DTOs, WebSocket message types, enums, API response shapes.
@fxflow/shared
Pure utilities — market hours, pip math, zone detection, trend analysis, technical indicators.
@fxflow/db
Prisma ORM services — 24 domain-specific service files, encryption, database client.
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 typesApiResponse<T>— Standard API response wrapperAI_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 scoringdetectTrend()— Market structure and trend analysiscomputeRSI(),computeMACD(),computeEMA()— Technical indicatorsisMarketExpectedOpen()— Forex market hours utilitiesgetPipSize(),priceToPips()— Pip calculation helpers
@fxflow/db
- 24 service files with domain-specific database operations
getDb()— Lazy-initialized Prisma client singletonencrypt()/decrypt()— AES-256-GCM credential encryptionenrichSource()— Maps trade source to display labels