FOREX APIforex.com ↗
Access live forex prices, pivot points, client sentiment, economic calendar events, and rollover rates from FOREX.com via a single REST API.
What is the FOREX API?
The FOREX.com API covers 7 endpoints that expose live currency pair prices, pivot point levels, client sentiment percentages, economic calendar events, and overnight rollover rates. The get_currency_pair_price endpoint returns bid, offer, spread, and price direction for any pair you query. Supporting endpoints cover popular pairs in bulk, instrument search across the FOREX.com US catalog, and daily/weekly/monthly pivot levels with S1–S3 and R1–R3 values.
curl -X GET 'https://api.parse.bot/scraper/f7008907-4ba2-4ad2-a866-43fa117143e4/get_currency_pair_price?pair=EUR+USD' \ -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 forex-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.
"""
FOREX.com API - Usage Example
Get your API key from: https://parse.bot/settings
"""
from parse_apis.forex_com_api import Forex, CurrencyPair, PivotPoint, Sentiment, EconomicEvent, Instrument
forex = Forex()
# Get a specific currency pair price
pair = forex.currencypairs.get(pair="EUR USD")
print(pair.product, pair.bid, pair.offer, pair.direction, pair.median_spread)
# List popular currency pairs
for cp in forex.currencypairs.list_popular():
print(cp.product, cp.bid, cp.offer, cp.direction)
# Get pivot points for a pair
pivot = forex.pivotpoints.get(pair="GBP USD")
print(pivot.pair, pivot.bid, pivot.offer, pivot.decimals)
for level in pivot.pivots:
print(level.period, level.pivot_point, level.s1, level.r1)
# Get client sentiment
for s in forex.sentiments.list():
print(s.underlying_name, s.long_customer_per, s.short_customer_per)
# Get economic calendar events
for event in forex.economicevents.list():
print(event.name, event.time, event.country, event.volatility)
# Get rollover rates
for rate in forex.rolloverrates.list():
print(rate.product, rate.bid, rate.offer)
# Search for instruments
for instr in forex.instruments.search(query="JPY"):
print(instr.title, instr.url, instr.page_type)
Fetch the current indicative price for a specific forex currency pair. Returns bid, offer, spread, and direction. Pair is normalized to space-separated format internally (e.g. 'EUR USD' or 'EUR/USD' both work).
| Param | Type | Description |
|---|---|---|
| pair | string | Currency pair separated by space or slash (e.g. 'EUR USD', 'GBP/USD', 'USD JPY'). |
{
"type": "object",
"fields": {
"Bid": "string, current bid price",
"Offer": "string, current offer/ask price",
"Product": "string, formatted pair name (e.g. 'EUR/USD')",
"Direction": "string, price direction (e.g. 'UP', 'DOWN')",
"MedianSpread": "string, median spread in pips"
},
"sample": {
"data": {
"Bid": "1.15382",
"Offer": "1.15392",
"Product": "EUR/USD",
"Direction": "DOWN",
"MedianSpread": "1.0"
},
"status": "success"
}
}About the FOREX API
Live Prices and Pair Lookup
The get_currency_pair_price endpoint accepts a pair parameter in flexible formats — space-separated (EUR USD), slash-delimited (GBP/USD), or fused — and returns four fields: Bid, Offer, Direction (UP or DOWN), and MedianSpread in pips. To pull prices for multiple major pairs at once without iterating, get_popular_currency_pairs returns the same four fields for each pair in a single response. For catalog discovery, search_instruments accepts any currency code (EUR, JPY, CHF, etc.) and returns matching instruments with title, description, url, pageType, and pageSubType, plus a total count.
Pivot Points and Technical Levels
get_pivot_points takes the same flexible pair input and returns a pivots array covering three periods: daily, weekly, and monthly. Each period object includes pivotPoint, high, low, close, lastUpdated, and all six support/resistance levels (S1, S2, S3, R1, R2, R3). The response also surfaces a decimals field indicating the precision for the pair, alongside the current bid and offer.
Sentiment, Calendar, and Rollover Rates
get_client_sentiment returns a rows array where each item holds underlying_name, long and short customer percentages (Long_Customer_PER, Short_Customer_PER), and long/short volume percentages (Long_VOL_PER, Short_VOL_PER) — useful for gauging positioning across major pairs. get_economic_calendar lists upcoming macro events with name, time, country, actual, consensus, previous, and volatility level. get_rollover_rates returns overnight swap rates as Bid and Offer per Product, covering major forex instruments.
Source and Coverage Notes
All endpoints reflect data from the FOREX.com US platform. Coverage is limited to forex instruments in that catalog; indices, commodities, and crypto listed elsewhere on FOREX.com are not included. The search_instruments endpoint works best with standard currency codes rather than full pair names.
The FOREX API is a managed, monitored endpoint for forex.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when forex.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 forex.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?+
- Display live bid/offer quotes and spread for a watchlist of forex pairs using
get_currency_pair_price. - Render a pivot point chart overlay with S1–S3 and R1–R3 levels from
get_pivot_pointsfor daily, weekly, and monthly timeframes. - Show a sentiment gauge widget using
Long_Customer_PERandShort_Customer_PERfromget_client_sentiment. - Build an economic event feed that surfaces
volatility,consensus, andactualvalues fromget_economic_calendar. - Display carry trade cost estimates using bid and offer rollover rates from
get_rollover_rates. - Populate a pair selector UI by searching available instruments via
search_instrumentswith currency codes. - Track spread changes across popular pairs over time using repeated calls to
get_popular_currency_pairs.
| 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 FOREX.com have an official developer API?+
What does `get_client_sentiment` actually measure?+
get_client_sentiment returns the percentage of FOREX.com clients holding long versus short positions (Long_Customer_PER, Short_Customer_PER) and the corresponding volume-weighted percentages (Long_VOL_PER, Short_VOL_PER). It covers major forex pairs and reflects the platform's own client book — it is not aggregated from external sources.Does the economic calendar endpoint support date filtering or a specific time range?+
get_economic_calendar returns upcoming events without a date-range parameter — you get whatever events are currently listed on the FOREX.com calendar page. There is no from or to filter exposed. You can fork this API on Parse and revise it to add date-filtering logic or pagination over the calendar data.Are instruments outside forex covered — for example, indices or commodities listed on FOREX.com?+
How precise are the price values returned by `get_currency_pair_price`?+
Bid, Offer) at whatever precision FOREX.com publishes for the pair. The get_pivot_points endpoint separately returns a decimals integer that indicates the number of decimal places for that pair, which you can use to format price display consistently.