1
1
# fast_arrow
2
- API client for Robinhood
2
+ A robust yet simple API client for Robinhood.
3
3
4
4
[ ![ Build Status] ( https://travis-ci.com/westonplatter/fast_arrow.svg?branch=master )] ( https://travis-ci.com/westonplatter/fast_arrow )
5
5
[ ![ Coverage
6
6
Status] ( https://coveralls.io/repos/github/westonplatter/fast_arrow/badge.svg?branch=master )] ( https://coveralls.io/github/westonplatter/fast_arrow?branch=master )
7
7
8
- <hr />
9
- WARNING. this project is under active development (pre alpha).
10
- USE AT YOUR OWN RISK.
11
- <hr />
12
8
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
+ ```
13
50
14
51
## install
52
+ Install the package from pypi
53
+
54
+ ```
15
55
pip install fast_arrow
56
+ ```
16
57
17
- ## example
18
- @todo
19
58
20
59
## 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".
22
62
23
63
Robinhood as an API has a few different core objects,
24
64
- instruments (Option, Stock)
@@ -42,6 +82,11 @@ Run the test suite via,
42
82
make test
43
83
```
44
84
85
+ Run all the examples (make sure you add username/password to config.debug.ini),
86
+ ```
87
+ sh run_all_examples.sh
88
+ ```
89
+
45
90
Run the test suite against a specific python version,
46
91
```
47
92
pipenv run tox -e py36
0 commit comments