@0xmonaco/types 1.0.40 → 1.0.41-develop.ebb62ed

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.
@@ -123,6 +123,13 @@ export interface GetCandlesticksParams {
123
123
  endTime?: number;
124
124
  /** Maximum number of bars to return (max: 500, server defaults to 350 if omitted) */
125
125
  limit?: number;
126
+ /**
127
+ * Price series to chart. `"trade"` (default) returns the trade-derived OHLCV
128
+ * series; `"mark"` returns the mark-price series (margin pairs only), where
129
+ * each candle's open/high/low/close are the bucket's closing mark and volume
130
+ * is 0. Omit for the trade series.
131
+ */
132
+ priceType?: "trade" | "mark";
126
133
  }
127
134
  /**
128
135
  * Query parameters for fetching trading pairs
@@ -45,6 +45,13 @@ export interface TradingAPI extends BaseAPI {
45
45
  * Echoed back as `postOnly` on order detail and list reads.
46
46
  */
47
47
  postOnly?: boolean;
48
+ /**
49
+ * Client-assigned correlation handle, echoed back on order reads and
50
+ * order WebSocket events. At most 64 characters from [A-Za-z0-9._:-].
51
+ * Not de-duplicated and not unique — a replacement re-states it and
52
+ * inherits nothing from the original order.
53
+ */
54
+ clientOrderId?: string;
48
55
  takeProfit?: ParentTpSlLegParams;
49
56
  stopLoss?: ParentTpSlLegParams;
50
57
  }): Promise<CreateOrderResponse>;
@@ -70,6 +77,13 @@ export interface TradingAPI extends BaseAPI {
70
77
  positionSide?: PositionSide;
71
78
  leverage?: string;
72
79
  reduceOnly?: boolean;
80
+ /**
81
+ * Client-assigned correlation handle, echoed back on order reads and
82
+ * order WebSocket events. At most 64 characters from [A-Za-z0-9._:-].
83
+ * Not de-duplicated and not unique — a replacement re-states it and
84
+ * inherits nothing from the original order.
85
+ */
86
+ clientOrderId?: string;
73
87
  takeProfit?: ParentTpSlLegParams;
74
88
  stopLoss?: ParentTpSlLegParams;
75
89
  }): Promise<CreateOrderResponse>;
@@ -119,6 +133,13 @@ export interface TradingAPI extends BaseAPI {
119
133
  quantity?: string;
120
134
  useMasterBalance?: boolean;
121
135
  postOnly?: boolean;
136
+ /**
137
+ * Client-assigned correlation handle, echoed back on order reads and
138
+ * order WebSocket events. At most 64 characters from [A-Za-z0-9._:-].
139
+ * Not de-duplicated and not unique — a replacement re-states it and
140
+ * inherits nothing from the original order.
141
+ */
142
+ clientOrderId?: string;
122
143
  }): Promise<ReplaceOrderResponse>;
123
144
  /**
124
145
  * Batch creates multiple orders in a single request.
@@ -70,6 +70,14 @@ export interface Order {
70
70
  reduceOnly?: boolean;
71
71
  /** Whether the order was placed post-only (maker-only). Absent for orders placed before the flag was persisted. */
72
72
  postOnly?: boolean;
73
+ /**
74
+ * Client-assigned correlation handle as stored: the value supplied on create
75
+ * or replace, with surrounding whitespace trimmed. Absent when the order
76
+ * carried none, including every order placed before the field was accepted on
77
+ * write. Not unique — several orders may share one value, so a lookup by it
78
+ * can be ambiguous.
79
+ */
80
+ clientOrderId?: string;
73
81
  /** Position ID linked to the order, when available */
74
82
  positionId?: string;
75
83
  /** Stable cause when status is CANCELLED */
@@ -38,8 +38,12 @@ export interface MatchResult {
38
38
  } | null;
39
39
  }
40
40
  /**
41
- * Parent TP/SL follows the parent order quantity and becomes active once the
42
- * parent order creates or extends a position.
41
+ * A take-profit / stop-loss leg attached to an order at placement. It becomes
42
+ * active once the parent order creates or extends a position.
43
+ *
44
+ * Sizing is the leg's own, set by `quantity` / `closePosition` below — it does
45
+ * NOT follow the parent order's quantity. Sizing from the parent is what let a
46
+ * leg freeze at the order's size and under-cover a position that later grew.
43
47
  */
