@uniswap/client-trading 0.11.20 → 0.11.21

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.
@@ -9262,8 +9262,14 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9262
9262
  */
9263
9263
  roe?: string;
9264
9264
  /**
9265
- * ACTIVE only. Read on chain per request, never cached: a stale health factor
9266
- * is the one number a caller must not act on.
9265
+ * ACTIVE only. Balances, `oracle_price` and the risk fields below it are read
9266
+ * on chain per request, never cached: a stale health factor is the one number
9267
+ * a caller must not act on. `equity`, `leverage`, `unrealized_pnl`, `roe` and
9268
+ * `unrealized_pnl_in_debt` are valued at `current_price`, or at
9269
+ * `oracle_price` when it is absent. `leverage` is absent when `equity` is
9270
+ * zero at that price, or when `equity` is absent and the LTV is at or above
9271
+ * 1; `health_factor` can still be above 1e18 then, as the venue liquidates
9272
+ * at `oracle_price`.
9267
9273
  *
9268
9274
  * @generated from field: optional string equity = 12;
9269
9275
  */
@@ -9276,6 +9282,15 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9276
9282
  * @generated from field: optional string oracle_price = 14;
9277
9283
  */
9278
9284
  oraclePrice?: string;
9285
+ /**
9286
+ * ACTIVE only. The market price the position is marked at, which can differ
9287
+ * from `oracle_price`. Counter per exposure, 1e18-scaled, in the same trader
9288
+ * terms as `oracle_price`. Unlike the risk fields it can be served from a
9289
+ * short-lived cache. Absent when none was read.
9290
+ *
9291
+ * @generated from field: optional string current_price = 38;
9292
+ */
9293
+ currentPrice?: string;
9279
9294
  /**
9280
9295
  * In TRADER terms, so a short's mark and liquidation price are both
9281
9296
  * reciprocated; see `displayRiskPrices`.
@@ -10561,6 +10561,7 @@ MarginPositionRow.fields = proto3.util.newFieldList(() => [
10561
10561
  { no: 12, name: "equity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10562
10562
  { no: 13, name: "leverage", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10563
10563
  { no: 14, name: "oracle_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10564
+ { no: 38, name: "current_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10564
10565
  { no: 15, name: "liquidation_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10565
10566
  { no: 16, name: "buffer", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10566
10567
  { no: 17, name: "health_factor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.11.20",
3
+ "version": "0.11.21",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },