PHP code example of wss-group / bybitapi

1. Go to this page and download the library: Download wss-group/bybitapi 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/ */

    

wss-group / bybitapi example snippets


return [
];

// Account group
\BybitApi\Facades\Account::actingAs($entity)->getCollateralInfo('BTC');

// Asset group
\BybitApi\Facades\Asset::actingAs($entity)->getSubUID();

// Market group
\BybitApi\Facades\Market::actingAs($entity)->getBybitServerTime();

// Position group
\BybitApi\Facades\Position::actingAs($entity)->confirmNewRiskLimit(\BybitApi\Enums\Category::INVERSE, 'BTCUSDT');

// Trade group
\BybitApi\Facades\Trade::actingAs($entity)->cancelAllOrders(\BybitApi\Enums\Category::INVERSE);

// Trade group
\BybitApi\Facades\User::actingAs($entity)->getApiKeyInformation();
bash
php artisan vendor:publish --tag="bybit-api-config"