Helper Utilities

The FMP Node Wrapper includes a comprehensive set of helper utilities to enhance your development experience, provide better error handling, and simplify common financial data processing tasks.

Available Helper Categories

API Exploration Helpers (FMPHelpers)

Discover and explore the available API methods at runtime.

TypeScriptTypeScript

Validation Helpers (FMPValidation)

Validate parameters and API responses with comprehensive error checking.

TypeScriptTypeScript

Utility Helpers (FMPUtils)

Format and process financial data with common utilities.

TypeScriptTypeScript

Debug Helpers (FMPDebug)

Enhanced debugging and development tools.

TypeScriptTypeScript

Environment Variables

The debug helpers support the following environment variables:

  • FMP_DEBUG=true - Enable debug mode
  • NODE_ENV=development - Enable development logging

Error Handling with Helpers

Combine validation and error handling for robust applications:

TypeScriptTypeScript

Batch Processing Example

Use utilities for efficient batch processing:

TypeScriptTypeScript

Best Practices

  1. Use validation helpers to catch errors early and provide better error messages
  2. Format data consistently using utility helpers for better user experience
  3. Enable debug mode during development for better troubleshooting
  4. Use batch processing for multiple API calls to respect rate limits
  5. Implement retry logic for transient failures using retry helpers

Type Safety

All helper utilities are fully typed and provide excellent TypeScript support:

TypeScriptTypeScript

The helper utilities enhance the FMP Node Wrapper with powerful tools for validation, formatting, debugging, and API exploration while maintaining the library's TypeScript-first approach.