Developer API v1 Updated every 3 hours
Developer API

Forex Sentiment API

The same news sentiment scores that power the FXNewsBias dashboard, served straight to your code as clean JSON. Eight major currencies, refreshed every three hours, around the clock.

Key active
Your access

Checking your account...

Endpoints

Two GET endpoints, both authenticated with the same key. Base URL https://fxnewsbias.com.

GET
/api/v1/sentiment
Current news sentiment score for the 8 major currencies
GET
/api/v1/session-bias
Pair scorecard for the newest settled session, tone and conviction
Pro

The API serves forward data: the current read and everything published from now on. Historical series are not available through the API. If you need history for research, talk to us about a data licence.

Quickstart

Bearer header only. Keys are never accepted in the URL or query string.

curl -H "Authorization: Bearer $FXNB_KEY" \
  https://fxnewsbias.com/api/v1/sentiment

Response shape

{
  "schema": "fxnb.sentiment.v1",
  "generated_at": "2026-08-21T09:00:12Z",
  "next_update_expected": "2026-08-21T12:00:00Z",
  "attribution": {
    "required": true,
    "text": "Data by FXNewsBias",
    "url": "https://fxnewsbias.com"
  },
  "data": [
    { "currency": "USD", "score": 72, "bias": "Bullish",
      "updated_at": "2026-08-21T09:00:00Z" },
    ... 7 more
  ]
}
FieldContract, frozen. v1 never changes shape
dataAlways exactly 8 rows, ordered USD, EUR, GBP, JPY, AUD, CAD, CHF, NZD
scoreInteger 0 to 100. 50 is the neutral midpoint, higher is bullish news tone, lower is bearish
biasExactly one of Bullish, Bearish, Neutral
updated_atISO-8601 UTC. When the score was computed
next_update_expectedWhen the next refresh lands. Sleep until this, then poll once

Staying current without wasting quota

Scores publish on a fixed 3-hour cycle. Rather than polling blindly, read next_update_expected and come back then. You get the new data within seconds of publication and spend about 8 requests a day.

import requests, time
from datetime import datetime, timezone

H = {"Authorization": "Bearer " + FXNB_KEY}

while True:
    r = requests.get("https://fxnewsbias.com/api/v1/sentiment", headers=H).json()
    handle(r["data"])
    nxt = datetime.fromisoformat(r["next_update_expected"].replace("Z", "+00:00"))
    time.sleep(max(30, (nxt - datetime.now(timezone.utc)).total_seconds() + 20))

Rate limits

Errors

StatusBodyWhen
401{"error":"unauthorized"}Missing or malformed header, unknown key, revoked key
405{"error":"method-not-allowed"}Anything but GET
429{"error":"rate-limited","retry_after_seconds":n}Past your daily limit

Attribution and terms

Frequently asked questions

What is a forex sentiment API?

A forex sentiment API returns a machine readable measure of how positive or negative published news is for each currency. The FXNewsBias API returns a 0 to 100 score for the 8 major currencies as JSON. Above 50 leans bullish, below 50 leans bearish, and 50 is neutral.

How often is the forex sentiment data updated?

Scores are recomputed every 3 hours on a fixed cycle, eight times a day from 00:00 UTC, seven days a week. Every response carries a next_update_expected timestamp so you can sleep until the next publication instead of polling blindly. See how the scoring works.

Which currencies does the API cover?

USD, EUR, GBP, JPY, AUD, CAD, CHF and NZD. The sentiment endpoint always returns exactly 8 rows in that order, so the shape never changes between calls. Browse the live currency scores.

How much does the forex sentiment API cost?

API access is included with FXNewsBias Pro at $30 per month, which starts with a 7 day free trial. There is no separate API fee. The key works throughout the trial and stops when the subscription ends. See what else Pro includes.

What is the rate limit?

200 requests per UTC calendar day per account, resetting at 00:00 UTC. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers, and going over returns HTTP 429 with a Retry-After header.

Does the API provide historical sentiment data?

No. The API serves forward data, meaning the current read and everything published from the moment you subscribe. Historical series for backtesting are available under a separate data licence, so get in touch if that is what you need.

How do I get an API key?

Sign in to your FXNewsBias account and the key panel at the top of this page creates one instantly. There is no application form, no waiting list, and no email delivery. The key is shown once at creation because only a fingerprint of it is stored.

Where the data comes from