Skip to content

Commit df94517

Browse files
committed
Extend liquidation with liquidationprice
1 parent b5ad2d5 commit df94517

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/liquidations.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const fields = {
1616
amount: 5,
1717
basePrice: 6,
1818
isMatch: 8,
19-
isMarketSold: 9
19+
isMarketSold: 9,
20+
liquidationPrice: 11
2021
}
2122

2223
/**
@@ -32,6 +33,7 @@ class Liquidations extends Model {
3233
* @param {number} data.basePrice - base price
3334
* @param {number|boolean} data.isMatch - matched flag
3435
* @param {number|boolean} data.isMarketSold - sold flag
36+
* @param {number} data.liquidationPrice - Price at which the liquidation was triggered
3537
*/
3638
constructor (data = {}) {
3739
super({ data, fields })
@@ -79,7 +81,8 @@ class Liquidations extends Model {
7981
amount: amountValidator,
8082
basePrice: priceValidator,
8183
isMatch: boolValidator,
82-
isMarketSold: boolValidator
84+
isMarketSold: boolValidator,
85+
liquidationPrice: numberValidator
8386
}
8487
})
8588
}

0 commit comments

Comments
 (0)