The mortgage rates can be volatile. If you want to monitor the rates, instead of checking it manually each time, you can save time by setting up a monitoring task and get notified whenever the mortgage rates changed.
In this tutorial, we'll show you how to use iHook to monitor the Freddie Mac mortgage rates, by consuming the API provided by the financial data platform IEX cloud.
1. Create a free IEX account and an API key
First, go to IEX homepage and register a free account. After going through an email verification process, you will land at the admin console. Copy the API token (the one that starts with
pk_) - you will need it in the next step.
2. Create an iHook scheduled task
After logging into iHook dashboard, click the
CREATE TASK button at the top left corner, then you will see the task creation form:
Request Settings and
Request Schedule sections, provide the following values:
|Task Name||Mortgage rate monitor - IEX||The name of the task|
|URL||https://cloud.iexapis.com/stable/data-points/market/MORTGAGE30US?token=||IEX API that returns Freddie Mac 30-Year fixed rate mortgage weekly average, the data is updated weekly as of this writing. More rate options see here.|
|Request Headers||None||No headers are needed|
|Request Schedule||Every 1 week||The task will run once every week|
This tells the task to fetch Freddie Mac 30-Year fixed rate from the IEX API once every week.
3. Create email notification
The API response body will carry a rate number in text format (e.g.
2.66). You will need to set up an email notification, so you can get notified whenever the response body value changed.
Notification section, click the
ADD button next to the
Then a notification setup dialog will show up:
Then provide the following values in the dialog:
|Source||Parse the API response as plaintext|
|Your email address|
|Subject||The email subject|
|Message||You can leave this field as-is||The email body|
This tells iHook to send an email notification whenever the IEX API response body changed.
SAVE, you will see the new email notification appear under the
4. Save task
CREATE button at the bottom of the task creation page:
You'll see the created task in
5. Test task
To make sure your task settings such as URL and notification rules are properly configured, it's recommended to test your task at least once.
You can perform the test by clicking the
TEST button at the top of your task page. The
TEST button will trigger the HTTP request right away, and evaluate all configured notification conditions.
If everything went smooth, you should see the mortgage rate appear in the
Response Body section of the execution detail:
You would also receive the email notification the first time the task runs successfully since the response body value has changed from non-existent to some value.
Congratulations! You can now sit back and wait for the iHook email notification whenever the mortgage rate changed.