@pear-protocol/utils 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/reduce-only-minimum.d.ts +5 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1437,8 +1437,8 @@ function requestedBaseQuantity(leg, referencePrice) {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
__name(requestedBaseQuantity, "requestedBaseQuantity");
|
|
1440
|
-
function isRefusedBelowMinimum(quantity, price, precision,
|
|
1441
|
-
if (!
|
|
1440
|
+
function isRefusedBelowMinimum(quantity, price, precision, isPartialVenueReduce) {
|
|
1441
|
+
if (!isPartialVenueReduce) {
|
|
1442
1442
|
return false;
|
|
1443
1443
|
}
|
|
1444
1444
|
const minQuantity = precision.quantity.min;
|
|
@@ -35,8 +35,9 @@ export declare function requestedBaseQuantity(leg: {
|
|
|
35
35
|
amount: string;
|
|
36
36
|
}, referencePrice: string): string;
|
|
37
37
|
/**
|
|
38
|
-
* Whether a close leg is refused for its size. A close
|
|
39
|
-
* the venue
|
|
40
|
-
*
|
|
38
|
+
* Whether a close leg is refused for its size. A close that flattens the venue position is valid at any
|
|
39
|
+
* size. When the venue reads it as a partial reduce instead, because another position holds the asset or
|
|
40
|
+
* the close leaves part of the position open, it is held to the venue's minimum order quantity and minimum
|
|
41
|
+
* order value at the order price (#1184).
|
|
41
42
|
*/
|
|
42
|
-
export declare function isRefusedBelowMinimum(quantity: string, price: string, precision: InstrumentPrecision,
|
|
43
|
+
export declare function isRefusedBelowMinimum(quantity: string, price: string, precision: InstrumentPrecision, isPartialVenueReduce: boolean): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/utils",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Pear Protocol Utility functions",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@noble/hashes": "^1.3.2",
|
|
30
|
-
"@pear-protocol/types": "^2.
|
|
30
|
+
"@pear-protocol/types": "^2.25.0",
|
|
31
31
|
"@scure/base": "^2.3.0",
|
|
32
32
|
"bignumber.js": "9.3.1"
|
|
33
33
|
},
|