<commit_before># auto-investor
Python library interfacing with LendingClub. Run this as a cronjob to automatically invest in notes that meet your investment criteria.

[![Build Status](https://travis-ci.org/jbutler/auto-investor.svg?branch=master)](https://travis-ci.org/jbutler/auto-investor)

## Requirements
* Python 3
* pyparsing
* requests

## Configuration
Account configuration and lending criteria are two pieces that you'll need/want to tweak. There are separate config files for each.

### Account configuration
There are five fields of interest in the account configuration json file (config.json):
* iid - This is your account number. Find it on the account summary page
* auth - This is an authentication string used to communicate with LendingClub. You will need access to the API. Find this under "API Settings" on the "Settings" page.
* orderamnt - This is the integer amount to invest in loans that pass your filters. Must be a multiple of $25.
* min_balance - This is your desired minimum account balance. auto-investor will initiate a transfer when your available cash plus the sum of any pending transfers is less than this amount. Keep in mind that money transfers take 4 business days to complete.
* email - Email address to send purchase notification to

### Filters
This is where `auto-investor` shines. It includes a parser which allows you to write arbitrarily complex filters using multiple loan keys and operators. The available loan keys are defined as part of the LendingClub API. You can find these on the developer section of their webpage.

The filter parser supports (in)equalities as well as basic math functions. The return value of a filter must be a boolean!
<commit_msg>Add command line options to README<commit_after># auto-investor
Don't waste your time managing your LendingClub account. Set up a set of filters and let `auto-investor` put your spare cash to work.

[![Build Status](https://travis-ci.org/jbutler/auto-investor.svg?branch=master)](https://travis-ci.org/jbutler/auto-investor)

## Requirements
* Python 3
* pyparsing
* requests

## Command Line Options
Run `python main.py --help` for the most current list of command line options. Currently there are two supported options.
* `-p`, `--productionMode`: This is a required option to do anything interesting. `auto-investor` will not transfer money into your account or invest in loans without it.
* `-t`, `--testFilters`: This is a special mode that will retrieve the currently listed loans and apply each filter to give you confidence that they are well formed. It is recommended to run this after updating your loan filters. No notes will be purchased.

## Configuration
Account configuration and lending criteria are two pieces that you'll need/want to tweak. There are separate config files for each.

### Account configuration
There are five fields of interest in the account configuration json file (config.json):
* iid - This is your account number. Find it on the account summary page
* auth - This is an authentication string used to communicate with LendingClub. You will need access to the API. Find this under "API Settings" on the "Settings" page.
* orderamnt - This is the integer amount to invest in loans that pass your filters. Must be a multiple of $25.
* min_balance - This is your desired minimum account balance. auto-investor will initiate a transfer when your available cash plus the sum of any pending transfers is less than this amount. Keep in mind that money transfers take 4 business days to complete.
* email - Email address to send purchase notification to

### Filters
This is where `auto-investor` shines. It includes a parser which allows you to write arbitrarily complex filters using multiple loan keys and operators. The available loan keys are defined as part of the LendingClub API. You can find these on the developer section of their webpage.

The filter parser supports (in)equalities as well as basic math functions. The return value of a filter must be a boolean!

{'fraction_non_alphanumeric': 0.05606777971592325, 'fraction_numerical': 0.00199352105656616, 'mean_word_length': 4.44640434192673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1385357', 'n_tokens_mistral': 997, 'n_tokens_neox': 951, 'n_words': 582}