From ec6c9a40a5bb4cd96319437f1d5eb8d24c1b6530 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Wed, 11 Nov 2020 20:46:02 +0000 Subject: [PATCH] fix readme typo & some consistency cleaning --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cab65ef..ca282a8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ client.changeUserLeverage({leverage: 4, symbol: 'ETHUSD'}) console.log(result); }) .catch(err => { - console.error(error); + console.error(err); }); ``` @@ -57,23 +57,23 @@ const ws = new WebsocketClient({key: API_KEY, secret: PRIVATE_KEY}); ws.subscribe(['position', 'execution', 'trade']); ws.subscribe('kline.BTCUSD.1m'); -ws.on('open', function() { +ws.on('open', () => { console.log('connection open'); }); -ws.on('update', function(message) { +ws.on('update', message => { console.log('update', message); }); -ws.on('response', function(response) { +ws.on('response', response => { console.log('response', response); }); -ws.on('close', function() { +ws.on('close', () => { console.log('connection closed'); }); -ws.on('error', function(err) { +ws.on('error', err => { console.error('ERR', err); }); ```