@0xmonaco/react 0.8.7-develop.34bd452 → 0.8.7-develop.ab57a24

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.
@@ -0,0 +1,87 @@
1
+ /** operationId → the @0xmonaco/react hook that covers it. */
2
+ export declare const COVERED: {
3
+ add_position_margin: string;
4
+ attach_position_tp_sl: string;
5
+ batch_cancel_all: string;
6
+ batch_cancel_all_by_pair: string;
7
+ batch_cancel_orders: string;
8
+ batch_create_orders: string;
9
+ batch_replace_orders: string;
10
+ cancel_conditional_order: string;
11
+ cancel_order: string;
12
+ close_position: string;
13
+ create_challenge: string;
14
+ create_conditional_order: string;
15
+ create_order: string;
16
+ get_candles: string;
17
+ get_funding_state: string;
18
+ get_index_price: string;
19
+ get_mark_price: string;
20
+ get_market_metadata: string;
21
+ get_open_interest: string;
22
+ get_order_by_id: string;
23
+ get_orderbook_snapshot: string;
24
+ get_orders: string;
25
+ get_perp_market_config: string;
26
+ get_perp_market_summary: string;
27
+ get_position: string;
28
+ get_position_risk: string;
29
+ get_trades: string;
30
+ get_user_balance_by_asset: string;
31
+ get_user_balances: string;
32
+ get_user_movements: string;
33
+ get_user_profile: string;
34
+ get_withdrawal: string;
35
+ initiate_withdrawal: string;
36
+ list_conditional_orders: string;
37
+ list_funding_history: string;
38
+ list_position_history: string;
39
+ list_positions: string;
40
+ list_trading_pairs: string;
41
+ reduce_position_margin: string;
42
+ refresh_session: string;
43
+ replace_order: string;
44
+ revoke_session: string;
45
+ simulate_fees: string;
46
+ };
47
+ /** operationId → reason it is intentionally not covered by @0xmonaco/react. */
48
+ export declare const INTENTIONALLY_EXCLUDED: {
49
+ authenticate_backend: string;
50
+ create_delegated_session: string;
51
+ create_sub_account_limit: string;
52
+ delete_sub_account_limit: string;
53
+ ensure_parent_margin_account: string;
54
+ get_application_config: string;
55
+ get_application_stats: string;
56
+ get_available_collateral: string;
57
+ get_margin_account_movements: string;
58
+ get_margin_account_summary: string;
59
+ get_portfolio_chart: string;
60
+ get_portfolio_stats: string;
61
+ get_screener: string;
62
+ get_sub_account_limits: string;
63
+ get_trade_by_id: string;
64
+ get_trading_pair_by_id: string;
65
+ get_user_trades: string;
66
+ health_check: string;
67
+ list_application_balances: string;
68
+ list_application_movements: string;
69
+ list_application_orders: string;
70
+ list_application_users: string;
71
+ list_delegated_agent_owners: string;
72
+ list_delegated_agents: string;
73
+ list_funding_payments: string;
74
+ list_margin_accounts: string;
75
+ list_sub_accounts_with_balances: string;
76
+ mint_tokens: string;
77
+ revoke_delegated_agent: string;
78
+ simulate_auto_margin_order_risk: string;
79
+ simulate_order_risk: string;
80
+ submit_whitelist: string;
81
+ transfer_collateral_from_margin_account: string;
82
+ transfer_collateral_to_auto_margin_account: string;
83
+ transfer_collateral_to_margin_account: string;
84
+ update_sub_account_limit: string;
85
+ upsert_delegated_agent: string;
86
+ verify_signature: string;
87
+ };
@@ -0,0 +1,87 @@
1
+ /** operationId → the @0xmonaco/react hook that covers it. */
2
+ export const COVERED = {
3
+ add_position_margin: "usePositions",
4
+ attach_position_tp_sl: "usePositions",
5
+ batch_cancel_all: "useTrade",
6
+ batch_cancel_all_by_pair: "useTrade",
7
+ batch_cancel_orders: "useTrade",
8
+ batch_create_orders: "useTrade",
9
+ batch_replace_orders: "useTrade",
10
+ cancel_conditional_order: "useTrade",
11
+ cancel_order: "useTrade",
12
+ close_position: "usePositions",
13
+ create_challenge: "useAuth",
14
+ create_conditional_order: "useTrade",
15
+ create_order: "useTrade",
16
+ get_candles: "useMarket",
17
+ get_funding_state: "useMarket",
18
+ get_index_price: "useMarket",
19
+ get_mark_price: "useMarket",
20
+ get_market_metadata: "useMarket",
21
+ get_open_interest: "useMarket",
22
+ get_order_by_id: "useTrade",
23
+ get_orderbook_snapshot: "useOrderbook",
24
+ get_orders: "useTrade",
25
+ get_perp_market_config: "useMarket",
26
+ get_perp_market_summary: "useMarket",
27
+ get_position: "usePositions",
28
+ get_position_risk: "usePositions",
29
+ get_trades: "useTradeFeed",
30
+ get_user_balance_by_asset: "useProfile",
31
+ get_user_balances: "useUserBalances",
32
+ get_user_movements: "useUserMovements",
33
+ get_user_profile: "useProfile",
34
+ get_withdrawal: "useVault (retryWithdrawal)",
35
+ initiate_withdrawal: "useVault (withdraw)",
36
+ list_conditional_orders: "useTrade",
37
+ list_funding_history: "useMarket",
38
+ list_position_history: "usePositions",
39
+ list_positions: "usePositions",
40
+ list_trading_pairs: "useMarket",
41
+ reduce_position_margin: "usePositions",
42
+ refresh_session: "useAuth",
43
+ replace_order: "useTrade",
44
+ revoke_session: "useAuth",
45
+ simulate_fees: "useFees",
46
+ };
47
+ /** operationId → reason it is intentionally not covered by @0xmonaco/react. */
48
+ export const INTENTIONALLY_EXCLUDED = {
49
+ authenticate_backend: "Backend auth is header-based via setServerKey()/the x-server-key header, not an endpoint method (MON-1486).",
50
+ create_delegated_session: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
51
+ create_sub_account_limit: "Sub-account administration; no React hook.",
52
+ delete_sub_account_limit: "Sub-account administration; no React hook.",
53
+ ensure_parent_margin_account: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
54
+ get_application_config: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
55
+ get_application_stats: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
56
+ get_available_collateral: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
57
+ get_margin_account_movements: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
58
+ get_margin_account_summary: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
59
+ get_portfolio_chart: "Portfolio analytics endpoint; no React hook yet.",
60
+ get_portfolio_stats: "Portfolio analytics endpoint; no React hook yet.",
61
+ get_screener: "Market lookup available via the core client / list+symbol hooks; no dedicated React hook.",
62
+ get_sub_account_limits: "Sub-account administration; no React hook.",
63
+ get_trade_by_id: "Trade-history lookup with a core client method but no dedicated React hook yet.",
64
+ get_trading_pair_by_id: "Market lookup available via the core client / list+symbol hooks; no dedicated React hook.",
65
+ get_user_trades: "Trade-history lookup with a core client method but no dedicated React hook yet.",
66
+ health_check: "Infrastructure liveness probe (GET /health); not part of the data SDK surface.",
67
+ list_application_balances: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
68
+ list_application_movements: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
69
+ list_application_orders: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
70
+ list_application_users: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
71
+ list_delegated_agent_owners: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
72
+ list_delegated_agents: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
73
+ list_funding_payments: "Perps funding-payment history; no React hook yet.",
74
+ list_margin_accounts: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
75
+ list_sub_accounts_with_balances: "Sub-account administration; no React hook.",
76
+ mint_tokens: "Test-net faucet; no React hook (use the MCP/core faucet path).",
77
+ revoke_delegated_agent: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
78
+ simulate_auto_margin_order_risk: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
79
+ simulate_order_risk: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
80
+ submit_whitelist: "Whitelist submission; no React hook.",
81
+ transfer_collateral_from_margin_account: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
82
+ transfer_collateral_to_auto_margin_account: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
83
+ transfer_collateral_to_margin_account: "Margin-account management/collateral/simulation endpoint; no React hook yet.",
84
+ update_sub_account_limit: "Sub-account administration; no React hook.",
85
+ upsert_delegated_agent: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
86
+ verify_signature: "Auth verification runs inside login()/authenticate(); useAuth does not expose verifySignature as its own hook method.",
87
+ };
@@ -1,31 +1,11 @@
1
- import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CreateConditionalOrderParams, CreateConditionalOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, OrderSide, ParentTpSlLegParams, PositionSide, ReplaceOrderResponse, TimeInForce, TradingMode } from "@0xmonaco/types";
1
+ import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CreateConditionalOrderParams, CreateConditionalOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, OrderSide, ReplaceOrderResponse, TradingAPI } from "@0xmonaco/types";
2
+ type PlaceLimitOrderOptions = NonNullable<Parameters<TradingAPI["placeLimitOrder"]>[4]>;
3
+ type PlaceMarketOrderOptions = NonNullable<Parameters<TradingAPI["placeMarketOrder"]>[3]>;
2
4
  export interface UseTradeReturn {
3
5
  /** Place a limit order */
4
- placeLimitOrder: (tradingPairId: string, side: OrderSide, quantity: string, price: string, options?: {
5
- tradingMode?: TradingMode;
6
- useMasterBalance?: boolean;
7
- expirationDate?: string;
8
- timeInForce?: TimeInForce;
9
- marginAccountId?: string;
10
- strategyKey?: string;
11
- positionSide?: PositionSide;
12
- leverage?: string;
13
- reduceOnly?: boolean;
14
- takeProfit?: ParentTpSlLegParams;
15
- stopLoss?: ParentTpSlLegParams;
16
- }) => Promise<CreateOrderResponse>;
6
+ placeLimitOrder: (tradingPairId: string, side: OrderSide, quantity: string, price: string, options?: PlaceLimitOrderOptions) => Promise<CreateOrderResponse>;
17
7
  /** Place a market order */
18
- placeMarketOrder: (tradingPairId: string, side: OrderSide, quantity: string, options?: {
19
- tradingMode?: TradingMode;
20
- slippageTolerance?: number;
21
- marginAccountId?: string;
22
- strategyKey?: string;
23
- positionSide?: PositionSide;
24
- leverage?: string;
25
- reduceOnly?: boolean;
26
- takeProfit?: ParentTpSlLegParams;
27
- stopLoss?: ParentTpSlLegParams;
28
- }) => Promise<CreateOrderResponse>;
8
+ placeMarketOrder: (tradingPairId: string, side: OrderSide, quantity: string, options?: PlaceMarketOrderOptions) => Promise<CreateOrderResponse>;
29
9
  /** Cancel an existing order */
30
10
  cancelOrder: (orderId: string) => Promise<CancelOrderResponse>;
31
11
  /** Create a standalone conditional TP/SL order */
@@ -53,3 +33,4 @@ export interface UseTradeReturn {
53
33
  /** Get a single order by ID */
54
34
  getOrder: (orderId: string) => Promise<GetOrderResponse>;
55
35
  }
36
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "0.8.7-develop.34bd452",
3
+ "version": "0.8.7-develop.ab57a24",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,8 +20,8 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/core": "0.8.7-develop.34bd452",
24
- "@0xmonaco/types": "0.8.7-develop.34bd452"
23
+ "@0xmonaco/core": "0.8.7-develop.ab57a24",
24
+ "@0xmonaco/types": "0.8.7-develop.ab57a24"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.1.12",