8000 GitHub - sckor/quote: A golang based utility library modelled after the sql package for retrieving simple stock quotes
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sckor/quote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quote

A golang based utility library modelled after the sql package for retrieving simple stock quotes

Overview

Probably the easiest way to get going is to use go get to download the Yahoo finance quote driver which also includes a sample executable that shows how to make use of the quote utility.

The yahoo driver can be found here: https://github.com/sckor/yahoo

The sample code is located at: github.com/sckor/yahoo/yahoo-quote/yahoo-quote.go

Usage

Import the quote package and the driver package (in this case, it shows the Yahoo finance driver)

import (
	"github.com/sckor/quote"
	_ "github.com/sckor/yahoo"
)

Get access to the Quote Source by using Open and pass in the name of the driver and any additional driver args

qs, err := quote.Open("yahoo", "")

You can then retrieve a list of quotes by using the quote Retrieve function and supplying a list of tickers

tickers := []string{"MSFT", "AAPL"}
q, err := quote.Retrieve(qs, tickers)

About

A golang based utility library modelled after the sql package for retrieving simple stock quotes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0