Add new REST endpoints

https://bybit-exchange.github.io/docs/inverse/#2020-08-19
getOpenInterest
getLatestBigDeal
getLongShortRatio

https://bybit-exchange.github.io/docs/inverse/#2020-07-07
getAssetExchangeRecords
This commit is contained in:
John BEPPU
2020-09-14 20:54:15 -07:00
parent 5d5c069d8e
commit c22a27779a
2 changed files with 39 additions and 0 deletions

View File

@@ -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)

View File

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