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

Commit d1014bc

Browse files
committed
started
0 parents  commit d1014bc

File tree

6 files changed

+226
-0
lines changed

6 files changed

+226
-0
lines changed

.gitignore

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
config.debug.ini
2+
dev_data/*
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# Installer logs
32+
pip-log.txt
33+
pip-delete-this-directory.txt
34+
35+
# Unit test / coverage reports
36+
htmlcov/
37+
.tox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
.hypothesis/
45+
.pytest_cache/
46+
47+
# Translations
48+
*.mo
49+
*.pot
50+
51+
# Django stuff:
52+
*.log
53+
local_settings.py
54+
db.sqlite3
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Sphinx documentation
61+
docs/_build/
62+
63+
# PyBuilder
64+
target/
65+
66+
# Jupyter Notebook
67+
.ipynb_checkpoints
68+
69+
# pyenv
70+
.python-version
71+
72+
# celery beat schedule file
73+
celerybeat-schedule
74+
75+
# SageMath parsed files
76+
*.sage.py
77+
78+
# Environments
79+
.env
80+
.venv
81+
env/
82+
venv/
83+
ENV/
84+
env.bak/
85+
venv.bak/
86+
87+
# mkdocs documentation
88+
/site
89+
90+
# mypy
91+
.mypy_cache/

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2018 Weston Platter
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# fast_arrow - API client for RH
2+
A simple, humble, and direct API client for Robinhood
3+
4+
<hr/>
5+
WARNING - THIS IS UNDER ACTIVE DVELOPMENT (pre alpha). USE AT YOUR OWN
6+
RISK.
7+
<hr/>
8+
9+
10+
## install
11+
12+
## example
13+
14+
## philosophy
15+
16+
## development
17+
18+
## license
19+
See LICENSE file.

fast_arrow/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

fast_arrow/cli.py

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import click
2+
import functools
3+
4+
5+
# def get_username_password(config_file):
6+
# import configparser
7+
# config = configparser.ConfigParser()
8+
# config.read(config_file)
9+
#
10+
# username = config['account']['username']
11+
# password = config['account']['password']
12+
#
13+
# account = {
14+
# 'username': username,
15+
# 'password': password}
16+
# return account
17+
18+
19+
def common_options(func):
20+
@click.option('--debug/--no-debug', default=False)
21+
@functools.wraps(func)
22+
def wrapper(*args, **kwargs):
23+
return func(*args, **kwargs)
24+
return wrapper
25+
26+
27+
@click.group()
28+
def cli():
29+
pass
30+
31+
32+
# @cli.command()
33+
# @click.option('--config-file', default="config.ini", required=False)
34+
# @click.option('--trades', default="stock",
35+
# type=click.Choice(['stock', 'option']), required=False)
36+
# @click.option('--duration', default="1m")
37+
# @click.option('--export-file', default="default.csv", required=False)
38+
# @common_options
39+
# def export_history(debug, duration, config_file, trades, export_file):
40+
# if debug and config_file == "config.ini":
41+
# config_file = "config.debug.ini"
42+
# account = get_username_password(config_file)
43+
#
44+
# if trades == 'stock':
45+
# stock_orders = fetch.stock_orders(account, {})
46+
# click.echo("-- sm: Fetched {} stock orders".format(len(stock_orders)))
47+
#
48+
# click.echo("-- sm: Exporting to stock_orders.cvs")
49+
# export.stock_orders(stock_orders, {})
50+
#
51+
# elif trades == 'option':
52+
# option_orders = fetch.option_orders(account, {})
53+
# click.echo("-- sm: Fetched {} option orders".format(len(option_orders)))
54+
#
55+
# click.echo("-- sm: Exporting to option_orders.csv")
56+
# export.option_orders(option_orders, {})
57+
#
58+
# click.echo("-- sm: Finished")
59+
60+
@cli.command()
61+
@common_options
62+
def check(debug):
63+
click.echo("fa.check -- you're good to go")
64+
65+
66+
if __name__ == '__main__':
67+
cli()

setup.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from setuptools import setup
2+
3+
with open("README.md", "r") as fh:
4+
long_description = fh.read()
5+
6+
setup(name='fast_arrow',
7+
version='0.0.1',
8+
description='API client for Robinhood',
9+
long_description=long_description,
10+
long_description_content_type="text/markdown",
11+
author='Weston Platter',
12+
author_email='[email protected]',
13+
url='https://github.com/westonplatter/fast_arrow/',
14+
packages=['fast_arrow'],
15+
# install_requires=[
16+
# 'click',
17+
# 'Robinhood==1.0.1',
18+
# ],
19+
# dependency_links=[
20+
# # # this git commit hash is master as of July 14th. It's 64 commits ahead of release 1.0.1
21+
# # 'https://github.com/Jamonek/Robinhood/archive/d21b1907dfa0ec9ba04177e597350b7d2a1ef31e.zip#egg=Robinhood-1.0.1',
22+
#
23+
# 'https://github.com/westonplatter/Robinhood/archive/6294a5c3d53dd7553c05c272ebeb069df1c86aa2.zip#egg=Robinhood-1.0.1',
24+
# ],
25+
entry_points='''
26+
[console_scripts]
27+
fa=fast_arrow.cli:cli
28+
''',
29+
)

0 commit comments

Comments
 (0)