https://github.com/calvn/go-tradier
Go library for interacting with the Tradier API
https://github.com/calvn/go-tradier
go tradier tradier-api
Last synced: 12 months ago
JSON representation
Go library for interacting with the Tradier API
- Host: GitHub
- URL: https://github.com/calvn/go-tradier
- Owner: calvn
- License: mit
- Created: 2016-09-16T06:26:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T05:07:47.000Z (over 9 years ago)
- Last Synced: 2025-02-08T20:23:58.682Z (over 1 year ago)
- Topics: go, tradier, tradier-api
- Language: Go
- Size: 96.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-tradier
[](https://goreportcard.com/report/github.com/calvn/go-tradier)
[ ](https://godoc.org/github.com/calvn/go-tradier/tradier)
Golang library for interacting with the [Tradier API](https://developer.tradier.com/documentation/)
***Note:*** *This library is still under development - use with discretion!*
## Authentication
go-tradier does not directly handle authentication. However, it uses `http.Client`, so authentication can be done by passing an `http.Client` that can handle authentication. For instance, you can use the [oauth2](https://github.com/golang/oauth2) library to achieve proper authentication. For a full working example, refer to the `examples/` directory.
```go
import "golang.org/x/oauth2"
func main() {
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: "... your access token ..."},
)
tc := oauth2.NewClient(oauth2.NoContext, ts)
client := tradier.NewClient(tc)
// Returns the profile of the user
profile, _, err := client.User.Profile()
}
```
## License
This library is licensed under the MIT License as provided in [here](LICENSE.md).
*Made with <3 in Go. Heavily borrowed from and influenced by Google's go-github library*