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)
|
#### async getWithdrawRecords(params)
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-withdrawrecords)
|
[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)
|
#### async getWalletBalance(params)
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-balance)
|
[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)
|
#### async getKline(params)
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-querykline)
|
[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()
|
#### async getLatestInformation()
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-latestsymbolinfo)
|
[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);
|
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) {
|
async getWalletBalance(params) {
|
||||||
assert(params, 'No params passed');
|
assert(params, 'No params passed');
|
||||||
assert(params.coin, 'Parameter coin is required');
|
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);
|
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() {
|
async getLatestInformation() {
|
||||||
return await this.request.get('v2/public/tickers');
|
return await this.request.get('v2/public/tickers');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user