MCPcopy Index your code
hub / github.com/andrewstuart/go-robinhood

github.com/andrewstuart/go-robinhood @v2.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.2.0 ↗ · + Follow
124 symbols 250 edges 26 files 98 documented · 79%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Go Reference

Robinhood the rich and feeding the poor, now automated

Even though robinhood makes me poor

Notice

2022-05-24

Robinhood updated their API and our auth method broke. The new authentication requires using your email as your username, so if you see an error message about an invalid email, you'll need to update your username.

2018-09-27:

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: "my.email@example.com",
  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
}

Extension points exported contracts — how you extend this code

Unknown (Interface)
(no doc)
positions.go

Core symbols most depended-on inside this repo

GetAndDecode
called by 23
client.go
String
called by 14
options.go
nextWeekdayHourMinuteNY
called by 6
times.go
DoAndDecode
called by 6
client.go
nyMinute
called by 3
times.go
IsWeekDay
called by 3
times.go
encode
called by 3
positions.go
MinuteOfDay
called by 2
times.go

Shape

Method 53
Struct 41
Function 24
TypeAlias 5
Interface 1

Languages

Go100%

Modules by API surface

options.go18 symbols
times.go16 symbols
positions.go13 symbols
order.go12 symbols
client.go7 symbols
account.go6 symbols
options-order.go5 symbols
instrument.go5 symbols
currency_pairs.go5 symbols
crypto_order.go5 symbols
portfolios.go4 symbols
marketdata.go4 symbols

For agents

$ claude mcp add go-robinhood \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact