Myfxbook APImyfxbook.com ↗
Access Myfxbook economic calendar events, central bank interest rates, market hours, and holiday data via a structured JSON API with 9 endpoints.
What is the Myfxbook API?
The Myfxbook API provides 9 endpoints covering forex-relevant economic data: calendar events by period, date, or country; central bank interest rates; major session market hours; and bank holiday schedules. The get_event_history endpoint returns paginated historical release records with previous, consensus, and actual values for any tracked indicator, making it straightforward to build backtesting datasets or economic surprise models.
curl -X GET 'https://api.parse.bot/scraper/09664a39-3a46-41b8-852d-1286994ec995/get_economic_calendar?period=yesterday' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace myfxbook-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.myfxbook_economic_calendar_api import Myfxbook, Period, CalendarEvent, EventDetail, InterestRate, MarketSchedule, Holiday
client = Myfxbook()
# List today's calendar events using the Period enum
for event in client.calendarevents.list_by_period(period=Period.TODAY):
print(event.event_name, event.country, event.impact, event.actual)
# List events for next week
for event in client.calendarevents.list_by_period(period=Period.NEXT_WEEK):
print(event.event_name, event.currency, event.consensus)
# Search for GDP-related events
for event in client.calendarevents.search(query="GDP"):
print(event.event_name, event.currency, event.consensus)
# Get event detail and walk its history sub-resource
detail = client.eventdetails.get(country_slug="united-states", event_slug="initial-jobless-claims")
print(detail.event_name, detail.impact, detail.event_id)
for release in detail.history.list():
print(release.date, release.time, release.actual, release.consensus)
# List interest rates from central banks
for rate in client.interestrates.list():
print(rate.country, rate.central_bank_abbr, rate.current_rate, rate.change)
# Get market session schedule
schedule = client.marketschedules.get()
print(schedule.liquidity_average)
for session in schedule.sessions:
print(session.day, session.market, session.open_time, session.close_time)
# List holidays for the current week
for holiday in client.holidays.list():
print(holiday.holiday_name, holiday.country, holiday.currency)
Fetch economic calendar events for a named time window. Returns all scheduled and released events within the chosen period including country, currency, impact level, and consensus/actual values. Periods cover rolling calendar windows relative to today.
| Param | Type | Description |
|---|---|---|
| period | string | Time period for calendar events. |
{
"type": "object",
"fields": {
"items": "array of CalendarEvent objects with id, date, datetime, time, country, currency, event_name, event_url, impact, previous, consensus, actual"
},
"sample": {
"data": {
"items": [
{
"id": "305318",
"date": "Wednesday, Jun 10, 2026",
"time": "Jun 10, 01:30",
"actual": "-3.4%",
"impact": "Low",
"country": "Australia",
"currency": "AUD",
"datetime": "2026-06-10 01:30:00.0",
"previous": "-10.5%",
"consensus": "-3.4%",
"event_url": "https://www.myfxbook.com/forex-economic-calendar/australia/building-permits-mom",
"event_name": "Building Permits MoM"
}
]
},
"status": "success"
}
}About the Myfxbook API
Economic Calendar Coverage
Three endpoints let you slice the economic calendar differently. get_economic_calendar accepts a period parameter (yesterday, today, tomorrow, this_week, next_week) for time-relative queries. get_economic_calendar_by_date takes an explicit date in YYYY-MM-DD format when you need a precise day. get_economic_calendar_by_country accepts a country_slug (e.g., united-states, japan) and returns a response object that includes country, description, and an events array. All three return the same event object shape in their data field, and all respond with a status of success.
Event Detail and History
get_event_detail takes both an event_slug (e.g., initial-jobless-claims) and a country_slug and returns event_name, event_slug, country, description, impact, and event_id. That event_id — which can be a negative integer — feeds directly into get_event_history, which returns paginated historical releases with date, time, previous, consensus, and actual fields per release. Alternatively, get_event_history can resolve the event_id internally if you supply event_slug and country_slug instead. Use the page parameter to walk through long histories.
Rates, Sessions, and Holidays
get_interest_rates returns an array of objects per country with central_bank_abbr, central_bank_name, current_rate, previous_rate, change, and last_meeting date — no inputs required. get_market_hours returns a markets object keyed by day label showing open/close times for Tokyo, Sydney, New York, and London sessions, plus a liquidityLastDayValueAverage field. get_holidays_calendar covers the current week and returns holiday records with date, time, country, currency, and holiday_name.
Search
search_economic_events accepts a free-text query (e.g., GDP, inflation, jobless) and searches across event names, countries, and currencies within next week's scheduled events, returning matching event objects in the same structure as the calendar endpoints.
The Myfxbook API is a managed, monitored endpoint for myfxbook.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when myfxbook.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official myfxbook.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build an economic surprise tracker by comparing
actualvsconsensusvalues fromget_event_history - Display an upcoming-events widget filtered by country using
get_economic_calendar_by_country - Populate a forex trading dashboard with live central bank rates from
get_interest_rates - Alert users before high-impact events by querying
get_economic_calendarwithperiod=todayand filtering on impact - Identify trading session overlaps using open/close times from
get_market_hours - Warn users about reduced liquidity days by checking
get_holidays_calendaragainst their trading calendar - Keyword-search scheduled releases with
search_economic_eventsto find all upcoming inflation-related announcements
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Myfxbook offer an official developer API?+
What does get_event_history actually return, and how far back does it go?+
data array includes date, time, previous, consensus, and actual for a single scheduled release of the event. Results are paginated using the page parameter. The depth of history depends on how many releases Myfxbook has recorded for that specific event — there is no documented cutoff date, but major indicators like GDP and CPI typically have multi-year histories available.Does the holidays calendar cover more than the current week?+
get_holidays_calendar returns only the current week's market and bank holidays. Future or past holiday data is not currently exposed by this API. You can fork it on Parse and revise it to add a date-range parameter for multi-week holiday lookups.Can I filter economic calendar results by impact level (e.g., high-impact only)?+
get_event_detail response, but the calendar endpoints (get_economic_calendar, get_economic_calendar_by_date, get_economic_calendar_by_country) do not accept an impact filter as an input parameter. Filtering by impact currently needs to be done client-side after retrieving results. You can fork the API on Parse and revise it to add server-side impact filtering.