@0xmonaco/react 1.0.70 → 1.0.73
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.
package/dist/coverage.d.ts
CHANGED
|
@@ -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;
|
|
@@ -74,6 +77,7 @@ export declare const INTENTIONALLY_EXCLUDED: {
|
|
|
74
77
|
claim_managed_market_lease: string;
|
|
75
78
|
refresh_managed_market_quotes: string;
|
|
76
79
|
claim_buildercode_rewards: string;
|
|
80
|
+
set_builder_fee: string;
|
|
77
81
|
cancel_twap_order: string;
|
|
78
82
|
create_delegated_session: string;
|
|
79
83
|
create_twap_order: string;
|
|
@@ -115,6 +119,7 @@ export declare const INTENTIONALLY_EXCLUDED: {
|
|
|
115
119
|
list_application_orders: string;
|
|
116
120
|
list_application_users: string;
|
|
117
121
|
list_buildercode_payouts: string;
|
|
122
|
+
list_builder_fee_changes: string;
|
|
118
123
|
list_delegated_agent_owners: string;
|
|
119
124
|
list_delegated_agents: string;
|
|
120
125
|
list_all_funding_history: 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",
|
|
@@ -74,6 +77,7 @@ export const INTENTIONALLY_EXCLUDED = {
|
|
|
74
77
|
claim_managed_market_lease: "Process lease lifecycle belongs to the managed maker driver, not an interactive consumer.",
|
|
75
78
|
refresh_managed_market_quotes: "Cadenced fenced intents belong to the managed maker driver; core SDK exposes the transport.",
|
|
76
79
|
claim_buildercode_rewards: "BuilderCodes payout claim is a frontend-operator workflow, not an end-user trading action; covered by @0xmonaco/core.",
|
|
80
|
+
set_builder_fee: "BuilderCodes fee administration is a frontend-operator workflow covered by @0xmonaco/core; no React hook.",
|
|
77
81
|
cancel_twap_order: "TWAP parent orders are an advanced execution-algo surface (covered by @0xmonaco/core); no React hook yet.",
|
|
78
82
|
create_delegated_session: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
|
|
79
83
|
create_twap_order: "TWAP parent orders are an advanced execution-algo surface (covered by @0xmonaco/core); no React hook yet.",
|
|
@@ -115,6 +119,7 @@ export const INTENTIONALLY_EXCLUDED = {
|
|
|
115
119
|
list_application_orders: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
|
|
116
120
|
list_application_users: "Application/backend (server-key) admin endpoint; not a user-wallet React workflow.",
|
|
117
121
|
list_buildercode_payouts: "BuilderCodes frontend-operator reporting is covered by @0xmonaco/core; no React hook.",
|
|
122
|
+
list_builder_fee_changes: "BuilderCodes frontend-operator audit reporting is covered by @0xmonaco/core; no React hook.",
|
|
118
123
|
list_delegated_agent_owners: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
|
|
119
124
|
list_delegated_agents: "Delegated-agent management is an automation/agent surface, not a UI workflow; no React hook.",
|
|
120
125
|
list_all_funding_history: "Bulk market data; useMarket covers per-pair funding; no React hook.",
|
|
@@ -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.
|
|
3
|
+
"version": "1.0.73",
|
|
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.
|
|
20
|
-
"@0xmonaco/types": "1.0.
|
|
19
|
+
"@0xmonaco/core": "1.0.73",
|
|
20
|
+
"@0xmonaco/types": "1.0.73"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/react": "^19.2.18",
|