iHook

iHook

  • Blog
  • Docs
  • Dashboard

›Examples

Quick Start

  • Create your first task

General Settings

  • HTTP Settings
  • Request Schedule

Notifications

  • Notification Overview
  • Source
  • Property / CSS Selector
  • Comparison
  • Message Template

History

  • Chart

Errors

  • Errors

Keyboard Shortcuts

  • Keyboard Shortcuts

Examples

  • Nintendo Switch availability monitor
  • Mortgage rate monitor

Mortgage rate monitor

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:

General Settings

Under the Request Settings and Request Schedule sections, provide the following values:

FieldValueNotes
Task NameMortgage rate monitor - IEXThe name of the task
URLhttps://cloud.iexapis.com/stable/data-points/market/MORTGAGE30US?token=YOUR_IEX_API_TOKENIEX 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 MethodGET
Request HeadersNoneNo headers are needed
Request ScheduleEvery 1 weekThe 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.

Under the Notification section, click the ADD button next to the Email label:

add-notification

Then a notification setup dialog will show up:

email notification

Then provide the following values in the dialog:

FieldValueNotes
SourceResponse Body (TEXT)Parse the API response as JSON payload
Comparisonvalue has changed
EmailYour email address
SubjectUS 30-Year fixed mortgage rate has changed!The email subject
MessageYou can leave this field as-isThe email body

This tells iHook to send an email notification whenever the IEX API response body changed.

Now click SAVE, you will see the new email notification appear under the Notification section:

saved-notification

4. Save task

Click the CREATE button at the bottom of the task creation page:

create-task-button

You'll see the created task in ACTIVE state:

created task

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:

history

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.

← Nintendo Switch availability monitor
  • 1. Create a free IEX account and an API key
  • 2. Create an iHook scheduled task
  • 3. Create email notification
  • 4. Save task
  • 5. Test task
Copyright © 2021 iHook, Inc.