linwj/bitget
最新稳定版本:1.0.2
Composer 安装命令:
composer require linwj/bitget
包简介
Bitget API Like the official document interface, Support for arbitrary extension.
关键字:
README 文档
README
It is recommended that you read the official document first
Bitget Document
https://www.bitget.com/zh-CN/api-doc/common/intro
All interface methods are initialized the same as those provided by Bitget. See details src/api
Most of the interface is now complete, and the user can continue to extend it based on my design, working with me to improve it.
Other exchanges API
Exchanges It includes all of the following exchanges and is highly recommended.
If you don't find the exchange SDK you want, you can tell me and I'll join them.
Installation
composer require linwj/bitget
Support for more request Settings
$bitget=new BitgetSpotV2($key,$secret,$passphrase); //or $bitget=new BitgetContractV2()($key,$secret,$passphrase); //You can set special needs $bitget->setOptions([ //Set the request timeout to 60 seconds by default 'timeout'=>10, ]);
Bitget Spot API
Market API More
$bitget=new BitgetSpotV2($key,$secret,$passphrase); try { $result=$bitget->market()->getTickers([ 'symbol'=>'BTCUSDT', ]); print_r($result); }catch (\Exception $e){ print_r(json_decode($e->getMessage(),true)); } try { $result=$bitget->market()->getCandles([ 'symbol'=>'BTCUSDT', 'granularity'=>'5min' ]); print_r($result); }catch (\Exception $e){ print_r(json_decode($e->getMessage(),true)); }
Account API More
$bitget=new BitgetSpotV2($key,$secret,$passphrase); try { $result=$bitget->account()->getAssets(); print_r($result); }catch (\Exception $e){ print_r(json_decode($e->getMessage(),true)); }
Order API More
$bitget=new BitgetSpot($key,$secret); try { $result=$bitget->trade()->postPlaceOrder([ 'symbol'=>'BTCUSDT', 'side'=>'sell', 'orderType'=>'limit', 'force'=>'gtc', 'price'=>'66666', 'size'=>'1', //'clientOid'=>'**************', ]); print_r($result); }catch (\Exception $e){ print_r(json_decode($e->getMessage(),true)); } try { $result=$bitget->trade()->getOrderInfo([ //'orderId'=>'***************', 'clientOid'=>'**************', ]); print_r($result); }catch (\Exception $e){ print_r(json_decode($e->getMessage(),true)); }
统计信息
- 总下载量: 6.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-15