mortgagerate.app
Simple US mortgage rate API
Current mortgage rate
source: fred.stlouisfed.org
How to use the API
curl https://api.mortgagerate.app/v1/rates
-H "Accept: application/json"
-H "Authorization: Bearer yourtoken"
const axios = require('axios');
const instance = axios.create({
baseURL: 'https://api.mortgagerate.app/v1/',
timeout: 1000,
headers: {'Authorization': 'Bearer '+ yourtoken }
});
instance.get('rates').then(response => {
return response.data;
});
$client = new GuzzleHttp\Client([
'base_uri' => 'https://api.mortgagerate.app/v1/'
]);
$headers = [
'Authorization' => 'Bearer ' . $yourtoken,
'Accept' => 'application/json',
];
$response = $client->request('GET', 'rates', [
'headers' => $headers
]);