-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marketdata DefaultClient authentication does not seem to work #276
Comments
Have you set the environment variables as described here? |
@LeventeLantos - did you ever figure this out? I'm running into the same issue, even when |
Figured this out, the client := marketdata.NewClient(marketdata.ClientOpts{
APIKey: os.Getenv("APCA_API_KEY_ID"),
APISecret: os.Getenv("APCA_API_SECRET_KEY"),
})
client.GetBars(...)
// etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
marketdata DefaultClient authentication does not seem to work, I have this piece code:
`func printCurrentPrice(symbol string) {
lastQuote, err := marketdata.GetLatestQuote(symbol, marketdata.GetLatestQuoteRequest{
Feed: marketdata.SIP,
Currency: "USD",
})
if err != nil {
fmt.Printf("Failed to get last quote for %s: %s\n", symbol, err)
return
}
}`
This will simple return:
<title>403 Forbidden</title>`$ go run main.go
Failed to get last quote for AAPL:
403 Forbidden
nginx (HTTP 403) `
The text was updated successfully, but these errors were encountered: