@gainsnetwork/sdk 0.0.24-rc2 → 0.0.24-rc3

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.
@@ -1,2 +1,2 @@
1
1
  import { LimitOrder, OpenInterest, Pair, PairParams } from "./types";
2
- export declare const getTriggerPrice: (order: LimitOrder, pair: Pair, pairParams: PairParams, openInterest: OpenInterest) => number;
2
+ export declare const getFulfillmentPrice: (order: LimitOrder, pair: Pair, pairParams: PairParams, openInterest: OpenInterest) => number;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTriggerPrice = void 0;
3
+ exports.getFulfillmentPrice = void 0;
4
4
  const spread_1 = require("./spread");
5
5
  const types_1 = require("./types");
6
- const getTriggerPrice = (order, pair, pairParams, openInterest) => {
6
+ const getFulfillmentPrice = (order, pair, pairParams, openInterest) => {
7
7
  if (!order || !pair) {
8
8
  return 0;
9
9
  }
@@ -18,7 +18,7 @@ const getTriggerPrice = (order, pair, pairParams, openInterest) => {
18
18
  ? order.maxPrice
19
19
  : order.minPrice;
20
20
  return order.buy
21
- ? askingPrice * (1 + spreadWithPriceImpactP)
22
- : askingPrice * (1 - spreadWithPriceImpactP);
21
+ ? askingPrice * (1 - spreadWithPriceImpactP)
22
+ : askingPrice * (1 + spreadWithPriceImpactP);
23
23
  };
24
- exports.getTriggerPrice = getTriggerPrice;
24
+ exports.getFulfillmentPrice = getFulfillmentPrice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "0.0.24-rc2",
3
+ "version": "0.0.24-rc3",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [