aftermath-ts-sdk 4.1.0 → 4.1.1-dev.1a3bf25

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.d.ts CHANGED
@@ -2512,6 +2512,15 @@ interface PerpetualsMarketData {
2512
2512
  collateralPrice: number;
2513
2513
  /** Oracle/index price of the base asset for this market. */
2514
2514
  indexPrice: number;
2515
+ /**
2516
+ * Price positions are marked against for PnL and liquidation, as opposed to
2517
+ * the raw index.
2518
+ *
2519
+ * Only the websocket market stream carries this. REST responses are built
2520
+ * from an indexer payload that has no mark price, so the field is absent
2521
+ * there rather than reported as null.
2522
+ */
2523
+ markPrice?: number;
2515
2524
  /** Estimated funding rate for the next funding interval. */
2516
2525
  estimatedFundingRate: Percentage;
2517
2526
  /** Timestamp (ms) for the next funding event, as a bigint. */
@@ -6568,11 +6577,14 @@ interface PerpetualsWsUpdatesOraclePayload {
6568
6577
  */
6569
6578
  markPrice: number;
6570
6579
  /**
6571
- * Raw orderbook mid price, or `null` when either side of the book is empty.
6572
- * Nullable where `markPrice` is not: mark falls back to the index price
6580
+ * Raw orderbook mid price, absent when either side of the book is empty.
6581
+ * Optional where `markPrice` is not: mark falls back to the index price
6573
6582
  * upstream, whereas a raw mid has none.
6583
+ *
6584
+ * The API sends JSON `null` here, but the websocket parser maps `null` to
6585
+ * `undefined`, so a `=== null` check would never match.
6574
6586
  */
6575
- bookPrice: number | null;
6587
+ bookPrice?: number;
6576
6588
  }
6577
6589
  /**
6578
6590
  * Websocket payload for market orders stream.