@0xmonaco/types 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/trading/index.d.ts +21 -0
- package/dist/trading/orders.d.ts +8 -0
- package/dist/trading/responses.d.ts +32 -2
- package/dist/validation/trading.d.ts +10 -0
- package/dist/validation/trading.js +12 -0
- package/dist/websocket/events/account-events.d.ts +45 -0
- package/dist/websocket/events/account-events.js +12 -0
- package/dist/websocket/events/index.d.ts +1 -0
- package/dist/websocket/events/index.js +1 -0
- package/dist/websocket/events/orders-events.d.ts +9 -0
- package/dist/wire/schema.d.ts +37 -4
- package/package.json +2 -2
package/dist/trading/index.d.ts
CHANGED
|
@@ -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.
|
package/dist/trading/orders.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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;
|
|
@@ -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
|
+
*/
|
|
@@ -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
|
package/dist/wire/schema.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
|
5953
|
-
* @example
|
|
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
|
-
|
|
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
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
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.
|
|
23
|
+
"@0xmonaco/contracts": "1.0.41",
|
|
24
24
|
"zod": "^4.1.12"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|