@0xmonaco/types 1.0.76 → 1.0.77

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.
@@ -159,10 +159,9 @@ export interface TradingAPI extends BaseAPI {
159
159
  * partially filled order the replacement rests `total - filled` and locks
160
160
  * collateral for that remainder only (FIX convention: `LeavesQty =
161
161
  * OrderQty - CumQty`); must exceed the filled amount. Omitted, the
162
- * replacement keeps the unfilled remainder. Margin reduce-only orders are
163
- * the exception: their quantity is a close size measured against the live
164
- * position, placed as given, so neither the subtraction nor the
165
- * must-exceed-filled rule applies.
162
+ * replacement keeps the unfilled remainder. Margin reduce-only orders
163
+ * follow the same rule; what the replacement rests must not exceed the
164
+ * live position.
166
165
  * @param newOrder.useMasterBalance - Whether to use master balance (optional, defaults to false)
167
166
  * @param newOrder.postOnly - Re-states post-only intent for the replacement (nothing is inherited from the original order)
168
167
  * @returns Promise resolving to a `ReplaceOrderResponse`
@@ -176,9 +176,8 @@ export interface UpdatedFields {
176
176
  * The replacement's TOTAL quantity, not its resting size: the requested
177
177
  * quantity, or the original order's total when omitted. A 100-lot with 60
178
178
  * filled reports "100" and rests 40; read the order's `remainingQuantity`
179
- * for the resting size. For a margin reduce-only replacement it is the close
180
- * size placed (the requested quantity, or the original's remaining quantity
181
- * when omitted).
179
+ * for the resting size. Margin reduce-only replacements report their total
180
+ * the same way.
182
181
  */
183
182
  quantity?: string;
184
183
  }
@@ -440,8 +439,8 @@ export interface BatchReplaceOrderParams {
440
439
  /**
441
440
  * New TOTAL order quantity (optional): the replacement rests this total
442
441
  * minus the already-filled amount, so it must exceed the filled amount.
443
- * Omitted, the order keeps its total. A margin reduce-only quantity is a
444
- * close size, placed as given.
442
+ * Omitted, the order keeps its total. Margin reduce-only orders follow the
443
+ * same rule; what the replacement rests must not exceed the live position.
445
444
  */
446
445
  quantity?: string;
447
446
  /** For sub-accounts: use master's balance (optional) */
@@ -106,7 +106,8 @@ export interface MonacoWebSocket {
106
106
  /**
107
107
  * Subscribe to market lifecycle + config changes (public); omit
108
108
  * `tradingPairId` for all markets. `onSnapshot` receives the full current
109
- * config of every active market.
109
+ * config of every listed market, inactive ones included and flagged
110
+ * `isActive: false`; filter on `isActive` for the tradable set.
110
111
  *
111
112
  * Opting in also changes how the baseline is delivered: without
112
113
  * `onSnapshot`, the snapshot is fanned out to `handler` as one synthetic
@@ -12,8 +12,11 @@
12
12
  * market and never as an additive delta; `changedFields` names which fields the
13
13
  * mutation touched, for callers that want to react selectively.
14
14
  *
15
- * A subscriber receives a subscribe-time snapshot of the current active-pair
16
- * configuration list (each frame a `Listing` baseline) before the live diffs.
15
+ * A subscriber receives a subscribe-time snapshot of every listed market's
16
+ * configuration (each frame a `Listing` baseline) before the live diffs.
17
+ * Inactive markets are included, flagged `isActive: false`, so positions,
18
+ * orders and history on a delisted market can still resolve its metadata;
19
+ * filter on `isActive` for the tradable set.
17
20
  *
18
21
  * Perp-only fields (`minLeverage`, `maxLeverage`, `initialMarginRate`, `maintenanceMarginRate`)
19
22
  * are optional and omitted on the wire for spot markets, which have no leverage
@@ -12,8 +12,11 @@
12
12
  * market and never as an additive delta; `changedFields` names which fields the
13
13
  * mutation touched, for callers that want to react selectively.
14
14
  *
15
- * A subscriber receives a subscribe-time snapshot of the current active-pair
16
- * configuration list (each frame a `Listing` baseline) before the live diffs.
15
+ * A subscriber receives a subscribe-time snapshot of every listed market's
16
+ * configuration (each frame a `Listing` baseline) before the live diffs.
17
+ * Inactive markets are included, flagged `isActive: false`, so positions,
18
+ * orders and history on a delisted market can still resolve its metadata;
19
+ * filter on `isActive` for the tradable set.
17
20
  *
18
21
  * Perp-only fields (`minLeverage`, `maxLeverage`, `initialMarginRate`, `maintenanceMarginRate`)
19
22
  * are optional and omitted on the wire for spot markets, which have no leverage
@@ -155,6 +155,22 @@ export interface MarketStatsSummary {
155
155
  fundingTimestamp?: number;
156
156
  /** Tradability label (always present) */
157
157
  marketStatus: MarketStatus | (string & {});
158
+ /** Index price (decimal string). Perp-only; omitted for spot. */
159
+ indexPrice?: string;
160
+ /**
161
+ * Estimated next-window funding rate (decimal string), distinct from the last
162
+ * settled `currentFundingRate`. Perp-only; omitted for spot and when it
163
+ * cannot be estimated.
164
+ */
165
+ fundingRate?: string;
166
+ /** Funding premium (decimal string). Perp-only; omitted for spot. */
167
+ premium?: string;
168
+ /**
169
+ * Open interest in quote notional (decimal string): `openInterest` priced at
170
+ * the mark, falling back to the last trade price. Perp-only; omitted for spot,
171
+ * and omitted (never zero) until both open interest and a price are known.
172
+ */
173
+ openInterestNotional?: string;
158
174
  }
159
175
  /**
160
176
  * All-markets summary event on the `market_stats` channel: one
@@ -4017,7 +4017,7 @@ export interface components {
4017
4017
  */
4018
4018
  price?: string | null;
4019
4019
  /**
4020
- * @description New TOTAL quantity (if changing). On a partially filled order the replacement rests total minus filled, and collateral is locked for that remainder only (FIX cancel/replace convention: LeavesQty = OrderQty - CumQty). Must exceed the filled amount. Omitted, the replacement keeps the unfilled remainder. Margin reduce-only orders are the exception: their quantity is a close size measured against the live position, placed as given, with no subtraction and no must-exceed-filled rule.
4020
+ * @description New TOTAL quantity (if changing). On a partially filled order the replacement rests total minus filled, and collateral is locked for that remainder only (FIX cancel/replace convention: LeavesQty = OrderQty - CumQty). Must exceed the filled amount. Omitted, the replacement keeps the unfilled remainder. Margin reduce-only orders follow the same rule: the quantity is the order's total, and what the replacement rests (total minus filled) must not exceed the live position it reduces.
4021
4021
  * @example 0.7
4022
4022
  */
4023
4023
  quantity?: string | null;
@@ -9150,7 +9150,7 @@ export interface components {
9150
9150
  */
9151
9151
  price?: string | null;
9152
9152
  /**
9153
- * @description New TOTAL quantity (if changing). On a partially filled order the replacement rests total minus filled, and collateral is locked for that remainder only (FIX cancel/replace convention: LeavesQty = OrderQty - CumQty). Must exceed the filled amount. Omitted, the replacement keeps the unfilled remainder. Margin reduce-only orders are the exception: their quantity is a close size measured against the live position, placed as given, with no subtraction and no must-exceed-filled rule.
9153
+ * @description New TOTAL quantity (if changing). On a partially filled order the replacement rests total minus filled, and collateral is locked for that remainder only (FIX cancel/replace convention: LeavesQty = OrderQty - CumQty). Must exceed the filled amount. Omitted, the replacement keeps the unfilled remainder. Margin reduce-only orders follow the same rule: the quantity is the order's total, and what the replacement rests (total minus filled) must not exceed the live position it reduces.
9154
9154
  * @example 0.7
9155
9155
  */
9156
9156
  quantity?: string | null;
@@ -10659,7 +10659,7 @@ export interface components {
10659
10659
  */
10660
10660
  price?: string | null;
10661
10661
  /**
10662
- * @description The replacement's total quantity: the requested quantity, or the original order's total when quantity was omitted. It is not the resting size: the replacement rests this total minus the already-filled amount, so a 100-lot with 60 filled reports 100 here and rests 40. Read the order's remainingQuantity for the resting size. Margin reduce-only replacements are the exception: this is the close size placed, which is the requested quantity or, when omitted, the original's remaining quantity.
10662
+ * @description The replacement's total quantity: the requested quantity, or the original order's total when quantity was omitted. It is not the resting size: the replacement rests this total minus the already-filled amount, so a 100-lot with 60 filled reports 100 here and rests 40. Read the order's remainingQuantity for the resting size. Margin reduce-only replacements report their total the same way.
10663
10663
  * @example 0.7
10664
10664
  */
10665
10665
  quantity?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "lint": "biome lint ."
17
17
  },
18
18
  "dependencies": {
19
- "@0xmonaco/contracts": "1.0.76",
19
+ "@0xmonaco/contracts": "1.0.77",
20
20
  "zod": "^4.1.12"
21
21
  },
22
22
  "peerDependencies": {