<commit_before># Radiant brook

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/badges/build.png?b=master)](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/build-status/master) [![codecov.io](http://codecov.io/github/thedavidmeister/radiant-brook/coverage.svg?branch=master)](http://codecov.io/github/thedavidmeister/radiant-brook?branch=master)

## What is Radiant brook?

A simple command line process that scans a market, calculates percentiles of the market, then places bids/asks across the spread based on these percentiles.

Duplicates trades are detected, within a configurable tolerance, and will not be placed.

Additionally, historical data of your account balance can be collected using a snapshot tool and pushed to Keen.IO.

## What things can be traded?

Currently only Bitcoin.

## Why bitcoin?

Because it's possible to trade bitcoin with a relatively low balance (a few hundred $USD is enough to get started) which makes it easy to prototype things and make mistakes without losing the house.

## What markets are supported?

Only Bitstamp currently.

## What markets might be supported in the future?

Other Bitcoin markets are obvious candidates for relatively swift integrations. Kraken is high on the list of candidates, for example.

Gold/Silver markets with APIs, like [BullionVault](https://www.bullionvault.com/help/API_terms.html), for example.

Other cryptocurrency markets.

Other things that can be bought/sold relatively easily through an API, with a public order book for gauging market depth.

## Is this a high frequency trading bot?

No, for a few reasons:

1. The bot has no concept of frequency, it looks for and places trades once per run. Scheduling runs has to be handled by some external process, like cron jobs in the OS, for example.
2. It relies on consuming RESTful APIs, which will generally be too slow to compete with realtime streaming APIs, such as websockets.
3. The algorithm this bot uses sees diminishing returns from increasing the frequency of market scans for sane (profitable) configurations.

## What is it written in?

Symfony 2, PHP.

Also, for snapshots to work, you will need a free [Keen.IO](https://keen.io/) subscription.

## Why don't you write it in X?

Maybe, someday.

## Does it have unit tests?

Yes.

## How do I set this up for myself?

1. Find the `.env.example` file (check `src/AppBundle`) and then create a `.env` file with your own settings/API keys OR export environment variables for each.
2. Run `app/console trade:bitstamp` whenever you like, this could even be a cron job or whatever

## What is the license?

MIT license, same as Symfony 2. See License.md.

Specifically, it is worth noting that MIT contains the following:

````
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
````

If it is not clear to you what this means, please consult a legal professional.
<commit_msg>added codecov graph<commit_after># Radiant brook

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/badges/build.png?b=master)](https://scrutinizer-ci.com/g/thedavidmeister/radiant-brook/build-status/master) [![codecov.io](http://codecov.io/github/thedavidmeister/radiant-brook/coverage.svg?branch=master)](http://codecov.io/github/thedavidmeister/radiant-brook?branch=master)
![codecov.io](http://codecov.io/github/thedavidmeister/radiant-brook/branch.svg?branch=master)

## What is Radiant brook?

A simple command line process that scans a market, calculates percentiles of the market, then places bids/asks across the spread based on these percentiles.

Duplicates trades are detected, within a configurable tolerance, and will not be placed.

Additionally, historical data of your account balance can be collected using a snapshot tool and pushed to Keen.IO.

## What things can be traded?

Currently only Bitcoin.

## Why bitcoin?

Because it's possible to trade bitcoin with a relatively low balance (a few hundred $USD is enough to get started) which makes it easy to prototype things and make mistakes without losing the house.

## What markets are supported?

Only Bitstamp currently.

## What markets might be supported in the future?

Other Bitcoin markets are obvious candidates for relatively swift integrations. Kraken is high on the list of candidates, for example.

Gold/Silver markets with APIs, like [BullionVault](https://www.bullionvault.com/help/API_terms.html), for example.

Other cryptocurrency markets.

Other things that can be bought/sold relatively easily through an API, with a public order book for gauging market depth.

## Is this a high frequency trading bot?

No, for a few reasons:

1. The bot has no concept of frequency, it looks for and places trades once per run. Scheduling runs has to be handled by some external process, like cron jobs in the OS, for example.
2. It relies on consuming RESTful APIs, which will generally be too slow to compete with realtime streaming APIs, such as websockets.
3. The algorithm this bot uses sees diminishing returns from increasing the frequency of market scans for sane (profitable) configurations.

## What is it written in?

Symfony 2, PHP.

Also, for snapshots to work, you will need a free [Keen.IO](https://keen.io/) subscription.

## Why don't you write it in X?

Maybe, someday.

## Does it have unit tests?

Yes.

## How do I set this up for myself?

1. Find the `.env.example` file (check `src/AppBundle`) and then create a `.env` file with your own settings/API keys OR export environment variables for each.
2. Run `app/console trade:bitstamp` whenever you like, this could even be a cron job or whatever

## What is the license?

MIT license, same as Symfony 2. See License.md.

Specifically, it is worth noting that MIT contains the following:

````
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
````

If it is not clear to you what this means, please consult a legal professional.

{'fraction_non_alphanumeric': 0.07691228070175439, 'fraction_numerical': 0.0019649122807017545, 'mean_word_length': 4.664546899841017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, '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': '4342179', 'n_tokens_mistral': 2060, 'n_tokens_neox': 1949, 'n_words': 929}