Download the PHP package carpenstar/bybitapi-sdk-websockets without Composer

On this page you can find all versions of the php package carpenstar/bybitapi-sdk-websockets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bybitapi-sdk-websockets

Scrutinizer Code Quality Build Status Code Intelligence Status

ByBitAPI - websockets package

[!IMPORTANT] This is an unofficial SDK for interaction with the ByBit exchange. The development is carried out by one person solely on enthusiasm and as far as possible For all questions, you can contact me in Issues, by email: [email protected] or in telegram: @novisad0189

[!IMPORTANT] This package is an extension of bybitapi-sdk-core

Requirements

Install

AVAILABLE CHANNELS
SPOT
Channel name Access View Offical documentation Language
Book Ticker publicEndpoint view view EN, RU
Kline publicEndpoint view view EN, RU
Order Book publicEndpoint view view EN, RU
Public Trade publicEndpoint view view EN, RU
Tickers publicEndpoint view view EN, RU
DERIVATIVES
Channel name Access View Offical documentation Language
Kline publicEndpoint view view EN, RU
Liquidation publicEndpoint view view EN, RU
Order Book publicEndpoint view view EN, RU
Public Trade publicEndpoint view view EN, RU
Tickers publicEndpoint view view EN, RU


Application instance


Setting connection parameters


Starting socket server listening


Processing callbacks from a socket server

As a handler for incoming messages, you need to create your own class that will extend the abstract class Carpenstar\ByBitAPI\Core\Objects\WebSockets\Channels\ChannelHandler

The entry point to the business logic zone is the procedure handle($data, TcpConnection $connection) inside which you should implement the processing of incoming data.

[!WARNING] Please note that each time you subscribe to a channel, the first message that comes is a handshake message, which will indicate the connection status, and only the following messages will contain the information you need.

Example of a message handler class:


Handshake - message

Handshake always comes as the first message after you have established a connection to the socket server, so before starting the business logic, it is recommended to make sure that the connection was successful by calling the isSuccess() function, which will return if successful true


All versions of bybitapi-sdk-websockets with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
workerman/workerman Version 4.1.16
carpenstar/bybitapi-sdk-core Version 5.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package carpenstar/bybitapi-sdk-websockets contains the following files

Loading the files please wait ....