Interest Rate API
The Interest Rate API provides current central bank interest rates for 22 countries, all major benchmark interest rates (such as LIBOR, EURIBOR, and SOFR), and prime rates.
Interest rates are refreshed every 4 hours to ensure up-to-date information.
Available endpoints:
- /v2/interestrate - Get a specific interest rate by name
- /v2/interestratehistorical - Get historical interest rate data
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 298ms | 309ms | 359ms | 504ms | 1011ms |
Didn't find what you were looking for? Suggest an improvement
/v2/interestrate GET
https://api.api-ninjas.com/v2/interestrate
Get a specific interest rate by name. Returns the rate value, name, and last updated timestamp.
Parameters
raterequiredName of the interest rate to retrieve. The following rates are supported:
Central Bank Rates ▶Benchmark Rates ▶
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v2/interestrate?rate=central_bank_usHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
{
"rate_name": "United States Federal Reserve",
"rate_pct": 4.5,
"last_updated": "12-18-2024"
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/interestrate?rate=central_bank_us" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
/v2/interestratehistorical GET
https://api.api-ninjas.com/v2/interestratehistorical
Returns historical interest rates for specific central banks or benchmark rates using a single rate parameter. You can specify a time range to retrieve data from. The maximum number of data points returned per API call is 100.
Parameters
raterequiredThe specific interest rate identifier. Supports both central bank rates and benchmark rates.
Central Bank Rates ▶Benchmark Rates ▶start_timeoptionalStart time for the data range, specified as a UNIX timestamp in seconds.
end_timeoptionalEnd time for the data range, specified as a UNIX timestamp in seconds.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v2/interestratehistorical?rate=central_bank_usHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"name": "United States Federal Reserve",
"data": [
{
"timestamp": 647827200,
"rate_pct": 8
},
{
"timestamp": 657158400,
"rate_pct": 7.75
},
{
"timestamp": 658454400,
"rate_pct": 7.5
},
{
"timestamp": 660528000,
"rate_pct": 7.25
},
{
"timestamp": 661478400,
"rate_pct": 7
},
{
"timestamp": 663379200,
"rate_pct": 6.75
},
{
"timestamp": 665366400,
"rate_pct": 6.25
},
{
"timestamp": 668390400,
"rate_pct": 6
},
...
]
}