Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit 532f491

Browse files
committed
readme. add example.
1 parent da4fc26 commit 532f491

File tree

3 files changed

+56
-9
lines changed

3 files changed

+56
-9
lines changed

Diff for: .gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
config.debug.ini
22
config.test.ini
33
config.dev.ini
4-
dev_data/*
54
*.csv
65

76
# Byte-compiled / optimized / DLL files

Diff for: README.md

+53-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,64 @@
11
# fast_arrow
2-
API client for Robinhood
2+
A robust yet simple API client for Robinhood.
33

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

8-
<hr/>
9-
WARNING. this project is under active development (pre alpha).
10-
USE AT YOUR OWN RISK.
11-
<hr/>
128

9+
## example
10+
11+
```py
12+
from fast_arrow import (
13+
Client,
14+
Stock,
15+
OptionChain,
16+
Option,
17+
)
18+
19+
client = Client(username=username, password=password)
20+
client.authenticate()
21+
22+
#
23+
# fetch the stock info for TLT
24+
#
25+
symbol = "TLT"
26+
stock = Stock.fetch(client, symbol)
27+
28+
#
29+
# get the TLT option chain
30+
#
31+
stock_id = stock["id"]
32+
option_chain = OptionChain.fetch(client, stock_id)
33+
34+
#
35+
# let's get TLT options (calls and puts) for next 3 expiration dates
36+
#
37+
oc_id = option_chain["id"]
38+
eds = option_chain['expiration_dates'][0:3]
39+
40+
#
41+
# get all options on the TLT option chain
42+
#
43+
ops = Option.in_chain(client, oc_id, expiration_dates=eds)
44+
45+
#
46+
# merge in market data fro TLT option instruments
47+
#
48+
ops = Option.mergein_marketdata_list(client, ops)
49+
```
1350

1451
## install
52+
Install the package from pypi
53+
54+
```
1555
pip install fast_arrow
56+
```
1657

17-
## example
18-
@todo
1958

2059
## philosophy
21-
`fast_arrow` is Robinhood api client, not an automated trading system. thus, "keep it simple stupid"
60+
`fast_arrow` is a Robinhood api client, not an automated trading system. Thus,
61+
the goal is "keep it simple stupid".
2262

2363
Robinhood as an API has a few different core objects,
2464
- instruments (Option, Stock)
@@ -42,6 +82,11 @@ Run the test suite via,
4282
make test
4383
```
4484

85+
Run all the examples (make sure you add username/password to config.debug.ini),
86+
```
87+
sh run_all_examples.sh
88+
```
89+
4590
Run the test suite against a specific python version,
4691
```
4792
pipenv run tox -e py36

Diff for: config.debug.ini.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[account]
2+
username = my_username
3+
password = my_password

0 commit comments

Comments
 (0)