Skip to content

Neal/robinhood-api-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robinhood API

Build Status Dependency Status devDependency Status Coverage Status license

A Node.js wrapper for the Robinhood API.

Constructor

let rh = new Robinhood({
  username: 'myRobinhoodUsername',
  password: 'myRobinhoodPassword'
});

rh.accounts.get()
  .then(data => {
    console.log(data.body);
    console.log(data.headers);
    console.log(data.statusCode);
  });

Possible Options

  • username
  • password
  • authToken
  • accountNumber
  • apiRoot

Note: Either username and password or authToken is required.

Enviornment Variables

Enviornment varialbes are an alternative to passing them in constructor.

  • ROBINHOOD_USERNAME
  • ROBINHOOD_PASSWORD
  • ROBINHOOD_AUTH_TOKEN
  • ROBINHOOD_ACCOUNT_NUMBER
  • ROBINHOOD_API_ROOT

API Servers

Enviornment URL
Production https://api.robinhood.com
Development http://brokeback.dev.robinhood.com

API Overview

Note: All API methods return a Promise and also have an optional callback.

Accounts

Get All Accounts

GET /accounts/

rh.accounts.getAll(callback);

Get Primary Account

GET /accounts/:accountNumber/

rh.accounts.get(callback);

Check Day Trades for Instrument

GET /accounts/:accountNumber/day_trade_checks/

rh.accounts.checkDayTrade(instrument, callback);

Get Recent Day Trades

GET /accounts/:accountNumber/recent_day_trades/

rh.accounts.recentDayTrades(callback);

Get Dividends

GET /dividends/

rh.accounts.dividends(callback);

Get Dividend

GET /dividends/:id/

rh.accounts.dividend(id, callback);

Get Portfolios

GET /portfolios/:accountNumber/

rh.accounts.portfolios(callback);

Get Positions

GET /positions/

rh.accounts.positions(callback);

Get Position

GET /positions/:accountNumber/:instrumentId

rh.accounts.position(instrumentId, callback);

Ach

Get Relationships

GET /ach/relationships/

rh.ach.getRelationships(callback);

Get Relationship

GET /ach/relationships/:id/

rh.ach.getRelationship(id, callback);

Get Transfers

GET /ach/transfers/

rh.ach.getTransfers(callback);

Get Transfer

GET /ach/transfers/:id/

rh.ach.getTransfer(id, callback);

Get Deposit Schedules

GET /ach/deposit_schedules/

rh.ach.getDepositSchedules(callback);

Get Deposit Schedule

GET /ach/deposit_schedules/:id/

rh.ach.getDepositSchedule(id, callback);

Get Queued Deposit

GET /ach/iav/queued_deposit/

rh.ach.getQueuedDeposit(callback);

Verify Micro Deposits

POST /ach/relationships/:relationshipId/micro_deposits/veryify/

rh.ach.verifyMicroDeposits(relationshipId, amountOne, amountTwo, callback);

Get Bank

GET /ach/banks/:routingNumber/

rh.ach.getBank(routingNumber, callback);

Applications

Get All Applications

GET /applications/

rh.applications.getAll(callback);

Get Application(s) for Type

GET /applications/:type/

rh.applications.get(type, callback);

Auth

Login

POST /api-token-auth/

rh.auth.login(username, password, callback);

Logout

POST /api-token-logout/

rh.auth.logout(callback);

Documents

Request Documents

GET /upload/document_requests/

rh.documents.requests(callback);

Get All

GET /documents/

rh.documents.getAll(callback);

Get Info

GET /documents/:id/

rh.documents.getInfo(id, callback);

Get URL

GET /documents/:id/download/

rh.documents.getUrl(id, callback);

Instruments

For Symbol

GET /instruments/

rh.instruments.forSymbol(symbol, callback);

For Id

GET /instruments/:id/

rh.instruments.forId(id, callback);

Margin

Get Upgrades

GET /margin/upgrades/

rh.margin.getUpgrades(callback);

Post Upgrades

POST /margin/upgrades/

rh.margin.postUpgrades(callback);

Get Settings

GET /settings/margin/:accountNumber/

rh.margin.getSettings(callback);

Markets

Get All Markets

GET /markets/

rh.markets.getAll(callback);

Get Market

GET /markets/:mic/

rh.markets.get(mic, callback);

Get Hours

GET /markets/:mic/:date/

rh.markets.getHours(mic, date, callback);

Midlands

Get Instant Permissions

GET /midlands/permissions/instant/

rh.midlands.getInstantPermissions(callback);

Top Movers

GET /midlands/movers/sp500/

rh.midlands.topMovers(callback);

News

GET /midlands/news/:symbol/

rh.midlands.news(symbol, callback);

Get Notifications Stack

GET /midlands/notifications/stack/

rh.midlands.getNotificationsStack(callback);

Dismiss Notification

POST /midlands/notifications/stack/:id/dismiss/

rh.midlands.dismissNotification(id, callback);

Get ACH Banks

GET /midlands/ach/banks/

rh.midlands.getAchBanks(callback);

Notifications

Get Notifications

GET /notifications/

rh.notifications.get(callback);

Get Settings

GET /settings/notifications/

rh.notifications.getSettings(callback);

Get Devices

GET /notifications/devices/

rh.notifications.getDevices(callback);

Orders

Get All Orders

GET /orders/

rh.orders.getAll(callback);

Get Order

GET /orders/

rh.orders.get(id, callback);

Get Order for Instrument

GET /orders/

rh.orders.forInstrument(instrumentId, callback);

Place Order

POST /orders/

rh.orders.place(opts, callback);

Place Buy Order

POST /orders/

rh.orders.buy(opts, callback);

Place Sell Order

POST /orders/

rh.orders.sell(opts, callback);

Password

Request Reset

POST /password_reset/request/

rh.password.requestReset(email, callback);

Reset

POST /password_reset/

rh.password.reset(token, password, callback);

Quotes

GET /quotes/:symbol/

rh.quotes.get(symbol, callback);

User

Get User

GET /user/

rh.user.get(callback);

Get User Id

GET /user/id/

rh.user.getId(callback);

Get Basic Info

GET /user/basic_info/

rh.user.getBasicInfo(callback);

Get Additional Info

GET /user/additional_info/

rh.user.getAdditionalInfo(callback);

Get Employment

GET /user/employment/

rh.user.getEmployment(callback);

Get Investment Profile

GET /user/investment_profile/

rh.user.getInvestmentProfile(callback);

Get Identity Mismatch

GET /user/identity_mismatch/

rh.user.getIdentityMismatch(callback);

Get CIP Questions

GET /user/cip_questions/

rh.user.getCipQuestions(callback);

Watchlists

Get Watchlists

GET /watchlists/

rh.watchlists.get(callback);

Wire

Get Relationships

GET /wire/relationships/

rh.wire.getRelationships(callback);

Get Transfers

GET /wire/transfers/

rh.wire.getTransfers(callback);

License

MIT

Releases

No releases published

Packages

No packages published