Get pair rate differentials
Returns a historical differential between the base and quote currency using a shared rate measure. The endpoint aligns the two legs by date intersection and reports the spread in both percentage points and basis points.
Measures:
- Supported values: auto, risk_free_rate, gov_bond_2y, gov_bond_10y, policy_rate.
- auto prefers risk_free_rate, then gov_bond_2y, then policy_rate.
Rate Types:
- Supported values: spot, forward.
- spot compares the selected shared rate measure.
- forward derives each leg from government bond curve nodes, then aligns dates.
Authentication:
- Requires an Individual or Business API key via ?api_key=<key> or X-API-Key.
Request
- Base URL: https://api.fxmacrodata.com
- URL: https://api.fxmacrodata.com/v1/rate_differentials/{base}/{quote}
- Auth: one of:
- none
- API key in header X-API-Key
- HTTP bearer
Path parameters
Base currency code
Required path parameter. Base currency code Allowed values: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD.
Quote currency code
Required path parameter. Quote currency code Allowed values: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD.
Query parameters
Shared rate measure to compare across the pair.
Optional query parameter. Shared rate measure to compare across the pair. Allowed values: auto, risk_free_rate, gov_bond_2y, gov_bond_10y, policy_rate.
Differential type: spot for shared rate measures, forward for derived curve segments.
Optional query parameter. Differential type: spot for shared rate measures, forward for derived curve segments. Allowed values: spot, forward.
Curve family used when rate_type=forward.
Optional query parameter. Curve family used when rate_type=forward. Allowed values: government_nominal.
Start tenor in years when rate_type=forward.
Optional query parameter. Start tenor in years when rate_type=forward.
End tenor in years when rate_type=forward.
Optional query parameter. End tenor in years when rate_type=forward.
Inclusive start date YYYY-MM-DD. Defaults to 365 days ago.
Optional query parameter. Inclusive start date YYYY-MM-DD. Defaults to 365 days ago.
Inclusive end date YYYY-MM-DD. Defaults to today.
Optional query parameter. Inclusive end date YYYY-MM-DD. Defaults to today.
Maximum rows to return. Defaults to 20. Maximum 100.
Optional query parameter. Maximum rows to return. Defaults to 20. Maximum 100.
Number of rows to skip after most-recent-first ordering.
Optional query parameter. Number of rows to skip after most-recent-first ordering.
Explicit UTC information cutoff for verified vintage replay; date means start of day.
Optional query parameter. Explicit UTC information cutoff for verified vintage replay; date means start of day.
Source-public or captured-value availability clock.
Optional query parameter. Source-public or captured-value availability clock.
Your Individual or Business API key
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.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.