Closed PopeDCM closed 1 year ago
@PopeDCM I was having troubles with this too, using go get -u github.com/alpacahq/alpaca-trade-api-go/v3/alpaca
from inside of my Alpaca project seemed to do the trick (not a fix, just a workaround)
Now the error message is clearer:
$ go install github.com/alpacahq/alpaca-trade-api-go/v3/alpaca@latest
package github.com/alpacahq/alpaca-trade-api-go/v3/alpaca is not a main package
You can't "install" the SDK, because it's a library, not an executable. As @lilcriispy and the readme suggests, use go get
or go mod tidy
to add it to your project.
After running
go install github.com/alpacahq/alpaca-trade-api-go/v3/alpaca@latest
I get the errorThe go.mod file for the module providing named packages contains one or more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module.