@uniswap/client-trading 0.12.17 → 0.12.19

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.
@@ -7949,10 +7949,15 @@ export type MarginPositionRow = Message<"trading.v1.MarginPositionRow"> & {
7949
7949
  */
7950
7950
  oraclePrice?: string | undefined;
7951
7951
  /**
7952
- * ACTIVE only. The market price the position is marked at, which can differ
7953
- * from `oracle_price`. Counter per exposure, 1e18-scaled, in the same trader
7954
- * terms as `oracle_price`. Unlike the risk fields it can be served from a
7955
- * short-lived cache. Absent when none was read.
7952
+ * ACTIVE only. The pair's market price, which can differ from
7953
+ * `oracle_price`: the midpoint of a small fixed sale of the collateral for
7954
+ * the debt and a buy of about the same amount of collateral, each on its
7955
+ * cheapest single route, so the pool fee largely cancels out of it. Shared
7956
+ * by every position on the pair and up to 30 seconds old, so unlike the risk
7957
+ * fields it can be served from a cache. It leaves out the position's own
7958
+ * size and the pool fee, so a close realizes less than this values it at,
7959
+ * by that close's fee and price impact. Counter per exposure, 1e18-scaled,
7960
+ * in the same trader terms as `oracle_price`. Absent when none was read.
7956
7961
  *
7957
7962
  * @generated from field: optional string current_price = 38;
7958
7963
  */
@@ -8121,7 +8126,8 @@ export type MarginPositionRow = Message<"trading.v1.MarginPositionRow"> & {
8121
8126
  realizedPnlToDateInDebt?: string | undefined;
8122
8127
  /**
8123
8128
  * The position's PnL in the pair's quote asset, from the position store.
8124
- * Absent when the store does not track the row's PnL, and it tracks none.
8129
+ * Absent on a SHORT row, whose quote asset is not the debt the PnL is booked
8130
+ * in, and when the store does not track the row's PnL.
8125
8131
  *
8126
8132
  * @generated from field: optional trading.v1.MarginPositionPnl pnl = 45;
8127
8133
  */
@@ -8146,13 +8152,14 @@ export type MarginPositionRow = Message<"trading.v1.MarginPositionRow"> & {
8146
8152
  export declare const MarginPositionRowSchema: GenMessage<MarginPositionRow>;
8147
8153
  /**
8148
8154
  * Every amount is a signed base-10 integer in raw `quote_token` units, and
8149
- * market values are at the price the row's `equity` is valued at.
8155
+ * market values are at the price an ACTIVE row's `equity` is valued at; a
8156
+ * terminal row's are at its close.
8150
8157
  *
8151
8158
  * @generated from message trading.v1.MarginPositionPnl
8152
8159
  */
8153
8160
  export type MarginPositionPnl = Message<"trading.v1.MarginPositionPnl"> & {
8154
8161
  /**
8155
- * The row's `counter_token`, on a LONG and a SHORT alike.
8162
+ * The row's `counter_token`.
8156
8163
  *
8157
8164
  * @generated from field: trading.v1.MarginTokenMetadata quote_token = 1;
8158
8165
  */
@@ -8193,15 +8200,17 @@ export type MarginPositionPnl = Message<"trading.v1.MarginPositionPnl"> & {
8193
8200
  */
8194
8201
  unrealized?: string | undefined;
8195
8202
  /**
8196
- * `total` / `invested`, 1e18-scaled, signed: 1e18 is 100%. Absent when
8197
- * `invested` is zero or negative.
8203
+ * `total` / `invested`, 1e18-scaled, signed: 1e18 is 100%, and never below
8204
+ * -1e18. Absent when `invested` is zero or negative, or under 5% of the
8205
+ * deposits.
8198
8206
  *
8199
8207
  * @generated from field: optional string roi = 7;
8200
8208
  */
8201
8209
  roi?: string | undefined;
8202
8210
  /**
8203
8211
  * ACTIVE only. The market price at which `total` is zero, in the same terms
8204
- * as the row's `entry_price`. Absent with `roi`.
8212
+ * as the row's `entry_price`. Absent with `roi`, and when the row holds no
8213
+ * collateral.
8205
8214
  *
8206
8215
  * @generated from field: optional string break_even_price = 8;
8207
8216
  */
@@ -8235,7 +8244,8 @@ export type MarginPositionPnl = Message<"trading.v1.MarginPositionPnl"> & {
8235
8244
  */
8236
8245
  collateralInterest?: string | undefined;
8237
8246
  /**
8238
- * TERMINAL only. What the close paid the owner. Never negative.
8247
+ * TERMINAL only. What the close paid the owner: `total` + `invested`. Never
8248
+ * negative.
8239
8249
  *
8240
8250
  * @generated from field: optional string payout = 13;
8241
8251
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.12.17",
3
+ "version": "0.12.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },