REST API for interacting with Barrenero.
- Version: 1.0.0
- Status: Production/Stable
- Author: José Antonio Perdiguero López
This project defines a lightweight REST API on top of Barrenero Miner, providing an easy and simple way to interact with all miners. This API exposes methods for:
- Query current machine status, such as active services, GPU stats...
- Query Ether miner and pool status.
- Restart Ether miner service.
- Query Storj miner status.
- Restart Storj miner service.
- Query Ethereum wallet value and last transactions.
Full documentation for Barrenero project.
This project is free and open sourced, you can use it, spread the word, contribute to the codebase and help us donating:
- Ether:
0x566d41b925ed1d9f643748d652f4e66593cba9c9
- Bitcoin:
1Jtj2m65DN2UsUzxXhr355x38T6pPGhqiA
- PayPal:
barrenerobot@gmail.com
- Docker. Official docs.
- Configure api parameters in setup.cfg file. Parameters explained below.
- Run the service:
docker run -p 80:80 --env-file=/etc/barrenero/api/setup.cfg perdy/barrenero-api:latest uwsgi
Defines the following keys in setup.cfg file:
Put the Django secret key in DJANGO_SECRET_KEY
variable.
More info here.
To create an API superuser password that allows users to do actions such restarting services you must define a password and encrypt it using Django tools:
from django.contrib.auth.hashers import make_password
password = make_password('foo_password')
You should put the result in DJANGO_API_SUPERUSER
variable.
Put your Etherscan API token in DJANGO_ETHERSCAN_TOKEN
variable.
More info here.
Put your Ethplorer API token in DJANGO_ETHPLORER_TOKEN
variable.
More info here.