1. Go to this page and download the library: Download fcsapi/websocket 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/ */
fcsapi / websocket example snippets
<!-- Include JS library from CDN -->
<script src="https://cdn.jsdelivr.net/gh/fcsapi/websocket-php/fcs-client-lib.js"></script>
<!-- Or local file -->
<script src="<?= $baseUrl
$apiKey = 'YOUR_API_KEY'; // Or use 'fcs_socket_demo' for testing
$symbol = 'BINANCE:BTCUSDT';
$timeframe = '1D';