PHPackages                             sreeb/huobi-api - 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. sreeb/huobi-api

ActiveLibrary[API Development](/categories/api)

sreeb/huobi-api
===============

简单易用的火币网接口SDK

1.0.2(5y ago)0132proprietaryPHPPHP &gt;=7.1.0

Since Jul 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sreeb228/huobi-api)[ Packagist](https://packagist.org/packages/sreeb/huobi-api)[ RSS](/packages/sreeb-huobi-api/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

项目介绍
----

[](#项目介绍)

简单易用的火币网交易包 [接口文档](https://huobiapi.github.io/docs/coin_margined_swap/v1/cn/#5ea2e0cde2)

使用方法(具体查看tests目录)
-----------------

[](#使用方法具体查看tests目录)

```
use sreeb\api\perpetual\HuobiPerprtualApi;
use sreeb\api\RequestData;
use sreeb\Huobi;

//创建永续合约类
$huobiPerprtualApi = Huobi::createInstance(HuobiPerprtualApi::class);

//设置配置,不设置默认读取 src/config.php配置
$huobiPerprtualApi->setOptions([
    "AccessKey" => "",
    "SecretKey" => "",
    "SignatureMethod" => "HmacSHA256",
    "SignatureVersion" => 2,
    //接口请求网关
    "ApiHost" => "https://api.hbdm.vn",
    //curl请求配置项
    "curlOptions" => [
        //请求超时时间
        "timeOut" => 5,
        //SSL验证
        "verifySsl" => false,
        //开启代理
        "openProxy" => false,
        //代理设置
        "proxy" => [
            'ip' => '',
            'port' => '',
            'username' => '',
            'password' => '',
        ]
    ],
    //返回结果是否为数组
    "returnArray" => false,
    //返回结果数组数值类型转化为string类型，防止被科学计数。（returnArray=true时生效）
    "toString" => true,
    //请求日志保存目录，为空不保存
    "logPath" => __DIR__ . '/../src/log/'
]);

//请求接口数据（市场接口为market开头,合约资产为account开头，合约交易为contract开头）
$huobiPerprtualApi->marketSwapContractInfo('BTC-USD');
//对于多参数接口参数也可以采用数组参数
$huobiPerprtualApi->marketSwapFundingRate([
    'contract_code' => 'BTC-USD',
    'page_index' => 1,
    'page_size' => 20,
]);
//对于未封装接口,可先实例化RequestData类（请求方法，请求接口，请求参数），然后调用request进行请求。
$requestData = new RequestData('GET','/v1/account/accounts',[
    'symbol' => 'BTC',
    'contract_type' => 'next_week',
    'contract_code' => 20,
]);
$huobiPerprtualApi->request($requestData);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

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

Every ~3 days

Total

3

Last Release

2128d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/sreeb-huobi-api/health.svg)

```
[![Health](https://phpackages.com/badges/sreeb-huobi-api/health.svg)](https://phpackages.com/packages/sreeb-huobi-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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