44
48
  export interface ParentTpSlLegParams {
45
49
  /** Mark price that arms the close order */
@@ -54,6 +58,18 @@ export interface ParentTpSlLegParams {
54
58
  slippageToleranceBps?: number;
55
59
  /** Optional conditional order expiry timestamp (ISO 8601) */
56
60
  expiresAt?: string;
61
+ /**
62
+ * Deliberate partial size: this leg closes exactly this much and never
63
+ * resizes, however the position grows. Mutually exclusive with
64
+ * `closePosition: true`; required when `closePosition: false`.
65
+ */
66
+ quantity?: string;
67
+ /**
68
+ * Resolve the full live position size when triggered, so the leg keeps
69
+ * covering the position as it grows. Mutually exclusive with `quantity`.
70
+ * Omitting both also means full-position close.
71
+ */
72
+ closePosition?: boolean;
57
73
  }
58
74
  /**
59
75
  * Response from creating an order.
@@ -359,6 +375,13 @@ export interface BatchCreateOrderParams {
359
375
  * detail and list reads.
360
376
  */
361
377
  postOnly?: boolean;
378
+ /**
379
+ * Client-assigned correlation handle, echoed back on order reads and on
380
+ * order WebSocket events. At most 64 characters from [A-Za-z0-9._:-].
381
+ * Monaco does not de-duplicate on it and does not enforce uniqueness —
382
+ * it correlates a response to a request, it does not make a retry safe.
383
+ */
384
+ clientOrderId?: string;
362
385
  }
363
386
  /**
364
387
  * Parameters for a single order in a batch replace request
@@ -377,6 +400,13 @@ export interface BatchReplaceOrderParams {
377
400
  * inherited from the original order — see `TradingAPI.replaceOrder`.
378
401
  */
379
402
  postOnly?: boolean;
403
+ /**
404
+ * Client-assigned correlation handle, echoed back on order reads and on
405
+ * order WebSocket events. At most 64 characters from [A-Za-z0-9._:-].
406
+ * Monaco does not de-duplicate on it and does not enforce uniqueness —
407
+ * it correlates a response to a request, it does not make a retry safe.
408
+ */
409
+ clientOrderId?: string;
380
410
  }
381
411
  export interface CancelConditionalOrderResponse {
382
412
  conditionalOrderId: string;
@@ -171,6 +171,10 @@ export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
171
171
  startTime: z.ZodOptional<z.ZodNumber>;
172
172
  endTime: z.ZodOptional<z.ZodNumber>;
173
173
  limit: z.ZodOptional<z.ZodNumber>;
174
+ priceType: z.ZodOptional<z.ZodEnum<{
175
+ trade: "trade";
176
+ mark: "mark";
177
+ }>>;
174
178
  }, z.core.$strip>;
