Add missing getKline API. Fixes #8. (#9)

Co-authored-by: tiagosiebler <ts@github.com>
This commit is contained in:
Tiago
2020-04-20 13:10:02 +01:00
committed by GitHub
parent 7618336df9
commit 336170faa5
2 changed files with 12 additions and 0 deletions

View File

@@ -197,6 +197,15 @@ module.exports = class RestClient {
return await this.request.get('/v2/public/orderBook/L2', params);
}
async getKline(params) {
assert(params, 'No params passed');
assert(params.symbol, 'Parameter symbol is required');
assert(params.interval, 'Parameter interval is required');
assert(params.from, 'Parameter from is required');
return await this.request.get('/v2/public/kline/list', params);
}
async getLatestInformation() {
return await this.request.get('/v2/public/tickers');
}