@0xmonaco/types 1.0.25 → 1.0.26

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.
@@ -47,6 +47,51 @@ export interface MintTokensResponse {
47
47
  /** Remaining faucet requests in the next 24h */
48
48
  remainingRequests24h: number;
49
49
  }
50
+ /** One token minted by a past faucet request. */
51
+ export interface FaucetMintRecord {
52
+ /** Asset UUID */
53
+ assetId: string;
54
+ /** Token symbol */
55
+ symbol: string;
56
+ /** Amount minted in token units */
57
+ amount: string;
58
+ /**
59
+ * On-chain transaction hash; absent when the transaction was submitted but
60
+ * never confirmed
61
+ */
62
+ txHash?: string;
63
+ }
64
+ /**
65
+ * Past faucet mints grouped by clock minute for display. A group can span
66
+ * several endpoint calls made in the same minute; the daily quota counts
67
+ * each call individually.
68
+ */
69
+ export interface FaucetRequestRecord {
70
+ /**
71
+ * Timestamp (ISO 8601) of the request, truncated to the minute (display
72
+ * grouping; the daily quota counts every call)
73
+ */
74
+ requestedAt: string;
75
+ /** Tokens minted in the group, oldest first */
76
+ minted: FaucetMintRecord[];
77
+ }
78
+ /** Result of a faucet info request. */
79
+ export interface GetFaucetInfoResponse {
80
+ /** Remaining faucet requests in the rolling 24h window */
81
+ remainingRequests24h: number;
82
+ /** Maximum faucet requests per rolling 24h window */
83
+ dailyLimit: number;
84
+ /**
85
+ * Timestamp (ISO 8601) safe to retry at or after: when the wallet's next
86
+ * faucet slot frees under the current daily limit, with a small safety
87
+ * margin. When remainingRequests24h is 0 this is when the next mint
88
+ * becomes possible. Absent when no requests are in the rolling 24h window
89
+ * or when the daily limit is 0. Not a calendar-day reset.
90
+ */
91
+ nextAvailableAt?: string;
92
+ /** Up to 5 most recent faucet requests, newest first */
93
+ recentRequests: FaucetRequestRecord[];
94
+ }
50
95
  /**
51
96
  * Faucet API interface. Session-authenticated.
52
97
  */
@@ -68,4 +113,14 @@ export interface FaucetAPI extends BaseAPI {
68
113
  * @returns Promise resolving to the minted tokens and remaining quota
69
114
  */
70
115
  mint(params: MintTokensParams): Promise<MintTokensResponse>;
116
+ /**
117
+ * Fetches the authenticated wallet's faucet quota and recent requests.
118
+ *
119
+ * Read-only: remaining requests in the rolling 24h window, when the next
120
+ * request becomes available, and the 5 most recent requests. Wallet-scoped
121
+ * across apps, matching mint enforcement.
122
+ *
123
+ * @returns Promise resolving to the quota and recent-request history
124
+ */
125
+ getInfo(): Promise<GetFaucetInfoResponse>;
71
126
  }
@@ -114,11 +114,13 @@ export interface GetMarginAccountMovementsResponse {
114
114
  export interface SimulateOrderRiskRequest {
115
115
  tradingPairId: string;
116
116
  side: OrderSide;
117
- positionSide: PositionSide;
117
+ /** @deprecated `side` is authoritative; when present BUY=LONG and SELL=SHORT. */
118
+ positionSide?: PositionSide;
118
119
  orderType: OrderType;
119
120
  price?: string;
120
121
  quantity: string;
121
- leverage: string;
122
+ /** Required for normal orders; optional and ignored for reduce-only. */
123
+ leverage?: string;
122
124
  reduceOnly?: boolean;
123
125
  }
124
126
  export type SimulateIsolatedRiskBucketOrderRiskRequest = SimulateOrderRiskRequest & {
@@ -273,11 +273,12 @@ export interface MarketStats {
273
273
  totalTradeCountLtd: number;
274
274
  }
275
275
  export interface RiskTier {
276
- notional_floor: string;
277
- notional_cap?: string;
278
276
  initialMarginRatio: string;
279
277
  maintenanceMarginRatio: string;
280
- maxLeverage: string;
278
+ /** Maximum authoritative absolute base-asset quantity. */
279
+ maxPositionSize?: string;
280
+ /** @deprecated This legacy alias is base quantity, not notional. */
281
+ maxPositionNotional?: string;
281
282
  }
282
283
  export interface PerpMarketConfig {
283
284
  tradingPairId: string;
@@ -133,6 +133,8 @@ export interface TpSlLeg {
133
133
  orderType: OrderType;
134
134
  limitPrice?: string;
135
135
  quantity?: string;
136
+ /** Resolve the full live position size when triggered. */
137
+ closePosition?: boolean;
136
138
  timeInForce?: Extract<TimeInForce, "GTC" | "IOC">;
137
139
  slippageToleranceBps?: number;
138
140
  expiresAt?: string;
@@ -140,6 +142,8 @@ export interface TpSlLeg {
140
142
  export interface AttachPositionTpSlRequest {
141
143
  takeProfit?: TpSlLeg;
142
144
  stopLoss?: TpSlLeg;
145
+ /** Cancel the sibling after one leg triggers. Requires both legs. */
146
+ oco?: boolean;
143
147
  }
144
148
  export interface AttachPositionTpSlResponse {
145
149
  positionId: string;
@@ -56,6 +56,14 @@ export interface SDKConfig {
56
56
  * (e.g. Docker DNS `ws://ws-api:8080/ws`). Must be a valid absolute URL.
57
57
  */
58
58
  wsUrl?: string;
59
+ /**
60
+ * Polling frequency in milliseconds for the SDK's internal viem public
61
+ * client (e.g. `waitForTransactionReceipt` during vault deposits). Sei
62
+ * produces sub-second blocks, so a value near the chain's block time
63
+ * confirms transactions much sooner than viem's 4000ms default. Defaults to
64
+ * 750ms when omitted. Must be a positive finite number when provided.
65
+ */
66
+ pollingInterval?: number;
59
67
  }
60
68
  /**
61
69
  * Core SDK interface providing access to all Monaco functionality.
@@ -34,10 +34,13 @@ export interface TradingAPI extends BaseAPI {
34
34
  riskBucketId?: string;
35
35
  riskBucketCollateral?: string;
36
36
  strategyKey?: string;
37
+ /** @deprecated Order side is authoritative. */
37
38
  positionSide?: PositionSide;
38
39
  leverage?: string;
39
40
  reduceOnly?: boolean;
41
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
40
42
  takeProfit?: ParentTpSlLegParams;
43
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
41
44
  stopLoss?: ParentTpSlLegParams;
42
45
  }): Promise<CreateOrderResponse>;
43
46
  /**
@@ -58,10 +61,13 @@ export interface TradingAPI extends BaseAPI {
58
61
  riskBucketId?: string;
59
62
  riskBucketCollateral?: string;
60
63
  strategyKey?: string;
64
+ /** @deprecated Order side is authoritative. */
61
65
  positionSide?: PositionSide;
62
66
  leverage?: string;
63
67
  reduceOnly?: boolean;
68
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
64
69
  takeProfit?: ParentTpSlLegParams;
70
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
65
71
  stopLoss?: ParentTpSlLegParams;
66
72
  }): Promise<CreateOrderResponse>;
67
73
  /**
@@ -140,6 +146,6 @@ export interface TradingAPI extends BaseAPI {
140
146
  */
141
147
  getOrder(orderId: string): Promise<GetOrderResponse>;
142
148
  }
143
- export type { ConditionalOrderConditionType, ConditionalOrderState, ConditionalOrderTriggerSource, Order, OrderRole, OrderSide, OrderStatus, OrderType, PositionSide, TimeInForce, TradingMode, } from "./orders";
149
+ export type { ConditionalOrderConditionType, ConditionalOrderState, ConditionalOrderTriggerSource, Order, OrderRole, OrderSide, OrderStatus, OrderTerminalReason, OrderType, PositionSide, TimeInForce, TradingMode, } from "./orders";
144
150
  export { ORDER_STATUS_VALUES } from "./orders";
145
151
  export type { BatchCancelError, BatchCancelOrdersResponse, BatchCancelResult, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchCreateResult, BatchError, BatchReplaceOrderParams, BatchReplaceOrdersResponse, BatchReplaceResult, CancelConditionalOrderResponse, CancelOrderResponse, ConditionalOrder, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, MatchResult, ParentTpSlLegParams, ReplaceOrderResponse, UpdatedFields, } from "./responses";
@@ -70,7 +70,11 @@ export interface Order {
70
70
  reduceOnly?: boolean;
71
71
  /** Position ID linked to the order, when available */
72
72
  positionId?: string;
73
+ /** Stable cause when status is CANCELLED */
74
+ terminalReason?: OrderTerminalReason;
73
75
  }
76
+ /** Stable terminal causes for accepted orders that end as CANCELLED. */
77
+ export type OrderTerminalReason = "USER_REQUESTED" | "REPLACED" | "LIQUIDATION" | "INSUFFICIENT_MARGIN" | "REDUCE_ONLY_EXHAUSTED" | "POSITION_CLOSED" | "OCO_SIBLING_TRIGGERED" | "SYSTEM";
74
78
  /**
75
79
  * Role of the creator or order
76
80
  */
@@ -38,7 +38,7 @@ export interface MatchResult {
38
38
  } | null;
39
39
  }
