-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e7f197
commit 0478acf
Showing
13 changed files
with
813 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?php | ||
/** | ||
* @author lin <[email protected]> | ||
* */ | ||
|
||
namespace Lin\Bitget\Api\ContractV2; | ||
|
||
use Lin\Bitget\Request; | ||
|
||
class Account extends Request | ||
{ | ||
|
||
/** | ||
*GET /api/v2/mix/account/account | ||
* */ | ||
public function getAccount(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/account/account'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/account/accounts | ||
* */ | ||
public function getAccounts(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/account/accounts'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/account/sub-account-assets | ||
* */ | ||
public function getSubAccountAssets(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/account/sub-account-assets'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/account/open-count | ||
* */ | ||
public function getOpenCount(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/account/open-count'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*POST /api/v2/mix/account/set-leverage | ||
* */ | ||
public function postAetLeverage(array $data=[]){ | ||
$this->type='POST'; | ||
$this->path='/api/v2/mix/account/set-leverage'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*POST /api/v2/mix/account/set-margin | ||
* */ | ||
public function postSetMargin(array $data=[]){ | ||
$this->type='POST'; | ||
$this->path='/api/v2/mix/account/set-margin'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*POST /api/v2/mix/account/set-margin-mode | ||
* */ | ||
public function postSetMarginMode(array $data=[]){ | ||
$this->type='POST'; | ||
$this->path='/api/v2/mix/account/set-margin-mode'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*POST /api/v2/mix/account/set-position-mode | ||
* */ | ||
public function postSetPositionMode(array $data=[]){ | ||
$this->type='POST'; | ||
$this->path='/api/v2/mix/account/set-position-mode'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/account/bill | ||
* */ | ||
public function getBill(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/account/bill'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
<?php | ||
/** | ||
* @author lin <[email protected]> | ||
* */ | ||
|
||
namespace Lin\Bitget\Api\ContractV2; | ||
|
||
use Lin\Bitget\Request; | ||
|
||
class Market extends Request | ||
{ | ||
|
||
/** | ||
*GET /api/v2/mix/market/vip-fee-rate | ||
* */ | ||
public function getVipFeeRate(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/vip-fee-rate'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/merge-depth | ||
* */ | ||
public function getMergeDepth(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/merge-depth'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/ticker | ||
* */ | ||
public function getTicker(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/ticker'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/tickers | ||
* */ | ||
public function getTickers(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/tickers'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/fills | ||
* */ | ||
public function getFills(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/fills'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/fills-history | ||
* */ | ||
public function getFillsHistory(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/fills-history'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/candles | ||
* */ | ||
public function getCandles(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/candles'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/history-candles | ||
* */ | ||
public function getHistoryCandles(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/history-candles'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/history-index-candles | ||
* */ | ||
public function getHistoryIndexCandles(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/history-index-candles'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/history-mark-candles | ||
* */ | ||
public function getHistoryMarkCandles(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/history-mark-candles'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/open-interest | ||
* */ | ||
public function getOpenInterest(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/open-interest'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/funding-time | ||
* */ | ||
public function getFundingTime(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/funding-time'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/symbol-price | ||
* */ | ||
public function getSymbolPrice(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/symbol-price'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/history-fund-rate | ||
* */ | ||
public function getHistoryFundRate(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/history-fund-rate'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/current-fund-rate | ||
* */ | ||
public function getCurrentFundRate(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/current-fund-rate'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/contracts | ||
* */ | ||
public function getContracts(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/contracts'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
|
||
/** | ||
*GET /api/v2/mix/market/query-position-lever | ||
* */ | ||
public function getQueryPositionLever(array $data=[]){ | ||
$this->type='GET'; | ||
$this->path='/api/v2/mix/market/query-position-lever'; | ||
|
||
$this->data=$data; | ||
return $this->exec(); | ||
} | ||
} |
Oops, something went wrong.