binance-api-node
Advanced tools
Comparing version 0.9.6 to 0.9.7
@@ -170,3 +170,3 @@ 'use strict'; | ||
return sendResult(fetch('' + base + (path.includes('/wapi') ? '' : '/api') + path + (noData ? '' : makeQueryString(newData)), { | ||
return sendResult(fetch('' + base + (path.includes('/wapi') || path.includes('/sapi') ? '' : '/api') + path + (noData ? '' : makeQueryString(newData)), { | ||
method: method, | ||
@@ -360,4 +360,33 @@ headers: { 'X-MBX-APIKEY': apiKey }, | ||
return privCall('/v1/userDataStream', payload, 'DELETE', false, true); | ||
}, | ||
marginGetDataStream: function marginGetDataStream() { | ||
return privCall('/sapi/v1/userDataStream', null, 'POST', true); | ||
}, | ||
marginKeepDataStream: function marginKeepDataStream(payload) { | ||
return privCall('/sapi/v1/userDataStream', payload, 'PUT', false, true); | ||
}, | ||
marginCloseDataStream: function marginCloseDataStream(payload) { | ||
return privCall('/sapi/v1/userDataStream', payload, 'DELETE', false, true); | ||
}, | ||
marginAllOrders: function marginAllOrders(payload) { | ||
return privCall('/sapi/v1/margin/allOrders', payload); | ||
}, | ||
marginOrder: function marginOrder(payload) { | ||
return _order(privCall, payload, '/sapi/v1/margin/order'); | ||
}, | ||
marginCancelOrder: function marginCancelOrder(payload) { | ||
return privCall('/sapi/v1/margin/order', payload, 'DELETE'); | ||
}, | ||
marginOpenOrders: function marginOpenOrders(payload) { | ||
return privCall('/sapi/v1/margin/openOrders', payload); | ||
}, | ||
marginAccountInfo: function marginAccountInfo(payload) { | ||
return privCall('/sapi/v1/margin/account', payload); | ||
}, | ||
marginMyTrades: function marginMyTrades(payload) { | ||
return privCall('/sapi/v1/margin/myTrades', payload); | ||
} | ||
}; | ||
}; |
@@ -336,9 +336,10 @@ 'use strict'; | ||
var user = function user(opts) { | ||
var user = function user(opts, margin) { | ||
return function (cb) { | ||
var _httpMethods = (0, _httpClient2.default)(opts), | ||
getDataStream = _httpMethods.getDataStream, | ||
keepDataStream = _httpMethods.keepDataStream, | ||
closeDataStream = _httpMethods.closeDataStream; | ||
var httpMethods = httpMethods(opts); | ||
var getDataStream = margin === false ? httpMethods.getDataStream : httpMethods.marginGetDataStream; | ||
var keepDataStream = margin === false ? httpMethods.keepDataStream : httpMethods.marginKeepDataStream; | ||
var closeDataStream = margin === false ? httpMethods.closeDataStream : httpMethods.marginCloseDataStream; | ||
var currentListenKey = null; | ||
@@ -425,4 +426,5 @@ var int = null; | ||
allTickers: allTickers, | ||
user: user(opts) | ||
user: user(opts), | ||
marginUser: user(opts, true) | ||
}; | ||
}; |
@@ -144,7 +144,7 @@ // tslint:disable:interface-name | ||
[asset: string]: { | ||
minWithdrawAmount: string; | ||
minWithdrawAmount: number; | ||
depositStatus: boolean; | ||
withdrawFee: number; | ||
withdrawStatus: boolean; | ||
depositTip: string; | ||
depositTip?: string; | ||
} | ||
@@ -533,2 +533,3 @@ } | ||
isBuyerMaker: boolean; | ||
totalQuoteTradeQuantity: string; | ||
} | ||
@@ -535,0 +536,0 @@ |
{ | ||
"name": "binance-api-node", | ||
"version": "0.9.6", | ||
"version": "0.9.7", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -1164,4 +1164,14 @@ # binance-api-node [![build](https://img.shields.io/travis/HyperCubeProject/binance-api-node.svg?style=flat-square)](https://travis-ci.org/HyperCubeProject/binance-api-node) [![cover](https://img.shields.io/coveralls/HyperCubeProject/binance-api-node.svg?style=flat-square)](https://coveralls.io/github/HyperCubeProject/binance-api-node) [![bnb](https://img.shields.io/badge/binance-winner-yellow.svg?style=flat-square)](https://github.com/binance-exchange/binance-api-node) | ||
Note that this method returns a promise which will resolve the `clean` callback. | ||
Live user messages data feed on margin wallet. | ||
**Requires authentication** | ||
```js | ||
const clean = await client.ws.marginUser(msg => { | ||
console.log(msg) | ||
}) | ||
``` | ||
Note that this methods returns a promise which will resolve the `clean` callback. | ||
<details> | ||
@@ -1168,0 +1178,0 @@ <summary>Output</summary> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72228
1387
1203