fix set leverage for resetting back to cross (value == 0)
This commit is contained in:
@@ -184,9 +184,12 @@ module.exports = class RestClient {
|
||||
|
||||
async changeUserLeverage(params) {
|
||||
assert(params, 'No params passed');
|
||||
assert(params.leverage, 'Parameter leverage is required');
|
||||
assert(params.symbol, 'Parameter symbol is required');
|
||||
|
||||
if (typeof params.leverage === 'undefined') {
|
||||
throw new Error('Parameter leverage is required');
|
||||
}
|
||||
|
||||
return await this.request.post('user/leverage/save', params);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user