🚀 Welcome to forex_data Documentation
forex_data is a powerful, professional-grade Python library for aggregating and managing Forex market data in standardized OHLC (Open, High, Low, Close) format. It provides a unified, elegant interface for both historical and real-time data sources, making it effortless to work with multiple data providers and timeframes.
Important
🎯 The Perfect Combination: This package uniquely bridges historical data (20+ years of market history) with real-time updates, giving you comprehensive market coverage through a single, intuitive API.
Tip
New to forex_data? Start with our Quick Start guide to be up and running in minutes!
Key Features
📊 Unified OHLC Format: All data sources return consistent timestamp, open, high, low, close format
🕐 Multiple Timeframes: Easily aggregate data into any timeframe (1m, 5m, 1h, 1D, 1W, etc.)
📈 Historical Data: Access 20+ years of historical data from sources like histdata.com
⚡ Real-time Data: Get up-to-date market data from Alpha Vantage and Polygon.io
🔍 Conditional Filtering: Filter data directly during retrieval with SQL-like conditions
🚀 High Performance: Built on Polars, PyArrow, or Pandas for lightning-fast data processing
💾 Smart Caching: Intelligent data caching for optimal performance
📉 Built-in Plotting: Visualize candlestick charts with ease
Quick Example
from forex_data import HistoricalManagerDB
# Create a historical data manager
manager = HistoricalManagerDB(
config='data_config.yaml'
)
# Get hourly data for a date range
data = manager.get_data(
ticker='NZDUSD',
timeframe='1h',
start='2020-01-01',
end='2020-12-31'
)
# Plot the data
manager.plot(
ticker='NZDUSD',
timeframe='1D',
start_date='2020-01-01',
end_date='2020-12-31'
)
Documentation Contents
User Guide
API Reference
Additional Information