Fix getPosition
* Re adds the v1 endpoint as `getPositions` * Fixes params for v2 endpoint `getPosition` Resolves: #5
This commit is contained in:
@@ -109,8 +109,15 @@ module.exports = class RestClient {
|
||||
return await this.request.post('/user/leverage/save', params);
|
||||
}
|
||||
|
||||
async getPosition() {
|
||||
return await this.request.get('/v2/private/position/list');
|
||||
async getPosition(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.symbol, 'Parameter symbol is required');
|
||||
|
||||
return await this.request.get('/v2/private/position/list', params);
|
||||
}
|
||||
|
||||
async getPositions() {
|
||||
return await this.request.get('/position/list');
|
||||
}
|
||||
|
||||
async changePositionMargin(params) {
|
||||
|
||||
Reference in New Issue
Block a user