Skip to content

Instantly share code, notes, and snippets.

View ubuntupunk's full-sized avatar
:octocat:
making coffee

DavDev Yes ubuntupunk

:octocat:
making coffee
View GitHub Profile
"""
@Will Reynolds 2018
this is a financial data gathering and manipulation program.
"""
# import libraries
# you must have the following packages installed to run the program
import requests
@ubuntupunk
ubuntupunk / YahooFinance.js
Created July 5, 2021 12:02 — forked from mikaelz/YahooFinance.js
Google script to fetch stock quote data from Yahoo Finance
function YahooFinance(ticker) {
var ticker = ticker || "GOOG";
ticker = encodeURI(ticker);
var response = UrlFetchApp.fetch("https://query2.finance.yahoo.com/v7/finance/options/" + ticker);
var chain = JSON.parse(response.getContentText());
return parseFloat(chain.optionChain.result[0].quote.regularMarketPrice);
}