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. Free key for every account; real-time data on Pro.

Listed on public-apis and awesome-quant. Official client on PyPI.

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
News sentiment score for the 8 major currencies. Real-time on Pro; free keys get the previous 3-hour cycle
Free + Pro
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

Python

Official client, MIT licensed, no required dependencies.

pip install fxnewsbias
from fxnewsbias import Client

fx = Client("fxnb_live_...")

# the whole point: a yes or no on the pair you are about to trade
fx.sentiment().favours("AUD/USD")   # 'long', 'short', or None
fx.sentiment().spread("AUD/USD")    # 13  (AUD 68 - USD 55)

The scores move every few hours, so follow() waits for the next one instead of polling on a timer. A 15-minute loop spends 96 calls a day; this spends about 8.

for s in fx.follow():
    print(s["AUD"].score)   # blocks until the data actually changes

Source on GitHub · PyPI

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
delayedFree-tier responses only: true, alongside delay_hours: 3. The scores are from the previous cycle. Absent on Pro

Tiers and rate limits

FreePro
Price$0, no cardFrom $20/month, 7-day free trial
Requests per UTC day251,000
Data freshnessPrevious 3-hour cycle (3 to 6 hours old)Current cycle, real-time
/api/v1/sentimentYes, delayedYes, real-time
/api/v1/session-biasNoYes
UseNon-commercial, with attributionCommercial use in your own product
  • Both tiers reset at 00:00 UTC. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset
  • One over the limit returns 429 with a Retry-After header
  • The allowance follows the account, not the key, so regenerating a key does not reset it
  • Free responses include "delayed": true, "delay_hours": 3 so the freshness is never ambiguous

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

  • Wherever the data is displayed or republished, keep the attribution "Data by FXNewsBias" linking to https://fxnewsbias.com. It ships in every response
  • Free tier is for personal and non-commercial projects. A Pro subscription covers commercial use inside your own product
  • No redistribution, resale, or using the data to build a competing sentiment service, on either tier
  • One key per account. Sharing a key across separate users or products is not permitted and is detectable
  • A Pro key works while the subscription is active, including the free trial. When it ends the Pro key stops, and you can create a free-tier key from the same panel
  • Questions, higher volume, or a data licence: contact@fxnewsbias.com

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))

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?

The free tier costs nothing: 25 requests a day with data one cycle behind, no card required. Real-time access is included with FXNewsBias Pro, from $20 per month billed yearly ($25 on 3 months, $30 monthly), which starts with a 7 day free trial. There is no separate API fee. See what else Pro includes.

Is there a free tier?

Yes. Any signed-in account can create a free key from the panel at the top of this page, no card required. It allows 25 requests a day on the sentiment endpoint and serves the previous 3-hour cycle, so the data is between 3 and 6 hours old. Built for testing, learning and non-commercial projects, with attribution. When you need the current cycle, Pro is real-time.

What is the rate limit?

Free keys: 25 requests per UTC calendar day. Pro: 1,000 per day per account. Both reset 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?

Create a free account, sign in, and the key panel at the top of this page creates one instantly. There is no application form, no waiting list, no card, and no email delivery. The key is shown once at creation because only a fingerprint of it is stored. Pro subscribers get the real-time key from the same panel.

Where the data comes from