Société Tunisienne de Banque (STB) Exchange Rate API: TND Buy and Sell Rates as JSON

Reviewed by Madhushan, Fintech Developer — November 2026

Société Tunisienne de Banque is Tunisia’s largest state-owned bank. Its cours de change page lists selling and buying rates in dinars for 13 currencies with the date of each price. This guide shows how to read that board as JSON: what the rates mean, how they compare with the Central Bank of Tunisia official rate and with other banks in Tunisia, and the calls that return them.

What the STB board shows

Spreads across the board

On the 15 November 2026 board the tightest spreads were EUR (2.39%), USD (2.45%), GBP (2.58%) and the widest LYD (4.07%), BHD (3.50%), OMR (3.46%). Spread is (sell − buy) ÷ mid: what a round trip through the bank costs, before any fees. The API returns it on every row as spread_pct, so you can rank currencies or alert when a bank widens its board.

USD at STB and other banks in Tunisia

USD on the 7 boards AllRatesToday reads in Tunisia, all captured on 15 November 2026 (the Central Bank of Tunisia official rate was 3.0335):

BankBuySellSpreadMid vs official
Arab Tunisian Bank (ATB)2.9913.0622.35%-0.23%
Attijari Bank Tunisie2.993.0692.61%-0.13%
Banque de Tunisie et des Emirats (BTE)2.9913.0361.49%-0.66%
Société Tunisienne de Banque (STB)2.9853.0592.45%-0.38%
BH Bank2.9493.0382.97%-1.32%
Tunisian Saudi Bank (TSB)2.9963.0361.33%-0.58%
Al Baraka Bank Tunisia2.9653.0663.35%-0.59%

STB had the 4th narrowest USD spread of the 7. One call to /api/v1/bank-rates/tn returns every board in the table at once.

Get the board (REST)

You need an API key; the free key works. The full board:

curl "https://allratestoday.com/api/v1/bank-rates/tn/stbtn" \
  -H "Authorization: Bearer art_live_your_key"

What comes back (the 15 November 2026 board, first three rows):

{
  "bank": "stbtn",
  "name": "Société Tunisienne de Banque (STB)",
  "country": "tn",
  "quote_ccy": "TND",
  "bank_updated_at": "13/11/26",
  "basis": "Cours de change (achat / vente)",
  "captured_at": "2026-11-15T11:37:56.108Z",
  "rates": [
    {"ccy":"AED","buy":0.8085,"sell":0.8328,"mid":0.82065,"spread_pct":2.961,"official":0.81953,"vs_official_pct":0.137},
    {"ccy":"BHD","buy":7.833,"sell":8.112,"mid":7.9725,"spread_pct":3.5,"official":7.9816,"vs_official_pct":-0.114},
    {"ccy":"CAD","buy":2.088,"sell":2.146,"mid":2.117,"spread_pct":2.74,"official":2.1143,"vs_official_pct":0.128},
    … 10 more currencies
  ],
  "disclaimer": "…",
  "attribution": { … }
}

One currency, with the row fields at the top level:

curl "https://allratestoday.com/api/v1/bank-rates/tn/stbtn?ccy=USD" \
  -H "Authorization: Bearer art_live_your_key"
{
  "bank": "stbtn",
  "name": "Société Tunisienne de Banque (STB)",
  "country": "tn",
  "quote_ccy": "TND",
  "bank_updated_at": "13/11/26",
  "basis": "Cours de change (achat / vente)",
  "captured_at": "2026-11-15T11:37:56.108Z",
  "ccy": "USD",
  "buy": 2.985,
  "sell": 3.059,
  "mid": 3.022,
  "spread_pct": 2.449,
  "official": 3.0335,
  "vs_official_pct": -0.379,
  "disclaimer": "Retail buy/sell rates as displayed on each bank’s own website at capture time, quoted as home currency per 1 unit of foreign currency. Indicative only: banks change these through the day, apply them at the counter or in-app, and they are not official or reference rates. For the rate a regulation names, use the central-bank endpoints.",
  "attribution": {
    "source": "Board rates published by Société Tunisienne de Banque (STB) on its own website, collected by AllRatesToday",
    "bank_url": "https://www.stb.com.tn/fr/bourse-et-change/cours-de-change/",
    "url": "https://allratestoday.com/bank-exchange-rate-api/tn/stbtn/",
    "terms": "Public pages that show the rates need a visible link to allratestoday.com"
  }
}

