- Go to TD Ameritrade API
- Follow this site [TD] API 申請流程
- Modify client_secret.json.sample and pass it to auth.GetClient
$ go get github.com/z-Wind/gotd
auth := NewAuth()
client := auth.GetClient(clientsecretPath, "TDAmeritrade-go.json")
td, err := New(client)
auth := NewAuth()
auth.SetTLS(TLSCertPath, TLSKeyPath)
client := auth.GetClient(clientsecretPath, "TDAmeritrade-go.json")
td, err := New(client)
call := td.Quotes.GetQuote("VTI")
quote, err := call.Do()