@0xmonaco/react 1.1.2 → 1.1.5

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.
@@ -3,6 +3,7 @@ export declare const COVERED: {
3
3
  attach_position_tp_sl: string;
4
4
  batch_cancel_all: string;
5
5
  batch_cancel_all_by_pair: string;
6
+ cancel_all_after: string;
6
7
  batch_cancel_orders: string;
7
8
  batch_create_orders: string;
8
9
  batch_replace_orders: string;
@@ -81,6 +82,14 @@ export declare const COVERED: {
81
82
  };
82
83
  /** operationId → reason it is intentionally not covered by @0xmonaco/react. */
83
84
  export declare const INTENTIONALLY_EXCLUDED: {
85
+ get_rfq_capabilities: string;
86
+ create_rfq: string;
87
+ get_rfq: string;
88
+ accept_rfq: string;
89
+ cancel_rfq: string;
90
+ upsert_rfq_quote: string;
91
+ withdraw_rfq_quote: string;
92
+ respond_rfq_last_look: string;
84
93
  list_managed_market_assignments: string;
85
94
  claim_managed_market_lease: string;
86
95
  refresh_managed_market_quotes: string;
@@ -134,6 +143,9 @@ export declare const INTENTIONALLY_EXCLUDED: {
134
143
  list_delegated_agent_owners: string;
135
144
  list_delegated_agents: string;
136
145
  list_all_funding_history: string;
146
+ list_all_liquidation_events: string;
147
+ list_insurance_funds: string;
148
+ list_trades: string;
137
149
  list_funding_payments: string;
138
150
  list_margin_accounts: string;
139
151
  list_sub_accounts_with_balances: string;
package/dist/coverage.js CHANGED
@@ -3,6 +3,7 @@ export const COVERED = {
3
3
  attach_position_tp_sl: "usePositions",
4
4
  batch_cancel_all: "useTrade",
5
5
  batch_cancel_all_by_pair: "useTrade",
6
+ cancel_all_after: "useTrade",
6
7
  batch_cancel_orders: "useTrade",
7
8
  batch_create_orders: "useTrade",
8
9
  batch_replace_orders: "useTrade",
@@ -81,6 +82,14 @@ export const COVERED = {
81
82
  };
82
83
  /** operationId → reason it is intentionally not covered by @0xmonaco/react. */
83
84
  export const INTENTIONALLY_EXCLUDED = {
85
+ get_rfq_capabilities: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
86
+ create_rfq: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
87
+ get_rfq: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
88
+ accept_rfq: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
89
+ cancel_rfq: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
90
+ upsert_rfq_quote: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
91
+ withdraw_rfq_quote: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
92
+ respond_rfq_last_look: "RFQ (block trading) ships behind a feature flag; hooks come with the frontend's RFQ UI. Covered by @0xmonaco/core.",
84
93
  list_managed_market_assignments: "Operational maker inventory; consumed by the authenticated bot driver through the core SDK.",
85
94
  claim_managed_market_lease: "Process lease lifecycle belongs to the managed maker driver, not an interactive consumer.",
86
95
  refresh_managed_market_quotes: "Cadenced fenced intents belong to the managed maker driver; core SDK exposes the transport.",
@@ -134,6 +143,9 @@ export const INTENTIONALLY_EXCLUDED = {
134
143
  list_delegated_agent_owners: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
135
144
  list_delegated_agents: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
136
145
  list_all_funding_history: "Bulk market data; useMarket covers per-pair funding; no React hook.",
146
+ list_all_liquidation_events: "Every-market explorer feed covered by @0xmonaco/core; useMarket covers per-pair liquidation events; no React hook.",
147
+ list_insurance_funds: "Explorer reporting read covered by @0xmonaco/core; no React hook.",
148
+ list_trades: "Every-market and per-application explorer trade feed covered by @0xmonaco/core; useTradeFeed covers a pair's trades; no React hook.",
137
149
  list_funding_payments: "Perps funding-payment history; no React hook yet.",
138
150
  list_margin_accounts: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
139
151
  list_sub_accounts_with_balances: "Sub-account administration; no React hook.",
@@ -1,4 +1,4 @@
1
- import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, ConditionalOrder, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, OrderSide, ReplaceOrderResponse, TradingAPI } from "@0xmonaco/types";
1
+ import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelAllAfterOptions, CancelAllAfterResponse, CancelConditionalOrderResponse, CancelOrderResponse, ConditionalOrder, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, OrderSide, ReplaceOrderResponse, TradingAPI } from "@0xmonaco/types";
2
2
  type PlaceLimitOrderOptions = NonNullable<Parameters<TradingAPI["placeLimitOrder"]>[4]>;
3
3
  type PlaceMarketOrderOptions = NonNullable<Parameters<TradingAPI["placeMarketOrder"]>[3]>;
4
4
  type ReplaceOrderOptions = NonNullable<Parameters<TradingAPI["replaceOrder"]>[1]>;
@@ -19,6 +19,12 @@ export interface UseTradeReturn {
19
19
  batchCancel: (orderIds: string[]) => Promise<BatchCancelOrdersResponse>;
20
20
  /** Cancel all active orders, optionally filtered by trading pair */
21
21
  batchCancelAll: (tradingPairId?: string) => Promise<BatchCancelOrdersResponse>;
22
+ /**
23
+ * Arm, refresh or disarm the cancel-all-after dead man's switch: unless you
24
+ * call again before `timeoutMs` runs out, your resting orders are
25
+ * cancelled. 0 disarms; otherwise 5000 to 900000.
26
+ */
27
+ cancelAllAfter: (timeoutMs: number, options?: CancelAllAfterOptions) => Promise<CancelAllAfterResponse>;
22
28
  /** Replace an existing order */
23
29
  replaceOrder: (orderId: string, newOrder: ReplaceOrderOptions) => Promise<ReplaceOrderResponse>;
24
30
  /** Batch create multiple orders */
@@ -68,6 +68,11 @@ export const useTrade = () => {
68
68
  throw new Error("SDK not available");
69
69
  return await sdk.trading.batchCancelAll(tradingPairId);
70
70
  }, [sdk]);
71
+ const cancelAllAfter = useCallback(async (timeoutMs, options) => {
72
+ if (!sdk)
73
+ throw new Error("SDK not available");
74
+ return await sdk.trading.cancelAllAfter(timeoutMs, options);
75
+ }, [sdk]);
71
76
  const replaceOrder = useCallback(
72
77
  // Derived from the TradingAPI signature so new replace options (e.g.
73
78
  // clientOrderId) flow through without re-listing them here.
@@ -127,6 +132,7 @@ export const useTrade = () => {
127
132
  listConditionalOrders,
128
133
  batchCancel,
129
134
  batchCancelAll,
135
+ cancelAllAfter,
130
136
  replaceOrder,
131
137
  batchCreate,
132
138
  batchReplace,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "1.1.2",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -16,8 +16,8 @@
16
16
  "lint": "biome lint ."
17
17
  },
18
18
  "dependencies": {
19
- "@0xmonaco/core": "1.1.2",
20
- "@0xmonaco/types": "1.1.2"
19
+ "@0xmonaco/core": "1.1.5",
20
+ "@0xmonaco/types": "1.1.5"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/react": "^19.3.0",