Skip to content

Commit

Permalink
Merge pull request ccxt#349 from carlosmiei/huobi-add-cost
Browse files Browse the repository at this point in the history
Huobi :: add cost field
  • Loading branch information
kroitor authored Jul 4, 2022
2 parents eeea87d + 9420ce0 commit ae9cf0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/huobi.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ module.exports = class huobi extends ccxt.huobi {
// accountId: 44234548,
// orderPrice: '100',
// orderSize: '0.05',
// orderValue: '3.71676361', // market-buy only
// symbol: 'ethusdt',
// type: 'buy-limit',
// orderId: '478861479986886',
Expand Down Expand Up @@ -1012,6 +1013,7 @@ module.exports = class huobi extends ccxt.huobi {
if (side === undefined) {
side = this.safeString (order, 'direction');
}
const cost = this.safeString (order, 'orderValue');
return this.safeOrder ({
'info': order,
'id': id,
Expand All @@ -1029,7 +1031,7 @@ module.exports = class huobi extends ccxt.huobi {
'amount': amount,
'filled': filled,
'remaining': undefined,
'cost': undefined,
'cost': cost,
'fee': fee,
'average': avgPrice,
'trades': rawTrades,
Expand Down

0 comments on commit ae9cf0b

Please sign in to comment.