Skip to content

A golang library for interacting with the Robinhood private API

License

Notifications You must be signed in to change notification settings

elanamir/go-robinhood

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reference

Robinhood the rich and feeding the poor, now automated

Even though robinhood makes me poor

Notice

If you have used this library before, and use credential caching, you will need to remove any credential cache and rebuild if you experience errors.

General usage

cli, err := robinhood.Dial(&robinhood.OAuth{
  Username: "andrewstuart",
  Password: "mypasswordissecure",
})

// err

i, err := cli.GetInstrumentForSymbol("SPY")

// err

o, err := cli.Order(i, robinhood.OrderOpts{
  Price: 100.0,
  Side: robinhood.Buy,
  Quantity: 1,
})

// err

time.Sleep(5*time.Second) //Let me think about it some more...

// Ah crap, I need to buy groceries.

err := o.Cancel()

if err != nil {
  // Oh well
}

About

A golang library for interacting with the Robinhood private API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%