@0xmonaco/core 1.0.36 → 1.0.37
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.
|
@@ -87,6 +87,7 @@ export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
|
|
|
87
87
|
positionSide?: PositionSide;
|
|
88
88
|
leverage?: string;
|
|
89
89
|
reduceOnly?: boolean;
|
|
90
|
+
postOnly?: boolean;
|
|
90
91
|
takeProfit?: ParentTpSlLegParams;
|
|
91
92
|
stopLoss?: ParentTpSlLegParams;
|
|
92
93
|
}): Promise<CreateOrderResponse>;
|
|
@@ -201,6 +202,7 @@ export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
|
|
|
201
202
|
price?: string;
|
|
202
203
|
quantity?: string;
|
|
203
204
|
useMasterBalance?: boolean;
|
|
205
|
+
postOnly?: boolean;
|
|
204
206
|
}): Promise<ReplaceOrderResponse>;
|
|
205
207
|
/**
|
|
206
208
|
* Batch creates multiple orders in a single request.
|
package/dist/api/trading/api.js
CHANGED
|
@@ -114,6 +114,7 @@ export class TradingAPIImpl extends BaseAPI {
|
|
|
114
114
|
positionSide: options?.positionSide,
|
|
115
115
|
leverage: options?.leverage,
|
|
116
116
|
reduceOnly: options?.reduceOnly,
|
|
117
|
+
postOnly: options?.postOnly,
|
|
117
118
|
takeProfit: parentTpSlLegToRequest(options?.takeProfit),
|
|
118
119
|
stopLoss: parentTpSlLegToRequest(options?.stopLoss),
|
|
119
120
|
};
|
|
@@ -304,6 +305,9 @@ export class TradingAPIImpl extends BaseAPI {
|
|
|
304
305
|
if (newOrder.quantity !== undefined) {
|
|
305
306
|
requestBody.quantity = newOrder.quantity;
|
|
306
307
|
}
|
|
308
|
+
if (newOrder.postOnly !== undefined) {
|
|
309
|
+
requestBody.postOnly = newOrder.postOnly;
|
|
310
|
+
}
|
|
307
311
|
return await this.makeAuthenticatedRequest(perpRoutes.orders.replace(orderId), {
|
|
308
312
|
method: "PUT",
|
|
309
313
|
body: JSON.stringify(requestBody),
|
|
@@ -361,6 +365,7 @@ export class TradingAPIImpl extends BaseAPI {
|
|
|
361
365
|
positionSide: order.positionSide,
|
|
362
366
|
leverage: order.leverage,
|
|
363
367
|
reduceOnly: order.reduceOnly,
|
|
368
|
+
postOnly: order.postOnly,
|
|
364
369
|
})),
|
|
365
370
|
};
|
|
366
371
|
return this.makeAuthenticatedRequest(perpRoutes.orders.batchCreate(), {
|
|
@@ -401,6 +406,7 @@ export class TradingAPIImpl extends BaseAPI {
|
|
|
401
406
|
price: order.price,
|
|
402
407
|
quantity: order.quantity,
|
|
403
408
|
useMasterBalance: order.useMasterBalance,
|
|
409
|
+
postOnly: order.postOnly,
|
|
404
410
|
})),
|
|
405
411
|
};
|
|
406
412
|
return this.makeAuthenticatedRequest(perpRoutes.orders.batchReplace(), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"viem": "^2.45.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@0xmonaco/contracts": "1.0.
|
|
27
|
-
"@0xmonaco/types": "1.0.
|
|
26
|
+
"@0xmonaco/contracts": "1.0.37",
|
|
27
|
+
"@0xmonaco/types": "1.0.37",
|
|
28
28
|
"@noble/curves": "^1.9.1",
|
|
29
29
|
"@noble/hashes": "^1.8.0",
|
|
30
30
|
"http-status-codes": "^2.3.0"
|