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

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