Skip to content

Commit

Permalink
readme. add example.
Browse files Browse the repository at this point in the history
  • Loading branch information
westonplatter committed Aug 25, 2018
1 parent da4fc26 commit 532f491
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config.debug.ini
config.test.ini
config.dev.ini
dev_data/*
*.csv

# Byte-compiled / optimized / DLL files
Expand Down
61 changes: 53 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,64 @@
# fast_arrow
API client for Robinhood
A robust yet simple API client for Robinhood.

[![Build Status](https://travis-ci.com/westonplatter/fast_arrow.svg?branch=master)](https://travis-ci.com/westonplatter/fast_arrow)
[![Coverage
Status](https://coveralls.io/repos/github/westonplatter/fast_arrow/badge.svg?branch=master)](https://coveralls.io/github/westonplatter/fast_arrow?branch=master)

<hr/>
WARNING. this project is under active development (pre alpha).
USE AT YOUR OWN RISK.
<hr/>

## example

```py
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
```

## example
@todo

## philosophy
`fast_arrow` is Robinhood api client, not an automated trading system. thus, "keep it simple stupid"
`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)
Expand All @@ -42,6 +82,11 @@ 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
Expand Down
3 changes: 3 additions & 0 deletions config.debug.ini.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[account]
username = my_username
password = my_password

0 comments on commit 532f491

Please sign in to comment.