Giter Club home page Giter Club logo

robinhood-python's Introduction

robinhood-python ๐Ÿ— 

Robinhood module with convenience scripts for automating common activites (downloading entire history, trading, etc.)

Some current caveats:

  • Development has been in python 3, I'm not taking much care to keep python 2 support at the moment.
  • The scripts currently default to extreme caching policies, use --live to guarantee most recent data.
  • Much of the code will assert (or not) in scenarioes where states and paging is involved where they haven't been handled correctly yet

Security

  • Certificate pinning is used to block against MITM attacks

Module

Scripts

Account

  • login.py
    • Forces a new login and caches the token. Note most scripts will do this automatically so you usually don't need to call this.
  • logout.py
    • Invalidates the current auth token and deletes the cached token
  • enable_mfa.py [app|sms]
    • Enables MFA for login
  • disable_mfa.py
    • Disables MFA for login

Portfolio management

Stocks

Purchasing stocks

  • show_quote.py AMZN [--live]
    • Displays the latest stock quote for the given symbol along with auxilary info
  • order.py [market|limit] [buy|sell] SYMBOL QUANTITY PRICE [--no-cancel]
    • Prints the quote for the given symbol, confirms, and places an order
  • show_pending_orders.py
    • Displays any outstanding stock orders along with position information
  • cancel.py ORDER_ID...
    • Cancels one or more order ids given, or all pending orders if none given
  • show_potentials.py
    • Show stocks and some stats to help decide on positions to push forward on.
      • Note this is basically only useful to myself ATM.
  • show_interesting_stocks.py
    • Show stocks that are on various lists
      • 10 popular S&P 500 stocks with Robinhood users
      • S&P 500 top movers up and down
      • Top 10 and 100 popular sticks with Robinhood users
    • This script is kind of a mess and mostly just a raw dump.

Options

Purchasing options

  • show_options_discoveries.py AMZN [--live]
    • Displays robinhood's options suggestions for the given symbol (pretty raw for now)
  • show_options_quote.py AMZN [--type=call|put] [--date 2018-05-21] [--strike=55] [--live]
    • Displays the quote for the given options contract (pretty raw for now)
      • Can do things like get all $55 puts, get all puts on 2 dates, etc.
  • order_options.py [market|limit] [buy|sell] SYMBOL DATE STRIKE [call|put] QUANTITY PRICE
    • Places an options order
  • show_pending_options_orders.py
    • Displays any outstanding options orders
  • cancel_options.py ORDER_ID...
    • Cancels one or more options order ids given, or all pending options orders if none given

Cryptocurrency

Purchasing cryptocurrency

  • show_crypto_quote.py [-s BTCUSD] [--live]
    • Displays a quote for the given cryptocurrencies or all crypto currencies when none given.
  • order_crypto.py [market|limit] [buy|sell] SYMBOL QUANTITY PRICE
    • Places some cryptocurrency
  • show_pending_crypto_orders.py
    • Displays any outstanding crypto orders
  • cancel_crypto.py ORDER_ID...
    • Cancels one or more crypto order ids given, or all pending crypto orders if none given

Legal

  • This library may have bugs which could result in financial consequences, you are responsible for anything you execute. Inspect the underlying code if you want to be sure it's doing what you think it should be doing.
  • I am not affiliated with Robinhood and this library uses an undocumented API. If you have any questions about them, contact Robinhood directly: https://robinhood.com/
  • By using this library, you understand that you are not to charge or make any money through advertisements or fees. Until Robinhood releases an official API with official guidance, this is only to be used for non-profit activites. I am not responsible if Robinhood cancels your account because of misuse of this library.

robinhood-python's People

Contributors

mstrum avatar jeffeverett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.