Get all interest rates
Get all CPF quarterly rates and SGS monthly yields.
1 min read
get/interest-rates
Request example
curl --request GET \
--url https://simplycpf.com/api/cpf/interest-ratesimport requests
url = "https://simplycpf.com/api/cpf/interest-rates"
response = requests.request("GET", url)
print(response.text)const response = await fetch('https://simplycpf.com/api/cpf/interest-rates', {
method: 'GET'
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://simplycpf.com/api/cpf/interest-rates',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://simplycpf.com/api/cpf/interest-rates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://simplycpf.com/api/cpf/interest-rates"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://simplycpf.com/api/cpf/interest-rates')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyResponse
{
"quarterlyRates": [
{
"quarter": "<string>",
"oa": 1,
"sa": 1,
"ma": 1,
"ra": 1
}
],
"sgsYields": [
{
"month": "<string>",
"yield": 1
}
]
}{
"error": "Rate limit exceeded"
}get/interest-rates
Responses
application/json
Interest rates data
Error message