The board as it stood on a past day:

curl "https://allratestoday.com/api/v1/bank-rates/tn/stbtn?date=2026-11-13" \
  -H "Authorization: Bearer art_live_your_key"

One currency over a date range, one row per day (paid plans; add &format=csv, xml or xlsx for a file):

curl "https://allratestoday.com/api/v1/bank-rates/tn/stbtn/history?ccy=USD&from=2026-11-13&to=2026-11-15" \
  -H "Authorization: Bearer art_live_your_key"

JavaScript

npm install @allratestoday/sdk
import { AllRatesToday } from '@allratestoday/sdk';

const client = new AllRatesToday({ apiKey: 'art_live_your_key' });

// Société Tunisienne de Banque (STB)'s USD row
const r = await client.bankRates('tn', { bank: 'stbtn', ccy: 'USD' });
console.log(`STB buys USD at ${r.buy}, sells at ${r.sell} TND`);

// The board as it stood on a past day
const past = await client.bankRates('tn', { bank: 'stbtn', date: '2026-11-13' });
console.log(past.snapshot_date, past.rates.length);

Python

import requests

r = requests.get(
    "https://allratestoday.com/api/v1/bank-rates/tn/stbtn",
    headers={"Authorization": "Bearer art_live_your_key"},
    timeout=10,
)
r.raise_for_status()
for row in r.json()["rates"]:
    print(row["ccy"], row["buy"], row["sell"], row["spread_pct"])

Board rate or official rate?

The Central Bank of Tunisia rate is the one tax, accounting and customs rules in Tunisia name; nobody transacts at it. STB's board is the price a customer actually gets. The API puts both on every row: official is the central bank's rate for the same currency and vs_official_pct is how far the bank's mid sits from it. Use the board to show customers a real price, compare banks for a remittance, or keep a dated record of what the bank quoted; use the Central Bank of Tunisia endpoint when a rule asks for the official rate.

FAQ

Where do the Société Tunisienne de Banque (STB) rates come from?

From the bank's own public rates page (https://www.stb.com.tn/fr/bourse-et-change/cours-de-change/), read hourly. AllRatesToday does not change the numbers: each row is the buy and sell price STB shows, with the mid, the spread and the Central Bank of Tunisia rate added.

Are these the official TND exchange rates?

No. They are STB's retail prices for customers. The official rate in Tunisia is the Central Bank of Tunisia rate, which the API returns as official on each row where the central bank has one, and in full from the central-bank endpoint.

How often is the STB board updated?

AllRatesToday reads the page every hour. The bank's own last-updated stamp is returned as bank_updated_at, so you can tell a fresh read of an unchanged board from a new board.

Can I get STB rates for a past date?

Yes, from 13 November 2026 onward; every day's board is kept permanently. Add ?date=YYYY-MM-DD for one day: the response is the board captured that day, or the nearest earlier day within five days, with date_requested and snapshot_date added. For a range, /history?ccy=USD&from=…&to=… returns one row per day as JSON, CSV, XML or XLSX on paid plans.

Do I need an API key?

Yes. Commercial bank boards need an API key; any plan works, the free key included, and each call counts against the plan. Public pages or widgets that show the rates need a visible link to allratestoday.com.

Société Tunisienne de Banque (STB) rates, as JSON

Free API key, hourly board captures, the official rate alongside.

Get your free API key

Related