Download the PHP package tigusigalpa/bitget-php without Composer

On this page you can find all versions of the php package tigusigalpa/bitget-php. 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 bitget-php

Bitget PHP/Laravel Client/SDK/Client

Bitget PHP Laravel SDK

Tests Coverage CodeQL Actions Static Analysis Security Audit Codecov

A production-grade PHP SDK for the Bitget Unified Trading Account (UTA) API v3, with seamless Laravel 10-13 integration. Phase 1 covers Market, Account, and Trade REST services plus a reconnecting WebSocket client with a pluggable transport.

Package: a matching Go SDK is available at tigusigalpa/bitget-go.

What's inside

Install

Laravel setup

The service provider and Bitget facade are auto-discovered. Publish the config file:

Plain PHP (no Laravel)

Configuration

config/bitget.php key Env var Default
api_key BITGET_API_KEY ''
secret_key BITGET_SECRET_KEY ''
passphrase BITGET_PASSPHRASE ''
demo BITGET_DEMO false
base_url BITGET_BASE_URL https://api.bitget.com
locale BITGET_LOCALE en-US

REST API coverage (Phase 1)

Category Methods Docs
Market (public) getInstruments, getTickers, getOrderBook Instruments · Tickers · OrderBook
Account (private) getAssets, getSettings, setLeverage Get-Account · Get-Account-Setting · Change-Leverage
Trade (private) placeOrder, modifyOrder, cancelOrder, getOpenOrders, getOrderHistory, getPositions Place-Order · Modify-Order · Cancel-Order · Get-Order-Pending · Get-Order-History · Get-Position

Full mapping with HTTP methods and paths: docs/endpoints.md.

WebSocket

For private channels (e.g. order fills), pass credentials to the constructor — connect() authenticates automatically:

connect() is safe to call repeatedly while the socket is open. subscribe() is idempotent per channel, preventing duplicate subscription frames and unnecessary quota use. listen() blocks the current process, answers Bitget's text-frame ping/pong heartbeat, and — on an unexpected disconnect — reconnects with exponential backoff (1s → 60s cap) and restores every active channel in one subscription frame. The default transport (TextalkConnection) is synchronous; to run under a non-blocking event loop (ReactPHP, Amp, Laravel Octane), implement Tigusigalpa\Bitget\WebSocket\ConnectionInterface and pass it as WebsocketClient's $connection constructor argument.

Implemented private channel: fast-fill. Other channels work through the same subscribe()/listen() API; see docs/endpoints.md.

Demo trading

Set demo: true (or BITGET_DEMO=true) together with a Demo API key from the Bitget console to send paptrading: 1 on every REST request, or use WebsocketClient::DEMO_PUBLIC_URL/DEMO_PRIVATE_URL for WebSocket. Always validate new code against demo credentials before pointing it at a live account:

Errors

Tests

Unit tests run fully offline against a mocked Guzzle transport (MockHandler) — no network access or credentials required.

Contributing

  1. Fork and branch off main.
  2. Add/update tests for any behavior change (vendor/bin/phpunit must pass).
  3. Every public method must include a Docs: line in its docblock linking to the exact Bitget API documentation page it implements.
  4. Update docs/endpoints.md for new endpoints.

Security

Found a vulnerability? Email [email protected] directly — please don't open a public issue.

License

MIT. See LICENSE.

Author

Igor Sazonov — @tigusigalpa — [email protected]

Links


Not affiliated with Bitget. Test on demo before going live.


All versions of bitget-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.15.2
phrity/websocket Version ^3.7.3
psr/log Version ^3.0
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 tigusigalpa/bitget-php contains the following files

Loading the files please wait ...