---
title: "Global risk-on / risk-off indicator"
method: GET
path: "/v1/risk_sentiment"
tags: ["fx_markets"]
---

# Global risk-on / risk-off indicator

`GET /v1/risk_sentiment`

## Request

- Base URL: `https://api.fxmacrodata.com`
- URL: `https://api.fxmacrodata.com/v1/risk_sentiment`
- Auth: one of:
  - none
  - API key in header `X-API-Key`
  - HTTP bearer

Returns a composite daily risk-sentiment score indicating whether global financial conditions favour risk-on currencies (AUD, NZD, CAD) or risk-off safe havens (JPY, CHF, USD).

The score is derived from four publicly available sources:
- **OFR FSI** (U.S. Treasury Office of Financial Research Financial Stress Index) — primary stress gauge, *inverted*
- **Gold** (National Bank of Ukraine official gold price, USD per troy ounce; Narodowy Bank Polski where the NBU did not publish) — safe-haven demand proxy, *inverted*
- **AUD/USD** (European Central Bank euro reference rates, crossed via EUR) — risk-sensitive currency pair
- **USD/JPY** (European Central Bank euro reference rates, crossed via EUR) — safe-haven flow proxy

Each component is normalised to a 252-day rolling z-score, weighted, and compressed through tanh to produce a final score in **[-1.0, +1.0]**.

**Weights:** OFR FSI 40%, Gold 20%, AUD/USD 20%, USD/JPY 20%.

Weights are renormalised over available components and reported as effective_weights. input_dates and input_status describe component observation dates and carry-forward. provisional marks lagged, missing or unknown inputs; complete inputs may also be revised. Recorded changes are available at `/v1/risk_sentiment/changes`; recording clocks are distinct from publisher publication times.

**Query Parameters:**
- `start_date`: Start date YYYY-MM-DD (default: 365 days ago).
- `end_date`: End date YYYY-MM-DD (default: today).

**Each data record contains:**
- `date`: Observation date (YYYY-MM-DD).
- `val`: Composite score -1.0 (extreme risk-off) ... +1.0 (extreme risk-on).
- `regime`: `risk_on` (>= 0.25) | `neutral` | `risk_off` (<= -0.25).
- `components.ofr_fsi`: Normalised (inverted) OFR FSI contribution.
- `components.gold`: Normalised (inverted) gold price contribution.
- `components.aud_usd`: Normalised AUD/USD contribution.
- `components.usd_jpy`: Normalised USD/JPY contribution.

## Query parameters

- `start_date` string: Start date YYYY-MM-DD
- `end_date` string: End date YYYY-MM-DD
- `limit` integer: Maximum rows to return. Defaults to 20. Maximum 100.
- `offset` integer: Number of rows to skip after most-recent-first ordering.

## Response `200`

Risk sentiment time series and component-level contributions.

