���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/trader/vendor/jaggedsoft/php-binance-api/examples/single/ |
<?php // Works without composer, supports php 5.6 require 'binance-api-single.php'; $api = new Binance("<key>","<secret>"); // Get latest price of all symbols $tickers = $api->prices(); print_r($tickers); // List prices of all symbols // Get latest price of a symbol $price = $api->price("BNBBTC"); echo "Price of BNB: {$price} BTC.".PHP_EOL; // Get balances for all of your positions, including estimated BTC value $balances = $api->balances($tickers); print_r($balances); echo "BTC owned: ".$balances['BTC']['available'].PHP_EOL; echo "ETH owned: ".$balances['ETH']['available'].PHP_EOL; echo "Estimated Value: ".$api->btc_value." BTC".PHP_EOL; // Getting 24hr ticker price change statistics for a symbol $prevDay = $api->prevDay("BNBBTC"); print_r($prevDay); echo "BNB price change since yesterday: ".$prevDay['priceChangePercent']."%".PHP_EOL;