@0xmonaco/react 1.0.70 → 1.0.72

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.
@@ -18,6 +18,9 @@ export declare const COVERED: {
18
18
  list_lead_trader_open_positions: string;
19
19
  upsert_follow: string;
20
20
  stop_follow: string;
21
+ close_follow_positions: string;
22
+ close_all_copy_positions: string;
23
+ add_follow_position_margin: string;
21
24
  list_my_follows: string;
22
25
  get_follow: string;
23
26
  list_follow_leader_positions: string;
package/dist/coverage.js CHANGED
@@ -18,6 +18,9 @@ export const COVERED = {
18
18
  list_lead_trader_open_positions: "useCopyTrading",
19
19
  upsert_follow: "useCopyTrading",
20
20
  stop_follow: "useCopyTrading",
21
+ close_follow_positions: "useCopyTrading",
22
+ close_all_copy_positions: "useCopyTrading",
23
+ add_follow_position_margin: "useCopyTrading",
21
24
  list_my_follows: "useCopyTrading",
22
25
  get_follow: "useCopyTrading",
23
26
  list_follow_leader_positions: "useCopyTrading",
@@ -3,4 +3,4 @@ import type { CopyTradingAPI } from "@0xmonaco/types";
3
3
  * Return type of {@link useCopyTrading}: the copy trading client methods, each
4
4
  * with the same signature and documentation as `sdk.copyTrading`.
5
5
  */
6
- export type UseCopyTradingReturn = Pick<CopyTradingAPI, "listLeadTraders" | "getLeadTrader" | "listLeadTraderClosedTrades" | "listLeadTraderOpenPositions" | "upsertLeadTrader" | "getMyLeadTrader" | "listMyFollowers" | "upsertFollow" | "stopFollow" | "listMyFollows" | "getFollow" | "listFollowLeaderPositions" | "previewFollow">;
6
+ export type UseCopyTradingReturn = Pick<CopyTradingAPI, "listLeadTraders" | "getLeadTrader" | "listLeadTraderClosedTrades" | "listLeadTraderOpenPositions" | "upsertLeadTrader" | "getMyLeadTrader" | "listMyFollowers" | "upsertFollow" | "stopFollow" | "closeFollowPositions" | "closeAllCopyPositions" | "listMyFollows" | "getFollow" | "listFollowLeaderPositions" | "previewFollow" | "addFollowPositionMargin">;
@@ -1,7 +1,8 @@
1
1
  import type { UseCopyTradingReturn } from "./types";
2
2
  /**
3
3
  * Copy trading: the public leaderboard and lead trader profiles, your own lead
4
- * trader profile and followers, and your follows.
4
+ * trader profile and followers, and your follows (including adding margin to
5
+ * a copy position).
5
6
  *
6
7
  * Every method delegates to `sdk.copyTrading` (see `@0xmonaco/core` for the
7
8
  * request contract). The leaderboard, `getLeadTrader` and
@@ -2,7 +2,8 @@ import { useCallback } from "react";
2
2
  import { useMonacoSDK } from "../useMonaco";
3
3
  /**
4
4
  * Copy trading: the public leaderboard and lead trader profiles, your own lead
5
- * trader profile and followers, and your follows.
5
+ * trader profile and followers, and your follows (including adding margin to
6
+ * a copy position).
6
7
  *
7
8
  * Every method delegates to `sdk.copyTrading` (see `@0xmonaco/core` for the
8
9
  * request contract). The leaderboard, `getLeadTrader` and
@@ -36,10 +37,13 @@ export const useCopyTrading = () => {
36
37
  const listMyFollowers = useCallback(async (params) => await client().listMyFollowers(params), [client]);
37
38
  const upsertFollow = useCallback(async (params) => await client().upsertFollow(params), [client]);
38
39
  const stopFollow = useCallback(async (followId) => await client().stopFollow(followId), [client]);
40
+ const closeFollowPositions = useCallback(async (followId) => await client().closeFollowPositions(followId), [client]);
41
+ const closeAllCopyPositions = useCallback(async () => await client().closeAllCopyPositions(), [client]);
39
42
  const listMyFollows = useCallback(async (params) => await client().listMyFollows(params), [client]);
40
43
  const getFollow = useCallback(async (followId) => await client().getFollow(followId), [client]);
41
44
  const previewFollow = useCallback(async (params) => await client().previewFollow(params), [client]);
42
45
  const listFollowLeaderPositions = useCallback(async (followId) => await client().listFollowLeaderPositions(followId), [client]);
46
+ const addFollowPositionMargin = useCallback(async (params) => await client().addFollowPositionMargin(params), [client]);
43
47
  return {
44
48
  listLeadTraders,
45
49
  getLeadTrader,
@@ -50,9 +54,12 @@ export const useCopyTrading = () => {
50
54
  listMyFollowers,
51
55
  upsertFollow,
52
56
  stopFollow,
57
+ closeFollowPositions,
58
+ closeAllCopyPositions,
53
59
  listMyFollows,
54
60
  getFollow,
55
61
  listFollowLeaderPositions,
56
62
  previewFollow,
63
+ addFollowPositionMargin,
57
64
  };
58
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
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.0.70",
20
- "@0xmonaco/types": "1.0.70"
19
+ "@0xmonaco/core": "1.0.72",
20
+ "@0xmonaco/types": "1.0.72"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/react": "^19.2.18",