- RiskSentimentResponse
  - `start_date` string, nullable
  - `end_date` string, nullable
  - `latest_available_date` string, nullable
  - `last_updated` string, nullable
  - `revision_tracking` RiskSentimentRevisionTracking
    - `enabled` boolean, required
    - `started_at` string, nullable
    - `last_change_sequence` integer, required
    - `complete_first_release_history_verified` boolean, required
    - `timestamp_semantics` string, required
    - `changes_endpoint` string, required
  - `data_quality` DataQuality
    - `source_freshness` string, nullable
    - `source_monitoring_complete` boolean, nullable
    - `known_source_gap` boolean, nullable
    - `source_checked_at` integer, nullable
    - `source_check_expires_at` integer, nullable
    - `latest_published_period` string, nullable
    - `source_permission_status` string, nullable
    - `commodity_coverage` CommodityCoverage
      - `scope` string, required
      - `requested_start` string, nullable
      - `requested_end` string, nullable
      - `available_start` string, nullable
      - `available_end` string, nullable
      - `input_row_count` integer, required
      - `row_count` integer, required
      - `distinct_date_count` integer, required
      - `duplicate_date_row_count` integer, required
      - `excluded_weekend_row_count` integer, required
      - `invalid_date_row_count` integer, required
      - `expected_weekday_label_count` integer, required
      - `missing_weekday_label_count` integer, required
      - `largest_missing_weekday_run` integer, required
      - `largest_calendar_gap_days` integer, required
      - `missing_weekday_ranges` CommodityMissingWeekdayRange[], required
        - `start_date` string, required
        - `end_date` string, required
        - `weekday_count` integer, required
      - `longest_continuous_weekday_segment` CommodityCoverageSegment, required
        - `start_date` string, nullable
        - `end_date` string, nullable
        - `row_count` integer, required
      - `latest_continuous_weekday_segment` CommodityCoverageSegment, required
        - `start_date` string, nullable
        - `end_date` string, nullable
        - `row_count` integer, required
      - `sparse_history` boolean, required
      - `coverage_basis` string, required
      - `continuous_coverage_verified` boolean
      - `reference_only` boolean
      - `executable_quotes` boolean
      - `provenance_version` integer, required
      - `repaired_excluded_weekend_row_count` integer
      - `repaired_invalid_date_row_count` integer
    - `stored_history_coverage` CommodityCoverage
      - `scope` string, required
      - `requested_start` string, nullable
      - `requested_end` string, nullable
      - `available_start` string, nullable
      - `available_end` string, nullable
      - `input_row_count` integer, required
      - `row_count` integer, required
      - `distinct_date_count` integer, required
      - `duplicate_date_row_count` integer, required
      - `excluded_weekend_row_count` integer, required
      - `invalid_date_row_count` integer, required
      - `expected_weekday_label_count` integer, required
      - `missing_weekday_label_count` integer, required
      - `largest_missing_weekday_run` integer, required
      - `largest_calendar_gap_days` integer, required
      - `missing_weekday_ranges` CommodityMissingWeekdayRange[], required
        - `start_date` string, required
        - `end_date` string, required
        - `weekday_count` integer, required
      - `longest_continuous_weekday_segment` CommodityCoverageSegment, required
        - `start_date` string, nullable
        - `end_date` string, nullable
        - `row_count` integer, required
      - `latest_continuous_weekday_segment` CommodityCoverageSegment, required
        - `start_date` string, nullable
        - `end_date` string, nullable
        - `row_count` integer, required
      - `sparse_history` boolean, required
      - `coverage_basis` string, required
      - `continuous_coverage_verified` boolean
      - `reference_only` boolean
      - `executable_quotes` boolean
      - `provenance_version` integer, required
      - `repaired_excluded_weekend_row_count` integer
      - `repaired_invalid_date_row_count` integer
    - `point_in_time_basis` string, nullable
    - `is_official` boolean, required
    - `is_proxy` boolean, required
    - `is_fallback` boolean, required
    - `is_stale` boolean, required
    - `has_announcement_datetime` boolean, required
    - `point_in_time_safe` boolean, required: Whether the returned values have verified availability and vintage evidence; estimated release times do not qualify.
    - `unverified_vintage_count` integer
    - `unknown_publication_time_count` integer
    - `latest_available_date` string, nullable
    - `last_updated` string, nullable
    - `data_lag_days` integer, nullable
    - `source_name` string, nullable
    - `source_type` 'official' | 'public' | 'fallback' | 'derived', required
    - `is_derived` boolean
    - `row_count` integer
    - `announcement_datetime_count` integer
    - `missing_announcement_datetime_count` integer
    - `has_assumed_release_times` boolean: True when at least one row in the quality scope carries a publication timestamp derived from the publication lag measured on that series' own confirmed releases, because no official release calendar reaches the period.
    - `assumed_release_time_count` integer: Number of rows in the quality scope whose publication timestamp was derived rather than captured. Compare against row_count to size the derived portion of the requested window.
    - `bounded_release_time_count` integer: Legacy rows carrying an upper-bound estimate flag; this does not certify replay safety.
    - `unbounded_release_time_count` integer: Assumed timestamps without proven availability bounds.
    - `quality_scope` string
    - `stale_after_days` integer, nullable
    - `requested_window_has_data` boolean, nullable
    - `requested_window_latest_date` string, nullable
    - `requested_window_includes_latest_available` boolean, nullable
    - `page_includes_latest_available` boolean, nullable
    - `returned_latest_available_before_window` boolean, nullable
    - `staleness_days` integer, nullable
    - `reason` string, nullable
    - `datetime_field` string, nullable
    - `datetime_precision` string, nullable
    - `datetime_semantics` string, nullable
    - `source_legs` object[], nullable
    - `historical_point_in_time` PointInTimeCompleteness: Coverage of source-confirmed publication timestamps for a dataset.
      - `row_count` integer, required
      - `announcement_datetime_count` integer, required
      - `missing_announcement_datetime_count` integer, required
      - `assumed_release_time_count` integer
      - `bounded_release_time_count` integer
      - `unbounded_release_time_count` integer
      - `unverified_vintage_count` integer
      - `unknown_publication_time_count` integer
      - `point_in_time_safe` boolean, required
  - `component_metadata` RiskSentimentComponentMetadata
    - `stored_components` string[], nullable
    - `component_coverage_fields` string[], nullable
    - `aliases` RiskSentimentAliases: Legacy field names retained alongside their current equivalents.
      - `score` string, nullable
      - `risk_regime` string, nullable
      - `sentiment` string, nullable
    - `unavailable_components_are_reported_false` boolean, nullable
  - `pagination` PaginationInfo: Offset pagination state for a single page of results.
    - `limit` integer, nullable
    - `offset` integer, required
    - `returned_count` integer, required
    - `total_count` integer, required
    - `has_more` boolean, required
    - `next_offset` integer, nullable
    - `page_includes_latest_available` boolean, nullable
  - `data` RiskSentimentPoint[], nullable
    - `date` string, nullable
    - `val` number, nullable
    - `score` number, nullable
    - `regime` string, nullable
    - `risk_regime` string, nullable
    - `sentiment` string, nullable
    - `components` object, nullable
    - `component_coverage` RiskSentimentComponentCoverage: Per-component availability for one observation.
      - `ofr_fsi` boolean, nullable
      - `gold` boolean, nullable
      - `aud_usd` boolean, nullable
      - `usd_jpy` boolean, nullable
      - `vix` boolean, nullable
      - `spx` boolean, nullable
      - `dxy` boolean, nullable
      - `us10y` boolean, nullable
      - `credit_spreads` boolean, nullable
    - `stored_component_count` integer, nullable
    - `financial_stress_score` number, nullable
    - `commodity_beta_score` number, nullable
    - `safe_haven_score` number, nullable
    - `input_dates` object, nullable
    - `input_status` object, nullable
    - `effective_weights` object, nullable
    - `coverage_status` string, nullable
    - `provisional` boolean, nullable
    - `revision` integer, nullable
    - `first_recorded_at` string, nullable
    - `first_tracked_at` string, nullable
    - `last_changed_at` string, nullable
    - `last_change_sequence` integer, nullable
    - `revision_history_complete` boolean, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fxmacrodata/apis/fx-macrodata-api.md) · [All operations](https://skmtc.dev/fxmacrodata/apis/fx-macrodata-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fxmacrodata/apis/fx-macrodata-api/revisions/fadaa543b154?raw)
