@0xmonaco/react 0.7.8 → 0.8.1

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.
@@ -1,4 +1,4 @@
1
- import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CreateConditionalOrderParams, CreateConditionalOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, OrderSide, 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, ParentTpSlLegParams, PositionSide, ReplaceOrderResponse, TimeInForce, TradingMode } from "@0xmonaco/types";
2
2
  export interface UseTradeReturn {
3
3
  /** Place a limit order */
4
4
  placeLimitOrder: (tradingPairId: string, side: OrderSide, quantity: string, price: string, options?: {
@@ -10,6 +10,8 @@ export interface UseTradeReturn {
10
10
  positionSide?: PositionSide;
11
11
  leverage?: string;
12
12
  reduceOnly?: boolean;
13
+ takeProfit?: ParentTpSlLegParams;
14
+ stopLoss?: ParentTpSlLegParams;
13
15
  }) => Promise<CreateOrderResponse>;
14
16
  /** Place a market order */
15
17
  placeMarketOrder: (tradingPairId: string, side: OrderSide, quantity: string, options?: {
@@ -19,6 +21,8 @@ export interface UseTradeReturn {
19
21
  positionSide?: PositionSide;
20
22
  leverage?: string;
21
23
  reduceOnly?: boolean;
24
+ takeProfit?: ParentTpSlLegParams;
25
+ stopLoss?: ParentTpSlLegParams;
22
26
  }) => Promise<CreateOrderResponse>;
23
27
  /** Cancel an existing order */
24
28
  cancelOrder: (orderId: string) => Promise<CancelOrderResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "0.7.8",
3
+ "version": "0.8.1",
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.7.8",
24
- "@0xmonaco/types": "0.7.8"
23
+ "@0xmonaco/core": "0.8.1",
24
+ "@0xmonaco/types": "0.8.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.1.12",