Interest Rates (Snapshot)
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>"
}
],
"next_page_url": "<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"
}Interest Rates
Snapshot
Get the current policy rate of 10 major central banks in one call.
GET
/
macro
/
interest-rates
/
snapshot
Interest Rates (Snapshot)
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>"
}
],
"next_page_url": "<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 returns the newest published policy rate of each of the 10 central banks we cover, with the date it is in effect. Passbank to get one bank only.
We source our data from authoritative sources that compile each central bank’s official policy rate. The daily series is published once a week, so the newest day is typically two to nine days behind the calendar. For the Federal Reserve the rate is the midpoint of the target range (for example 3.875 for a 3.75 to 4.00 percent range).
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 Banks | Coverage | Updated |
|---|---|---|
| 10 | Newest published day per bank | Weekly, as the source publishes |
Available Central Banks
You can fetch a list of available central banks with aGET request to:
https://api.financialdatasets.ai/macro/interest-rates/banks/
Getting Started
There are only 2 steps for making a successful API call:- Add your API key to the header of the request as
X-API-KEY. - 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
API key for authentication.
Query Parameters
Optional central bank code (e.g., FED, ECB, BOJ) to return one bank only. Use the /macro/interest-rates/banks endpoint to get a list of available banks.