https://github.com/zahav/cryptobot
Free, open source crypto trading bot for Laravel.
https://github.com/zahav/cryptobot
coinspot cryptobot laravel-package
Last synced: 5 months ago
JSON representation
Free, open source crypto trading bot for Laravel.
- Host: GitHub
- URL: https://github.com/zahav/cryptobot
- Owner: zahav
- License: mit
- Created: 2021-01-25T10:07:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-02T16:07:42.000Z (over 4 years ago)
- Last Synced: 2024-04-19T18:20:59.631Z (about 2 years ago)
- Topics: coinspot, cryptobot, laravel-package
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cryptocurrency trading bot for Laravel
This package provides an easily customisable trading bot to implement in your own projects.
It follows a conservative trading strategy and supports the [Coinspot](https://www.coinspot.com.au/api) API.
## Installation via Composer
Add zahav/zahav-laravel to your composer.json:
```php
composer require "zahav/cryptobot"
```
Register our service provider in `config/app.php`, within the `providers` array:
```php
'providers' => [
// ...
Zahav\ZahavLaravel\ZahavServiceProvider::class,
// ...
],
```
To use the configured Zahav client, import the facade each time:
```php
use Zahav\ZahavLaravel\Facades\Zahav;
```
Optionally, you can register an alias in `config/app.php`:
```php
'aliases' => [
// ...
'Zahav' => Zahav\ZahavLaravel\Facades\Zahav::class,
],
```
## Configuration
Publish the default config file to your application so you can make modifications:
```console
foo@bar:~$ php artisan vendor:publish
```
Next, you should configure your CoinspotAPI keys in your application's `.env` file. You can retrieve your Coinspot API keys from the Coinspot settings page:
```console
COINSPOT_KEY=
COINSPOT_SECRET=
```
```console
ZAHAV_STRATEGY=conservative
ZAHAV_BUY_AMOUNT=0.0025
ZAHAV_SELL_AMOUNT=0.025
```
## Usage
Zahav includes an Artisan command that will complete a buy/sell trade pair. You may run the worker using the `zahav:work` Artisan command.
```console
foo@bar:~$ php artisan zahav:work
```
For regular trading, you can add a cron entry to keep your `zahav:work` process running.
```console
0 * * * * php /home/forge/app.com/artisan zahav:work >> /dev/null 2>&1
```