40
40
  /**
41
- * Parent TP/SL leg attached to a normal margin order.
41
+ * @deprecated Entry-attached TP/SL is rejected. Use position-associated TP/SL.
42
42
  *
43
43
  * Parent TP/SL follows the parent order quantity and becomes active once the
44
44
  * parent order creates or extends a position.
@@ -75,18 +75,18 @@ export declare const SimulateOrderRiskSchema: z.ZodObject<{
75
75
  BUY: "BUY";
76
76
  SELL: "SELL";
77
77
  }>;
78
- positionSide: z.ZodEnum<{
78
+ positionSide: z.ZodOptional<z.ZodEnum<{
79
79
  LONG: "LONG";
80
80
  SHORT: "SHORT";
81
81
  NONE: "NONE";
82
- }>;
82
+ }>>;
83
83
  orderType: z.ZodEnum<{
84
84
  LIMIT: "LIMIT";
85
85
  MARKET: "MARKET";
86
86
  }>;
87
87
  price: z.ZodOptional<z.ZodString>;
88
88
  quantity: z.ZodString;
89
- leverage: z.ZodString;
89
+ leverage: z.ZodOptional<z.ZodString>;
90
90
  reduceOnly: z.ZodOptional<z.ZodBoolean>;
91
91
  }, z.core.$strict>;
92
92
  }, z.core.$strip>;
@@ -97,18 +97,18 @@ export declare const SimulateParentMarginOrderRiskSchema: z.ZodObject<{
97
97
  BUY: "BUY";
98
98
  SELL: "SELL";
99
99
  }>;
100
- positionSide: z.ZodEnum<{
100
+ positionSide: z.ZodOptional<z.ZodEnum<{
101
101
  LONG: "LONG";
102
102
  SHORT: "SHORT";
103
103
  NONE: "NONE";
104
- }>;
104
+ }>>;
105
105
  orderType: z.ZodEnum<{
106
106
  LIMIT: "LIMIT";
107
107
  MARKET: "MARKET";
108
108
  }>;
109
109
  price: z.ZodOptional<z.ZodString>;
110
110
  quantity: z.ZodString;
111
- leverage: z.ZodString;
111
+ leverage: z.ZodOptional<z.ZodString>;
112
112
  reduceOnly: z.ZodOptional<z.ZodBoolean>;
113
113
  }, z.core.$strict>;
114
114
  }, z.core.$strip>;
@@ -118,18 +118,18 @@ export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
118
118
  BUY: "BUY";
119
119
  SELL: "SELL";
120
120
  }>;
121
- positionSide: z.ZodEnum<{
121
+ positionSide: z.ZodOptional<z.ZodEnum<{
122
122
  LONG: "LONG";
123
123
  SHORT: "SHORT";
124
124
  NONE: "NONE";
125
- }>;
125
+ }>>;
126
126
  orderType: z.ZodEnum<{
127
127
  LIMIT: "LIMIT";
128
128
  MARKET: "MARKET";
129
129
  }>;
130
130
  price: z.ZodOptional<z.ZodString>;
131
131
  quantity: z.ZodString;
132
- leverage: z.ZodString;
132
+ leverage: z.ZodOptional<z.ZodString>;
133
133
  reduceOnly: z.ZodOptional<z.ZodBoolean>;
134
134
  tradingPairId: z.ZodUUID;
135
135
  strategyKey: z.ZodOptional<z.ZodString>;
@@ -141,18 +141,18 @@ export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
141
141
  BUY: "BUY";
142
142
  SELL: "SELL";
143
143
  }>;
144
- positionSide: z.ZodEnum<{
144
+ positionSide: z.ZodOptional<z.ZodEnum<{
145
145
  LONG: "LONG";
146
146
  SHORT: "SHORT";
147
147
  NONE: "NONE";
148
- }>;
148
+ }>>;
149
149
  orderType: z.ZodEnum<{
150
150
  LIMIT: "LIMIT";
151
151
  MARKET: "MARKET";
152
152
  }>;
153
153
  price: z.ZodOptional<z.ZodString>;
154
154
  quantity: z.ZodString;
155
- leverage: z.ZodString;
155
+ leverage: z.ZodOptional<z.ZodString>;
156
156
  reduceOnly: z.ZodOptional<z.ZodBoolean>;
157
157
  marginMode: z.ZodLiteral<"CROSS">;
158
158
  selectedTradingPairIds: z.ZodArray<z.ZodUUID>;
@@ -78,17 +78,39 @@ export const GetParentMarginAccountMovementsSchema = PaginationSchema.extend({
78
78
  const BaseSimulateOrderRiskRequestSchema = z.object({
79
79
  tradingPairId: UUIDSchema,
80
80
  side: OrderSideSchema,
81
- positionSide: PositionSideSchema,
81
+ positionSide: PositionSideSchema.optional(),
82
82
  orderType: OrderTypeSchema,
83
83
  price: PositiveDecimalStringSchema.optional(),
84
84
  quantity: PositiveDecimalStringSchema,
85
- leverage: PositiveDecimalStringSchema,
85
+ leverage: PositiveDecimalStringSchema.optional(),
86
86
  reduceOnly: z.boolean().optional(),
87
87
  });
88
- const SimulateOrderRiskRequestSchema = BaseSimulateOrderRiskRequestSchema.strict();
89
- const SimulateIsolatedRiskBucketOrderRiskRequestSchema = BaseSimulateOrderRiskRequestSchema.merge(IsolatedRiskBucketRequestSchema).strict();
88
+ const validateOneWaySimulationFields = (data, ctx) => {
89
+ if (data.positionSide !== undefined) {
90
+ const expected = data.side === "BUY" ? "LONG" : "SHORT";
91
+ if (data.positionSide !== expected) {
92
+ ctx.addIssue({
93
+ code: z.ZodIssueCode.custom,
94
+ message: "positionSide must match side when provided (BUY=LONG, SELL=SHORT)",
95
+ path: ["positionSide"],
96
+ });
97
+ }
98
+ }
99
+ if (data.reduceOnly !== true && data.leverage === undefined) {
100
+ ctx.addIssue({
101
+ code: z.ZodIssueCode.custom,
102
+ message: "leverage is required for normal margin orders",
103
+ path: ["leverage"],
104
+ });
105
+ }
106
+ };
107
+ const SimulateOrderRiskRequestSchema = BaseSimulateOrderRiskRequestSchema.strict().superRefine(validateOneWaySimulationFields);
108
+ const SimulateIsolatedRiskBucketOrderRiskRequestSchema = BaseSimulateOrderRiskRequestSchema.merge(IsolatedRiskBucketRequestSchema)
109
+ .strict()
110
+ .superRefine(validateOneWaySimulationFields);
90
111
  const SimulateCrossRiskBucketOrderRiskRequestSchema = BaseSimulateOrderRiskRequestSchema.merge(CrossRiskBucketScopeSchema)
91
112
  .strict()
113
+ .superRefine(validateOneWaySimulationFields)
92
114
  .refine((data) => data.selectedTradingPairIds.includes(data.tradingPairId), {
93
115
  message: "tradingPairId must be included in selectedTradingPairIds for CROSS risk buckets",
94
116
  path: ["selectedTradingPairIds"],
@@ -60,6 +60,7 @@ export declare const AttachPositionTpSlSchema: z.ZodObject<{
60
60
  }>;
61
61
  limitPrice: z.ZodOptional<z.ZodString>;
62
62
  quantity: z.ZodOptional<z.ZodString>;
63
+ closePosition: z.ZodOptional<z.ZodBoolean>;
63
64
  timeInForce: z.ZodOptional<z.ZodEnum<{
64
65
  GTC: "GTC";
65
66
  IOC: "IOC";
@@ -75,6 +76,7 @@ export declare const AttachPositionTpSlSchema: z.ZodObject<{
75
76
  }>;
76
77
  limitPrice: z.ZodOptional<z.ZodString>;
77
78
  quantity: z.ZodOptional<z.ZodString>;
79
+ closePosition: z.ZodOptional<z.ZodBoolean>;
78
80
  timeInForce: z.ZodOptional<z.ZodEnum<{
79
81
  GTC: "GTC";
80
82
  IOC: "IOC";
@@ -82,6 +84,7 @@ export declare const AttachPositionTpSlSchema: z.ZodObject<{
82
84
  slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
83
85
  expiresAt: z.ZodOptional<z.ZodISODateTime>;
84
86
  }, z.core.$strip>>;
87
+ oco: z.ZodOptional<z.ZodBoolean>;
85
88
  }, z.core.$strip>;
86
89
  }, z.core.$strip>;
87
90
  export declare const ListPositionHistorySchema: z.ZodObject<{
@@ -60,6 +60,7 @@ const TpSlLegSchema = z
60
60
  orderType: OrderTypeSchema,
61
61
  limitPrice: PositiveDecimalStringSchema.optional(),
62
62
  quantity: PositiveDecimalStringSchema.optional(),
63
+ closePosition: z.boolean().optional(),
63
64
  timeInForce: ConditionalTimeInForceSchema.optional(),
64
65
  slippageToleranceBps: SlippageToleranceBpsSchema.optional(),
65
66
  expiresAt: ISO8601DateSchema.optional(),
@@ -79,15 +80,28 @@ const TpSlLegSchema = z
79
80
  .refine((data) => data.orderType !== "LIMIT" || data.slippageToleranceBps === undefined, {
80
81
  message: "slippageToleranceBps is only allowed for MARKET TP/SL legs",
81
82
  path: ["slippageToleranceBps"],
83
+ })
84
+ .refine((data) => data.closePosition !== true || data.quantity === undefined, {
85
+ message: "quantity must be omitted when closePosition is true",
86
+ path: ["quantity"],
87
+ })
88
+ .refine((data) => data.quantity !== undefined || data.closePosition !== false, {
89
+ message: "quantity is required when closePosition is false",
90
+ path: ["closePosition"],
82
91
  });
83
92
  export const AttachPositionTpSlSchema = PositionIdSchema.extend({
84
93
  request: z
85
94
  .object({
86
95
  takeProfit: TpSlLegSchema.optional(),
87
96
  stopLoss: TpSlLegSchema.optional(),
97
+ oco: z.boolean().optional(),
88
98
  })
89
99
  .refine((data) => data.takeProfit !== undefined || data.stopLoss !== undefined, {
90
100
  message: "At least one of takeProfit or stopLoss is required",
101
+ })
102
+ .refine((data) => data.oco !== true || (data.takeProfit !== undefined && data.stopLoss !== undefined), {
103
+ message: "oco=true requires both takeProfit and stopLoss",
104
+ path: ["oco"],
91
105
  }),
92
106
  });
93
107
  export const ListPositionHistorySchema = PaginationSchema.extend({
@@ -19,12 +19,12 @@ export declare const LedgerEntryTypeSchema: z.ZodEnum<{
19
19
  * Transaction type validation
20
20
  */
