Skip to content

Commit

Permalink
Version 7 of Yahoo! Finance
Browse files Browse the repository at this point in the history
  • Loading branch information
brandleesee authored Sep 15, 2019
1 parent f1908ce commit a4b86c4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions yahoo_quotes.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2013-2016 by Michael Dvorkin. All Rights Reserved.
// Copyright (c) 2013-2019 by Michael Dvorkin. All Rights Reserved.
// Use of this source code is governed by a MIT-style license that can
// be found in the LICENSE file.

Expand All @@ -13,13 +13,10 @@ import (
`strings`
)

// See http://www.gummy-stuff.org/Yahoo-stocks.htm
//
// const quotesURL = `http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=sl1c6k2oghjkva2r2rdyj3j1`
// c2: realtime change vs c1: change
// k2: realtime change vs p2: change
//
const quotesURL = `http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=sl1c1p2oghjkva2r2rdyj3j1`
const quotesURLv7 = `https://query1.finance.yahoo.com/v7/finance/quote?symbols=%s`
const quotesURLv7QueryParts = `&range=1d&interval=5m&indicators=close&includeTimestamps=false&includePrePost=false&corsDomain=finance.yahoo.com&.tsrc=finance`

const noDataIndicator = `N/A`

// Stock stores quote information for the particular stock ticker. The data
// for all the fields except 'Advancing' is fetched using Yahoo market API.
Expand Down

0 comments on commit a4b86c4

Please sign in to comment.