@0xmonaco/types 1.0.69 → 1.0.70

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,95 @@
1
+ /**
2
+ * Copy Trading Types (0XM-2851)
3
+ *
4
+ * Followers allocate collateral to a per-leader copy account (a cross risk
5
+ * bucket in their margin account) and every fill the leader makes is mirrored
6
+ * into it. Leaders are addressed by their custom TraderCode handle.
7
+ */
8
+ import type { BaseAPI } from "../api";
9
+ import type { ListLeadTraderClosedTradesParams, ListLeadTradersParams, ListMyFollowersParams, ListMyFollowsParams, PreviewFollowParams, UpsertFollowParams, UpsertLeadTraderParams } from "../validation/copy-trading";
10
+ import type { GetFollowResponse, GetLeadTraderResponse, ListFollowLeaderPositionsResponse, ListLeadTraderClosedTradesResponse, ListLeadTraderOpenPositionsResponse, ListLeadTradersResponse, ListMyFollowersResponse, ListMyFollowsResponse, PreviewFollowResponse, StopFollowResponse, UpsertFollowResponse, UpsertLeadTraderResponse } from "./responses";
11
+ /**
12
+ * Copy trading API.
13
+ *
14
+ * Public reads (no session needed): {@link listLeadTraders},
15
+ * {@link getLeadTrader}, {@link listLeadTraderClosedTrades}. Everything else
16
+ * is self-scoped to the authenticated caller. Delegated agent and sub-account
17
+ * sessions cannot register as a leader or follow (403).
18
+ */
19
+ export interface CopyTradingAPI extends BaseAPI {
20
+ /**
21
+ * List lead traders (the public leaderboard), highest first by `sort`
22
+ * (default `roi`) over `window` (default `30d`). Cursor paged: pass the
23
+ * previous response's `nextPageToken` with the SAME sort and window; an
24
+ * empty token means the end.
25
+ */
26
+ listLeadTraders(params?: ListLeadTradersParams): Promise<ListLeadTradersResponse>;
27
+ /**
28
+ * Get one lead trader by custom TraderCode handle: profile, follow summary
29
+ * and stats for 7d, 30d, 90d and all. 404 for an unknown or suspended
30
+ * leader.
31
+ */
32
+ getLeadTrader(handle: string): Promise<GetLeadTraderResponse>;
33
+ /** List a lead trader's closed trades (reducing executions), newest first, cursor paged. */
34
+ listLeadTraderClosedTrades(handle: string, params?: ListLeadTraderClosedTradesParams): Promise<ListLeadTraderClosedTradesResponse>;
35
+ /** List a lead trader's open positions. Only current followers of that leader may read them (403 otherwise). */
36
+ listLeadTraderOpenPositions(handle: string): Promise<ListLeadTraderOpenPositionsResponse>;
37
+ /**
38
+ * Register as a lead trader, or edit your profile. A registration is
39
+ * checked against the platform's eligibility rules (account equity, trading
40
+ * history, closed positions, and a claimed custom TraderCode handle, which
41
+ * followers address you by); a refusal is a 400 naming the rule. A follower
42
+ * with a live follow cannot register.
43
+ *
44
+ * The profile is replaced as sent: an omitted `bio` or `minAllocation`
45
+ * clears it and an omitted `status` means `ACTIVE`; an omitted `shareBps`
46
+ * keeps the current share (the platform default on a registration).
47
+ */
48
+ upsertLeadTrader(params?: UpsertLeadTraderParams): Promise<UpsertLeadTraderResponse>;
49
+ /** Get your own lead trader profile (404 when you are not a lead trader). */
50
+ getMyLeadTrader(): Promise<GetLeadTraderResponse>;
51
+ /** List your followers, as a leader. Cursor paged, up to 1000 per page. */
52
+ listMyFollowers(params?: ListMyFollowersParams): Promise<ListMyFollowersResponse>;
53
+ /**
54
+ * Follow a lead trader (no `followId`), or edit one of your follows
55
+ * (`followId` set). A create moves `allocation` from your margin account
56
+ * into a new copy account: a cross risk bucket that holds this follow's
57
+ * collateral and positions.
58
+ *
59
+ * An edit REPLACES the follow's settings: every optional setting you leave
60
+ * out reverts to its default, so an edit that omits `slPct` removes the
61
+ * stop-loss. Pass the full desired configuration on every edit. The leader
62
+ * comes from the stored follow, so `leader` may be omitted on an edit; a
63
+ * handle naming a different leader is refused.
64
+ */
65
+ upsertFollow(params: UpsertFollowParams): Promise<UpsertFollowResponse>;
66
+ /**
67
+ * Stop one of your follows: the leader's fills stop being mirrored. An exit
68
+ * is never gated beyond ownership, except that a delegated agent session
69
+ * cannot stop a follow (403).
70
+ */
71
+ stopFollow(followId: string): Promise<StopFollowResponse>;
72
+ /** List your follows, newest first. Cursor paged, up to 1000 per page. */
73
+ listMyFollows(params?: ListMyFollowsParams): Promise<ListMyFollowsResponse>;
74
+ /**
75
+ * Get one of your follows with its most recent skipped mirrors (up to 100)
76
+ * and the copy account's marked equity. 404 for a follow that is not yours.
77
+ */
78
+ getFollow(followId: string): Promise<GetFollowResponse>;
79
+ /**
80
+ * List the open positions of the leader one of your follows copies. The
81
+ * leader comes from the follow, so this works after the leader releases
82
+ * their handle. 404 for a follow that is not yours; 403 for a stopped one.
83
+ */
84
+ listFollowLeaderPositions(followId: string): Promise<ListFollowLeaderPositionsResponse>;
85
+ /**
86
+ * Preview what a follow with these terms would open if it set
87
+ * `copyExisting`, as totals only: the estimated margin and fees, and how
88
+ * many of the leader's positions would and would not be copied (no pair,
89
+ * side or reason). Read-only. Delegated agent and sub-account sessions get
90
+ * 403, as for following.
91
+ */
92
+ previewFollow(params: PreviewFollowParams): Promise<PreviewFollowResponse>;
93
+ }
94
+ export type { ClosedTrade, ClosedTradeAction, CopySkip, Follow, Follower, GetFollowResponse, GetLeadTraderResponse, LeadTraderFollowSummary, LeadTraderListing, LeadTraderOpenPosition, LeadTraderProfile, LeadTraderRef, LeadTraderSort, LeadTraderStats, LeadTraderStatsWindow, LeadTraderStatus, ListFollowLeaderPositionsResponse, ListLeadTraderClosedTradesResponse, ListLeadTraderOpenPositionsResponse, ListLeadTradersResponse, ListMyFollowersResponse, ListMyFollowsResponse, PreviewFollowResponse, StopFollowResponse, UpsertFollowResponse, UpsertLeadTraderResponse, } from "./responses";
95
+ export { ClosedTradeSchema, CopySkipSchema, FollowerSchema, FollowSchema, GetFollowResponseSchema, GetLeadTraderResponseSchema, LeadTraderFollowSummarySchema, LeadTraderListingSchema, LeadTraderOpenPositionSchema, LeadTraderProfileSchema, LeadTraderRefSchema, LeadTraderStatsSchema, ListFollowLeaderPositionsResponseSchema, ListLeadTraderClosedTradesResponseSchema, ListLeadTraderOpenPositionsResponseSchema, ListLeadTradersResponseSchema, ListMyFollowersResponseSchema, ListMyFollowsResponseSchema, PreviewFollowResponseSchema, StopFollowResponseSchema, UpsertFollowResponseSchema, UpsertLeadTraderResponseSchema, } from "./responses";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copy Trading Types (0XM-2851)
3
+ *
4
+ * Followers allocate collateral to a per-leader copy account (a cross risk
5
+ * bucket in their margin account) and every fill the leader makes is mirrored
6
+ * into it. Leaders are addressed by their custom TraderCode handle.
7
+ */
8
+ export { ClosedTradeSchema, CopySkipSchema, FollowerSchema, FollowSchema, GetFollowResponseSchema, GetLeadTraderResponseSchema, LeadTraderFollowSummarySchema, LeadTraderListingSchema, LeadTraderOpenPositionSchema, LeadTraderProfileSchema, LeadTraderRefSchema, LeadTraderStatsSchema, ListFollowLeaderPositionsResponseSchema, ListLeadTraderClosedTradesResponseSchema, ListLeadTraderOpenPositionsResponseSchema, ListLeadTradersResponseSchema, ListMyFollowersResponseSchema, ListMyFollowsResponseSchema, PreviewFollowResponseSchema, StopFollowResponseSchema, UpsertFollowResponseSchema, UpsertLeadTraderResponseSchema, } from "./responses";
@@ -0,0 +1,373 @@
1
+ /**
2
+ * Copy trading response types (0XM-2851).
3
+ *
4
+ * Zod schemas for every copy trading REST/gRPC response, with the inferred
5
+ * TypeScript types. The REST API returns camelCase JSON; an optional field the
6
+ * server has no value for arrives as `null`, so optional fields are typed
7
+ * `T | null | undefined` (`.nullish()`).
8
+ *
9
+ * Leaders are only ever identified by their public wallet address and custom
10
+ * TraderCode handle, never by an internal id.
11
+ *
12
+ * Label fields (statuses, modes, reasons) are typed `Union | (string & {})`:
13
+ * the unions name the values the server sends today, and the schemas accept
14
+ * any string so a value added server-side later does not fail parsing.
15
+ */
16
+ import { z } from "zod";
17
+ import type { CopyLeverageMode, CopyMarginModePolicy, CopyRelationshipStatus, CopySizingMode, CopySkipReason, CopyStopReason } from "../websocket/events/copy-events";
18
+ /** Lead trader profile status. `SUSPENDED` appears only on your own profile. */
19
+ export type LeadTraderStatus = "ACTIVE" | "PAUSED" | "SUSPENDED";
20
+ /** Leaderboard stats window. */
21
+ export type LeadTraderStatsWindow = "7d" | "30d" | "90d" | "all";
22
+ /** Leaderboard sort metric (highest first). */
23
+ export type LeadTraderSort = "roi" | "pnl" | "followers" | "allocated" | "aum" | "win_rate";
24
+ /** The kind of reducing execution a closed trade records. */
25
+ export type ClosedTradeAction = "DECREASE" | "CLOSE" | "LIQUIDATE" | "ADL";
26
+ /** A lead trader as the public sees them: wallet and handle, never an internal id. */
27
+ export declare const LeadTraderRefSchema: z.ZodObject<{
28
+ walletAddress: z.ZodString;
29
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ display: z.ZodString;
31
+ }, z.core.$strip>;
32
+ /** A lead trader's public profile. */
33
+ export declare const LeadTraderProfileSchema: z.ZodObject<{
34
+ leader: z.ZodObject<{
35
+ walletAddress: z.ZodString;
36
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ display: z.ZodString;
38
+ }, z.core.$strip>;
39
+ status: z.ZodType<(string & {}) | LeadTraderStatus, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatus, unknown>>;
40
+ shareBps: z.ZodNumber;
41
+ bio: z.ZodString;
42
+ minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ registeredAt: z.ZodString;
44
+ }, z.core.$strip>;
45
+ /** Live follows of a leader. */
46
+ export declare const LeadTraderFollowSummarySchema: z.ZodObject<{
47
+ followerCount: z.ZodNumber;
48
+ allocated: z.ZodString;
49
+ aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ }, z.core.$strip>;
51
+ /** A leader's trading stats over one window. */
52
+ export declare const LeadTraderStatsSchema: z.ZodObject<{
53
+ window: z.ZodType<(string & {}) | LeadTraderStatsWindow, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatsWindow, unknown>>;
54
+ pnl: z.ZodString;
55
+ roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ winRatePct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ closedTrades: z.ZodNumber;
59
+ }, z.core.$strip>;
60
+ /** One lead trader: profile, follow summary and stats for every window (7d, 30d, 90d, all). */
61
+ export declare const GetLeadTraderResponseSchema: z.ZodObject<{
62
+ profile: z.ZodObject<{
63
+ leader: z.ZodObject<{
64
+ walletAddress: z.ZodString;
65
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ display: z.ZodString;
67
+ }, z.core.$strip>;
68
+ status: z.ZodType<(string & {}) | LeadTraderStatus, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatus, unknown>>;
69
+ shareBps: z.ZodNumber;
70
+ bio: z.ZodString;
71
+ minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ registeredAt: z.ZodString;
73
+ }, z.core.$strip>;
74
+ followSummary: z.ZodObject<{
75
+ followerCount: z.ZodNumber;
76
+ allocated: z.ZodString;
77
+ aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ }, z.core.$strip>;
79
+ stats: z.ZodArray<z.ZodObject<{
80
+ window: z.ZodType<(string & {}) | LeadTraderStatsWindow, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatsWindow, unknown>>;
81
+ pnl: z.ZodString;
82
+ roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ winRatePct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ closedTrades: z.ZodNumber;
86
+ }, z.core.$strip>>;
87
+ }, z.core.$strip>;
88
+ /** One leaderboard row: stats for the requested window only. */
89
+ export declare const LeadTraderListingSchema: z.ZodObject<{
90
+ profile: z.ZodObject<{
91
+ leader: z.ZodObject<{
92
+ walletAddress: z.ZodString;
93
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ display: z.ZodString;
95
+ }, z.core.$strip>;
96
+ status: z.ZodType<(string & {}) | LeadTraderStatus, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatus, unknown>>;
97
+ shareBps: z.ZodNumber;
98
+ bio: z.ZodString;
99
+ minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ registeredAt: z.ZodString;
101
+ }, z.core.$strip>;
102
+ followSummary: z.ZodObject<{
103
+ followerCount: z.ZodNumber;
104
+ allocated: z.ZodString;
105
+ aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ }, z.core.$strip>;
107
+ stats: z.ZodObject<{
108
+ window: z.ZodType<(string & {}) | LeadTraderStatsWindow, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatsWindow, unknown>>;
109
+ pnl: z.ZodString;
110
+ roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ winRatePct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ closedTrades: z.ZodNumber;
114
+ }, z.core.$strip>;
115
+ }, z.core.$strip>;
116
+ /** A page of the public leaderboard. */
117
+ export declare const ListLeadTradersResponseSchema: z.ZodObject<{
118
+ leaders: z.ZodArray<z.ZodObject<{
119
+ profile: z.ZodObject<{
120
+ leader: z.ZodObject<{
121
+ walletAddress: z.ZodString;
122
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ display: z.ZodString;
124
+ }, z.core.$strip>;
125
+ status: z.ZodType<(string & {}) | LeadTraderStatus, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatus, unknown>>;
126
+ shareBps: z.ZodNumber;
127
+ bio: z.ZodString;
128
+ minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ registeredAt: z.ZodString;
130
+ }, z.core.$strip>;
131
+ followSummary: z.ZodObject<{
132
+ followerCount: z.ZodNumber;
133
+ allocated: z.ZodString;
134
+ aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ }, z.core.$strip>;
136
+ stats: z.ZodObject<{
137
+ window: z.ZodType<(string & {}) | LeadTraderStatsWindow, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatsWindow, unknown>>;
138
+ pnl: z.ZodString;
139
+ roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
+ maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ winRatePct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ closedTrades: z.ZodNumber;
143
+ }, z.core.$strip>;
144
+ }, z.core.$strip>>;
145
+ nextPageToken: z.ZodString;
146
+ asOf: z.ZodString;
147
+ }, z.core.$strip>;
148
+ /** Result of registering as, or editing, a lead trader. */
149
+ export declare const UpsertLeadTraderResponseSchema: z.ZodObject<{
150
+ created: z.ZodBoolean;
151
+ status: z.ZodType<(string & {}) | LeadTraderStatus, unknown, z.core.$ZodTypeInternals<(string & {}) | LeadTraderStatus, unknown>>;
152
+ shareBps: z.ZodNumber;
153
+ }, z.core.$strip>;
154
+ /** One of your followers, as a leader sees them. */
155
+ export declare const FollowerSchema: z.ZodObject<{
156
+ walletAddress: z.ZodString;
157
+ display: z.ZodString;
158
+ status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
159
+ allocation: z.ZodString;
160
+ startedAt: z.ZodString;
161
+ }, z.core.$strip>;
162
+ /** A page of your followers. */
163
+ export declare const ListMyFollowersResponseSchema: z.ZodObject<{
164
+ followers: z.ZodArray<z.ZodObject<{
165
+ walletAddress: z.ZodString;
166
+ display: z.ZodString;
167
+ status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
168
+ allocation: z.ZodString;
169
+ startedAt: z.ZodString;
170
+ }, z.core.$strip>>;
171
+ nextPageToken: z.ZodString;
172
+ }, z.core.$strip>;
173
+ /** One reducing execution of a leader's position. */
174
+ export declare const ClosedTradeSchema: z.ZodObject<{
175
+ tradingPairId: z.ZodString;
176
+ positionSide: z.ZodString;
177
+ action: z.ZodType<(string & {}) | ClosedTradeAction, unknown, z.core.$ZodTypeInternals<(string & {}) | ClosedTradeAction, unknown>>;
178
+ size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ exitPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ entryPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ netRealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
+ realizedRoe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ closedAt: z.ZodString;
185
+ }, z.core.$strip>;
186
+ /** A page of a leader's closed trades. */
187
+ export declare const ListLeadTraderClosedTradesResponseSchema: z.ZodObject<{
188
+ closedTrades: z.ZodArray<z.ZodObject<{
189
+ tradingPairId: z.ZodString;
190
+ positionSide: z.ZodString;
191
+ action: z.ZodType<(string & {}) | ClosedTradeAction, unknown, z.core.$ZodTypeInternals<(string & {}) | ClosedTradeAction, unknown>>;
192
+ size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
+ exitPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ entryPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ netRealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ realizedRoe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ closedAt: z.ZodString;
199
+ }, z.core.$strip>>;
200
+ nextPageToken: z.ZodString;
201
+ }, z.core.$strip>;
202
+ /** One open position of a leader you follow. */
203
+ export declare const LeadTraderOpenPositionSchema: z.ZodObject<{
204
+ tradingPairId: z.ZodString;
205
+ side: z.ZodString;
206
+ size: z.ZodString;
207
+ entryPrice: z.ZodString;
208
+ markPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ unrealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
211
+ marginMode: z.ZodString;
212
+ }, z.core.$strip>;
213
+ /** A followed leader's open positions (current followers only). */
214
+ export declare const ListLeadTraderOpenPositionsResponseSchema: z.ZodObject<{
215
+ positions: z.ZodArray<z.ZodObject<{
216
+ tradingPairId: z.ZodString;
217
+ side: z.ZodString;
218
+ size: z.ZodString;
219
+ entryPrice: z.ZodString;
220
+ markPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ unrealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
+ marginMode: z.ZodString;
224
+ }, z.core.$strip>>;
225
+ }, z.core.$strip>;
226
+ /** One of your follows. */
227
+ export declare const FollowSchema: z.ZodObject<{
228
+ followId: z.ZodString;
229
+ leader: z.ZodObject<{
230
+ walletAddress: z.ZodString;
231
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ display: z.ZodString;
233
+ }, z.core.$strip>;
234
+ status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
235
+ marginModePolicy: z.ZodType<CopyMarginModePolicy | (string & {}), unknown, z.core.$ZodTypeInternals<CopyMarginModePolicy | (string & {}), unknown>>;
236
+ sizingMode: z.ZodType<CopySizingMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopySizingMode | (string & {}), unknown>>;
237
+ sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
239
+ fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ allocation: z.ZodString;
241
+ slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ copyExisting: z.ZodBoolean;
243
+ tradingPairIds: z.ZodArray<z.ZodString>;
244
+ consecutiveSkips: z.ZodNumber;
245
+ copyRiskBucketId: z.ZodString;
246
+ startedAt: z.ZodString;
247
+ stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
249
+ }, z.core.$strip>;
250
+ /** A page of your follows. */
251
+ export declare const ListMyFollowsResponseSchema: z.ZodObject<{
252
+ follows: z.ZodArray<z.ZodObject<{
253
+ followId: z.ZodString;
254
+ leader: z.ZodObject<{
255
+ walletAddress: z.ZodString;
256
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ display: z.ZodString;
258
+ }, z.core.$strip>;
259
+ status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
260
+ marginModePolicy: z.ZodType<CopyMarginModePolicy | (string & {}), unknown, z.core.$ZodTypeInternals<CopyMarginModePolicy | (string & {}), unknown>>;
261
+ sizingMode: z.ZodType<CopySizingMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopySizingMode | (string & {}), unknown>>;
262
+ sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
264
+ fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ allocation: z.ZodString;
266
+ slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
267
+ copyExisting: z.ZodBoolean;
268
+ tradingPairIds: z.ZodArray<z.ZodString>;
269
+ consecutiveSkips: z.ZodNumber;
270
+ copyRiskBucketId: z.ZodString;
271
+ startedAt: z.ZodString;
272
+ stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
274
+ }, z.core.$strip>>;
275
+ nextPageToken: z.ZodString;
276
+ }, z.core.$strip>;
277
+ /** A leader fill one of your follows did not mirror. */
278
+ export declare const CopySkipSchema: z.ZodObject<{
279
+ tradingPairId: z.ZodString;
280
+ reason: z.ZodType<CopySkipReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopySkipReason | (string & {}), unknown>>;
281
+ requestedQuantity: z.ZodString;
282
+ skippedAt: z.ZodString;
283
+ }, z.core.$strip>;
284
+ /** One of your follows with its most recent skips (up to 100). */
285
+ export declare const GetFollowResponseSchema: z.ZodObject<{
286
+ follow: z.ZodObject<{
287
+ followId: z.ZodString;
288
+ leader: z.ZodObject<{
289
+ walletAddress: z.ZodString;
290
+ handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
+ display: z.ZodString;
292
+ }, z.core.$strip>;
293
+ status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
294
+ marginModePolicy: z.ZodType<CopyMarginModePolicy | (string & {}), unknown, z.core.$ZodTypeInternals<CopyMarginModePolicy | (string & {}), unknown>>;
295
+ sizingMode: z.ZodType<CopySizingMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopySizingMode | (string & {}), unknown>>;
296
+ sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
297
+ leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
298
+ fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
+ allocation: z.ZodString;
300
+ slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
+ copyExisting: z.ZodBoolean;
302
+ tradingPairIds: z.ZodArray<z.ZodString>;
303
+ consecutiveSkips: z.ZodNumber;
304
+ copyRiskBucketId: z.ZodString;
305
+ startedAt: z.ZodString;
306
+ stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
307
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
308
+ }, z.core.$strip>;
309
+ recentSkips: z.ZodArray<z.ZodObject<{
310
+ tradingPairId: z.ZodString;
311
+ reason: z.ZodType<CopySkipReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopySkipReason | (string & {}), unknown>>;
312
+ requestedQuantity: z.ZodString;
313
+ skippedAt: z.ZodString;
314
+ }, z.core.$strip>>;
315
+ copyAccountEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ }, z.core.$strip>;
317
+ /** The open positions of the leader one of your follows copies. */
318
+ export declare const ListFollowLeaderPositionsResponseSchema: z.ZodObject<{
319
+ positions: z.ZodArray<z.ZodObject<{
320
+ tradingPairId: z.ZodString;
321
+ side: z.ZodString;
322
+ size: z.ZodString;
323
+ entryPrice: z.ZodString;
324
+ markPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ unrealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ marginMode: z.ZodString;
328
+ }, z.core.$strip>>;
329
+ }, z.core.$strip>;
330
+ /** Result of following a leader or editing a follow. */
331
+ export declare const UpsertFollowResponseSchema: z.ZodObject<{
332
+ followId: z.ZodString;
333
+ copyRiskBucketId: z.ZodString;
334
+ created: z.ZodBoolean;
335
+ }, z.core.$strip>;
336
+ /**
337
+ * What following with `copyExisting` would open, as totals only. The caller
338
+ * is never a follower of the leader, so the preview names no pair, side,
339
+ * size, mark or skip reason. Totals are rounded up to cents.
340
+ */
341
+ export declare const PreviewFollowResponseSchema: z.ZodObject<{
342
+ estimatedMargin: z.ZodString;
343
+ estimatedFee: z.ZodString;
344
+ copiedPositions: z.ZodNumber;
345
+ skippedPositions: z.ZodNumber;
346
+ truncated: z.ZodBoolean;
347
+ }, z.core.$strip>;
348
+ /** Result of stopping a follow. */
349
+ export declare const StopFollowResponseSchema: z.ZodObject<{
350
+ followId: z.ZodString;
351
+ }, z.core.$strip>;
352
+ export type LeadTraderRef = z.infer<typeof LeadTraderRefSchema>;
353
+ export type LeadTraderProfile = z.infer<typeof LeadTraderProfileSchema>;
354
+ export type LeadTraderFollowSummary = z.infer<typeof LeadTraderFollowSummarySchema>;
355
+ export type LeadTraderStats = z.infer<typeof LeadTraderStatsSchema>;
356
+ export type GetLeadTraderResponse = z.infer<typeof GetLeadTraderResponseSchema>;
357
+ export type LeadTraderListing = z.infer<typeof LeadTraderListingSchema>;
358
+ export type ListLeadTradersResponse = z.infer<typeof ListLeadTradersResponseSchema>;
359
+ export type UpsertLeadTraderResponse = z.infer<typeof UpsertLeadTraderResponseSchema>;
360
+ export type Follower = z.infer<typeof FollowerSchema>;
361
+ export type ListMyFollowersResponse = z.infer<typeof ListMyFollowersResponseSchema>;
362
+ export type ClosedTrade = z.infer<typeof ClosedTradeSchema>;
363
+ export type ListLeadTraderClosedTradesResponse = z.infer<typeof ListLeadTraderClosedTradesResponseSchema>;
364
+ export type LeadTraderOpenPosition = z.infer<typeof LeadTraderOpenPositionSchema>;
365
+ export type ListLeadTraderOpenPositionsResponse = z.infer<typeof ListLeadTraderOpenPositionsResponseSchema>;
366
+ export type Follow = z.infer<typeof FollowSchema>;
367
+ export type ListMyFollowsResponse = z.infer<typeof ListMyFollowsResponseSchema>;
368
+ export type CopySkip = z.infer<typeof CopySkipSchema>;
369
+ export type GetFollowResponse = z.infer<typeof GetFollowResponseSchema>;
370
+ export type ListFollowLeaderPositionsResponse = z.infer<typeof ListFollowLeaderPositionsResponseSchema>;
371
+ export type UpsertFollowResponse = z.infer<typeof UpsertFollowResponseSchema>;
372
+ export type StopFollowResponse = z.infer<typeof StopFollowResponseSchema>;
373
+ export type PreviewFollowResponse = z.infer<typeof PreviewFollowResponseSchema>;