API client for Robinhood
Project description
fast_arrow
A robust yet simple API client for Robinhood.
example
from fast_arrow import (
Client,
Stock,
OptionChain,
Option,
)
client = Client(username=username, password=password)
client.authenticate()
#
# fetch the stock info for TLT
#
symbol = "TLT"
stock = Stock.fetch(client, symbol)
#
# get the TLT option chain
#
stock_id = stock["id"]
option_chain = OptionChain.fetch(client, stock_id)
#
# let's get TLT options (calls and puts) for next 3 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
#
ops = Option.mergein_marketdata_list(client, ops)
install
Install the package from pypi
pip install fast_arrow
philosophy
fast_arrow
is a Robinhood api client, not an automated trading system. Thus,
the goal is "keep it simple stupid".
Robinhood as an API has a few different core objects,
- instruments (Option, Stock)
- marketdata (OptionMarketdata, StockMarketdata)
- positions (OptionPosition, StockPosition)
- orders (OptionOrder, StockOrder)
- account stuff (that I'll build for later)
fast_arrow
expects that users want to merge these core objects. For example,
fetch Apple, Inc (Stock) quote data (StockMarketdata) to display the current
price per share of $APPL stock.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fast_arrow-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49a806bcf4a1a78eda6f5bf7f85e0415a604ce84ec9d57ec85e437cbda7858d4 |
|
MD5 | 5fd7364f82b431ad347cfe7ffcda55e9 |
|
BLAKE2b-256 | 211d1ff7d88b60f7a9712c1ef0450e016c394fb1253acfee462d4d1ddbf6149a |