Expand description
Forex Factory Calendar Scraper Library
This library provides functionality to scrape economic event data from the Forex Factory calendar website.
§Example
ⓘ
use forex_factory::{CalendarService, EventQuery, Impact, Result};
async fn fetch_events() -> Result<()> {
let service = CalendarService::new()?;
// Get all events for this week
let events = service.get_week_events().await?;
// Query with filters
let query = EventQuery::new()
.with_currency_pair("EUR/USD")
.with_min_impact(Impact::Medium);
let filtered = service.query_events(&query).await?;
Ok(())
}Structs§
- Calendar
Parser - Parses Forex Factory calendar HTML into structured events.
- Calendar
Service - High-level service for fetching and querying economic events.
- Economic
Event - An economic event from the Forex Factory calendar.
- Event
Query - Query parameters for filtering economic events.
- Http
Calendar Fetcher - Fetches the raw HTML content from Forex Factory calendar page using HTTP.
Enums§
- Error
- Errors that can occur when using the forex-factory library.
- Impact
- Impact level of an economic event on the market. Forex Factory uses Low (yellow), Medium (orange), High (red).
Functions§
- resolve_
currency - Resolve a currency input to its ISO 4217 code.
Type Aliases§
- Result
- Result type alias for forex-factory operations.