承接 linwj/bitget 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

Bitmex Support Websocket

Okex Support Websocket

Huobi Support Websocket

Binance Support Websocket

Kucoin

Mxc

Coinbase

ZB

Bitfinex

Bittrex

Kraken

Gate

Bigone

Crex24

Bybit

Coinbene

Bitget

Poloniex

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));
}

More Test

More Api

统计信息

  • 总下载量: 6.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-15