fx_markets

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.
get/v1/rate_differentials/{base}/{quote}

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'AUD' | 'BRL' | 'CAD' | 'CHF' | 'CNH' | 'CNY' | 'DKK' | 'EUR' | 'GBP' | 'HUF' | 'ILS' | 'JPY' | 'KRW' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'SEK' | 'THB' | 'TWD' | 'USD' required

Base currency code

Example:AUD

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'AUD' | 'BRL' | 'CAD' | 'CHF' | 'CNH' | 'CNY' | 'DKK' | 'EUR' | 'GBP' | 'HUF' | 'ILS' | 'JPY' | 'KRW' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'SEK' | 'THB' | 'TWD' | 'USD' required

Quote currency code

Example:AUD

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

measure'auto' | 'risk_free_rate' | 'gov_bond_2y' | 'gov_bond_10y' | 'policy_rate'

Shared rate measure to compare across the pair.

Example:auto

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.

rate_type'spot' | 'forward'

Differential type: spot for shared rate measures, forward for derived curve segments.

Example:spot

Optional query parameter. Differential type: spot for shared rate measures, forward for derived curve segments. Allowed values: spot, forward.

curve_family'government_nominal'

Curve family used when rate_type=forward.

Example:government_nominal

Optional query parameter. Curve family used when rate_type=forward. Allowed values: government_nominal.

start_tenor_yearsnumber

Start tenor in years when rate_type=forward.

Example:2

Optional query parameter. Start tenor in years when rate_type=forward.

end_tenor_yearsnumber

End tenor in years when rate_type=forward.

Example:5

Optional query parameter. End tenor in years when rate_type=forward.

start_datestring

Inclusive start date YYYY-MM-DD. Defaults to 365 days ago.

Example:2026-01-01

Optional query parameter. Inclusive start date YYYY-MM-DD. Defaults to 365 days ago.

end_datestring

Inclusive end date YYYY-MM-DD. Defaults to today.

Example:2026-06-01

Optional query parameter. Inclusive end date YYYY-MM-DD. Defaults to today.

limitinteger

Maximum rows to return. Defaults to 20. Maximum 100.

Optional query parameter. Maximum rows to return. Defaults to 20. Maximum 100.

offsetinteger

Number of rows to skip after most-recent-first ordering.

Optional query parameter. Number of rows to skip after most-recent-first ordering.

as_ofstring nullable

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.

availabilitystring

Source-public or captured-value availability clock.

Optional query parameter. Source-public or captured-value availability clock.

api_keystring

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

researchobject nullable
basestring required
quotestring required
rate_typestring
measure_requestedstring required
measure_usedstring required
base_indicatorstring nullable
quote_indicatorstring nullable
curve_familystring nullable
start_tenorstring nullable
end_tenorstring nullable
forward_labelstring nullable
start_datestring required
end_datestring required
matched_pointsinteger required
unitstring required
latest_spreadnumber nullable
latest_spread_bpsnumber nullable
latest_differentialnumber nullable
latest_differential_bpsnumber nullable
base_latestnumber nullable
quote_latestnumber nullable

Changes

No recorded changes to this operation across all 1 revision of this API.