Skip to content

A command line program to alert the user if the gold price exits a specified range.

Notifications You must be signed in to change notification settings

Adrian1707/gold_price_alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial market professionals are obsessed with prices. So much so that they often sign up to alerts on various asset classes that they follow in order to make a buy or sell decision when the price is at a level they feel is sensible to deal in.

I've always loved following the gold price, as it gives an indication of how much faith investors have in monetary policy and central bankers. The rule of thumb in the markets is, the higher the gold price, the more shaky the world's monetary system and the more caution should be exercised.

This is a simply command line program I wrote that uses the Nokogiri gem to scrape the live gold price from a webpage and send a text to the user if the price goes beyond a certain boundary. The Twilio gem is used to send a text message once the gold price goes above or below the range set by the user.

You'll need to set up an account with Twilio to secure an account sid and auth token, then store them in environmental variables using the dotenv gem. Do the same with your personal phone number as well.

To Run

git clone https://github.com/Adrian1707/gold_price_alert
ruby gold_price_alert.rb
Program runs until the gold price exits the range specified on line 34

About

A command line program to alert the user if the gold price exits a specified range.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages