PHPackages                             exchange-sh/exchange - 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. exchange-sh/exchange

ActiveLibrary[API Development](/categories/api)

exchange-sh/exchange
====================

用于集成各个交易所对接

1.0.7(7y ago)019MITPHPPHP &gt;=5.4

Since Jan 2Pushed 7y agoCompare

[ Source](https://github.com/blockshine-sh/exchange)[ Packagist](https://packagist.org/packages/exchange-sh/exchange)[ RSS](/packages/exchange-sh-exchange/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

blockchainexorg/exchange
========================

[](#blockchainexorgexchange)

blockchainexorg/exchange用于集成对接各个主流交易所的开放接口

Ticker
------

[](#ticker)

获取ticker数据

支持平台：

```
coinsbank、oex、idcm、fatbtc、topbtc、coinsuper、mountaintoken、singbitx、hotbit、cointiger

其中coinsbank由于接口访问频次限制，ticker接口每5秒钟访问一次，总获取时间大概90秒

```

调用示例：

```
use ExchangeCenter\Exchange;

try {
    $obj = new Exchange();
    $ticker = $obj->setExchange('coinsbank')
        ->setOptions([
            //如果需要设置代理，则传该参数
            'proxy' => [
                'http' => 'http://127.0.0.1:8001',
                'https' => 'http://127.0.0.1:8001',
            ]
        ])
        ->getTicker();
} catch(Exception $e) {
    var_dump($e->getMessage());
}

```

方法解释：

```
setExchange() 设置平台
setOptions()  设置选项信息

```

返回数据：

```
amount 24小时交易量
vol    24小时交易额
count  成交笔数
bid1   买一价
ask1   卖一价

```

```
array(12) {
    ["digital_currency"]=>
    string(3) "CSE"
    ["market_currency"]=>
    string(3) "BTC"
    ["open"]=>
    float(0.00011)
    ["high"]=>
    string(9) "0.0001167"
    ["low"]=>
    string(8) "0.000108"
    ["close"]=>
    string(8) "0.000114"
    ["amount"]=>
    float(7852.7652384739)
    ["vol"]=>
    float(0)
    ["count"]=>
    int(0)
    ["bid1"]=>
    float(0)
    ["ask1"]=>
    float(0)
    ["timestamp"]=>
    float(1545717241)
  }

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~4 days

Total

7

Last Release

2660d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba3333399e8c09076e589bdaa9abfd93ea544b33bd67f9f58bf5f8e17b8eea9e?d=identicon)[blockshine-sh](/maintainers/blockshine-sh)

---

Top Contributors

[![199608](https://avatars.githubusercontent.com/u/40813253?v=4)](https://github.com/199608 "199608 (12 commits)")

### Embed Badge

![Health badge](/badges/exchange-sh-exchange/health.svg)

```
[![Health](https://phpackages.com/badges/exchange-sh-exchange/health.svg)](https://phpackages.com/packages/exchange-sh-exchange)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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