A simple yet robust API client for Robinhood
Project description
fast_arrow
A simple yet robust API client for Robinhood
example
from fast_arrow import Client, Stock, OptionChain, Option
#
# Oauth2 authenticate with Robinhood
#
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 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
another Robinhood client?
fast_arrow at its core,
- is a Robinhood api client focused on simple and robust features
- provides first class support for stock and option trading
- organizes code in small and discrete python classes
features
Here's what you can do with fast_arrow (some features still in development)
Stocks
- get quotes
- fetch all stock trades
- fetch historical data
- submit orders
Options
- fetch option quotes
- fetch open option positions
- fetch all option orders (filled, canceled, rejected)
- fetch historical options data
- fetch option events
- generate various option orders
- single
- verticals
- iron condors
- calendars
- diagonals
- submit order
- cancel order
Portfolio
Authentication/Security
- pin SSL certificate (see this PR)
- implments oauth2 automatic refresh
- handle MFA token during login
Want to propose a feature? Pull request changes to the readme.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_arrow-0.2.4.tar.gz.
File metadata
- Download URL: fast_arrow-0.2.4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f089d92583e7a91921c5a5dff08f50c8e117adaf50c7144e14e9fa9ed53c4b0a
|
|
| MD5 |
2b45a91c1462819ebb0cec7e8a41006d
|
|
| BLAKE2b-256 |
ad708c1c743c8e40ce260a8e5f7e8f42549bd0350d04ee8d9e41ca032437a742
|
File details
Details for the file fast_arrow-0.2.4-py3-none-any.whl.
File metadata
- Download URL: fast_arrow-0.2.4-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc58fcec301e27405af0e80be66ca85f38297cf2938fa47cd34de0461de935d4
|
|
| MD5 |
5521b573eaae1841fd38d3e3ac3e4e86
|
|
| BLAKE2b-256 |
ad3ca18ad138b7e5c29cd63b3811baa1573af74810001933785b222b0faa3886
|