使用thinkphp6.0
composer require love-dj/huobi dev-main
huobi.php配置文件在config文件中
namespace app\controller;
use app\BaseController;
use think\Huobi;
class TestController extends BaseController
{
/**
* @var think\Huobi
*/
protected $huobi;
public function __construct(Huobi $huobi)
{
$this->huobi = $huobi;
}
public function index()
{
dd($this->huobi->get_account_balance());
}
}