PHP code example of dantecoding / php-binance

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

    

dantecoding / php-binance example snippets


composer 

$bac = new BinanceApiContainer('<your_key>', '<your_secret>');

// Get all orders for a symbol (BNB/BTC pair).
$orders = $bac->getOrderBook(['symbol' => 'BNBBTC']);
var_dump($orders->getBody()->getContents());