PHPackages                             c2s/itiger-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. c2s/itiger-php-sdk

ActiveLibrary[API Development](/categories/api)

c2s/itiger-php-sdk
==================

PHP SDK for iTiger API

v1.0.0(6y ago)17MITPHPPHP &gt;=5.5.0CI failing

Since Oct 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/c2s/itiger-php-sdk)[ Packagist](https://packagist.org/packages/c2s/itiger-php-sdk)[ Docs](https://github.com/c2s/itiger-php-sdk)[ RSS](/packages/c2s-itiger-php-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

PHP SDK for Tiger API
=====================

[](#php-sdk-for-tiger-api)

> The detailed document , in order to receive the latest API change notifications, please `Watch` this repository.

Requirements
------------

[](#requirements)

DependencyRequirement[PHP](https://secure.php.net/manual/en/install.php)`>=5.5.0` `Recommend PHP7+`[guzzlehttp/guzzle](https://github.com/guzzle/guzzle)`~6.0`Install
-------

[](#install)

> Install package via [Composer](https://getcomposer.org/).

```
composer require "c2s/itiger-php-sdk:~1.0.0"
```

Usage
-----

[](#usage)

### Choose environment

[](#choose-environment)

EnvironmentBaseUri*Production* `DEFAULT`*Sandbox*```
// Switch to the sandbox environment
TigerApi::setBaseUri('https://openapi-sandbox.itiger.com/gateway');
```

### Debug mode &amp; logging

[](#debug-mode--logging)

```
// Debug mode will record the logs of API and WebSocket to files in the directory "TigerApi::getLogPath()" according to the minimum log level "TigerApi::getLogLevel()".
TigerApi::setDebugMode(true);

// Logging in your code
// TigerApi::setLogPath('/tmp');
// TigerApi::setLogLevel(Monolog\Logger::DEBUG);
TigerApi::getLogger()->debug("I'am a debug message");
```

### Examples

[](#examples)

> See the [test case](tests) for more examples.

#### Example of API `without` authentication

[](#example-of-api-without-authentication)

```
use Tiger\SDK\PublicApi\Time;

$api = new Time();
$timestamp = $api->timestamp();
var_dump($timestamp);
```

#### Example of API `with` authentication

[](#example-of-api-with-authentication)

```
use Tiger\SDK\Auth;
use Tiger\SDK\PrivateApi\Account;
use Tiger\SDK\Exceptions\HttpException;
use Tiger\SDK\Exceptions\BusinessException;

$auth = new Auth($publicKey, $privateKey);
$api = new Base($auth);

try {
    $result = $api->financialDaily();
    var_dump($result);
} catch (HttpException $e) {
    var_dump($e->getMessage());
} catch (BusinessException $e) {
    var_dump($e->getMessage());
}
```

#### Example of WebSocket feed

[](#example-of-websocket-feed)

```
use Tiger\SDK\Auth;
use Tiger\SDK\PrivateApi\WebSocketFeed;
use Ratchet\Client\WebSocket;
use React\EventLoop\LoopInterface;

$auth = null;
// Need to pass the Auth parameter when subscribing to a private channel($api->subscribePrivateChannel()).
// $auth = new Auth('key', 'secret', 'passphrase');
$api = new WebSocketFeed($auth);

$query = ['connectId' => uniqid('', true)];
$channels = [
    ['topic' => '/market/ticker:KCS-BTC'], // Subscribe multiple channels
    ['topic' => '/market/ticker:ETH-BTC'],
];

$api->subscribePublicChannels($query, $channels, function (array $message, WebSocket $ws, LoopInterface $loop) use ($api) {
    var_dump($message);

    // Unsubscribe the channel
    // $ws->send(json_encode($api->createUnsubscribeMessage('/market/ticker:ETH-BTC')));

    // Stop loop
    // $loop->stop();
}, function ($code, $reason) {
    echo "OnClose: {$code} {$reason}\n";
});
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2408d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4191f636046a2a6976101556528a184db414e75c7b20e20313f97142e1837d5?d=identicon)[mofei](/maintainers/mofei)

---

Top Contributors

[![c2s](https://avatars.githubusercontent.com/u/17718352?v=4)](https://github.com/c2s "c2s (5 commits)")

---

Tags

phpapisdkitigerddeepbluedataitiger-sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/c2s-itiger-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/c2s-itiger-php-sdk/health.svg)](https://phpackages.com/packages/c2s-itiger-php-sdk)
```

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
