@ex-master/huobi
Advanced tools
Comparing version 0.3.9 to 0.3.10
@@ -343,19 +343,11 @@ "use strict"; | ||
} | ||
try { | ||
let { data: id } = yield this.restAPI.postOrderPlace({ | ||
'account-id': this.accountId, | ||
'client-order-id': cid, | ||
price: price.toFixed(), | ||
amount: size.toFixed(), | ||
symbol: getMarketSymbol(market), | ||
type: orderType, | ||
}, retryLimit); | ||
orderId = id; | ||
} | ||
catch (error) { | ||
if (/order-value-min-error/.test(error.message)) { | ||
return undefined; | ||
} | ||
throw error; | ||
} | ||
let { data: id } = yield this.restAPI.postOrderPlace({ | ||
'account-id': this.accountId, | ||
'client-order-id': cid, | ||
price: price.toFixed(), | ||
amount: size.toFixed(), | ||
symbol: getMarketSymbol(market), | ||
type: orderType, | ||
}, retryLimit); | ||
orderId = id; | ||
if (!orderId) { | ||
@@ -362,0 +354,0 @@ return undefined; |
{ | ||
"name": "@ex-master/huobi", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"main": "bld/library/index.js", | ||
@@ -30,3 +30,3 @@ "types": "bld/library/index.d.ts", | ||
}, | ||
"gitHead": "ad2ebcc962f990af73526e6f8a2766b4d1ab2501" | ||
"gitHead": "b43653e1ff2fcbd309e4f2fb7f9c3370a68ea33c" | ||
} |
@@ -335,24 +335,16 @@ import { | ||
try { | ||
let {data: id} = await this.restAPI.postOrderPlace( | ||
{ | ||
'account-id': this.accountId, | ||
'client-order-id': cid, | ||
price: price.toFixed(), | ||
amount: size.toFixed(), | ||
symbol: getMarketSymbol(market), | ||
type: orderType, | ||
}, | ||
retryLimit, | ||
); | ||
let {data: id} = await this.restAPI.postOrderPlace( | ||
{ | ||
'account-id': this.accountId, | ||
'client-order-id': cid, | ||
price: price.toFixed(), | ||
amount: size.toFixed(), | ||
symbol: getMarketSymbol(market), | ||
type: orderType, | ||
}, | ||
retryLimit, | ||
); | ||
orderId = id; | ||
} catch (error) { | ||
if (/order-value-min-error/.test(error.message)) { | ||
return undefined; | ||
} | ||
orderId = id; | ||
throw error; | ||
} | ||
if (!orderId) { | ||
@@ -359,0 +351,0 @@ return undefined; |
Sorry, the diff of this file is not supported yet
183390
3602