PHP code example of techtailor / laravel-binance-api

1. Go to this page and download the library: Download techtailor/laravel-binance-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/ */

    

techtailor / laravel-binance-api example snippets


BINANCE_KEY=YOUR_API_KEY
BINANCE_SECRET=YOUR_SECRET

return [
    'auth' => [
        'key'        => env('BINANCE_KEY', 'YOUR_API_KEY'),
        'secret'     => env('BINANCE_SECRET', 'YOUR_SECRET')
    ],
];

use TechTailor\BinanceApi\BinanceAPI;

$binance = new BinanceAPI();

$time = $binance->getTime();

$binance = new BinanceApi();

$binance->setApi($apiKey, $secretKey);

$accountInfo = $binance->getAccountInfo();
bash
php artisan vendor:publish --tag="binance-api-config"