Merge pull request #13 from DimensionSoftware/new-rest-endpoints
New REST endpoints
This commit is contained in:
6
.jshintrc
Normal file
6
.jshintrc
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"esversion": 8,
|
||||
"asi": true,
|
||||
"laxbreak": true,
|
||||
"predef": [ "-Promise" ]
|
||||
}
|
||||
@@ -74,6 +74,9 @@ If you only use the [public endpoints](#public-endpoints) you can omit key and s
|
||||
#### async getWithdrawRecords(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-withdrawrecords)
|
||||
|
||||
#### async getAssetExchangeRecords(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-assetexchangerecords)
|
||||
|
||||
#### async getWalletBalance(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-balance)
|
||||
|
||||
@@ -103,6 +106,15 @@ If you only use the [public endpoints](#public-endpoints) you can omit key and s
|
||||
#### async getKline(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-querykline)
|
||||
|
||||
#### async getOpenInterest(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-marketopeninterest)
|
||||
|
||||
#### async getLatestBigDeal(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-marketbigdeal)
|
||||
|
||||
#### async getLongShortRatio(params)
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-marketaccountratio)
|
||||
|
||||
#### async getLatestInformation()
|
||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-latestsymbolinfo)
|
||||
|
||||
|
||||
@@ -152,6 +152,10 @@ module.exports = class RestClient {
|
||||
return await this.request.get('open-api/wallet/withdraw/list', params);
|
||||
}
|
||||
|
||||
async getAssetExchangeRecords(params) {
|
||||
return await this.request.get('v2/private/exchange-order/list', params);
|
||||
}
|
||||
|
||||
async getWalletBalance(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.coin, 'Parameter coin is required');
|
||||
@@ -214,6 +218,29 @@ module.exports = class RestClient {
|
||||
return await this.request.get('v2/public/kline/list', params);
|
||||
}
|
||||
|
||||
async getOpenInterest(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.symbol, 'Parameter symbol is required');
|
||||
assert(params.period, 'Parameter period is required');
|
||||
|
||||
return await this.request.get('v2/public/open-interest', params);
|
||||
}
|
||||
|
||||
async getLatestBigDeal(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.symbol, 'Parameter symbol is required');
|
||||
|
||||
return await this.request.get('v2/public/big-deal', params);
|
||||
}
|
||||
|
||||
async getLongShortRatio(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.symbol, 'Parameter symbol is required');
|
||||
assert(params.period, 'Parameter period is required');
|
||||
|
||||
return await this.request.get('v2/public/account-ratio', params);
|
||||
}
|
||||
|
||||
async getLatestInformation() {
|
||||
return await this.request.get('v2/public/tickers');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user