All Projects → westonplatter → Fast_arrow

westonplatter / Fast_arrow

Licence: mit
(no longer maintained) A simple yet robust (stock+options) API client for Robinhood

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fast arrow

cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-83.46%)
Mutual labels:  trading, stocks, quantitative-finance
Alphapy
Automated Machine Learning [AutoML] with Python, scikit-learn, Keras, XGBoost, LightGBM, and CatBoost
Stars: ✭ 564 (+344.09%)
Mutual labels:  portfolio, trading, stocks
AutoTrader
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.
Stars: ✭ 227 (+78.74%)
Mutual labels:  trading, stocks, quantitative-finance
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (+3.94%)
Mutual labels:  trading, quantitative-finance, stocks
Stocksharp
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
Stars: ✭ 4,601 (+3522.83%)
Mutual labels:  trading, quantitative-finance, stocks
Tradingstrategies
Algorithmic trading strategies
Stars: ✭ 120 (-5.51%)
Mutual labels:  trading, quantitative-finance
Machinelearningstocks
Using python and scikit-learn to make stock predictions
Stars: ✭ 897 (+606.3%)
Mutual labels:  trading, quantitative-finance
Ta4j
A Java library for technical analysis.
Stars: ✭ 948 (+646.46%)
Mutual labels:  trading, stocks
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-52.76%)
Mutual labels:  trading, quantitative-finance
Gemini
Backtesting for sleepless cryptocurrency markets
Stars: ✭ 497 (+291.34%)
Mutual labels:  trading, quantitative-finance
Robin stocks
This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
Stars: ✭ 967 (+661.42%)
Mutual labels:  trading, quantitative-finance
Backtesting.py
🔎 📈 🐍 💰 Backtest trading strategies in Python.
Stars: ✭ 1,124 (+785.04%)
Mutual labels:  trading, stocks
Research
Notebooks based on financial machine learning.
Stars: ✭ 714 (+462.2%)
Mutual labels:  trading, quantitative-finance
Gym Anytrading
The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
Stars: ✭ 627 (+393.7%)
Mutual labels:  trading, stocks
Order Matcher
simple matching engine supports limit, market, stop-loss, iceberg, IOC, FOK, GTD orders
Stars: ✭ 22 (-82.68%)
Mutual labels:  trading, stocks
Go Robinhood
A golang library for interacting with the Robinhood private API
Stars: ✭ 48 (-62.2%)
Mutual labels:  trading, stocks
Reddit Sentiment Analysis
This program goes thru reddit, finds the most mentioned tickers and uses Vader SentimentIntensityAnalyzer to calculate the ticker compound value.
Stars: ✭ 97 (-23.62%)
Mutual labels:  trading, stocks
Portfolio
A simple tool to calculate the overall performance of an investment portfolio.
Stars: ✭ 1,326 (+944.09%)
Mutual labels:  portfolio, stocks
Quant
Codera Quant is a Java framework for algorithmic trading strategies development, execution and backtesting via Interactive Brokers TWS API or other brokers API
Stars: ✭ 104 (-18.11%)
Mutual labels:  trading, quantitative-finance
Tradingview Trainer
A lightweight app for practicing your trading on Tradingview
Stars: ✭ 106 (-16.54%)
Mutual labels:  trading, stocks

PLEASE NOTE - PROJECT IS UNMAINTAINED

I've made a personal choice to use a different brokerage due to Robinhood's outages during the Covid19 market moves. There are some other fantastic Robinhood focused python clients out there. I'd suggest finding them and using them going forward. Best of luck.

fast_arrow

A simple yet robust (stock+options) API client for Robinhood

Build Status   Coverage Status   Version

please note - breaking changes introduced in 1.0.0 release

Sometime during Spring 2019, Robinhood changed how their API handles authentication. In order to adapt to those changes, I've moved "authentication" outside this library to fast_arrow_auth, https://github.com/westonplatter/fast_arrow_auth.

Please see:

  • issue 35 for a detailed account of the issue
  • this comment for the approach I've taken to remediate auth issues
  • this PR for a run down on exact code changes

I have released these changes under version 1.0.0 to follow semantic version guidelines (since auth changes are incompatible API changes).

example

from fast_arrow import Client, Stock, OptionChain, Option

#
# new auth process as of 1.0.0
# get auth_data (see https://github.com/westonplatter/fast_arrow_auth)
#
with open("fast_arrow_auth.json") as f:
    auth_data = json.loads(f.read())

#
# initialize client with auth_data
#
client = Client(auth_data)

#
# fetch the stock info for TLT
#
symbol = "TLT"
md = StockMarketdata.quote_by_symbol(client, symbol)

#
# get the TLT option chain
#
stock_id = md["instrument"].split("/")[-2]
option_chain = OptionChain.fetch(client, stock_id, symbol)

#
# let's get TLT options (calls and puts) for next 4 expiration dates
#
oc_id = option_chain["id"]
eds = option_chain['expiration_dates'][0:3]

#
# get all options on the TLT option chain
#
ops = Option.in_chain(client, oc_id, expiration_dates=eds)

#
# merge in market data fro TLT option instruments (ask, bid, delta, theta, etc)
#
ops = Option.mergein_marketdata_list(client, ops)

install

Install the package from pypi,

pip install fast_arrow

design principles

You might be asking, "yet another Robinhood client? There's already a few out there. What's different about this one?"

fast_arrow holds to these design principles,

  • focus on simple features that expose data. Don't interpret data.
  • make stock & option operations easy to reason through & execute with code
  • organize code in small and discrete python classes
  • use fast_arrow_auth to handle authentication process

features

Here's what you can do with fast_arrow (some features still in development)

Stocks

  • [x] get quotes
  • [ ] fetch historical data
  • [x] fetch all stock trades
  • [ ] submit orders
  • [ ] fetch earning events (past and future)
  • [ ] fetch company news articles
  • [ ] fetch company fundamentals
  • [x] fetch popularity data

Options

  • [x] fetch option quotes (example)
  • [x] fetch open option positions (example)
  • [x] fetch all option orders (filled, canceled, rejected)
  • [x] fetch historical options data (example)
  • [x] fetch option events (example)
  • [ ] generate option strategy orders
  • [ ] generate humanized names for option strategies
  • [x] submit order (example)
  • [x] cancel order (example)
  • [x] replace order (example)

Portfolio

  • [x] fetch historical value of portfolio (example)

Authentication/Security

Want to propose a feature? Open a feature request or open a Pull Request.

development

Install pipenv, and then run,

pipenv install --dev

Run the test suite via,

make test

Run all the examples (make sure you add username/password to config.debug.ini),

sh run_all_examples.sh

Run the test suite against a specific python version,

pipenv run tox -e py36

releases

Adding so I don't forget the next time I release a version,

python setup.py sdist bdist_wheel
twine upload dist/*

supporting libraries

projects using fast_arrow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].