1. Go to this page and download the library: Download obydul/lypto-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// add the service provider to your `$providers` array in `config/app.php` file
Obydul\LyptoAPI\LyptoAPIServiceProvider::class
// and add these lines to `$aliases` array
'Binance' => Obydul\LyptoAPI\Facades\Binance::class,
'TAAPI' =>Obydul\LyptoAPI\Facades\TAAPI::class,
php artisan optimize
// exchange
LYPTO_API_MODE="sandbox" // sanbox or live
LYPTO_API_BINANCE_KEY="your-binane-api-key"
LYPTO_API_BINANCE_SECRET="your-binane-api-secret"
// tools
LYPTO_API_TAAPI_SECRET="your-taapi-secret"
use Obydul\LyptoAPI\Libraries\LyptoRequest;
$request = new LyptoRequest();
$request->param1 = 'Value 1';
$request->param2 = "Value 2";
$request->param2 = "Value 2";
use Obydul\LyptoAPI\Exchanges\Binance;
// create a Binance object
$binance = new Binance();
// create order
$binance->createOrder($request);
// using facade
use Obydul\LyptoAPI\Facades\Binance;
Binance::createOrder($request);
$api_key = "YOUR_API_KEY";
$api_secret = "YOUR_API_SECRET";
$mode = "sandbox"; // default is live
$this->binance = new Binance($api_key, $api_secret, $mode); // mode doesn't need to pass for live
$this->binance = new Binance($api_key, $api_secret); // live
// using facade
use Obydul\LyptoAPI\Facades\Binance;
$account_info = Binance::config($api_key, $api_secret, $mode)->accountInfo(); // sandbox
$account_info = Binance::config($api_key, $api_secret)->accountInfo(); // live
use Obydul\LyptoAPI\Tools\TAAPI;
$taapi = new TAAPI();
$request = new LyptoRequest();
$indicator_endpoint = "rsi";
$taapi->get($indicator_endpoint, $request);
// call via facade
use Obydul\LyptoAPI\Facades\TAAPI;
TAAPI::get($indicator_endpoint, $request);