175
179
  /**
176
180
  * @deprecated Use GetCandlesticksByPairIdSchema instead. Symbol-based lookups are no longer supported.
@@ -191,6 +195,10 @@ export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
191
195
  startTime: z.ZodOptional<z.ZodNumber>;
192
196
  endTime: z.ZodOptional<z.ZodNumber>;
193
197
  limit: z.ZodOptional<z.ZodNumber>;
198
+ priceType: z.ZodOptional<z.ZodEnum<{
199
+ trade: "trade";
200
+ mark: "mark";
201
+ }>>;
194
202
  }, z.core.$strip>;
195
203
  /**
196
204
  * Get Trading Pair validation schema
@@ -188,6 +188,7 @@ export const GetCandlesticksByPairIdSchema = z
188
188
  startTime: TimestampSchema.optional(),
189
189
  endTime: TimestampSchema.optional(),
190
190
  limit: CandlestickLimitSchema,
191
+ priceType: z.enum(["trade", "mark"]).optional(),
191
192
  })
192
193
  .refine((data) => {
193
194
  // Only validate startTime < endTime if both are provided
@@ -74,6 +74,8 @@ export declare const ParentTpSlLegSchema: z.ZodObject<{
74
74
  MARKET: "MARKET";
75
75
  }>;
76
76
  limitPrice: z.ZodOptional<z.ZodString>;
77
+ quantity: z.ZodOptional<z.ZodString>;
78
+ closePosition: z.ZodOptional<z.ZodBoolean>;
77
79
  timeInForce: z.ZodOptional<z.ZodEnum<{
78
80
  GTC: "GTC";
79
81
  IOC: "IOC";
@@ -127,6 +129,8 @@ export declare const PlaceLimitOrderSchema: z.ZodObject<{
127
129
  MARKET: "MARKET";
128
130
  }>;
129
131
  limitPrice: z.ZodOptional<z.ZodString>;
132
+ quantity: z.ZodOptional<z.ZodString>;
133
+ closePosition: z.ZodOptional<z.ZodBoolean>;
130
134
  timeInForce: z.ZodOptional<z.ZodEnum<{
131
135
  GTC: "GTC";
132
136
  IOC: "IOC";
@@ -141,6 +145,8 @@ export declare const PlaceLimitOrderSchema: z.ZodObject<{
141
145
  MARKET: "MARKET";
142
146
  }>;
143
147
  limitPrice: z.ZodOptional<z.ZodString>;
148
+ quantity: z.ZodOptional<z.ZodString>;
149
+ closePosition: z.ZodOptional<z.ZodBoolean>;
144
150
  timeInForce: z.ZodOptional<z.ZodEnum<{
145
151
  GTC: "GTC";
146
152
  IOC: "IOC";
@@ -188,6 +194,8 @@ export declare const PlaceMarketOrderSchema: z.ZodObject<{
188
194
  MARKET: "MARKET";
189
195
  }>;
190
196
  limitPrice: z.ZodOptional<z.ZodString>;
197
+ quantity: z.ZodOptional<z.ZodString>;
198
+ closePosition: z.ZodOptional<z.ZodBoolean>;
191
199
  timeInForce: z.ZodOptional<z.ZodEnum<{
192
200
  GTC: "GTC";
193
201
  IOC: "IOC";
@@ -202,6 +210,8 @@ export declare const PlaceMarketOrderSchema: z.ZodObject<{
202
210
  MARKET: "MARKET";
203
211
  }>;
204
212
  limitPrice: z.ZodOptional<z.ZodString>;
213
+ quantity: z.ZodOptional<z.ZodString>;
214
+ closePosition: z.ZodOptional<z.ZodBoolean>;
205
215
  timeInForce: z.ZodOptional<z.ZodEnum<{
206
216
  GTC: "GTC";
207
217
  IOC: "IOC";
@@ -83,6 +83,8 @@ export const ParentTpSlLegSchema = z
83
83
  triggerPrice: PositiveDecimalStringSchema,
84
84
  orderType: OrderTypeSchema,
85
85
  limitPrice: PositiveDecimalStringSchema.optional(),
86
+ quantity: PositiveDecimalStringSchema.optional(),
87
+ closePosition: z.boolean().optional(),
86
88
  timeInForce: ConditionalTimeInForceSchema.optional(),
87
89
  slippageToleranceBps: SlippageToleranceBpsSchema.optional(),
88
90
  expiresAt: ISO8601DateSchema.optional(),
@@ -102,6 +104,16 @@ export const ParentTpSlLegSchema = z
102
104
  .refine((data) => data.orderType !== "LIMIT" || data.slippageToleranceBps === undefined, {
103
105
  message: "slippageToleranceBps is only allowed for MARKET parent TP/SL",
104
106
  path: ["slippageToleranceBps"],
107
+ })
108
+ // Same sizing contract the position-attached rail enforces: omit both to
109
+ // track the live position, or name a deliberate partial that never resizes.
110
+ .refine((data) => data.closePosition !== true || data.quantity === undefined, {
111
+ message: "quantity must be omitted when closePosition is true",
112
+ path: ["quantity"],
113
+ })
114
+ .refine((data) => data.quantity !== undefined || data.closePosition !== false, {
115
+ message: "quantity is required when closePosition is false",
116
+ path: ["closePosition"],
105
117
  });
106
118
  const hasParentTpSl = (options) => options?.takeProfit !== undefined || options?.stopLoss !== undefined;
107
119
  const legacyPositionSideMatchesOrderSide = (side, positionSide) => positionSide === undefined || (positionSide !== "NONE" && ((side === "BUY" && positionSide === "LONG") || (side === "SELL" && positionSide === "SHORT")));
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Account WebSocket Event Types
3
+ *
4
+ * Types for real-time account-level margin updates: equity, collateral, free
5
+ * collateral, margin ratio, and maintenance requirement for a margin account.
6
+ *
7
+ * This is an authenticated channel - requires the signed session-key handshake.
8
+ * Lag policy is Conflate: a lagging subscriber is fast-forwarded to the latest
9
+ * state rather than disconnected, so there is no gap signal to reconcile. Each
10
+ * frame carries the account's full current health, so consume it as a
11
+ * terminal-state snapshot per margin account, never as an additive delta.
12
+ */
13
+ /**
14
+ * Account event data carrying the current margin health of a single account.
15
+ */
16
+ export interface AccountEventData {
17
+ /** Margin account this update describes (UUID) */
18
+ marginAccountId: string;
19
+ /** Mark-inclusive account equity: collateral + unrealized PnL + funding (decimal string) */
20
+ equity: string;
21
+ /** Raw deposited collateral in USD (decimal string) */
22
+ collateral: string;
23
+ /** Collateral available for new margin allocation (decimal string) */
24
+ freeCollateral: string;
25
+ /**
26
+ * Maintenance margin required divided by equity; `0` when equity is zero
27
+ * (decimal string).
28
+ */
29
+ marginRatio: string;
30
+ /** Maintenance margin required to keep the account solvent (decimal string) */
31
+ maintenanceRequirement: string;
32
+ /** Timestamp when the account state was updated (ISO 8601) */
33
+ updatedAt: string;
34
+ }
35
+ /**
36
+ * Account event emitted when a user's account-level margin health changes.
37
+ */
38
+ export interface AccountEvent {
39
+ /** Event type identifier */
40
+ eventType: "account_update";
41
+ /** User ID (UUID) */
42
+ userId: string;
43
+ /** Account data */
44
+ data: AccountEventData;
45
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Account WebSocket Event Types
3
+ *
4
+ * Types for real-time account-level margin updates: equity, collateral, free
5
+ * collateral, margin ratio, and maintenance requirement for a margin account.
6
+ *
7
+ * This is an authenticated channel - requires the signed session-key handshake.
8
+ * Lag policy is Conflate: a lagging subscriber is fast-forwarded to the latest
9
+ * state rather than disconnected, so there is no gap signal to reconcile. Each
10
+ * frame carries the account's full current health, so consume it as a
11
+ * terminal-state snapshot per margin account, never as an additive delta.
12
+ */
@@ -1,6 +1,8 @@
1
+ export * from "./account-events";
1
2
  export * from "./balance-events";
2
3
  export * from "./conditional-order-events";
3
4
  export * from "./liquidation-events";
5
+ export * from "./market-stats-events";
4
6
  export * from "./movement-events";
5
7
  export * from "./ohlcv-events";
6
8
  export * from "./orderbook-events";
@@ -1,6 +1,8 @@
1
+ export * from "./account-events";
1
2
  export * from "./balance-events";
2
3
  export * from "./conditional-order-events";
3
4
  export * from "./liquidation-events";
5
+ export * from "./market-stats-events";
4
6
  export * from "./movement-events";
5
7
  export * from "./ohlcv-events";
6
8
  export * from "./orderbook-events";
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Market-stats WebSocket Event Types
3
+ *
4
+ * Types for the two real-time market statistics channels:
5
+ * - per-market (`market_stats:<tradingPairId>`): a full stats frame for one
6
+ * market, carried by `MarketStatsEvent`.
7
+ * - all-markets (`market_stats`): one summary row per market in a single frame,
8
+ * carried by `MarketStatsAllEvent`.
9
+ *
10
+ * Both are public channels (no authentication). Lag policy is Conflate: a
11
+ * lagging subscriber is fast-forwarded to the latest frame rather than
12
+ * disconnected. Each frame carries the market's full current stats, so consume
13
+ * it as a terminal-state snapshot, never as an additive delta.
14
+ *
15
+ * Perp-only fields (index/mark price, open interest, funding) are optional and
16
+ * omitted on the wire for spot markets, which have no positions or funding.
17
+ * All numeric quantities are decimal strings except `fundingTimestamp`, which
18
+ * is a millisecond epoch number.
19
+ */
20
+ /**
21
+ * Market tradability label, derived from the oracle market status. Spot markets
22
+ * only emit `TRADABLE` or `HALTED`.
23
+ */
24
+ export type MarketStatus = "TRADABLE" | "POST_ONLY" | "HALTED" | "NOT_READY" | "UNKNOWN";
25
+ /**
26
+ * Full per-market statistics for the `market_stats:<tradingPairId>` channel.
27
+ */
28
+ export interface MarketStatsData {
29
+ /** Market symbol, e.g. "BTC/USDC" */
30
+ symbol: string;
31
+ /** Trading pair identifier (UUID) */
32
+ tradingPairId: string;
33
+ /** Oracle index price (decimal string). Perp-only; omitted for spot. */
34
+ indexPrice?: string;
35
+ /** Mark price (decimal string). Perp-only; omitted for spot. */
36
+ markPrice?: string;
37
+ /** Mid price between best bid and best ask (decimal string) */
38
+ midPrice?: string;
39
+ /** Best bid price (decimal string) */
40
+ bestBidPrice?: string;
41
+ /** Best ask price (decimal string) */
42
+ bestAskPrice?: string;
43
+ /** Open interest (decimal string). Perp-only; omitted for spot. */
44
+ openInterest?: string;
45
+ /** Open interest limit (decimal string). Perp-only; omitted for spot. */
46
+ openInterestLimit?: string;
47
+ /** Last trade price (decimal string) */
48
+ lastTradePrice?: string;
49
+ /** 24h base-token volume (decimal string) */
50
+ dailyBaseTokenVolume?: string;
51
+ /** 24h quote-token volume (decimal string) */
52
+ dailyQuoteTokenVolume?: string;
53
+ /** 24h low price (decimal string) */
54
+ dailyPriceLow?: string;
55
+ /** 24h high price (decimal string) */
56
+ dailyPriceHigh?: string;
57
+ /** 24h absolute price change, `latestClose - open24hAgo` (decimal string) */
58
+ dailyPriceChange?: string;
59
+ /** 24h percentage price change, two decimals (decimal string) */
60
+ dailyPriceChangePercent?: string;
61
+ /** Current (last settled) funding rate (decimal string). Perp-only; omitted for spot. */
62
+ currentFundingRate?: string;
63
+ /** Estimated next-window funding rate (decimal string). Perp-only; omitted for spot. */
64
+ fundingRate?: string;
65
+ /** Next funding time as a millisecond epoch. Perp-only; omitted for spot. */
66
+ fundingTimestamp?: number;
67
+ /** Funding premium (decimal string). Perp-only; omitted for spot. */
68
+ premium?: string;
69
+ /** Base interest rate for the funding formula (decimal string). Perp-only; omitted for spot. */
70
+ baseInterestRate?: string;
71
+ /** Live funding cap, lower bound (decimal string). Perp-only; omitted for spot. */
72
+ fundingClampSmall?: string;
73
+ /** Live funding cap, upper bound (decimal string). Perp-only; omitted for spot. */
74
+ fundingClampBig?: string;
75
+ }
76
+ /**
77
+ * Per-market statistics event on the `market_stats:<tradingPairId>` channel.
78
+ */
79
+ export interface MarketStatsEvent {
80
+ /** Trading pair identifier (UUID) */
81
+ tradingPairId: string;
82
+ /** Market statistics for this pair */
83
+ data: MarketStatsData;
84
+ }
85
+ /**
86
+ * A single market's row in the all-markets summary frame. A lighter shape than
87
+ * {@link MarketStatsData}: enough to render a markets table.
88
+ */
89
+ export interface MarketStatsSummary {
90
+ /** Trading pair identifier (UUID) */
91
+ tradingPairId: string;
92
+ /** Market symbol, e.g. "BTC/USDC" */
93
+ symbol: string;
94
+ /** Last trade price (decimal string) */
95
+ lastTradePrice?: string;
96
+ /** Mark price (decimal string). Perp-only; omitted for spot. */
97
+ markPrice?: string;
98
+ /** 24h absolute price change (decimal string) */
99
+ dailyPriceChange?: string;
100
+ /** 24h percentage price change, two decimals (decimal string) */
101
+ dailyPriceChangePercent?: string;
102
+ /** 24h base-token volume (decimal string) */
103
+ dailyBaseTokenVolume?: string;
104
+ /** 24h quote-token volume (decimal string) */
105
+ dailyQuoteTokenVolume?: string;
106
+ /** 24h high price (decimal string) */
107
+ dailyPriceHigh?: string;
108
+ /** 24h low price (decimal string) */
109
+ dailyPriceLow?: string;
110
+ /** Open interest (decimal string). Perp-only; omitted for spot. */
111
+ openInterest?: string;
112
+ /** Current (last settled) funding rate (decimal string). Perp-only; omitted for spot. */
113
+ currentFundingRate?: string;
114
+ /** Next funding time as a millisecond epoch. Perp-only; omitted for spot. */
115
+ fundingTimestamp?: number;
116
+ /** Tradability label (always present) */
117
+ marketStatus: MarketStatus;
118
+ }
119
+ /**
120
+ * All-markets summary event on the `market_stats` channel: one
121
+ * {@link MarketStatsSummary} per market, in a single frame per push.
122
+ */
123
+ export interface MarketStatsAllEvent {
124
+ /** One summary row per market */
125
+ markets: MarketStatsSummary[];
126
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Market-stats WebSocket Event Types
3
+ *
4
+ * Types for the two real-time market statistics channels:
5
+ * - per-market (`market_stats:<tradingPairId>`): a full stats frame for one
6
+ * market, carried by `MarketStatsEvent`.
7
+ * - all-markets (`market_stats`): one summary row per market in a single frame,
8
+ * carried by `MarketStatsAllEvent`.
9
+ *
10
+ * Both are public channels (no authentication). Lag policy is Conflate: a
11
+ * lagging subscriber is fast-forwarded to the latest frame rather than
12
+ * disconnected. Each frame carries the market's full current stats, so consume
13
+ * it as a terminal-state snapshot, never as an additive delta.
14
+ *
15
+ * Perp-only fields (index/mark price, open interest, funding) are optional and
16
+ * omitted on the wire for spot markets, which have no positions or funding.
17
+ * All numeric quantities are decimal strings except `fundingTimestamp`, which
18
+ * is a millisecond epoch number.
19
+ */
@@ -59,6 +59,15 @@ export interface CommonOrderEventData {
59
59
  quantityRaw?: string;
60
60
  /** Time in force - present in most events */
61
61
  timeInForce?: TimeInForce;
62
+ /**
63
+ * Client-assigned correlation handle, echoed so an event can be matched to
64
+ * the request that placed the order without a round trip to `getOrder`.
65
+ * Carried on every order event that inherits these fields — placed, taker and
66
+ * maker fills, cancelled, rejected and expired — so a submit whose HTTP
67
+ * response was lost can be resolved from the stream alone. Omitted when the
68
+ * order carried none. Wire: `client_order_id`.
69
+ */
70
+ clientOrderId?: string;
62
71
  }
63
72
  /**
64
73
  * OrderPlaced event - emitted when a new order is placed
@@ -2674,6 +2674,11 @@ export interface components {
2674
2674
  * @example false
2675
2675
  */
2676
2676
  postOnly?: boolean | null;
2677
+ /**
2678
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting.
2679
+ * @example quote-btc-1130-a
2680
+ */
2681
+ clientOrderId?: string | null;
2677
2682
  };
2678
2683
  BatchCreateOrdersRequest: {
2679
2684
  orders: components["schemas"]["BatchCreateOrderItem"][];
@@ -2748,6 +2753,11 @@ export interface components {
2748
2753
  * @example false
2749
2754
  */
2750
2755
  postOnly?: boolean | null;
2756
+ /**
2757
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
2758
+ * @example quote-btc-1130-a
2759
+ */
2760
+ clientOrderId?: string | null;
2751
2761
  };
2752
2762
  BatchReplaceOrdersRequest: {
2753
2763
  orders: components["schemas"]["BatchReplaceOrderItem"][];
@@ -3147,6 +3157,11 @@ export interface components {
3147
3157
  * @example false
3148
3158
  */
3149
3159
  postOnly?: boolean | null;
3160
+ /**
3161
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting.
3162
+ * @example quote-btc-1130-a
3163
+ */
3164
+ clientOrderId?: string | null;
3150
3165
  };
3151
3166
  CreateOrderResponse: {
3152
3167
  /**
@@ -4090,7 +4105,10 @@ export interface components {
4090
4105
  * @example 300000000
4091
4106
  */
4092
4107
  remainingQuantityRaw?: string | null;
4093
- /** @description Client-assigned order identifier */
4108
+ /**
4109
+ * @description Client-assigned correlation handle as stored: the value supplied on create or replace, with surrounding whitespace trimmed. Absent when the order carried none, including every order placed before the field was accepted on write. Not unique: Monaco neither de-duplicates nor enforces uniqueness, so several orders may share one value and a lookup by it can be ambiguous.
4110
+ * @example quote-btc-1130-a
4111
+ */
4094
4112
  clientOrderId?: string | null;
4095
4113
  /**
4096
4114
  * @description Timestamp when the order was cancelled (ISO 8601)
@@ -5381,6 +5399,16 @@ export interface components {
5381
5399
  * @example 2026-06-01T00:00:00Z
5382
5400
  */
5383
5401
  expiresAt?: string | null;
5402
+ /**
5403
+ * @description Deliberate partial size: this leg closes exactly this much and never resizes, however the position grows. Omit it (or set closePosition=true) to close the whole live position at trigger time. Mutually exclusive with closePosition=true; required when closePosition=false. Same contract as TpSlLeg on the position-attached rail.
5404
+ * @example 0.5
5405
+ */
5406
+ quantity?: string | null;
5407
+ /**
5408
+ * @description Resolve the full live position size when triggered, so the leg keeps covering the position as it grows. Mutually exclusive with quantity. Omitting both also means full-position close.
5409
+ * @example true
5410
+ */
5411
+ closePosition?: boolean | null;
5384
5412
  };
5385
5413
  /**
5386
5414
  * @description A single pending withdrawal in a list response. A lightweight summary — the
@@ -5949,10 +5977,10 @@ export interface components {
5949
5977
  };
5950
5978
  ReplaceOrderRequest: {
5951
5979
  /**
5952
- * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
5953
- * @example false
5980
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
5981
+ * @example quote-btc-1130-a
5954
5982
  */
5955
- postOnly?: boolean | null;
5983
+ clientOrderId?: string | null;
5956
5984
  /**
5957
5985
  * @description New limit price (if changing)
5958
5986
  * @example 35500.00
@@ -5968,6 +5996,11 @@ export interface components {
5968
5996
  * @example false
5969
5997
  */
5970
5998
  useMasterBalance?: boolean | null;
5999
+ /**
6000
+ * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
6001
+ * @example false
6002
+ */
6003
+ postOnly?: boolean | null;
5971
6004
  };
5972
6005
  ReplaceOrderResponse: {
5973
6006
  /**
@@ -9364,6 +9397,8 @@ export interface operations {
9364
9397
  endTime?: number;
9365
9398
  /** @description Max candles to return (max 1000) */
9366
9399
  limit?: number;
9400
+ /** @description Price series to chart: trade (default, trade-derived OHLCV) or mark (mark-price series, margin pairs only; each candle's open/high/low/close are the bucket's closing mark and volume is 0) */
9401
+ priceType?: "trade" | "mark";
9367
9402
  };
9368
9403
  header?: never;
9369
9404
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.40",
3
+ "version": "1.0.41-develop.ebb62ed",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/contracts": "1.0.40",
23
+ "@0xmonaco/contracts": "1.0.41-develop.ebb62ed",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {