@liberfi.io/react-predict 0.3.61 → 0.3.63

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/server.mjs CHANGED
@@ -253,6 +253,23 @@ var PredictClient = class {
253
253
  const url = `${this.endpoint}/api/v1/positions${query}`;
254
254
  return await httpGet(url);
255
255
  }
256
+ /**
257
+ * Maps to `GET /api/v1/positions/value`.
258
+ *
259
+ * Single-source: `getPositionValue("addr", "polymarket")`.
260
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
261
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
262
+ */
263
+ async getPositionValue(userOrWallets, source) {
264
+ let query;
265
+ if (typeof userOrWallets === "string") {
266
+ query = buildQuery({ source, user: userOrWallets });
267
+ } else {
268
+ query = buildQuery(userOrWallets);
269
+ }
270
+ const url = `${this.endpoint}/api/v1/positions/value${query}`;
271
+ return await httpGet(url);
272
+ }
256
273
  // -------------------------------------------------------------------------
257
274
  // Available shares (for sell flow)
258
275
  // -------------------------------------------------------------------------
@@ -1149,6 +1166,8 @@ var SIDE = { BUY: 0, SELL: 1 };
1149
1166
  var ROUNDING_CONFIG = {
1150
1167
  "0.1": { size: 2, price: 1, amount: 3 },
1151
1168
  "0.01": { size: 2, price: 2, amount: 4 },
1169
+ "0.005": { size: 2, price: 3, amount: 5 },
1170
+ "0.0025": { size: 2, price: 4, amount: 6 },
1152
1171
  "0.001": { size: 2, price: 3, amount: 5 },
1153
1172
  "0.0001": { size: 2, price: 4, amount: 6 }
1154
1173
  };