wss-group/bybitapi

A PHP package that implement Bybit API

5.0.0-beta.7 2025-03-11 13:18 UTC

README

Latest Version on Packagist Total Downloads GitHub Tests Action Status Fix Code Style codecov Static Badge

A PHP package that implement Bybit API (Current implementation v5)

Installation

You can install the package via composer:

composer require wss-group/bybitapi

You can publish the config file with:

php artisan vendor:publish --tag="bybit-api-config"

This is the contents of the published config file:

return [
];

Work Progress

Please see PROGRESS for more information about current implementation progress.

Usage

// 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();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.