The following code wil generate a "portfolio" (e.g. "folio.smith.json") for an array of given stocks (e.g. "YHOO", "AAPL", and "GOOG").
package main
import "github.com/openwonk/yafin"
func main() {
symbols := []string{"YHOO", "AAPL", "GOOG"}
name := "Smith" // name of the portfolio (no spaces)
yafin.CreatePortfolio(symbols, name)
}
OpenWonk © 2015 MIT License