package moneymoney import ( "github.com/474420502/gcurl" ) func GetFromAPI() { tp := gcurl.Parse(`curl 'http://quotes.money.163.com/service/chddata.html?code=0601398&start=20140720&end=20150508'`).Temporary() pcode := tp.QueryParam("code") start := tp.QueryParam("start") end := tp.QueryParam("end") for _, code := range GetStocks() { if code.MCAP >= 100*100000000 { pcode.StringSet(code.CODE) start.StringSet("20150101") end.StringSet("20220701") resp, err := tp.Execute() if err != nil { panic(err) } SaveFromCSV(resp.Content()) } } }