21
21
  export declare const TransactionTypeSchema: z.ZodEnum<{
22
+ LIQUIDATION: "LIQUIDATION";
22
23
  FEE: "FEE";
23
24
  DEPOSIT: "DEPOSIT";
24
25
  WITHDRAWAL: "WITHDRAWAL";
25
26
  TRADE: "TRADE";
26
27
  FUNDING: "FUNDING";
27
- LIQUIDATION: "LIQUIDATION";
28
28
  INTEREST: "INTEREST";
29
29
  REWARD: "REWARD";
30
30
  }>;
@@ -45,12 +45,12 @@ export declare const GetUserMovementsSchema: z.ZodObject<{
45
45
  FEE: "FEE";
46
46
  }>>;
47
47
  transactionType: z.ZodOptional<z.ZodEnum<{
48
+ LIQUIDATION: "LIQUIDATION";
48
49
  FEE: "FEE";
49
50
  DEPOSIT: "DEPOSIT";
50
51
  WITHDRAWAL: "WITHDRAWAL";
51
52
  TRADE: "TRADE";
52
53
  FUNDING: "FUNDING";
53
- LIQUIDATION: "LIQUIDATION";
54
54
  INTEREST: "INTEREST";
55
55
  REWARD: "REWARD";
56
56
  }>>;
