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

ActiveLibrary[API Development](/categories/api)

jybtx/huobi
===========

huobi api interface

v0.1.0(6y ago)11871MITPHPPHP &gt;=7.0.0

Since Nov 6Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

huobi
=====

[](#huobi)

laravel 火币 API请求库

```
composer require jybtx/huobi

```

### Laravel

[](#laravel)

#### &gt;= laravel5.5

[](#-laravel55)

ServiceProvider will be attached automatically

#### Other

[](#other)

In your `config/app.php` add `Jybtx\HuoBiApi\Providers\HuobiServiceProvider::class` to the end of the `providers` array:

```
'providers' => [
    ...
    Jybtx\HuoBiApi\Providers\HuobiServiceProvider::class,
],
'aliases'  => [
    ...
    "HuobiApi": Jybtx\HuoBiApi\Faceds\HuobiFacade::class,
]
```

Publish Configuration

```
php artisan vendor:publish --provider "Jybtx\HuoBiApi\Providers\HuobiServiceProvider"
```

OR

```
php artisan vendor:publish --tag=huobi-config
```

Usage
-----

[](#usage)

```
use HuobiApi;
HuobiApi::getAccountAccounts();
```

Methods
-------

[](#methods)

> 行情类API

- getHistoryKline($symbol = '', $period='',$size=0) // 获取K线数据
- getDetailMerged($symbol = '') // 获取聚合行情(Ticker)
- getMarketDepth($symbol = '', $type = '') // 获取 Market Depth 数据
- getMarketTrade($symbol = '') // 获取 Trade Detail 数据
- getHistoryTrade($symbol = '', $size = '') // 批量获取最近的交易记录
- getMarketDetail($symbol = '') // 获取 Market Detail 24小时成交量数据

> 公共类API

- getCommonSymbols() // 查询系统支持的所有交易对及精度
- getCommonAllCurrencys() // 查询系统支持的所有币种
- getCommonTimestamp() // 查询系统当前时间
- getAccountAccounts() // 查询当前用户的所有账户(即account-id)
- getAccountBalance() // 查询指定账户的余额

> 交易类API

- placeOrder($amount=0,$price=0,$symbol='',$type='') // 交易下单
- cancelOrderRequest($order\_id) // 申请撤销一个订单请求
- bulkOrderCancellation( $order\_ids = array() ) // 批量撤销订单
- getOrderDetails($order\_id) // 查询某个订单详情
- getOrderDetailsMatchresults($order\_id = 0) // 查询某个订单的成交明细
- getCurrentAndHistoricalOrders($symbol = '',$states = '',$types = '',$start\_date = '',$end\_date = '',$from = '',$direct='',$size = '') // 查询当前委托、历史委托
- getCurrentAndHistoryOrdersMatchresults($symbol = '', $types = '',$start\_date = '',$end\_date = '',$from = '',$direct='',$size = '') // 查询当前成交、历史成交
- getAccountIdBalance() //获取账户余额

> 借贷类API

- loanAccountTransferIn($symbol = '',$currency='',$amount='') // 现货账户划入至借贷账户
- loanAccountTransferOut($symbol = '',$currency='',$amount='') // 借贷账户划出至现货账户
- marginOrders($symbol = '',$currency='',$amount='') // 申请借贷
- repayMarginOrders($order\_id='',$amount='') // 归还借贷
- getLoanOrders($symbol='',$currency='',$states,$start\_date,$end\_date,$from,$direct,$size) // 借贷订单
- marginBalance($symbol='') // 借贷账户详情

> 虚拟币提现API

- withdrawVirtualCurrencyCreate($address='',$amount='',$currency='',$fee='',$addr\_tag='') // 申请提现虚拟币
- cancelWithdrawalOfVirtualCurrency($withdraw\_id='') // 申请取消提现虚拟币

License
=======

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

2376d ago

### Community

Maintainers

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

---

Top Contributors

[![jybtx](https://avatars.githubusercontent.com/u/34736990?v=4)](https://github.com/jybtx "jybtx (3 commits)")[![krylov123](https://avatars.githubusercontent.com/u/5936254?v=4)](https://github.com/krylov123 "krylov123 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

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

GitHub API v3 client

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

PHP SDK for Facebook Business

90121.9M33](/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.1M452](/packages/google-gax)

PHPackages © 2026

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