Download the PHP package sreeb/huobi-api without Composer

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

项目介绍

简单易用的火币网交易包 接口文档

使用方法(具体查看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);

All versions of huobi-api with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
ext-json Version *
php Version >=7.1.0
sreeb/curl Version 1.0.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 sreeb/huobi-api contains the following files

Loading the files please wait ....