@@ -104,6 +104,7 @@ export const ParentTpSlLegSchema = z
104
104
  path: ["slippageToleranceBps"],
105
105
  });
106
106
  const hasParentTpSl = (options) => options?.takeProfit !== undefined || options?.stopLoss !== undefined;
107
+ const legacyPositionSideMatchesOrderSide = (side, positionSide) => positionSide === undefined || (positionSide !== "NONE" && ((side === "BUY" && positionSide === "LONG") || (side === "SELL" && positionSide === "SHORT")));
107
108
  /**
108
109
  * Place Limit Order validation schema
109
110
  */
@@ -132,25 +133,17 @@ export const PlaceLimitOrderSchema = z
132
133
  })
133
134
  .optional(),
134
135
  })
135
- .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.positionSide !== undefined, {
136
- message: "positionSide is required for MARGIN orders",
136
+ .refine((data) => legacyPositionSideMatchesOrderSide(data.side, data.options?.positionSide), {
137
+ message: "positionSide is deprecated; when supplied BUY requires LONG and SELL requires SHORT",
137
138
  path: ["options", "positionSide"],
138
139
  })
139
- .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.leverage !== undefined, {
140
- message: "leverage is required for MARGIN orders",
140
+ .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.reduceOnly === true || data.options.leverage !== undefined, {
141
+ message: "leverage is required for normal MARGIN orders",
141
142
  path: ["options", "leverage"],
142
143
  })
143
- .refine((data) => !hasParentTpSl(data.options) || data.options?.tradingMode === "MARGIN", {
144
- message: "Parent TP/SL is only supported for MARGIN orders",
145
- path: ["options", "tradingMode"],
146
- })
147
- .refine((data) => !hasParentTpSl(data.options) || data.options?.positionSide !== "NONE", {
148
- message: "Parent TP/SL requires positionSide to be LONG or SHORT",
149
- path: ["options", "positionSide"],
150
- })
151
- .refine((data) => !hasParentTpSl(data.options) || data.options?.reduceOnly !== true, {
152
- message: "Parent TP/SL cannot be attached to reduceOnly orders",
153
- path: ["options", "reduceOnly"],
144
+ .refine((data) => !hasParentTpSl(data.options), {
145
+ message: "Entry-attached TP/SL are no longer supported; create position TP/SL after the position opens",
146
+ path: ["options"],
154
147
  })
155
148
  .refine((data) => data.options?.riskBucketCollateral === undefined || data.options?.tradingMode === "MARGIN", {
156
149
  message: "riskBucketCollateral is only supported for MARGIN orders",
@@ -209,25 +202,17 @@ export const PlaceMarketOrderSchema = z
209
202
  })
210
203
  .optional(),
211
204
  })
212
- .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.positionSide !== undefined, {
213
- message: "positionSide is required for MARGIN orders",
205
+ .refine((data) => legacyPositionSideMatchesOrderSide(data.side, data.options?.positionSide), {
206
+ message: "positionSide is deprecated; when supplied BUY requires LONG and SELL requires SHORT",
214
207
  path: ["options", "positionSide"],
215
208
  })
216
- .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.leverage !== undefined, {
217
- message: "leverage is required for MARGIN orders",
209
+ .refine((data) => data.options?.tradingMode !== "MARGIN" || data.options.reduceOnly === true || data.options.leverage !== undefined, {
210
+ message: "leverage is required for normal MARGIN orders",
218
211
  path: ["options", "leverage"],
219
212
  })
220
- .refine((data) => !hasParentTpSl(data.options) || data.options?.tradingMode === "MARGIN", {
221
- message: "Parent TP/SL is only supported for MARGIN orders",
222
- path: ["options", "tradingMode"],
223
- })
224
- .refine((data) => !hasParentTpSl(data.options) || data.options?.positionSide !== "NONE", {
225
- message: "Parent TP/SL requires positionSide to be LONG or SHORT",
226
- path: ["options", "positionSide"],
227
- })
228
- .refine((data) => !hasParentTpSl(data.options) || data.options?.reduceOnly !== true, {
229
- message: "Parent TP/SL cannot be attached to reduceOnly orders",
230
- path: ["options", "reduceOnly"],
213
+ .refine((data) => !hasParentTpSl(data.options), {
214
+ message: "Entry-attached TP/SL are no longer supported; create position TP/SL after the position opens",
215
+ path: ["options"],
231
216
  })
232
217
  .refine((data) => data.options?.riskBucketCollateral === undefined || data.options?.tradingMode === "MARGIN", {
233
218
  message: "riskBucketCollateral is only supported for MARGIN orders",
@@ -391,12 +376,12 @@ export const BatchCreateOrderItemSchema = z
391
376
  message: "reduceOnly orders cannot create a new risk bucket",
392
377
  path: ["reduceOnly"],
393
378
  })
394
- .refine((data) => data.tradingMode !== "MARGIN" || data.positionSide !== undefined, {
395
- message: "positionSide is required for MARGIN orders",
379
+ .refine((data) => legacyPositionSideMatchesOrderSide(data.side, data.positionSide), {
380
+ message: "positionSide is deprecated; when supplied BUY requires LONG and SELL requires SHORT",
396
381
  path: ["positionSide"],
397
382
  })
398
- .refine((data) => data.tradingMode !== "MARGIN" || data.leverage !== undefined, {
399
- message: "leverage is required for MARGIN orders",
383
+ .refine((data) => data.tradingMode !== "MARGIN" || data.reduceOnly === true || data.leverage !== undefined, {
384
+ message: "leverage is required for normal MARGIN orders",
400
385
  path: ["leverage"],
401
386
  });
402
387
  /**
@@ -4,7 +4,7 @@
4
4
  * TypeScript types for order websocket events matching the Rust backend definitions.
5
5
  * Each event type has specific data fields based on the event context.
6
6
  */
7
- import type { OrderRole, OrderSide, OrderStatus, OrderType, TimeInForce, TradingMode } from "../../trading";
7
+ import type { OrderRole, OrderSide, OrderStatus, OrderTerminalReason, OrderType, TimeInForce, TradingMode } from "../../trading";
8
8
  import type { RawEventMessage } from "../base";
9
9
  /**
10
10
  * Order event types
@@ -197,6 +197,8 @@ export interface OrderCancelledEvent extends OrderEvent {
197
197
  data: CommonOrderEventData & {
198
198
  /** Reason for cancellation */
199
199
  reason?: string;
200
+ /** Stable machine-readable cancellation cause */
201
+ terminalReason?: OrderTerminalReason;
200
202
  /** Total filled quantity before cancellation */
201
203
  totalFilled?: string;
202
204
  /** Remaining quantity when canceled */
@@ -10,6 +10,6 @@
10
10
  * hand-written SDK surface. CI regenerates it and fails on a diff, identical to
11
11
  * the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
12
12
  */
13
- export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_rewards_balance", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
13
+ export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_faucet_info", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_rewards_balance", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
14
14
  /** Union of every OpenAPI operationId in the spec. */
15
15
  export type OperationId = (typeof OPERATION_IDS)[number];
@@ -32,6 +32,7 @@ export const OPERATION_IDS = [
32
32
  "get_available_collateral",
33
33
  "get_candles",
34
34
  "get_conditional_order",
35
+ "get_faucet_info",
35
36
  "get_funding_state",
36
37
  "get_index_price",
37
38
  "get_margin_account_movements",
@@ -734,6 +734,32 @@ export interface paths {
734
734
  patch?: never;
735
735
  trace?: never;
736
736
  };
737
+ "/api/v1/faucet/info": {
738
+ parameters: {
739
+ query?: never;
740
+ header?: never;
741
+ path?: never;
742
+ cookie?: never;
743
+ };
744
+ /**
745
+ * Get faucet quota and recent requests
746
+ * @description Get faucet quota and recent requests.
747
+ *
748
+ * Returns the authenticated wallet's remaining faucet requests in the
749
+ * rolling 24h window, when the next request becomes available, and the
750
+ * 5 most recent faucet requests. Quota is wallet-scoped: it aggregates
751
+ * across all user rows sharing the wallet address, matching mint
752
+ * enforcement.
753
+ */
754
+ get: operations["get_faucet_info"];
755
+ put?: never;
756
+ post?: never;
757
+ delete?: never;
758
+ options?: never;
759
+ head?: never;
760
+ patch?: never;
761
+ trace?: never;
762
+ };
737
763
  "/api/v1/faucet/mint": {
738
764
  parameters: {
739
765
  query?: never;
@@ -2280,8 +2306,13 @@ export interface components {
2280
2306
  updatedAt?: string | null;
2281
2307
  };
2282
2308
  AttachPositionTpSlRequest: {
2283
- stopLoss?: components["schemas"]["TpSlLeg"];
2309
+ /**
2310
+ * @description One-cancels-the-other. Defaults to false. When true, both take_profit and
2311
+ * stop_loss are required and the sibling is cancelled after either triggers.
2312
+ */
2313
+ oco?: boolean | null;
2284
2314
  takeProfit?: components["schemas"]["TpSlLeg"];
2315
+ stopLoss?: components["schemas"]["TpSlLeg"];
2285
2316
  };
2286
2317
  AttachPositionTpSlResponse: {
2287
2318
  positionId?: string | null;
@@ -2499,13 +2530,14 @@ export interface components {
2499
2530
  */
2500
2531
  riskBucketCollateral?: string | null;
2501
2532
  /**
2502
- * @description Position side for margin orders: LONG, SHORT, or NONE
2533
+ * @deprecated
2534
+ * @description DEPRECATED compatibility field. Order side is authoritative. When supplied, BUY requires LONG and SELL requires SHORT; NONE is rejected.
2503
2535
  * @example LONG
2504
2536
  * @enum {string|null}
2505
2537
  */
2506
- positionSide?: "LONG" | "SHORT" | "NONE" | null;
2538
+ positionSide?: "LONG" | "SHORT" | null;
2507
2539
  /**
2508
- * @description Leverage multiplier as decimal string for margin orders
2540
+ * @description Leverage multiplier as a decimal string. Required for normal margin orders; optional and ignored for reduce-only orders.
2509
2541
  * @example 5
2510
2542
  */
2511
2543
  leverage?: string | null;
@@ -2947,13 +2979,14 @@ export interface components {
2947
2979
  */
2948
2980
  riskBucketCollateral?: string | null;
2949
2981
  /**
2950
- * @description Position side for margin orders: LONG, SHORT, or NONE
2982
+ * @deprecated
2983
+ * @description DEPRECATED compatibility field. Order side is authoritative. When supplied, BUY requires LONG and SELL requires SHORT; NONE is rejected.
2951
2984
  * @example LONG
2952
2985
  * @enum {string|null}
2953
2986
  */
2954
- positionSide?: "LONG" | "SHORT" | "NONE" | null;
2987
+ positionSide?: "LONG" | "SHORT" | null;
2955
2988
  /**
2956
- * @description Leverage multiplier as decimal string for margin orders
2989
+ * @description Leverage multiplier as a decimal string. Required for normal margin orders; optional and ignored for reduce-only orders.
2957
2990
  * @example 5
2958
2991
  */
2959
2992
  leverage?: string | null;
@@ -3123,6 +3156,36 @@ export interface components {
3123
3156
  */
3124
3157
  error?: string | null;
3125
3158
  };
3159
+ /** @description One token minted by a past faucet request. */
3160
+ FaucetMintRecord: {
3161
+ /**
3162
+ * Format: uuid
3163
+ * @description Asset UUID
3164
+ */
3165
+ assetId?: string | null;
3166
+ /**
3167
+ * @description Token symbol
3168
+ * @example USDC
3169
+ */
3170
+ symbol?: string | null;
3171
+ /**
3172
+ * @description Amount minted in token units
3173
+ * @example 1000
3174
+ */
3175
+ amount?: string | null;
3176
+ /** @description On-chain transaction hash; absent when the transaction was submitted but never confirmed */
3177
+ txHash?: string | null;
3178
+ };
3179
+ /**
3180
+ * @description Past faucet mints grouped by clock minute for display. A group can span
3181
+ * several endpoint calls made in the same minute; the daily quota counts
3182
+ * each call individually.
3183
+ */
3184
+ FaucetRequestRecord: {
3185
+ /** @description Timestamp (ISO 8601) of the request, truncated to the minute (display grouping; the daily quota counts every call) */
3186
+ requestedAt?: string | null;
3187
+ minted?: components["schemas"]["FaucetMintRecord"][] | null;
3188
+ };
3126
3189
  FeeTierScheduleRow: {
3127
3190
  /**
3128
3191
  * Format: int32
@@ -3372,6 +3435,27 @@ export interface components {
3372
3435
  */
3373
3436
  clientId?: string | null;
3374
3437
  };
3438
+ GetFaucetInfoResponse: {
3439
+ /**
3440
+ * Format: uint32
3441
+ * @description Remaining faucet requests in the rolling 24h window
3442
+ * @example 2
3443
+ */
3444
+ remainingRequests24h?: number | null;
3445
+ /**
3446
+ * Format: uint32
3447
+ * @description Maximum faucet requests per rolling 24h window
3448
+ * @example 3
3449
+ */
3450
+ dailyLimit?: number | null;
3451
+ /** @description Timestamp (ISO 8601) safe to retry at or after: when the wallet's next faucet slot frees under the current daily limit, with a small safety margin. When remaining_requests_24h is 0 this is when the next mint becomes possible. Absent when no requests are in the rolling 24h window or when the daily limit is 0. Not a calendar-day reset. */
3452
+ nextAvailableAt?: string | null;
3453
+ /**
3454
+ * @description Up to 5 most recent faucet request groups, newest first, regardless of
3455
+ * the 24h window.
3456
+ */
3457
+ recentRequests?: components["schemas"]["FaucetRequestRecord"][] | null;
3458
+ };
3375
3459
  GetFundingStateResponse: {
3376
3460
  /** Format: uuid */
3377
3461
  tradingPairId?: string | null;
@@ -3739,7 +3823,8 @@ export interface components {
3739
3823
  */
3740
3824
  marginAccountId?: string | null;
3741
3825
  /**
3742
- * @description Position side for margin orders
3826
+ * @deprecated
3827
+ * @description DEPRECATED derived compatibility value. Order side is authoritative.
3743
3828
  * @example LONG
3744
3829
  */
3745
3830
  positionSide?: string | null;
@@ -3831,6 +3916,11 @@ export interface components {
3831
3916
  * @description Batch UUID for batch orders
3832
3917
  */
3833
3918
  batchId?: string | null;
3919
+ /**
3920
+ * @description Stable terminal cause for a cancelled order: USER_REQUESTED, REPLACED, LIQUIDATION, INSUFFICIENT_MARGIN, REDUCE_ONLY_EXHAUSTED, POSITION_CLOSED, OCO_SIBLING_TRIGGERED, or SYSTEM
3921
+ * @example REDUCE_ONLY_EXHAUSTED
3922
+ */
3923
+ terminalReason?: string | null;
3834
3924
  };
3835
3925
  /** @description Orderbook snapshot with token metadata and sequence number. */
3836
3926
  GetOrderbookResponse: {
@@ -5415,7 +5505,13 @@ export interface components {
5415
5505
  RiskTier: {
5416
5506
  initialMarginRatio?: string | null;
5417
5507
  maintenanceMarginRatio?: string | null;
5508
+ /**
5509
+ * @deprecated
5510
+ * @description DEPRECATED compatibility alias. This value is a maximum absolute base-asset quantity, not a notional. Use maxPositionSize.
5511
+ */
5418
5512
  maxPositionNotional?: string | null;
5513
+ /** @description Maximum authoritative absolute position size in base-asset quantity. */
5514
+ maxPositionSize?: string | null;
5419
5515
  };
5420
5516
  /** @description Per-pair screener row. Window fields null when insufficient history. */
5421
5517
  ScreenerItem: {
@@ -5615,10 +5711,15 @@ export interface components {
5615
5711
  /** Format: uuid */
5616
5712
  tradingPairId?: string | null;
5617
5713
  side?: string | null;
5714
+ /**
5715
+ * @description Deprecated compatibility value. `side` is authoritative; when present,
5716
+ * BUY must carry LONG and SELL must carry SHORT.
5717
+ */
5618
5718
  positionSide?: string | null;
5619
5719
  orderType?: string | null;
5620
5720
  price?: string | null;
5621
5721
  quantity?: string | null;
5722
+ /** @description Required for normal orders; optional and ignored for reduce-only. */
5622
5723
  leverage?: string | null;
5623
5724
  reduceOnly?: boolean | null;
5624
5725
  };
@@ -5657,10 +5758,12 @@ export interface components {
5657
5758
  /** Format: uuid */
5658
5759
  tradingPairId?: string | null;
5659
5760
  side?: string | null;
5761
+ /** @description Deprecated compatibility value; `side` is authoritative. */
5660
5762
  positionSide?: string | null;
5661
5763
  orderType?: string | null;
5662
5764
  price?: string | null;
5663
5765
  quantity?: string | null;
5766
+ /** @description Required for normal orders; optional and ignored for reduce-only. */
5664
5767
  leverage?: string | null;
5665
5768
  reduceOnly?: boolean | null;
5666
5769
  };
@@ -5669,10 +5772,12 @@ export interface components {
5669
5772
  tradingPairId?: string | null;
5670
5773
  strategyKey?: string | null;
5671
5774
  side?: string | null;
5775
+ /** @description Deprecated compatibility value; `side` is authoritative. */
5672
5776
  positionSide?: string | null;
5673
5777
  orderType?: string | null;
5674
5778
  price?: string | null;
5675
5779
  quantity?: string | null;
5780
+ /** @description Required for normal orders; optional and ignored for reduce-only. */
5676
5781
  leverage?: string | null;
5677
5782
  reduceOnly?: boolean | null;
5678
5783
  /** @description Risk bucket mode. Defaults to ISOLATED. Values: ISOLATED, CROSS. */
@@ -5814,6 +5919,12 @@ export interface components {
5814
5919
  /** Format: int32 */
5815
5920
  slippageToleranceBps?: number | null;
5816
5921
  expiresAt?: string | null;
5922
+ /**
5923
+ * @description Resolve the full live position size when triggered. Mutually exclusive
5924
+ * with quantity. For compatibility, omitting both quantity and this field
5925
+ * also means full-position close.
5926
+ */
5927
+ closePosition?: boolean | null;
5817
5928
  };
5818
5929
  /** @description Core fields of a single executed trade, nested under `data` in the public trade event envelope. */
5819
5930
  TradeData: {
@@ -6349,6 +6460,7 @@ export interface operations {
6349
6460
  query?: never;
6350
6461
  header?: never;
6351
6462
  path: {
6463
+ /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
6352
6464
  assetId: string;
6353
6465
  };
6354
6466
  cookie?: never;
@@ -7002,6 +7114,7 @@ export interface operations {
7002
7114
  query?: never;
7003
7115
  header?: never;
7004
7116
  path: {
7117
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
7005
7118
  subAccountId: string;
7006
7119
  };
7007
7120
  cookie?: never;
@@ -7052,7 +7165,9 @@ export interface operations {
7052
7165
  query?: never;
7053
7166
  header?: never;
7054
7167
  path: {
7168
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
7055
7169
  subAccountId: string;
7170
+ /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
7056
7171
  assetId: string;
7057
7172
  };
7058
7173
  cookie?: never;
@@ -7117,7 +7232,9 @@ export interface operations {
7117
7232
  };
7118
7233
  header?: never;
7119
7234
  path: {
7235
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
7120
7236
  subAccountId: string;
7237
+ /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
7121
7238
  assetId: string;
7122
7239
  };
7123
7240
  cookie?: never;
@@ -7912,6 +8029,7 @@ export interface operations {
7912
8029
  query?: never;
7913
8030
  header?: never;
7914
8031
  path: {
8032
+ /** @example 2b1a5f9c-0000-4000-8000-000000000007 */
7915
8033
  delegatedAgentId: string;
7916
8034
  };
7917
8035
  cookie?: never;
@@ -7964,6 +8082,47 @@ export interface operations {
7964
8082
  };
7965
8083
  };
7966
8084
  };
8085
+ get_faucet_info: {
8086
+ parameters: {
8087
+ query?: never;
8088
+ header?: never;
8089
+ path?: never;
8090
+ cookie?: never;
8091
+ };
8092
+ requestBody?: never;
8093
+ responses: {
8094
+ /** @description OK */
8095
+ 200: {
8096
+ headers: {
8097
+ [name: string]: unknown;
8098
+ };
8099
+ content: {
8100
+ "application/json": components["schemas"]["GetFaucetInfoResponse"];
8101
+ };
8102
+ };
8103
+ /** @description Authentication required */
8104
+ 401: {
8105
+ headers: {
8106
+ [name: string]: unknown;
8107
+ };
8108
+ content?: never;
8109
+ };
8110
+ /** @description Internal server error */
8111
+ 500: {
8112
+ headers: {
8113
+ [name: string]: unknown;
8114
+ };
8115
+ content?: never;
8116
+ };
8117
+ /** @description Faucet quota configuration unavailable; safe to retry */
8118
+ 503: {
8119
+ headers: {
8120
+ [name: string]: unknown;
8121
+ };
8122
+ content?: never;
8123
+ };
8124
+ };
8125
+ };
7967
8126
  mint_tokens: {
7968
8127
  parameters: {
7969
8128
  query?: never;
@@ -8177,7 +8336,10 @@ export interface operations {
8177
8336
  };
8178
8337
  header?: never;
8179
8338
  path: {
8180
- /** @description Margin account UUID for the current isolated bucket. */
8339
+ /**
8340
+ * @description Margin account UUID for the current isolated bucket.
8341
+ * @example 2b1a5f9c-0000-4000-8000-000000000001
8342
+ */
8181
8343
  marginAccountId: string;
8182
8344
  };
8183
8345
  cookie?: never;
@@ -8200,7 +8362,10 @@ export interface operations {
8200
8362
  query?: never;
8201
8363
  header?: never;
8202
8364
  path: {
8203
- /** @description Parent margin account UUID that receives collateral. */
8365
+ /**
8366
+ * @description Parent margin account UUID that receives collateral.
8367
+ * @example 2b1a5f9c-0000-4000-8000-000000000001
8368
+ */
8204
8369
  marginAccountId: string;
8205
8370
  };
8206
8371
  cookie?: never;
@@ -8227,7 +8392,10 @@ export interface operations {
8227
8392
  query?: never;
8228
8393
  header?: never;
8229
8394
  path: {
8230
- /** @description Parent margin account UUID that releases collateral. */
8395
+ /**
8396
+ * @description Parent margin account UUID that releases collateral.
8397
+ * @example 2b1a5f9c-0000-4000-8000-000000000001
8398
+ */
8231
8399
  marginAccountId: string;
8232
8400
  };
8233
8401
  cookie?: never;
@@ -8260,7 +8428,10 @@ export interface operations {
8260
8428
  };
8261
8429
  header?: never;
8262
8430
  path: {
8263
- /** @description Margin account UUID for the current isolated bucket. */
8431
+ /**
8432
+ * @description Margin account UUID for the current isolated bucket.
8433
+ * @example 2b1a5f9c-0000-4000-8000-000000000001
8434
+ */
8264
8435
  marginAccountId: string;
8265
8436
  };
8266
8437
  cookie?: never;
@@ -8283,7 +8454,10 @@ export interface operations {
8283
8454
  query?: never;
8284
8455
  header?: never;
8285
8456
  path: {
8286
- /** @description Margin account UUID for the isolated bucket being simulated. */
8457
+ /**
8458
+ * @description Margin account UUID for the isolated bucket being simulated.
8459
+ * @example 2b1a5f9c-0000-4000-8000-000000000001
8460
+ */
8287
8461
  marginAccountId: string;
8288
8462
  };
8289
8463
  cookie?: never;
@@ -8553,7 +8727,9 @@ export interface operations {
8553
8727
  };
8554
8728
  header?: never;
8555
8729
  path: {
8730
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8556
8731
  tradingPairId: string;
8732
+ /** @example 1m */
8557
8733
  interval: string;
8558
8734
  };
8559
8735
  cookie?: never;
@@ -8597,6 +8773,7 @@ export interface operations {
8597
8773
  query?: never;
8598
8774
  header?: never;
8599
8775
  path: {
8776
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8600
8777
  tradingPairId: string;
8601
8778
  };
8602
8779
  cookie?: never;
@@ -8633,6 +8810,7 @@ export interface operations {
8633
8810
  query?: never;
8634
8811
  header?: never;
8635
8812
  path: {
8813
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8636
8814
  tradingPairId: string;
8637
8815
  };
8638
8816
  cookie?: never;
@@ -8664,6 +8842,7 @@ export interface operations {
8664
8842
  };
8665
8843
  header?: never;
8666
8844
  path: {
8845
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8667
8846
  tradingPairId: string;
8668
8847
  };
8669
8848
  cookie?: never;
@@ -8686,6 +8865,7 @@ export interface operations {
8686
8865
  query?: never;
8687
8866
  header?: never;
8688
8867
  path: {
8868
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8689
8869
  tradingPairId: string;
8690
8870
  };
8691
8871
  cookie?: never;
@@ -8708,6 +8888,7 @@ export interface operations {
8708
8888
  query?: never;
8709
8889
  header?: never;
8710
8890
  path: {
8891
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8711
8892
  tradingPairId: string;
8712
8893
  };
8713
8894
  cookie?: never;
@@ -8730,6 +8911,7 @@ export interface operations {
8730
8911
  query?: never;
8731
8912
  header?: never;
8732
8913
  path: {
8914
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8733
8915
  tradingPairId: string;
8734
8916
  };
8735
8917
  cookie?: never;
@@ -8766,6 +8948,7 @@ export interface operations {
8766
8948
  query?: never;
8767
8949
  header?: never;
8768
8950
  path: {
8951
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8769
8952
  tradingPairId: string;
8770
8953
  };
8771
8954
  cookie?: never;
@@ -8802,6 +8985,7 @@ export interface operations {
8802
8985
  query?: never;
8803
8986
  header?: never;
8804
8987
  path: {
8988
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8805
8989
  tradingPairId: string;
8806
8990
  };
8807
8991
  cookie?: never;
@@ -8824,6 +9008,7 @@ export interface operations {
8824
9008
  query?: never;
8825
9009
  header?: never;
8826
9010
  path: {
9011
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8827
9012
  tradingPairId: string;
8828
9013
  };
8829
9014
  cookie?: never;
@@ -8925,6 +9110,7 @@ export interface operations {
8925
9110
  };
8926
9111
  header?: never;
8927
9112
  path: {
9113
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
8928
9114
  tradingPairId: string;
8929
9115
  };
8930
9116
  cookie?: never;
@@ -9161,6 +9347,7 @@ export interface operations {
9161
9347
  query?: never;
9162
9348
  header?: never;
9163
9349
  path: {
9350
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
9164
9351
  tradingPairId: string;
9165
9352
  };
9166
9353
  cookie?: never;
@@ -9375,6 +9562,7 @@ export interface operations {
9375
9562
  query?: never;
9376
9563
  header?: never;
9377
9564
  path: {
9565
+ /** @example 2b1a5f9c-0000-4000-8000-000000000004 */
9378
9566
  conditionalOrderId: string;
9379
9567
  };
9380
9568
  cookie?: never;
@@ -9397,6 +9585,7 @@ export interface operations {
9397
9585
  query?: never;
9398
9586
  header?: never;
9399
9587
  path: {
9588
+ /** @example 2b1a5f9c-0000-4000-8000-000000000004 */
9400
9589
  conditionalOrderId: string;
9401
9590
  };
9402
9591
  cookie?: never;
@@ -9419,6 +9608,7 @@ export interface operations {
9419
9608
  query?: never;
9420
9609
  header?: never;
9421
9610
  path: {
9611
+ /** @example 2b1a5f9c-0000-4000-8000-000000000003 */
9422
9612
  orderId: string;
9423
9613
  };
9424
9614
  cookie?: never;
@@ -9476,6 +9666,7 @@ export interface operations {
9476
9666
  query?: never;
9477
9667
  header?: never;
9478
9668
  path: {
9669
+ /** @example 2b1a5f9c-0000-4000-8000-000000000003 */
9479
9670
  orderId: string;
9480
9671
  };
9481
9672
  cookie?: never;
@@ -9564,6 +9755,7 @@ export interface operations {
9564
9755
  query?: never;
9565
9756
  header?: never;
9566
9757
  path: {
9758
+ /** @example 0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5 */
9567
9759
  code: string;
9568
9760
  };
9569
9761
  cookie?: never;
@@ -9772,6 +9964,7 @@ export interface operations {
9772
9964
  query?: never;
9773
9965
  header?: never;
9774
9966
  path: {
9967
+ /** @example 2b1a5f9c-0000-4000-8000-000000000002 */
9775
9968
  positionId: string;
9776
9969
  };
9777
9970
  cookie?: never;
@@ -9794,6 +9987,7 @@ export interface operations {
9794
9987
  query?: never;
9795
9988
  header?: never;
9796
9989
  path: {
9990
+ /** @example 2b1a5f9c-0000-4000-8000-000000000002 */
9797
9991
  positionId: string;
9798
9992
  };
9799
9993
  cookie?: never;
@@ -9820,7 +10014,10 @@ export interface operations {
9820
10014
  query?: never;
9821
10015
  header?: never;
9822
10016
  path: {
9823
- /** @description Position UUID for the isolated bucket being adjusted. */
10017
+ /**
10018
+ * @description Position UUID for the isolated bucket being adjusted.
10019
+ * @example 2b1a5f9c-0000-4000-8000-000000000002
10020
+ */
9824
10021
  positionId: string;
9825
10022
  };
9826
10023
  cookie?: never;
@@ -9847,7 +10044,10 @@ export interface operations {
9847
10044
  query?: never;
9848
10045
  header?: never;
9849
10046
  path: {
9850
- /** @description Position UUID for the isolated bucket being adjusted. */
10047
+ /**
10048
+ * @description Position UUID for the isolated bucket being adjusted.
10049
+ * @example 2b1a5f9c-0000-4000-8000-000000000002
10050
+ */
9851
10051
  positionId: string;
9852
10052
  };
9853
10053
  cookie?: never;
@@ -9881,6 +10081,7 @@ export interface operations {
9881
10081
  };
9882
10082
  header?: never;
9883
10083
  path: {
10084
+ /** @example 2b1a5f9c-0000-4000-8000-000000000002 */
9884
10085
  positionId: string;
9885
10086
  };
9886
10087
  cookie?: never;
@@ -9931,6 +10132,7 @@ export interface operations {
9931
10132
  query?: never;
9932
10133
  header?: never;
9933
10134
  path: {
10135
+ /** @example 2b1a5f9c-0000-4000-8000-000000000002 */
9934
10136
  positionId: string;
9935
10137
  };
9936
10138
  cookie?: never;
@@ -9953,6 +10155,7 @@ export interface operations {
9953
10155
  query?: never;
9954
10156
  header?: never;
9955
10157
  path: {
10158
+ /** @example 2b1a5f9c-0000-4000-8000-000000000002 */
9956
10159
  positionId: string;
9957
10160
  };
9958
10161
  cookie?: never;
@@ -9979,6 +10182,7 @@ export interface operations {
9979
10182
  query?: never;
9980
10183
  header?: never;
9981
10184
  path: {
10185
+ /** @example 2b1a5f9c-0000-4000-8000-000000000006 */
9982
10186
  tradeId: string;
9983
10187
  };
9984
10188
  cookie?: never;
@@ -10027,6 +10231,7 @@ export interface operations {
10027
10231
  };
10028
10232
  header?: never;
10029
10233
  path: {
10234
+ /** @example 893d2add-2f36-4ee7-b660-893d2add2f36 */
10030
10235
  tradingPairId: string;
10031
10236
  };
10032
10237
  cookie?: never;
@@ -10227,6 +10432,7 @@ export interface operations {
10227
10432
  query?: never;
10228
10433
  header?: never;
10229
10434
  path: {
10435
+ /** @example 0 */
10230
10436
  withdrawalIndex: string;
10231
10437
  };
10232
10438
  cookie?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
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.25",
23
+ "@0xmonaco/contracts": "1.0.26",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {