Skip to main content
GET
/
macro
/
interest-rates
/
snapshot
Interest Rates (Real-Time)
curl --request GET \
  --url https://api.financialdatasets.ai/macro/interest-rates/snapshot \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.financialdatasets.ai/macro/interest-rates/snapshot"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.financialdatasets.ai/macro/interest-rates/snapshot', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.financialdatasets.ai/macro/interest-rates/snapshot",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.financialdatasets.ai/macro/interest-rates/snapshot"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/macro/interest-rates/snapshot")
  .header("X-API-KEY", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.financialdatasets.ai/macro/interest-rates/snapshot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "interest_rates": [
    {
      "bank": "<string>",
      "name": "<string>",
      "rate": 123,
      "date": "<string>"
    }
  ]
}
{
  "error": "Unauthorized",
  "message": "Invalid API key provided"
}
{
  "error": "Payment Required",
  "message": "This endpoint requires a paid subscription. Please upgrade your plan."
}
{
  "error": "Not Found",
  "message": "Ticker XXXX not found"
}

Overview

The Interest Rates Snapshot API lets you pull the latest published interest rate data for all major central banks in the world. We source our data directly from global central banks like the Federal Reserve, People’s Bank of China, European Central Bank, Bank of Japan, and other major monetary authorities. The real-time interest rate data comes from official monetary policy announcements. To get started, please create an account and grab your API key at financialdatasets.ai. You will use the API key to authenticate your API requests.

Coverage

Central BanksYears of CoverageUpdated
10LatestDaily

Available Central Banks

You can fetch a list of available central banks with a GET request to: https://api.financialdatasets.ai/macro/interest-rates/banks/

Getting Started

There are only 2 steps for making a successful API call:
  1. Add your API key to the header of the request as X-API-KEY.
  2. Execute the API request.

Example

Interest Rates Snapshot
import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# create the URL
url = 'https://api.financialdatasets.ai/macro/interest-rates/snapshot'

# make API request
response = requests.get(url, headers=headers)

# parse snapshot from the response
interest_rates = response.json().get('interest_rates')

Authorizations

X-API-KEY
string
header
required

API key for authentication.

Query Parameters

bank
string
required

The central bank code (e.g., FED, ECB, BOJ). Use the /macro/interest-rates/banks endpoint to get a list of available banks.

Response

Interest rates snapshot response

interest_rates
object[]