8000 GitHub - softwarebygabe/go-robinhood: A golang library for interacting with the Robinhood private API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

softwarebygabe/go-robinhood

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robinhood API Golang Client

This library is forked from Andrew Stuart's and builds upon the work done there, namely the oauth2 implementation and the characterization of a lot of the API endpoints and response types.

My implementation aims to add more API functionality as it becomes available from Robinhood, as well as to improve the usability and flexibility of the library and its functions by implementing the Functional Options pattern, and utilizing all-purpose libraries like Blend's Go SDK for things like logging and webutils.

General usage

client, _ := robinhood.NewClient(
  robinhood.NewOAuth("username", "password"),
)

instrument, _ := robinhood.GetInstrumentForSymbol("SPY")

historicalData, _ := robinhood.GetHistoricals(
  instrument,
  robinhood.OptHistoricalsInterval5Minute(),
  robinhood.OptHistoricalsSpanDay(),
  robinhood.OptHistoricalsBoundsTrading(),
)

// Do something with the data :)

Client Options

import (
  "github.com/blend/go-sdk/logger"
)

func main() {
  logger := logger.MustNew()

  client, _ := robinhood.NewClient(
    robinhood.NewOAuth("username", "password"),
    robinhood.OptClientLog(logger),
  )

  // now client will use the provided logger...
}

About

A golang library for interacting with the Robinhood private API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0