go-tradier

module
v0.0.0-...-54ce5d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2017 License: MIT

README

go-tradier

Go Report Card GoDoc

Golang library for interacting with the Tradier API

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 library to achieve proper authentication. For a full working example, refer to the examples/ directory.

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.

Made with <3 in Go. Heavily borrowed from and influenced by Google's go-github library

Directories

Path Synopsis
_examples
Package tradier provides a client for interacting with the Tradier API.
Package tradier provides a client for interacting with the Tradier API.
errors
Package errors handles multiple errors that can be returned from the Tradier API Example: { "errors": { "error": [ "Backoffice rejected override of the order.", "InitialMargin" ] } }
Package errors handles multiple errors that can be returned from the Tradier API Example: { "errors": { "error": [ "Backoffice rejected override of the order.", "InitialMargin" ] } }

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL