FX endpoint
Seasonality
How a pair has behaved in each calendar month, as a quick seasonal check before a trade.
No API key required.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.fxmacrodata.com/v1/seasonality/eurusd"
import os
import requests
response = requests.get(
"https://api.fxmacrodata.com/v1/seasonality/eurusd",
headers={"X-API-Key": os.environ["FXMACRODATA_API_KEY"]},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.fxmacrodata.com/v1/seasonality/eurusd", {
headers: { "X-API-Key": process.env.FXMACRODATA_API_KEY },
});
const payload = await response.json();
console.log(payload);
What it can do
1 route in this endpoint
Reference
Parameters and response fields
GET /v1/seasonality/{instrument} Get monthly FX or XAU/USD seasonality
No API key required.
Return monthly return seasonality for an FX pair or XAU/USD over 2 to 30 years: average and median return, win rate, best and worst month, with the yearly returns behind them.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
| instrumentRequired | path | string | Six-letter pair such as EURUSD, AUDUSD, or XAUUSD. |
| end_date | query | string | Inclusive upper bound, YYYY-MM-DD. Defaults to today. |
| lookback_years | query | integer | Number of years to include in the monthly seasonality sample. Default: 10. |
| month | query | string | Optional month filter, 1-12 or name such as July. |
| api_key | query | string | Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header. |
| lang | query | string | Optional language for names and labels, for example es or pt-BR. A regional tag falls back to its base language, and a language that is not yet available returns English with Content-Language: en. Translated fields keep the English text in <field>_original and add a <field>_localized flag. Slugs, field names, codes, dates and values never change. Omit it for English. |
Response fields
| Field | Type | Details |
|---|---|---|
| instrument | string | |
| base | string | |
| quote | string | |
| source | string | |
| provenance | object | Publisher and source lineage, shared by the market-data endpoints. |
| provenance.publisher | string | |
| provenance.publisher_url | string | |
| provenance.storage | string | Data provider label for the served series. Always FXMacroData. |
| provenance.source_store | string | Source series reference, when reported. |
| provenance.served_by | string | FXMacroData endpoint that serves this series. |
| provenance.timestamp_field | string | |
| provenance.value_field | string | |
| start_date | string | |
| end_date | string | |
| lookback_years | integer | |
| month | integer | |
| data_quality | object | |
| data_quality.source_freshness | string | |
| data_quality.source_monitoring_complete | boolean | |
| data_quality.known_source_gap | boolean | |
| data_quality.source_checked_at | integer | |
| data_quality.source_check_expires_at | integer | |
| data_quality.latest_published_period | string | |
| data_quality.source_permission_status | string | |
| data_quality.commodity_coverage | object | |
| data_quality.commodity_coverage.scope | string | |
| data_quality.commodity_coverage.requested_start | string | |
| data_quality.commodity_coverage.requested_end | string | |
| data_quality.commodity_coverage.available_start | string | |
| data_quality.commodity_coverage.available_end | string | |
| data_quality.commodity_coverage.input_row_count | integer | |
| data_quality.commodity_coverage.row_count | integer | |
| data_quality.commodity_coverage.distinct_date_count | integer | |
| data_quality.commodity_coverage.duplicate_date_row_count | integer | |
| data_quality.commodity_coverage.excluded_weekend_row_count | integer | |
| data_quality.commodity_coverage.invalid_date_row_count | integer |
Works well with
Endpoints people use alongside Seasonality
The whole API
All 24 endpoint guides
Rates and markets