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

On this page you can find all versions of the php package carpenstar/bybitapi-sdk-core. 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-core

Scrutinizer Code Quality Build Status Code Intelligence Status

Bybit SDK

NOTICE: This is an unofficial SDK, from an independent developer.

Any questions you are interested in regarding the settings, information about the bugs found, you can leave in Issues, by writing to [email protected] (ru, en) or in telegram: @novisad0189

And yes - the more stars, the more actively this project will develop :-)

Requirements

Installation

SPOT-trading package

DERIVATIVES-trading package

WEBSOCKETS-package

Market Data - V5 (in developing...)

API key generation

https://testnet.bybit.com/app/user/api-management - testnet
https://www.bybit.com/app/user/api-management - production

Application instance:

REST - queries

All endpoints that can be called are divided into two types - public (not requiring authorization) and private (authorization is required for each request).

Using the Derivatives/TickerInfo endpoint as an example, let’s make a request to the exchange API:

The execute() function always returns an object after completing a request, regardless of whether the request was successful implementing the interface Carpenstar\ByBitAPI\Core\Interfaces\IResponseInterface

To get the main body of the response, call the getResult function, which will return a DTO object containing information about the ticker.

In the case of the TickerInfo endpoint, this DTO will be an object that implements the Carpenstar\ByBitAPI\Derivatives\MarketData\TickerInfo\Interfaces\TickerInfoResponse interface

Next, calling the getTickerInfo() function will allow us to get an object with information about the ticker (the following DTO implements the ITickerInfoResponseItemInterface interface):

To summarize the above, as an example code this query might look like this:

An example of calls to the API, as well as a description of the available request/response objects can be found on the page of each endpoint

List of available REST endpoints

ByBit API V3 - DERIVATIVES:

MARKET DATA
Endpoint Access type View in directory Official documentation Language
Funding Rate History publicEndpoint go go EN, RU
Index Price Kline publicEndpoint go go EN, RU
Instrument Info publicEndpoint go go EN, RU
Kline publicEndpoint go go EN, RU
Mark Price Kline publicEndpoint go go EN, RU
Open Interest publicEndpoint go go EN, RU
Order Book publicEndpoint go go EN, RU
Public Trading History publicEndpoint go go EN, RU
Risk Limit publicEndpoint go go EN, RU
Ticker Info publicEndpoint go go EN, RU
CONTRACT - ACCOUNT
Endpoint Access type View in directory Official documentation
Get Trading Fee Rate privateEndpoint go go EN, RU
Wallet Balance privateEndpoint go go EN, RU
CONTRACT - ORDER
Endpoint Access type View in directory Official documentation
Cancel All Order privateEndpoint go go EN, RU
Cancel Order privateEndpoint go go EN, RU
Get Open Orders privateEndpoint go go EN, RU
Get Order List privateEndpoint go go EN, RU
Place Order privateEndpoint go go EN, RU
Replace Order privateEndpoint go go EN, RU
CONTRACT - POSITION
Endpoint Access type View in directory Official documentation Language
Get Closed PnL privateEndpoint go go EN, RU
Get Execution List privateEndpoint go go EN, RU
My Position privateEndpoint go go EN, RU
Set Auto Add Margin privateEndpoint go go EN, RU
Set Leverage privateEndpoint go go EN, RU
Set Risk Limit privateEndpoint go go EN, RU
Set Trading Stop privateEndpoint go go EN, RU
Switch Cross Isolated Margin privateEndpoint go go EN, RU
Switch Position Mode privateEndpoint go go EN, RU
Switch TpSl Mode privateEndpoint go go EN, RU

ByBit API V3 - SPOT:

MARKET DATA
Endpoint Access type View in directory Official documentation Language
Best Bid Ask Price publicEndpoint go go EN, RU
Instrument Info publicEndpoint go go EN, RU
Kline publicEndpoint go go EN, RU
Last Traded Price publicEndpoint go go EN, RU
Merged Order Book publicEndpoint go go EN, RU
Public Trading Records publicEndpoint go go EN, RU
Tickers publicEndpoint go go EN, RU
Order Book publicEndpoint go go EN, RU
TRADE
Endpoint Access type View in directory Official documentation
Place Order privateEndpoint go go EN, RU
Get Order privateEndpoint go go EN, RU
Cancel Order privateEndpoint go go EN, RU
Batch Cancel Order privateEndpoint go go EN, RU
Batch Cancel Order By Id privateEndpoint go go EN, RU
Open Orders privateEndpoint go go EN, RU
Order History privateEndpoint go go EN, RU
Trade History privateEndpoint go go EN, RU
LEVERAGE TOKEN
Endpoint Access type View in directory Official documentation
All Asset Info publicEndpoint go go EN
Market Info publicEndpoint go go EN
Purchase publicEndpoint go go EN
Purchase Redeem History publicEndpoint go go EN
Redeem publicEndpoint go go EN
ACCOUNT
Endpoint Access type View in directory Official documentation
Wallet Balance privateEndpoint go go EN

All versions of bybitapi-sdk-core with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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-core contains the following files

Loading the files please wait ....