Skip to content

A Scriptable widget that shows stock prices from yahoo finance api.

Notifications You must be signed in to change notification settings

wickenico/stock-widget.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

stock-widget.js

A Scriptable widget that shows stock prices and the percentual change from yahoo finance api. Also works with cryptocurrencies.

stock-widget-homescreen.small

GitHub last commit GitHub commit activity

SetupUsageLinksContribution

Setup

  1. (if not done yet) Download the scriptable app form AppStore
  2. In Scriptable create a new script
  3. Copy the code from script file stock-widget.js
  4. Create a new widget on homescreen and select this script in scriptable

stock-widget-homescreen

Usage

You can select your stock symbols in 2 different ways:

  1. You select the stocks which you want to display in the app through the parameter field. Separate them with "," stock-widget-settings

  2. You can code the stocks directly in the code in function getStockData():

  if(args.widgetParameter == null) {
    // EDIT: Insert your symbols between the quotation marks 
    stocks = ["AAPL", "22UA.DE", "GC=F", "BTC-USD"];
  } else {
    stocks = args.widgetParameter.split(",");
  }

Links

Yahoo Finance: https://finance.yahoo.com/

Contribution

If you have any ideas for extensions or changes just let me know.