Merge pull request #38 from tiagosiebler/leverageSetParam

fix set leverage for resetting back to cross (value == 0)
This commit is contained in:
Tiago
2020-11-19 08:46:28 +00:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "bybit-api",
"version": "1.2.4",
"version": "1.2.5",
"description": "A production-ready Node.js connector for the Bybit APIs and WebSockets",
"main": "index.js",
"scripts": {