@0xmonaco/core 0.8.20 → 0.8.21
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.
|
@@ -25,6 +25,7 @@ export declare const perpRoutes: {
|
|
|
25
25
|
pageSize?: number;
|
|
26
26
|
}) => string;
|
|
27
27
|
readonly cancelConditional: (conditionalOrderId: string) => string;
|
|
28
|
+
readonly getConditional: (conditionalOrderId: string) => string;
|
|
28
29
|
};
|
|
29
30
|
readonly delegatedAgents: {
|
|
30
31
|
readonly list: () => string;
|
package/dist/api/perp/routes.js
CHANGED
|
@@ -28,6 +28,7 @@ export const perpRoutes = {
|
|
|
28
28
|
batchReplace: () => `${API_V1}/orders/batch-replace`,
|
|
29
29
|
listConditional: (params) => withQuery(`${API_V1}/orders/conditional`, params),
|
|
30
30
|
cancelConditional: (conditionalOrderId) => `${API_V1}/orders/conditional/${encodeSegment(conditionalOrderId)}`,
|
|
31
|
+
getConditional: (conditionalOrderId) => `${API_V1}/orders/conditional/${encodeSegment(conditionalOrderId)}`,
|
|
31
32
|
},
|
|
32
33
|
delegatedAgents: {
|
|
33
34
|
list: () => `${API_V1}/delegated-agents`,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* );
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, MarginMode, OrderSide, ParentTpSlLegParams, PositionSide, ReplaceOrderResponse, TimeInForce, TradingAPI, TradingMode } from "@0xmonaco/types";
|
|
24
|
+
import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, ConditionalOrder, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, MarginMode, OrderSide, ParentTpSlLegParams, PositionSide, ReplaceOrderResponse, TimeInForce, TradingAPI, TradingMode } from "@0xmonaco/types";
|
|
25
25
|
import { BaseAPI } from "../base";
|
|
26
26
|
export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
|
|
27
27
|
/**
|
|
@@ -163,6 +163,7 @@ export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
|
|
|
163
163
|
*/
|
|
164
164
|
cancelOrder(orderId: string): Promise<CancelOrderResponse>;
|
|
165
165
|
cancelConditionalOrder(conditionalOrderId: string): Promise<CancelConditionalOrderResponse>;
|
|
166
|
+
getConditionalOrder(conditionalOrderId: string): Promise<ConditionalOrder>;
|
|
166
167
|
listConditionalOrders(params?: ListConditionalOrdersParams): Promise<ListConditionalOrdersResponse>;
|
|
167
168
|
/**
|
|
168
169
|
* Batch cancels specific orders by their IDs.
|
package/dist/api/trading/api.js
CHANGED
|
@@ -228,6 +228,12 @@ export class TradingAPIImpl extends BaseAPI {
|
|
|
228
228
|
method: "DELETE",
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
+
async getConditionalOrder(conditionalOrderId) {
|
|
232
|
+
validate(CancelConditionalOrderSchema, { conditionalOrderId });
|
|
233
|
+
return await this.makeAuthenticatedRequest(perpRoutes.orders.getConditional(conditionalOrderId), {
|
|
234
|
+
method: "GET",
|
|
235
|
+
});
|
|
236
|
+
}
|
|
231
237
|
async listConditionalOrders(params) {
|
|
232
238
|
if (params) {
|
|
233
239
|
validate(ListConditionalOrdersSchema, params);
|
package/dist/coverage.d.ts
CHANGED
package/dist/coverage.js
CHANGED
|
@@ -9,6 +9,7 @@ export const COVERED = {
|
|
|
9
9
|
batch_create_orders: "batchCreate",
|
|
10
10
|
batch_replace_orders: "batchReplace",
|
|
11
11
|
cancel_conditional_order: "cancelConditionalOrder",
|
|
12
|
+
get_conditional_order: "getConditionalOrder",
|
|
12
13
|
cancel_order: "cancelOrder",
|
|
13
14
|
close_position: "closePosition",
|
|
14
15
|
create_challenge: "createChallenge",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.21",
|
|
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": "0.8.
|
|
27
|
-
"@0xmonaco/types": "0.8.
|
|
26
|
+
"@0xmonaco/contracts": "0.8.21",
|
|
27
|
+
"@0xmonaco/types": "0.8.21",
|
|
28
28
|
"@noble/curves": "^1.9.1",
|
|
29
29
|
"@noble/hashes": "^1.8.0",
|
|
30
30
|
"http-status-codes": "^2.3.0"
|