diff --git a/README.md b/README.md new file mode 100644 index 0000000..1e548a3 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# totrader + +Experimental market maker script for TradeOgre. As of now it checks if the bid-ask spread is over a certain threshold and places a buy and sell order above and below the current bid and ask. + +This is still a work in progress. + +## Setup + +``` +# Setup secrets and adjust parameters +cp env-example .env +vim .env + +# Run containers +docker-compose up -d +``` + +## Usage + +This is a command line tool with an option to run continuously or only once. + +``` +$ ./trade.py --help +usage: trade.py [-h] [--market-maker] [--balances] [--update-orders] + [--market-data] [--run] + +Helpful TradeOgre trading script + +optional arguments: + -h, --help show this help message and exit + --market-maker Put in buy/sell orders + --balances Update coin balances of both base and currency + --update-orders Update status of orders + --market-data Update market data + --run Run continuously +``` + +View the results/metrics in your browser at http://localhost:3000 with the Grafana password specified. You'll need to add a datasource for the PostgreSQL database. Dial that in and your graphs should start working. Here's what it looks like: + +![](static/xmr-dashboard-1.png) + +![](static/xmr-dashboard-2.png) diff --git a/env-example b/env-example new file mode 100644 index 0000000..2863137 --- /dev/null +++ b/env-example @@ -0,0 +1,13 @@ +GRAFANA_PASSWORD=xxxx +GRAFANA_URL=localhost:3000 +DB_PASS=yyyyy +DB_USER=trader +DB_NAME=trader_xmr +DB_HOST=127.0.0.1 +TO_USER=zzzzzzzzz +TO_PASS=vvvvvvvvv +TRADE_CURRENCY=WOW +TRADE_AMOUNT=300 +SPREAD_TARGET=4 +AMOUNT_MULTIPLIER=1.2 +ACTIVE_ORDER_LIMIT=50 diff --git a/static/xmr-dashboard-1.png b/static/xmr-dashboard-1.png new file mode 100644 index 0000000..d2acbbe Binary files /dev/null and b/static/xmr-dashboard-1.png differ diff --git a/static/xmr-dashboard-2.png b/static/xmr-dashboard-2.png new file mode 100644 index 0000000..53e126f Binary files /dev/null and b/static/xmr-dashboard-2.png differ