@0xmonaco/types 1.0.93 → 1.0.94
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/buildercodes/responses.d.ts +9 -9
- package/dist/compliance/index.d.ts +1 -1
- package/dist/copy-trading/responses.d.ts +30 -30
- package/dist/sdk/index.d.ts +2 -1
- package/dist/tradercodes/responses.d.ts +8 -8
- package/dist/validation/copy-trading.d.ts +10 -10
- package/dist/validation/margin-accounts.d.ts +16 -16
- package/dist/validation/market.d.ts +22 -22
- package/dist/validation/positions.d.ts +6 -6
- package/dist/validation/profile.d.ts +11 -11
- package/dist/validation/trading.d.ts +50 -50
- package/dist/validation/vault.d.ts +2 -2
- package/dist/websocket/base.d.ts +10 -0
- package/dist/websocket/client.d.ts +11 -6
- package/dist/websocket/client.js +6 -4
- package/dist/websocket/snapshots.d.ts +7 -4
- package/dist/websocket/snapshots.js +7 -4
- package/dist/wire/schema.d.ts +15 -12
- package/dist/wire/schema.js +2 -1
- package/package.json +2 -2
|
@@ -35,14 +35,14 @@ export declare const SetBuilderFeeResponseSchema: z.ZodObject<{
|
|
|
35
35
|
}, z.core.$strip>;
|
|
36
36
|
/** Builder-fee change actor exposed by the audit log. */
|
|
37
37
|
export declare const BuilderFeeActorTypeSchema: z.ZodEnum<{
|
|
38
|
-
BUILDER: "BUILDER";
|
|
39
38
|
ADMIN: "ADMIN";
|
|
39
|
+
BUILDER: "BUILDER";
|
|
40
40
|
}>;
|
|
41
41
|
/** One builder-fee audit-log entry. */
|
|
42
42
|
export declare const BuilderFeeChangeSchema: z.ZodObject<{
|
|
43
43
|
actorType: z.ZodEnum<{
|
|
44
|
-
BUILDER: "BUILDER";
|
|
45
44
|
ADMIN: "ADMIN";
|
|
45
|
+
BUILDER: "BUILDER";
|
|
46
46
|
}>;
|
|
47
47
|
actor: z.ZodString;
|
|
48
48
|
oldBps: z.ZodNumber;
|
|
@@ -60,8 +60,8 @@ export declare const ListBuilderFeeChangesParamsSchema: z.ZodObject<{
|
|
|
60
60
|
export declare const ListBuilderFeeChangesResponseSchema: z.ZodObject<{
|
|
61
61
|
changes: z.ZodArray<z.ZodObject<{
|
|
62
62
|
actorType: z.ZodEnum<{
|
|
63
|
-
BUILDER: "BUILDER";
|
|
64
63
|
ADMIN: "ADMIN";
|
|
64
|
+
BUILDER: "BUILDER";
|
|
65
65
|
}>;
|
|
66
66
|
actor: z.ZodString;
|
|
67
67
|
oldBps: z.ZodNumber;
|
|
@@ -78,9 +78,9 @@ export declare const ListBuilderFeeChangesResponseSchema: z.ZodObject<{
|
|
|
78
78
|
* `BUILDER_MAKER_FEE` records maker add-ons charged to makers.
|
|
79
79
|
*/
|
|
80
80
|
export declare const BuildercodePayoutKindSchema: z.ZodEnum<{
|
|
81
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
82
81
|
BUILDER_FEE: "BUILDER_FEE";
|
|
83
82
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
83
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
84
84
|
}>;
|
|
85
85
|
/**
|
|
86
86
|
* Pagination and filter accepted by the per-trade payout history endpoint.
|
|
@@ -94,9 +94,9 @@ export declare const ListBuildercodePayoutsParamsSchema: z.ZodObject<{
|
|
|
94
94
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
96
96
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
97
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
98
97
|
BUILDER_FEE: "BUILDER_FEE";
|
|
99
98
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
99
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
100
100
|
}>>;
|
|
101
101
|
}, z.core.$strip>;
|
|
102
102
|
/** One per-trade BuilderCodes credit. Amounts are RAW atomic units. */
|
|
@@ -108,9 +108,9 @@ export declare const BuildercodePayoutSchema: z.ZodObject<{
|
|
|
108
108
|
appliedBps: z.ZodNumber;
|
|
109
109
|
createdAt: z.ZodString;
|
|
110
110
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
111
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
112
111
|
BUILDER_FEE: "BUILDER_FEE";
|
|
113
112
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
113
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
114
114
|
}>>;
|
|
115
115
|
}, z.core.$strip>;
|
|
116
116
|
/** Schema for the paginated per-trade payout history. */
|
|
@@ -123,9 +123,9 @@ export declare const ListBuildercodePayoutsResponseSchema: z.ZodObject<{
|
|
|
123
123
|
appliedBps: z.ZodNumber;
|
|
124
124
|
createdAt: z.ZodString;
|
|
125
125
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
126
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
127
126
|
BUILDER_FEE: "BUILDER_FEE";
|
|
128
127
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
128
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
129
129
|
}>>;
|
|
130
130
|
}, z.core.$strip>>;
|
|
131
131
|
total: z.ZodNumber;
|
|
@@ -144,9 +144,9 @@ export declare const BuildercodePayoutTokenTotalSchema: z.ZodObject<{
|
|
|
144
144
|
export declare const BuildercodePayoutTokenKindTotalSchema: z.ZodObject<{
|
|
145
145
|
token: z.ZodString;
|
|
146
146
|
kind: z.ZodEnum<{
|
|
147
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
148
147
|
BUILDER_FEE: "BUILDER_FEE";
|
|
149
148
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
149
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
150
150
|
}>;
|
|
151
151
|
totalAmount: z.ZodString;
|
|
152
152
|
payoutCount: z.ZodNumber;
|
|
@@ -165,9 +165,9 @@ export declare const GetBuildercodePayoutSummaryResponseSchema: z.ZodObject<{
|
|
|
165
165
|
byTokenAndKind: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
166
|
token: z.ZodString;
|
|
167
167
|
kind: z.ZodEnum<{
|
|
168
|
-
REVENUE_SHARE: "REVENUE_SHARE";
|
|
169
168
|
BUILDER_FEE: "BUILDER_FEE";
|
|
170
169
|
BUILDER_MAKER_FEE: "BUILDER_MAKER_FEE";
|
|
170
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
171
171
|
}>;
|
|
172
172
|
totalAmount: z.ZodString;
|
|
173
173
|
payoutCount: z.ZodNumber;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { BaseAPI } from "../api";
|
|
12
12
|
/** The caller's region status. */
|
|
13
13
|
export interface GetRegionStatusResponse {
|
|
14
|
-
/** True when
|
|
14
|
+
/** True when trading is not available in the caller's region; reads, signing in and withdrawing still work. */
|
|
15
15
|
restricted: boolean;
|
|
16
16
|
/** ISO 3166-1 alpha-2 country code (`T1` Tor, `XX` unknown); empty when the request carried no location. */
|
|
17
17
|
country: string;
|
|
@@ -36,7 +36,7 @@ export declare const LeadTraderProfileSchema: z.ZodObject<{
|
|
|
36
36
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
37
|
display: z.ZodString;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
|
-
status: z.ZodType<(string & {})
|
|
39
|
+
status: z.ZodType<LeadTraderStatus | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatus | (string & {}), unknown>>;
|
|
40
40
|
shareBps: z.ZodNumber;
|
|
41
41
|
bio: z.ZodString;
|
|
42
42
|
minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -50,7 +50,7 @@ export declare const LeadTraderFollowSummarySchema: z.ZodObject<{
|
|
|
50
50
|
}, z.core.$strip>;
|
|
51
51
|
/** A leader's trading stats over one window. */
|
|
52
52
|
export declare const LeadTraderStatsSchema: z.ZodObject<{
|
|
53
|
-
window: z.ZodType<(string & {})
|
|
53
|
+
window: z.ZodType<LeadTraderStatsWindow | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatsWindow | (string & {}), unknown>>;
|
|
54
54
|
pnl: z.ZodString;
|
|
55
55
|
roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
56
|
maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -65,7 +65,7 @@ export declare const GetLeadTraderResponseSchema: z.ZodObject<{
|
|
|
65
65
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
66
|
display: z.ZodString;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
|
-
status: z.ZodType<(string & {})
|
|
68
|
+
status: z.ZodType<LeadTraderStatus | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatus | (string & {}), unknown>>;
|
|
69
69
|
shareBps: z.ZodNumber;
|
|
70
70
|
bio: z.ZodString;
|
|
71
71
|
minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -77,7 +77,7 @@ export declare const GetLeadTraderResponseSchema: z.ZodObject<{
|
|
|
77
77
|
aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
78
|
}, z.core.$strip>;
|
|
79
79
|
stats: z.ZodArray<z.ZodObject<{
|
|
80
|
-
window: z.ZodType<(string & {})
|
|
80
|
+
window: z.ZodType<LeadTraderStatsWindow | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatsWindow | (string & {}), unknown>>;
|
|
81
81
|
pnl: z.ZodString;
|
|
82
82
|
roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
83
|
maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -93,7 +93,7 @@ export declare const LeadTraderListingSchema: z.ZodObject<{
|
|
|
93
93
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
94
|
display: z.ZodString;
|
|
95
95
|
}, z.core.$strip>;
|
|
96
|
-
status: z.ZodType<(string & {})
|
|
96
|
+
status: z.ZodType<LeadTraderStatus | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatus | (string & {}), unknown>>;
|
|
97
97
|
shareBps: z.ZodNumber;
|
|
98
98
|
bio: z.ZodString;
|
|
99
99
|
minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -105,7 +105,7 @@ export declare const LeadTraderListingSchema: z.ZodObject<{
|
|
|
105
105
|
aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
107
|
stats: z.ZodObject<{
|
|
108
|
-
window: z.ZodType<(string & {})
|
|
108
|
+
window: z.ZodType<LeadTraderStatsWindow | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatsWindow | (string & {}), unknown>>;
|
|
109
109
|
pnl: z.ZodString;
|
|
110
110
|
roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
111
|
maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -122,7 +122,7 @@ export declare const ListLeadTradersResponseSchema: z.ZodObject<{
|
|
|
122
122
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
123
|
display: z.ZodString;
|
|
124
124
|
}, z.core.$strip>;
|
|
125
|
-
status: z.ZodType<(string & {})
|
|
125
|
+
status: z.ZodType<LeadTraderStatus | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatus | (string & {}), unknown>>;
|
|
126
126
|
shareBps: z.ZodNumber;
|
|
127
127
|
bio: z.ZodString;
|
|
128
128
|
minAllocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -134,7 +134,7 @@ export declare const ListLeadTradersResponseSchema: z.ZodObject<{
|
|
|
134
134
|
aumEquity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
135
|
}, z.core.$strip>;
|
|
136
136
|
stats: z.ZodObject<{
|
|
137
|
-
window: z.ZodType<(string & {})
|
|
137
|
+
window: z.ZodType<LeadTraderStatsWindow | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatsWindow | (string & {}), unknown>>;
|
|
138
138
|
pnl: z.ZodString;
|
|
139
139
|
roiPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
140
|
maxDrawdownPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -148,14 +148,14 @@ export declare const ListLeadTradersResponseSchema: z.ZodObject<{
|
|
|
148
148
|
/** Result of registering as, or editing, a lead trader. */
|
|
149
149
|
export declare const UpsertLeadTraderResponseSchema: z.ZodObject<{
|
|
150
150
|
created: z.ZodBoolean;
|
|
151
|
-
status: z.ZodType<(string & {})
|
|
151
|
+
status: z.ZodType<LeadTraderStatus | (string & {}), unknown, z.core.$ZodTypeInternals<LeadTraderStatus | (string & {}), unknown>>;
|
|
152
152
|
shareBps: z.ZodNumber;
|
|
153
153
|
}, z.core.$strip>;
|
|
154
154
|
/** One of your followers, as a leader sees them. */
|
|
155
155
|
export declare const FollowerSchema: z.ZodObject<{
|
|
156
156
|
walletAddress: z.ZodString;
|
|
157
157
|
display: z.ZodString;
|
|
158
|
-
status: z.ZodType<(string & {})
|
|
158
|
+
status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
|
|
159
159
|
allocation: z.ZodString;
|
|
160
160
|
startedAt: z.ZodString;
|
|
161
161
|
}, z.core.$strip>;
|
|
@@ -164,7 +164,7 @@ export declare const ListMyFollowersResponseSchema: z.ZodObject<{
|
|
|
164
164
|
followers: z.ZodArray<z.ZodObject<{
|
|
165
165
|
walletAddress: z.ZodString;
|
|
166
166
|
display: z.ZodString;
|
|
167
|
-
status: z.ZodType<(string & {})
|
|
167
|
+
status: z.ZodType<CopyRelationshipStatus | (string & {}), unknown, z.core.$ZodTypeInternals<CopyRelationshipStatus | (string & {}), unknown>>;
|
|
168
168
|
allocation: z.ZodString;
|
|
169
169
|
startedAt: z.ZodString;
|
|
170
170
|
}, z.core.$strip>>;
|
|
@@ -174,7 +174,7 @@ export declare const ListMyFollowersResponseSchema: z.ZodObject<{
|
|
|
174
174
|
export declare const ClosedTradeSchema: z.ZodObject<{
|
|
175
175
|
tradingPairId: z.ZodString;
|
|
176
176
|
positionSide: z.ZodString;
|
|
177
|
-
action: z.ZodType<(string & {})
|
|
177
|
+
action: z.ZodType<ClosedTradeAction | (string & {}), unknown, z.core.$ZodTypeInternals<ClosedTradeAction | (string & {}), unknown>>;
|
|
178
178
|
size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
179
|
exitPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
180
|
entryPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -188,7 +188,7 @@ export declare const ListLeadTraderClosedTradesResponseSchema: z.ZodObject<{
|
|
|
188
188
|
closedTrades: z.ZodArray<z.ZodObject<{
|
|
189
189
|
tradingPairId: z.ZodString;
|
|
190
190
|
positionSide: z.ZodString;
|
|
191
|
-
action: z.ZodType<(string & {})
|
|
191
|
+
action: z.ZodType<ClosedTradeAction | (string & {}), unknown, z.core.$ZodTypeInternals<ClosedTradeAction | (string & {}), unknown>>;
|
|
192
192
|
size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
193
|
exitPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
194
|
entryPrice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -231,11 +231,11 @@ export declare const FollowSchema: z.ZodObject<{
|
|
|
231
231
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
232
|
display: z.ZodString;
|
|
233
233
|
}, z.core.$strip>;
|
|
234
|
-
status: z.ZodType<(string & {})
|
|
235
|
-
marginModePolicy: z.ZodType<(string & {})
|
|
236
|
-
sizingMode: z.ZodType<(string & {})
|
|
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
237
|
sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
|
-
leverageMode: z.ZodType<(string & {})
|
|
238
|
+
leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
|
|
239
239
|
fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
240
|
allocation: z.ZodString;
|
|
241
241
|
slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -245,7 +245,7 @@ export declare const FollowSchema: z.ZodObject<{
|
|
|
245
245
|
copyRiskBucketId: z.ZodString;
|
|
246
246
|
startedAt: z.ZodString;
|
|
247
247
|
stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
-
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<(string & {})
|
|
248
|
+
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
|
|
249
249
|
}, z.core.$strip>;
|
|
250
250
|
/** A page of your follows. */
|
|
251
251
|
export declare const ListMyFollowsResponseSchema: z.ZodObject<{
|
|
@@ -256,11 +256,11 @@ export declare const ListMyFollowsResponseSchema: z.ZodObject<{
|
|
|
256
256
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
257
|
display: z.ZodString;
|
|
258
258
|
}, z.core.$strip>;
|
|
259
|
-
status: z.ZodType<(string & {})
|
|
260
|
-
marginModePolicy: z.ZodType<(string & {})
|
|
261
|
-
sizingMode: z.ZodType<(string & {})
|
|
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
262
|
sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
|
-
leverageMode: z.ZodType<(string & {})
|
|
263
|
+
leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
|
|
264
264
|
fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
265
|
allocation: z.ZodString;
|
|
266
266
|
slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -270,14 +270,14 @@ export declare const ListMyFollowsResponseSchema: z.ZodObject<{
|
|
|
270
270
|
copyRiskBucketId: z.ZodString;
|
|
271
271
|
startedAt: z.ZodString;
|
|
272
272
|
stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
-
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<(string & {})
|
|
273
|
+
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
|
|
274
274
|
}, z.core.$strip>>;
|
|
275
275
|
nextPageToken: z.ZodString;
|
|
276
276
|
}, z.core.$strip>;
|
|
277
277
|
/** A leader fill one of your follows did not mirror. */
|
|
278
278
|
export declare const CopySkipSchema: z.ZodObject<{
|
|
279
279
|
tradingPairId: z.ZodString;
|
|
280
|
-
reason: z.ZodType<(string & {})
|
|
280
|
+
reason: z.ZodType<CopySkipReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopySkipReason | (string & {}), unknown>>;
|
|
281
281
|
requestedQuantity: z.ZodString;
|
|
282
282
|
skippedAt: z.ZodString;
|
|
283
283
|
}, z.core.$strip>;
|
|
@@ -290,11 +290,11 @@ export declare const GetFollowResponseSchema: z.ZodObject<{
|
|
|
290
290
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
291
|
display: z.ZodString;
|
|
292
292
|
}, z.core.$strip>;
|
|
293
|
-
status: z.ZodType<(string & {})
|
|
294
|
-
marginModePolicy: z.ZodType<(string & {})
|
|
295
|
-
sizingMode: z.ZodType<(string & {})
|
|
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
296
|
sizingParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
297
|
-
leverageMode: z.ZodType<(string & {})
|
|
297
|
+
leverageMode: z.ZodType<CopyLeverageMode | (string & {}), unknown, z.core.$ZodTypeInternals<CopyLeverageMode | (string & {}), unknown>>;
|
|
298
298
|
fixedLeverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
299
|
allocation: z.ZodString;
|
|
300
300
|
slPct: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -304,11 +304,11 @@ export declare const GetFollowResponseSchema: z.ZodObject<{
|
|
|
304
304
|
copyRiskBucketId: z.ZodString;
|
|
305
305
|
startedAt: z.ZodString;
|
|
306
306
|
stoppedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
307
|
-
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<(string & {})
|
|
307
|
+
stopReason: z.ZodOptional<z.ZodNullable<z.ZodType<CopyStopReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopyStopReason | (string & {}), unknown>>>>;
|
|
308
308
|
}, z.core.$strip>;
|
|
309
309
|
recentSkips: z.ZodArray<z.ZodObject<{
|
|
310
310
|
tradingPairId: z.ZodString;
|
|
311
|
-
reason: z.ZodType<(string & {})
|
|
311
|
+
reason: z.ZodType<CopySkipReason | (string & {}), unknown, z.core.$ZodTypeInternals<CopySkipReason | (string & {}), unknown>>;
|
|
312
312
|
requestedQuantity: z.ZodString;
|
|
313
313
|
skippedAt: z.ZodString;
|
|
314
314
|
}, z.core.$strip>>;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -77,7 +77,8 @@ export interface SDKConfig {
|
|
|
77
77
|
/**
|
|
78
78
|
* WebSocket reconnect/resync configuration. The `onStatusChange` /
|
|
79
79
|
* `onResync` callbacks and the reconnect knobs (`autoReconnect`,
|
|
80
|
-
* `maxReconnectAttempts`, `reconnectBaseDelayMs`, `connectionTimeoutMs
|
|
80
|
+
* `maxReconnectAttempts`, `reconnectBaseDelayMs`, `connectionTimeoutMs`,
|
|
81
|
+
* `idleTimeoutMs`) are
|
|
81
82
|
* threaded into the WebSocket client the SDK builds internally, so an app can
|
|
82
83
|
* observe connection status and drive snapshot resyncs without dropping to
|
|
83
84
|
* the low-level `createMonacoWebSocket` factory. The session keypair is not
|
|
@@ -30,23 +30,23 @@ export declare const TraderCodeResponseSchema: z.ZodObject<{
|
|
|
30
30
|
* advisory availability check. Empty/absent when the handle is available.
|
|
31
31
|
*/
|
|
32
32
|
export declare const TraderCodeAvailabilityReasonSchema: z.ZodEnum<{
|
|
33
|
-
taken: "taken";
|
|
34
|
-
too_short: "too_short";
|
|
35
|
-
too_long: "too_long";
|
|
36
|
-
reserved: "reserved";
|
|
37
33
|
invalid_char: "invalid_char";
|
|
38
34
|
looks_like_address: "looks_like_address";
|
|
35
|
+
reserved: "reserved";
|
|
36
|
+
taken: "taken";
|
|
37
|
+
too_long: "too_long";
|
|
38
|
+
too_short: "too_short";
|
|
39
39
|
}>;
|
|
40
40
|
/** Schema for the custom TraderCode availability check response. */
|
|
41
41
|
export declare const TraderCodeAvailabilityResponseSchema: z.ZodObject<{
|
|
42
42
|
available: z.ZodBoolean;
|
|
43
43
|
reason: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
taken: "taken";
|
|
45
|
-
too_short: "too_short";
|
|
46
|
-
too_long: "too_long";
|
|
47
|
-
reserved: "reserved";
|
|
48
44
|
invalid_char: "invalid_char";
|
|
49
45
|
looks_like_address: "looks_like_address";
|
|
46
|
+
reserved: "reserved";
|
|
47
|
+
taken: "taken";
|
|
48
|
+
too_long: "too_long";
|
|
49
|
+
too_short: "too_short";
|
|
50
50
|
}>>>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
/** Schema for the set-custom-TraderCode request params (claim or edit). */
|
|
@@ -30,18 +30,18 @@ export declare const UpsertFollowSchema: z.ZodObject<{
|
|
|
30
30
|
followId: z.ZodOptional<z.ZodUUID>;
|
|
31
31
|
leader: z.ZodOptional<z.ZodString>;
|
|
32
32
|
marginModePolicy: z.ZodOptional<z.ZodEnum<{
|
|
33
|
-
ISOLATED: "ISOLATED";
|
|
34
33
|
CROSS: "CROSS";
|
|
35
34
|
FOLLOW: "FOLLOW";
|
|
35
|
+
ISOLATED: "ISOLATED";
|
|
36
36
|
}>>;
|
|
37
37
|
sizingMode: z.ZodOptional<z.ZodEnum<{
|
|
38
|
-
PROPORTIONAL: "PROPORTIONAL";
|
|
39
38
|
FIXED_MARGIN: "FIXED_MARGIN";
|
|
39
|
+
PROPORTIONAL: "PROPORTIONAL";
|
|
40
40
|
}>>;
|
|
41
41
|
sizingParam: z.ZodOptional<z.ZodString>;
|
|
42
42
|
leverageMode: z.ZodOptional<z.ZodEnum<{
|
|
43
|
-
FOLLOW: "FOLLOW";
|
|
44
43
|
FIXED: "FIXED";
|
|
44
|
+
FOLLOW: "FOLLOW";
|
|
45
45
|
}>>;
|
|
46
46
|
fixedLeverage: z.ZodOptional<z.ZodString>;
|
|
47
47
|
allocation: z.ZodString;
|
|
@@ -53,18 +53,18 @@ export declare const UpsertFollowSchema: z.ZodObject<{
|
|
|
53
53
|
export declare const PreviewFollowSchema: z.ZodObject<{
|
|
54
54
|
leader: z.ZodString;
|
|
55
55
|
marginModePolicy: z.ZodOptional<z.ZodEnum<{
|
|
56
|
-
ISOLATED: "ISOLATED";
|
|
57
56
|
CROSS: "CROSS";
|
|
58
57
|
FOLLOW: "FOLLOW";
|
|
58
|
+
ISOLATED: "ISOLATED";
|
|
59
59
|
}>>;
|
|
60
60
|
sizingMode: z.ZodOptional<z.ZodEnum<{
|
|
61
|
-
PROPORTIONAL: "PROPORTIONAL";
|
|
62
61
|
FIXED_MARGIN: "FIXED_MARGIN";
|
|
62
|
+
PROPORTIONAL: "PROPORTIONAL";
|
|
63
63
|
}>>;
|
|
64
64
|
sizingParam: z.ZodOptional<z.ZodString>;
|
|
65
65
|
leverageMode: z.ZodOptional<z.ZodEnum<{
|
|
66
|
-
FOLLOW: "FOLLOW";
|
|
67
66
|
FIXED: "FIXED";
|
|
67
|
+
FOLLOW: "FOLLOW";
|
|
68
68
|
}>>;
|
|
69
69
|
fixedLeverage: z.ZodOptional<z.ZodString>;
|
|
70
70
|
allocation: z.ZodString;
|
|
@@ -85,16 +85,16 @@ export declare const ListLeadTradersSchema: z.ZodObject<{
|
|
|
85
85
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
86
86
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
87
87
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
roi: "roi";
|
|
89
|
-
pnl: "pnl";
|
|
90
|
-
followers: "followers";
|
|
91
88
|
allocated: "allocated";
|
|
92
89
|
aum: "aum";
|
|
90
|
+
followers: "followers";
|
|
91
|
+
pnl: "pnl";
|
|
92
|
+
roi: "roi";
|
|
93
93
|
win_rate: "win_rate";
|
|
94
94
|
}>>;
|
|
95
95
|
window: z.ZodOptional<z.ZodEnum<{
|
|
96
|
-
"7d": "7d";
|
|
97
96
|
"30d": "30d";
|
|
97
|
+
"7d": "7d";
|
|
98
98
|
"90d": "90d";
|
|
99
99
|
all: "all";
|
|
100
100
|
}>>;
|
|
@@ -27,8 +27,8 @@ export declare const TransferCollateralSchema: z.ZodObject<{
|
|
|
27
27
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
28
28
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
29
29
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
ISOLATED: "ISOLATED";
|
|
31
30
|
CROSS: "CROSS";
|
|
31
|
+
ISOLATED: "ISOLATED";
|
|
32
32
|
}>>;
|
|
33
33
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
34
34
|
}, z.core.$strip>;
|
|
@@ -43,8 +43,8 @@ export declare const TransferCollateralToParentMarginAccountSchema: z.ZodObject<
|
|
|
43
43
|
export declare const TransferCollateralToRiskBucketSchema: z.ZodObject<{
|
|
44
44
|
request: z.ZodPipe<z.ZodObject<{
|
|
45
45
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
ISOLATED: "ISOLATED";
|
|
47
46
|
CROSS: "CROSS";
|
|
47
|
+
ISOLATED: "ISOLATED";
|
|
48
48
|
}>>;
|
|
49
49
|
selectedTradingPairIds: z.ZodOptional<z.ZodUnknown>;
|
|
50
50
|
}, z.core.$loose>, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -98,8 +98,8 @@ export declare const SimulateOrderRiskSchema: z.ZodObject<{
|
|
|
98
98
|
}>;
|
|
99
99
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
100
100
|
LONG: "LONG";
|
|
101
|
-
SHORT: "SHORT";
|
|
102
101
|
NONE: "NONE";
|
|
102
|
+
SHORT: "SHORT";
|
|
103
103
|
}>>;
|
|
104
104
|
orderType: z.ZodEnum<{
|
|
105
105
|
LIMIT: "LIMIT";
|
|
@@ -121,8 +121,8 @@ export declare const SimulateParentMarginOrderRiskSchema: z.ZodObject<{
|
|
|
121
121
|
}>;
|
|
122
122
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
123
123
|
LONG: "LONG";
|
|
124
|
-
SHORT: "SHORT";
|
|
125
124
|
NONE: "NONE";
|
|
125
|
+
SHORT: "SHORT";
|
|
126
126
|
}>>;
|
|
127
127
|
orderType: z.ZodEnum<{
|
|
128
128
|
LIMIT: "LIMIT";
|
|
@@ -138,19 +138,25 @@ export declare const SimulateParentMarginOrderRiskSchema: z.ZodObject<{
|
|
|
138
138
|
export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
|
|
139
139
|
request: z.ZodPipe<z.ZodObject<{
|
|
140
140
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
141
|
-
ISOLATED: "ISOLATED";
|
|
142
141
|
CROSS: "CROSS";
|
|
142
|
+
ISOLATED: "ISOLATED";
|
|
143
143
|
}>>;
|
|
144
144
|
selectedTradingPairIds: z.ZodOptional<z.ZodUnknown>;
|
|
145
145
|
}, z.core.$loose>, z.ZodUnion<readonly [z.ZodObject<{
|
|
146
|
+
tradingPairId: z.ZodUUID;
|
|
147
|
+
strategyKey: z.ZodOptional<z.ZodString>;
|
|
148
|
+
marginMode: z.ZodOptional<z.ZodLiteral<"ISOLATED">>;
|
|
149
|
+
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
150
|
+
selectedTradingPairIds: z.ZodOptional<z.ZodNever>;
|
|
151
|
+
applyToPositionMargin: z.ZodOptional<z.ZodBoolean>;
|
|
146
152
|
side: z.ZodEnum<{
|
|
147
153
|
BUY: "BUY";
|
|
148
154
|
SELL: "SELL";
|
|
149
155
|
}>;
|
|
150
156
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
151
157
|
LONG: "LONG";
|
|
152
|
-
SHORT: "SHORT";
|
|
153
158
|
NONE: "NONE";
|
|
159
|
+
SHORT: "SHORT";
|
|
154
160
|
}>>;
|
|
155
161
|
orderType: z.ZodEnum<{
|
|
156
162
|
LIMIT: "LIMIT";
|
|
@@ -161,13 +167,11 @@ export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
|
|
|
161
167
|
leverage: z.ZodOptional<z.ZodString>;
|
|
162
168
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
163
169
|
slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
marginMode: z.ZodOptional<z.ZodLiteral<"ISOLATED">>;
|
|
170
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
171
|
+
marginMode: z.ZodLiteral<"CROSS">;
|
|
167
172
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
168
173
|
selectedTradingPairIds: z.ZodOptional<z.ZodNever>;
|
|
169
|
-
|
|
170
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
strategyKey: z.ZodOptional<z.ZodNever>;
|
|
171
175
|
tradingPairId: z.ZodUUID;
|
|
172
176
|
side: z.ZodEnum<{
|
|
173
177
|
BUY: "BUY";
|
|
@@ -175,8 +179,8 @@ export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
|
|
|
175
179
|
}>;
|
|
176
180
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
177
181
|
LONG: "LONG";
|
|
178
|
-
SHORT: "SHORT";
|
|
179
182
|
NONE: "NONE";
|
|
183
|
+
SHORT: "SHORT";
|
|
180
184
|
}>>;
|
|
181
185
|
orderType: z.ZodEnum<{
|
|
182
186
|
LIMIT: "LIMIT";
|
|
@@ -187,10 +191,6 @@ export declare const SimulateRiskBucketOrderRiskSchema: z.ZodObject<{
|
|
|
187
191
|
leverage: z.ZodOptional<z.ZodString>;
|
|
188
192
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
189
193
|
slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
|
|
190
|
-
marginMode: z.ZodLiteral<"CROSS">;
|
|
191
|
-
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
192
|
-
selectedTradingPairIds: z.ZodOptional<z.ZodNever>;
|
|
193
|
-
strategyKey: z.ZodOptional<z.ZodNever>;
|
|
194
194
|
}, z.core.$strict>]>>;
|
|
195
195
|
}, z.core.$strip>;
|
|
196
196
|
export declare const CreateMarginSubAccountSchema: z.ZodObject<{
|
|
@@ -6,15 +6,15 @@ import { z } from "zod";
|
|
|
6
6
|
* Candlestick interval validation
|
|
7
7
|
*/
|
|
8
8
|
export declare const IntervalSchema: z.ZodEnum<{
|
|
9
|
-
"1m": "1m";
|
|
10
|
-
"5m": "5m";
|
|
11
9
|
"15m": "15m";
|
|
12
|
-
"
|
|
13
|
-
"4h": "4h";
|
|
10
|
+
"1M": "1M";
|
|
14
11
|
"1d": "1d";
|
|
12
|
+
"1h": "1h";
|
|
13
|
+
"1m": "1m";
|
|
15
14
|
"1w": "1w";
|
|
16
15
|
"30m": "30m";
|
|
17
|
-
"
|
|
16
|
+
"4h": "4h";
|
|
17
|
+
"5m": "5m";
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
20
20
|
* Timestamp validation (milliseconds since epoch)
|
|
@@ -74,15 +74,15 @@ export declare const TimestampSchema: z.ZodNumber;
|
|
|
74
74
|
export declare const GetCandlesticksSchema: z.ZodObject<{
|
|
75
75
|
tradingPairId: z.ZodUUID;
|
|
76
76
|
interval: z.ZodEnum<{
|
|
77
|
-
"1m": "1m";
|
|
78
|
-
"5m": "5m";
|
|
79
77
|
"15m": "15m";
|
|
80
|
-
"
|
|
81
|
-
"4h": "4h";
|
|
78
|
+
"1M": "1M";
|
|
82
79
|
"1d": "1d";
|
|
80
|
+
"1h": "1h";
|
|
81
|
+
"1m": "1m";
|
|
83
82
|
"1w": "1w";
|
|
84
83
|
"30m": "30m";
|
|
85
|
-
"
|
|
84
|
+
"4h": "4h";
|
|
85
|
+
"5m": "5m";
|
|
86
86
|
}>;
|
|
87
87
|
startTime: z.ZodNumber;
|
|
88
88
|
endTime: z.ZodNumber;
|
|
@@ -158,22 +158,22 @@ export declare const CandlestickLimitSchema: z.ZodOptional<z.ZodNumber>;
|
|
|
158
158
|
export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
|
|
159
159
|
tradingPairId: z.ZodUUID;
|
|
160
160
|
interval: z.ZodEnum<{
|
|
161
|
-
"1m": "1m";
|
|
162
|
-
"5m": "5m";
|
|
163
161
|
"15m": "15m";
|
|
164
|
-
"
|
|
165
|
-
"4h": "4h";
|
|
162
|
+
"1M": "1M";
|
|
166
163
|
"1d": "1d";
|
|
164
|
+
"1h": "1h";
|
|
165
|
+
"1m": "1m";
|
|
167
166
|
"1w": "1w";
|
|
168
167
|
"30m": "30m";
|
|
169
|
-
"
|
|
168
|
+
"4h": "4h";
|
|
169
|
+
"5m": "5m";
|
|
170
170
|
}>;
|
|
171
171
|
startTime: z.ZodOptional<z.ZodNumber>;
|
|
172
172
|
endTime: z.ZodOptional<z.ZodNumber>;
|
|
173
173
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
174
174
|
priceType: z.ZodOptional<z.ZodEnum<{
|
|
175
|
-
trade: "trade";
|
|
176
175
|
mark: "mark";
|
|
176
|
+
trade: "trade";
|
|
177
177
|
}>>;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
179
|
/**
|
|
@@ -182,22 +182,22 @@ export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
|
|
|
182
182
|
export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
|
|
183
183
|
tradingPairId: z.ZodUUID;
|
|
184
184
|
interval: z.ZodEnum<{
|
|
185
|
-
"1m": "1m";
|
|
186
|
-
"5m": "5m";
|
|
187
185
|
"15m": "15m";
|
|
188
|
-
"
|
|
189
|
-
"4h": "4h";
|
|
186
|
+
"1M": "1M";
|
|
190
187
|
"1d": "1d";
|
|
188
|
+
"1h": "1h";
|
|
189
|
+
"1m": "1m";
|
|
191
190
|
"1w": "1w";
|
|
192
191
|
"30m": "30m";
|
|
193
|
-
"
|
|
192
|
+
"4h": "4h";
|
|
193
|
+
"5m": "5m";
|
|
194
194
|
}>;
|
|
195
195
|
startTime: z.ZodOptional<z.ZodNumber>;
|
|
196
196
|
endTime: z.ZodOptional<z.ZodNumber>;
|
|
197
197
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
198
198
|
priceType: z.ZodOptional<z.ZodEnum<{
|
|
199
|
-
trade: "trade";
|
|
200
199
|
mark: "mark";
|
|
200
|
+
trade: "trade";
|
|
201
201
|
}>>;
|
|
202
202
|
}, z.core.$strip>;
|
|
203
203
|
/**
|
|
@@ -9,10 +9,10 @@ export declare const ListPositionsSchema: z.ZodObject<{
|
|
|
9
9
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
10
10
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
11
11
|
status: z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
OPEN: "OPEN";
|
|
13
12
|
CLOSED: "CLOSED";
|
|
14
|
-
LIQUIDATING: "LIQUIDATING";
|
|
15
13
|
LIQUIDATED: "LIQUIDATED";
|
|
14
|
+
LIQUIDATING: "LIQUIDATING";
|
|
15
|
+
OPEN: "OPEN";
|
|
16
16
|
}>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export declare const GetPositionSchema: z.ZodObject<{
|
|
@@ -22,9 +22,9 @@ export declare const ClosePositionSchema: z.ZodObject<{
|
|
|
22
22
|
positionId: z.ZodUUID;
|
|
23
23
|
request: z.ZodObject<{
|
|
24
24
|
closeType: z.ZodEnum<{
|
|
25
|
+
IOC: "IOC";
|
|
25
26
|
LIMIT: "LIMIT";
|
|
26
27
|
MARKET: "MARKET";
|
|
27
|
-
IOC: "IOC";
|
|
28
28
|
}>;
|
|
29
29
|
limitPrice: z.ZodOptional<z.ZodString>;
|
|
30
30
|
slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
|
|
@@ -102,12 +102,12 @@ export declare const GetPositionPnlHistorySchema: z.ZodObject<{
|
|
|
102
102
|
positionId: z.ZodUUID;
|
|
103
103
|
params: z.ZodObject<{
|
|
104
104
|
interval: z.ZodEnum<{
|
|
105
|
-
"1m": "1m";
|
|
106
|
-
"5m": "5m";
|
|
107
105
|
"15m": "15m";
|
|
106
|
+
"1d": "1d";
|
|
108
107
|
"1h": "1h";
|
|
108
|
+
"1m": "1m";
|
|
109
109
|
"4h": "4h";
|
|
110
|
-
"
|
|
110
|
+
"5m": "5m";
|
|
111
111
|
}>;
|
|
112
112
|
startTime: z.ZodOptional<z.ZodNumber>;
|
|
113
113
|
endTime: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11,22 +11,22 @@ import { z } from "zod";
|
|
|
11
11
|
export declare const LedgerEntryTypeSchema: z.ZodEnum<{
|
|
12
12
|
CREDIT: "CREDIT";
|
|
13
13
|
DEBIT: "DEBIT";
|
|
14
|
+
FEE: "FEE";
|
|
14
15
|
LOCK: "LOCK";
|
|
15
16
|
UNLOCK: "UNLOCK";
|
|
16
|
-
FEE: "FEE";
|
|
17
17
|
}>;
|
|
18
18
|
/**
|
|
19
19
|
* Transaction type validation
|
|
20
20
|
*/
|
|
21
21
|
export declare const TransactionTypeSchema: z.ZodEnum<{
|
|
22
|
-
LIQUIDATION: "LIQUIDATION";
|
|
23
|
-
FEE: "FEE";
|
|
24
22
|
DEPOSIT: "DEPOSIT";
|
|
25
|
-
|
|
26
|
-
TRADE: "TRADE";
|
|
23
|
+
FEE: "FEE";
|
|
27
24
|
FUNDING: "FUNDING";
|
|
28
25
|
INTEREST: "INTEREST";
|
|
26
|
+
LIQUIDATION: "LIQUIDATION";
|
|
29
27
|
REWARD: "REWARD";
|
|
28
|
+
TRADE: "TRADE";
|
|
29
|
+
WITHDRAWAL: "WITHDRAWAL";
|
|
30
30
|
}>;
|
|
31
31
|
/**
|
|
32
32
|
* Set Self-Trade-Prevention Default validation schema
|
|
@@ -35,9 +35,9 @@ export declare const TransactionTypeSchema: z.ZodEnum<{
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const SetSelfTradePreventionDefaultSchema: z.ZodObject<{
|
|
37
37
|
mode: z.ZodEnum<{
|
|
38
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
38
39
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
39
40
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
40
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
41
41
|
SKIP: "SKIP";
|
|
42
42
|
}>;
|
|
43
43
|
}, z.core.$strip>;
|
|
@@ -58,19 +58,19 @@ export declare const GetUserMovementsSchema: z.ZodObject<{
|
|
|
58
58
|
entryType: z.ZodOptional<z.ZodEnum<{
|
|
59
59
|
CREDIT: "CREDIT";
|
|
60
60
|
DEBIT: "DEBIT";
|
|
61
|
+
FEE: "FEE";
|
|
61
62
|
LOCK: "LOCK";
|
|
62
63
|
UNLOCK: "UNLOCK";
|
|
63
|
-
FEE: "FEE";
|
|
64
64
|
}>>;
|
|
65
65
|
transactionType: z.ZodOptional<z.ZodEnum<{
|
|
66
|
-
LIQUIDATION: "LIQUIDATION";
|
|
67
|
-
FEE: "FEE";
|
|
68
66
|
DEPOSIT: "DEPOSIT";
|
|
69
|
-
|
|
70
|
-
TRADE: "TRADE";
|
|
67
|
+
FEE: "FEE";
|
|
71
68
|
FUNDING: "FUNDING";
|
|
72
69
|
INTEREST: "INTEREST";
|
|
70
|
+
LIQUIDATION: "LIQUIDATION";
|
|
73
71
|
REWARD: "REWARD";
|
|
72
|
+
TRADE: "TRADE";
|
|
73
|
+
WITHDRAWAL: "WITHDRAWAL";
|
|
74
74
|
}>>;
|
|
75
75
|
assetId: z.ZodOptional<z.ZodUUID>;
|
|
76
76
|
}, z.core.$strip>;
|
|
@@ -16,28 +16,28 @@ export declare const OrderSideSchema: z.ZodEnum<{
|
|
|
16
16
|
* Trading mode validation
|
|
17
17
|
*/
|
|
18
18
|
export declare const TradingModeSchema: z.ZodEnum<{
|
|
19
|
-
SPOT: "SPOT";
|
|
20
19
|
MARGIN: "MARGIN";
|
|
20
|
+
SPOT: "SPOT";
|
|
21
21
|
}>;
|
|
22
22
|
export declare const MarginModeSchema: z.ZodEnum<{
|
|
23
|
-
ISOLATED: "ISOLATED";
|
|
24
23
|
CROSS: "CROSS";
|
|
24
|
+
ISOLATED: "ISOLATED";
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
27
27
|
* Position side validation
|
|
28
28
|
*/
|
|
29
29
|
export declare const PositionSideSchema: z.ZodEnum<{
|
|
30
30
|
LONG: "LONG";
|
|
31
|
-
SHORT: "SHORT";
|
|
32
31
|
NONE: "NONE";
|
|
32
|
+
SHORT: "SHORT";
|
|
33
33
|
}>;
|
|
34
34
|
/**
|
|
35
35
|
* Time in force validation
|
|
36
36
|
*/
|
|
37
37
|
export declare const TimeInForceSchema: z.ZodEnum<{
|
|
38
|
+
FOK: "FOK";
|
|
38
39
|
GTC: "GTC";
|
|
39
40
|
IOC: "IOC";
|
|
40
|
-
FOK: "FOK";
|
|
41
41
|
}>;
|
|
42
42
|
export declare const ConditionalTimeInForceSchema: z.ZodEnum<{
|
|
43
43
|
GTC: "GTC";
|
|
@@ -47,9 +47,9 @@ export declare const ConditionalTimeInForceSchema: z.ZodEnum<{
|
|
|
47
47
|
* Per-order self-trade-prevention override validation
|
|
48
48
|
*/
|
|
49
49
|
export declare const SelfTradePreventionModeSchema: z.ZodEnum<{
|
|
50
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
50
51
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
51
52
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
52
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
53
53
|
SKIP: "SKIP";
|
|
54
54
|
}>;
|
|
55
55
|
/**
|
|
@@ -141,36 +141,36 @@ export declare const PlaceLimitOrderSchema: z.ZodObject<{
|
|
|
141
141
|
options: z.ZodOptional<z.ZodObject<{
|
|
142
142
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
143
143
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
144
|
-
SPOT: "SPOT";
|
|
145
144
|
MARGIN: "MARGIN";
|
|
145
|
+
SPOT: "SPOT";
|
|
146
146
|
}>>;
|
|
147
147
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
148
148
|
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
149
149
|
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
FOK: "FOK";
|
|
150
151
|
GTC: "GTC";
|
|
151
152
|
IOC: "IOC";
|
|
152
|
-
FOK: "FOK";
|
|
153
153
|
}>>;
|
|
154
154
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
155
155
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
156
|
-
ISOLATED: "ISOLATED";
|
|
157
156
|
CROSS: "CROSS";
|
|
157
|
+
ISOLATED: "ISOLATED";
|
|
158
158
|
}>>;
|
|
159
159
|
riskBucketId: z.ZodOptional<z.ZodUUID>;
|
|
160
160
|
riskBucketCollateral: z.ZodOptional<z.ZodString>;
|
|
161
161
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
162
162
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
163
163
|
LONG: "LONG";
|
|
164
|
-
SHORT: "SHORT";
|
|
165
164
|
NONE: "NONE";
|
|
165
|
+
SHORT: "SHORT";
|
|
166
166
|
}>>;
|
|
167
167
|
leverage: z.ZodOptional<z.ZodString>;
|
|
168
168
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
169
169
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
170
170
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
171
172
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
172
173
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
173
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
174
174
|
SKIP: "SKIP";
|
|
175
175
|
}>>;
|
|
176
176
|
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
@@ -228,29 +228,29 @@ export declare const PlaceMarketOrderSchema: z.ZodObject<{
|
|
|
228
228
|
options: z.ZodOptional<z.ZodObject<{
|
|
229
229
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
230
230
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
231
|
-
SPOT: "SPOT";
|
|
232
231
|
MARGIN: "MARGIN";
|
|
232
|
+
SPOT: "SPOT";
|
|
233
233
|
}>>;
|
|
234
234
|
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
235
235
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
236
236
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
237
|
-
ISOLATED: "ISOLATED";
|
|
238
237
|
CROSS: "CROSS";
|
|
238
|
+
ISOLATED: "ISOLATED";
|
|
239
239
|
}>>;
|
|
240
240
|
riskBucketId: z.ZodOptional<z.ZodUUID>;
|
|
241
241
|
riskBucketCollateral: z.ZodOptional<z.ZodString>;
|
|
242
242
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
243
243
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
244
244
|
LONG: "LONG";
|
|
245
|
-
SHORT: "SHORT";
|
|
246
245
|
NONE: "NONE";
|
|
246
|
+
SHORT: "SHORT";
|
|
247
247
|
}>>;
|
|
248
248
|
leverage: z.ZodOptional<z.ZodString>;
|
|
249
249
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
250
250
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
251
252
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
252
253
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
253
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
254
254
|
SKIP: "SKIP";
|
|
255
255
|
}>>;
|
|
256
256
|
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
@@ -318,9 +318,9 @@ export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
|
318
318
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
319
319
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
320
320
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
321
322
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
322
323
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
323
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
324
324
|
SKIP: "SKIP";
|
|
325
325
|
}>>;
|
|
326
326
|
}, z.core.$strip>;
|
|
@@ -337,28 +337,28 @@ export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
|
337
337
|
export declare const GetPaginatedOrdersSchema: z.ZodObject<{
|
|
338
338
|
page: z.ZodOptional<z.ZodNever>;
|
|
339
339
|
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
340
|
-
SUBMITTED: "SUBMITTED";
|
|
341
|
-
PARTIALLY_FILLED: "PARTIALLY_FILLED";
|
|
342
|
-
FILLED: "FILLED";
|
|
343
|
-
SETTLED_ON_CHAIN: "SETTLED_ON_CHAIN";
|
|
344
|
-
SETTLED: "SETTLED";
|
|
345
340
|
CANCELLED: "CANCELLED";
|
|
346
|
-
REJECTED: "REJECTED";
|
|
347
341
|
EXPIRED: "EXPIRED";
|
|
348
|
-
}>, z.ZodArray<z.ZodEnum<{
|
|
349
|
-
SUBMITTED: "SUBMITTED";
|
|
350
|
-
PARTIALLY_FILLED: "PARTIALLY_FILLED";
|
|
351
342
|
FILLED: "FILLED";
|
|
352
|
-
|
|
343
|
+
PARTIALLY_FILLED: "PARTIALLY_FILLED";
|
|
344
|
+
REJECTED: "REJECTED";
|
|
353
345
|
SETTLED: "SETTLED";
|
|
346
|
+
SETTLED_ON_CHAIN: "SETTLED_ON_CHAIN";
|
|
347
|
+
SUBMITTED: "SUBMITTED";
|
|
348
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
354
349
|
CANCELLED: "CANCELLED";
|
|
355
|
-
REJECTED: "REJECTED";
|
|
356
350
|
EXPIRED: "EXPIRED";
|
|
351
|
+
FILLED: "FILLED";
|
|
352
|
+
PARTIALLY_FILLED: "PARTIALLY_FILLED";
|
|
353
|
+
REJECTED: "REJECTED";
|
|
354
|
+
SETTLED: "SETTLED";
|
|
355
|
+
SETTLED_ON_CHAIN: "SETTLED_ON_CHAIN";
|
|
356
|
+
SUBMITTED: "SUBMITTED";
|
|
357
357
|
}>>]>>;
|
|
358
358
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
359
359
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
360
|
-
SPOT: "SPOT";
|
|
361
360
|
MARGIN: "MARGIN";
|
|
361
|
+
SPOT: "SPOT";
|
|
362
362
|
}>>;
|
|
363
363
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
364
364
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -373,13 +373,13 @@ export declare const ConditionalOrderTriggerSourceSchema: z.ZodEnum<{
|
|
|
373
373
|
MARK_PRICE: "MARK_PRICE";
|
|
374
374
|
}>;
|
|
375
375
|
export declare const ConditionalOrderStateSchema: z.ZodEnum<{
|
|
376
|
+
ACTIVE: "ACTIVE";
|
|
376
377
|
CANCELLED: "CANCELLED";
|
|
377
378
|
EXPIRED: "EXPIRED";
|
|
378
379
|
FAILED: "FAILED";
|
|
379
380
|
PENDING_PARENT: "PENDING_PARENT";
|
|
380
|
-
ACTIVE: "ACTIVE";
|
|
381
|
-
TRIGGERING: "TRIGGERING";
|
|
382
381
|
TRIGGERED: "TRIGGERED";
|
|
382
|
+
TRIGGERING: "TRIGGERING";
|
|
383
383
|
}>;
|
|
384
384
|
export declare const ClosePositionSideSchema: z.ZodEnum<{
|
|
385
385
|
LONG: "LONG";
|
|
@@ -393,22 +393,22 @@ export declare const ListConditionalOrdersSchema: z.ZodObject<{
|
|
|
393
393
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
394
394
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
395
395
|
state: z.ZodOptional<z.ZodEnum<{
|
|
396
|
+
ACTIVE: "ACTIVE";
|
|
396
397
|
CANCELLED: "CANCELLED";
|
|
397
398
|
EXPIRED: "EXPIRED";
|
|
398
399
|
FAILED: "FAILED";
|
|
399
400
|
PENDING_PARENT: "PENDING_PARENT";
|
|
400
|
-
ACTIVE: "ACTIVE";
|
|
401
|
-
TRIGGERING: "TRIGGERING";
|
|
402
401
|
TRIGGERED: "TRIGGERED";
|
|
402
|
+
TRIGGERING: "TRIGGERING";
|
|
403
403
|
}>>;
|
|
404
404
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
405
405
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
406
406
|
}, z.core.$strip>;
|
|
407
407
|
export declare const TwapOrderStateSchema: z.ZodEnum<{
|
|
408
|
-
CANCELLED: "CANCELLED";
|
|
409
408
|
ACTIVE: "ACTIVE";
|
|
410
|
-
|
|
409
|
+
CANCELLED: "CANCELLED";
|
|
411
410
|
COMPLETED: "COMPLETED";
|
|
411
|
+
PENDING: "PENDING";
|
|
412
412
|
}>;
|
|
413
413
|
export declare const CreateTwapOrderSchema: z.ZodObject<{
|
|
414
414
|
tradingPairId: z.ZodUUID;
|
|
@@ -425,19 +425,19 @@ export declare const CreateTwapOrderSchema: z.ZodObject<{
|
|
|
425
425
|
slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
|
|
426
426
|
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
427
427
|
executionStyle: z.ZodOptional<z.ZodEnum<{
|
|
428
|
-
TAKER: "TAKER";
|
|
429
428
|
PASSIVE: "PASSIVE";
|
|
429
|
+
TAKER: "TAKER";
|
|
430
430
|
}>>;
|
|
431
431
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
432
432
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
433
|
-
SPOT: "SPOT";
|
|
434
433
|
MARGIN: "MARGIN";
|
|
434
|
+
SPOT: "SPOT";
|
|
435
435
|
}>>;
|
|
436
436
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
437
437
|
riskBucketId: z.ZodOptional<z.ZodUUID>;
|
|
438
438
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
439
|
-
ISOLATED: "ISOLATED";
|
|
440
439
|
CROSS: "CROSS";
|
|
440
|
+
ISOLATED: "ISOLATED";
|
|
441
441
|
}>>;
|
|
442
442
|
leverage: z.ZodOptional<z.ZodString>;
|
|
443
443
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
@@ -457,10 +457,10 @@ export declare const CancelTwapOrderSchema: z.ZodObject<{
|
|
|
457
457
|
export declare const ListTwapOrdersSchema: z.ZodObject<{
|
|
458
458
|
page: z.ZodOptional<z.ZodNever>;
|
|
459
459
|
state: z.ZodOptional<z.ZodEnum<{
|
|
460
|
-
CANCELLED: "CANCELLED";
|
|
461
460
|
ACTIVE: "ACTIVE";
|
|
462
|
-
|
|
461
|
+
CANCELLED: "CANCELLED";
|
|
463
462
|
COMPLETED: "COMPLETED";
|
|
463
|
+
PENDING: "PENDING";
|
|
464
464
|
}>>;
|
|
465
465
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
466
466
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -497,37 +497,37 @@ export declare const BatchCreateOrderItemSchema: z.ZodObject<{
|
|
|
497
497
|
quantity: z.ZodString;
|
|
498
498
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
499
499
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
500
|
-
SPOT: "SPOT";
|
|
501
500
|
MARGIN: "MARGIN";
|
|
501
|
+
SPOT: "SPOT";
|
|
502
502
|
}>>;
|
|
503
503
|
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
504
504
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
505
505
|
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
506
506
|
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
507
|
+
FOK: "FOK";
|
|
507
508
|
GTC: "GTC";
|
|
508
509
|
IOC: "IOC";
|
|
509
|
-
FOK: "FOK";
|
|
510
510
|
}>>;
|
|
511
511
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
512
512
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
513
|
-
ISOLATED: "ISOLATED";
|
|
514
513
|
CROSS: "CROSS";
|
|
514
|
+
ISOLATED: "ISOLATED";
|
|
515
515
|
}>>;
|
|
516
516
|
riskBucketId: z.ZodOptional<z.ZodUUID>;
|
|
517
517
|
riskBucketCollateral: z.ZodOptional<z.ZodString>;
|
|
518
518
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
519
519
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
520
520
|
LONG: "LONG";
|
|
521
|
-
SHORT: "SHORT";
|
|
522
521
|
NONE: "NONE";
|
|
522
|
+
SHORT: "SHORT";
|
|
523
523
|
}>>;
|
|
524
524
|
leverage: z.ZodOptional<z.ZodString>;
|
|
525
525
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
526
526
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
527
527
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
528
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
528
529
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
529
530
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
530
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
531
531
|
SKIP: "SKIP";
|
|
532
532
|
}>>;
|
|
533
533
|
}, z.core.$strip>;
|
|
@@ -557,37 +557,37 @@ export declare const BatchCreateOrdersSchema: z.ZodObject<{
|
|
|
557
557
|
quantity: z.ZodString;
|
|
558
558
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
559
559
|
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
560
|
-
SPOT: "SPOT";
|
|
561
560
|
MARGIN: "MARGIN";
|
|
561
|
+
SPOT: "SPOT";
|
|
562
562
|
}>>;
|
|
563
563
|
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
564
564
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
565
565
|
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
566
566
|
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
567
|
+
FOK: "FOK";
|
|
567
568
|
GTC: "GTC";
|
|
568
569
|
IOC: "IOC";
|
|
569
|
-
FOK: "FOK";
|
|
570
570
|
}>>;
|
|
571
571
|
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
572
572
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
573
|
-
ISOLATED: "ISOLATED";
|
|
574
573
|
CROSS: "CROSS";
|
|
574
|
+
ISOLATED: "ISOLATED";
|
|
575
575
|
}>>;
|
|
576
576
|
riskBucketId: z.ZodOptional<z.ZodUUID>;
|
|
577
577
|
riskBucketCollateral: z.ZodOptional<z.ZodString>;
|
|
578
578
|
strategyKey: z.ZodOptional<z.ZodString>;
|
|
579
579
|
positionSide: z.ZodOptional<z.ZodEnum<{
|
|
580
580
|
LONG: "LONG";
|
|
581
|
-
SHORT: "SHORT";
|
|
582
581
|
NONE: "NONE";
|
|
582
|
+
SHORT: "SHORT";
|
|
583
583
|
}>>;
|
|
584
584
|
leverage: z.ZodOptional<z.ZodString>;
|
|
585
585
|
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
586
586
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
587
587
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
588
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
588
589
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
589
590
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
590
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
591
591
|
SKIP: "SKIP";
|
|
592
592
|
}>>;
|
|
593
593
|
}, z.core.$strip>>;
|
|
@@ -605,9 +605,9 @@ export declare const BatchReplaceOrderItemSchema: z.ZodObject<{
|
|
|
605
605
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
606
606
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
607
607
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
608
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
608
609
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
609
610
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
610
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
611
611
|
SKIP: "SKIP";
|
|
612
612
|
}>>;
|
|
613
613
|
}, z.core.$strip>;
|
|
@@ -624,9 +624,9 @@ export declare const BatchReplaceOrdersSchema: z.ZodObject<{
|
|
|
624
624
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
625
625
|
postOnly: z.ZodOptional<z.ZodBoolean>;
|
|
626
626
|
selfTradePreventionMode: z.ZodOptional<z.ZodEnum<{
|
|
627
|
+
CANCEL_BOTH: "CANCEL_BOTH";
|
|
627
628
|
CANCEL_MAKER: "CANCEL_MAKER";
|
|
628
629
|
CANCEL_TAKER: "CANCEL_TAKER";
|
|
629
|
-
CANCEL_BOTH: "CANCEL_BOTH";
|
|
630
630
|
SKIP: "SKIP";
|
|
631
631
|
}>>;
|
|
632
632
|
}, z.core.$strip>>;
|
|
@@ -45,8 +45,8 @@ export declare const DepositSchema: z.ZodObject<{
|
|
|
45
45
|
amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
|
|
46
46
|
autoWait: z.ZodOptional<z.ZodBoolean>;
|
|
47
47
|
target: z.ZodOptional<z.ZodEnum<{
|
|
48
|
-
spot: "spot";
|
|
49
48
|
margin: "margin";
|
|
49
|
+
spot: "spot";
|
|
50
50
|
}>>;
|
|
51
51
|
options: z.ZodOptional<z.ZodObject<{
|
|
52
52
|
asErc20: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -65,8 +65,8 @@ export declare const WithdrawSchema: z.ZodObject<{
|
|
|
65
65
|
destination: z.ZodString;
|
|
66
66
|
autoWait: z.ZodOptional<z.ZodBoolean>;
|
|
67
67
|
source: z.ZodOptional<z.ZodEnum<{
|
|
68
|
-
spot: "spot";
|
|
69
68
|
margin: "margin";
|
|
69
|
+
spot: "spot";
|
|
70
70
|
}>>;
|
|
71
71
|
}, z.core.$strip>;
|
|
72
72
|
/**
|
package/dist/websocket/base.d.ts
CHANGED
|
@@ -209,6 +209,16 @@ export interface MonacoWebSocketConfig {
|
|
|
209
209
|
* retried, in milliseconds (default: 10000)
|
|
210
210
|
*/
|
|
211
211
|
connectionTimeoutMs?: number;
|
|
212
|
+
/**
|
|
213
|
+
* How long an open connection may deliver nothing at all — no event, no
|
|
214
|
+
* `Pong` to the client's `Ping` — before the client treats it as dead,
|
|
215
|
+
* closes it, and reconnects, in milliseconds (default: 30000). The client
|
|
216
|
+
* pings every third of the window (at most every 15 s), so one lost `Pong`
|
|
217
|
+
* does not drop a live connection.
|
|
218
|
+
* The reopen fires `onResync`, since nothing was delivered while the
|
|
219
|
+
* connection was silent.
|
|
220
|
+
*/
|
|
221
|
+
idleTimeoutMs?: number;
|
|
212
222
|
/**
|
|
213
223
|
* Called on every connection status change, with the attempt context in
|
|
214
224
|
* {@link WebSocketStatusInfo}:
|
|
@@ -42,10 +42,12 @@
|
|
|
42
42
|
* baseline over REST for the extra consumer.
|
|
43
43
|
*
|
|
44
44
|
* Where the server has no snapshot arm for a channel yet, the callback is
|
|
45
|
-
* simply never invoked — a silent no-op, not an error. `
|
|
46
|
-
* `
|
|
47
|
-
* state, and the channel-coverage lock pins that classification against
|
|
48
|
-
* server's own snapshot dispatch. `
|
|
45
|
+
* simply never invoked — a silent no-op, not an error. `movements` and
|
|
46
|
+
* `marketLiquidations` take no `onSnapshot` at all: they stream events rather
|
|
47
|
+
* than state, and the channel-coverage lock pins that classification against
|
|
48
|
+
* the server's own snapshot dispatch. `orderbook` sends one row, the current
|
|
49
|
+
* book in the live event's shape, so `onSnapshot` and the event handler can
|
|
50
|
+
* share one setter. `trades` and `ohlcv` are event streams,
|
|
49
51
|
* but their `onSnapshot` delivers recent history as a baseline. `trades` sends
|
|
50
52
|
* the pair's newest trades, which can overlap the first live trades or miss
|
|
51
53
|
* one executed just before the subscribe, so a consumer dedupes on `tradeId`.
|
|
@@ -89,8 +91,11 @@ export interface MonacoWebSocket {
|
|
|
89
91
|
onSubscriptionChange: (listener: SubscriptionChangeHandler) => () => void;
|
|
90
92
|
/** Subscribe to order events (requires authentication); `onSnapshot` receives every resting order on the pair */
|
|
91
93
|
orders: (tradingPairId: string, tradingMode: TradingMode, handler: MessageHandler<OrderEvent>, onSnapshot?: SnapshotHandler<OrderSnapshotItem>) => () => void;
|
|
92
|
-
/**
|
|
93
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Subscribe to orderbook events (public); `onSnapshot` receives one event, the current book read from the matching
|
|
96
|
+
* engine, in the same shape as a live event. Its `sequence` is 0. A pair or mode with no book gets `[]`.
|
|
97
|
+
*/
|
|
98
|
+
orderbook: (tradingPairId: string, tradingMode: TradingMode, magnitude: number, quotationMode: OrderbookQuotationMode, handler: MessageHandler<OrderbookEvent>, onSnapshot?: SnapshotHandler<OrderbookEvent>) => () => void;
|
|
94
99
|
/**
|
|
95
100
|
* Subscribe to OHLCV candlestick events (public); `onSnapshot` receives the series' newest 350 candles, oldest first.
|
|
96
101
|
* The newest snapshot candle can be partial or missing, so upsert live candles by `T`. A `*` price type gets no snapshot.
|
package/dist/websocket/client.js
CHANGED
|
@@ -42,10 +42,12 @@
|
|
|
42
42
|
* baseline over REST for the extra consumer.
|
|
43
43
|
*
|
|
44
44
|
* Where the server has no snapshot arm for a channel yet, the callback is
|
|
45
|
-
* simply never invoked — a silent no-op, not an error. `
|
|
46
|
-
* `
|
|
47
|
-
* state, and the channel-coverage lock pins that classification against
|
|
48
|
-
* server's own snapshot dispatch. `
|
|
45
|
+
* simply never invoked — a silent no-op, not an error. `movements` and
|
|
46
|
+
* `marketLiquidations` take no `onSnapshot` at all: they stream events rather
|
|
47
|
+
* than state, and the channel-coverage lock pins that classification against
|
|
48
|
+
* the server's own snapshot dispatch. `orderbook` sends one row, the current
|
|
49
|
+
* book in the live event's shape, so `onSnapshot` and the event handler can
|
|
50
|
+
* share one setter. `trades` and `ohlcv` are event streams,
|
|
49
51
|
* but their `onSnapshot` delivers recent history as a baseline. `trades` sends
|
|
50
52
|
* the pair's newest trades, which can overlap the first live trades or miss
|
|
51
53
|
* one executed just before the subscribe, so a consumer dedupes on `tradeId`.
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
* own callback instead of the event handler: reducing both would apply the
|
|
21
21
|
* same state twice, in two different shapes.
|
|
22
22
|
* - **The row type is the channel's own `…EventData`**, so the baseline and the
|
|
23
|
-
* diffs that follow it describe state identically. `orders` is
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* diffs that follow it describe state identically. `orders` is one exception
|
|
24
|
+
* and has its own {@link OrderSnapshotItem}: a resting order carries fields no
|
|
25
|
+
* single order event does (`status` alongside the fill totals) and carries
|
|
26
|
+
* none of the change-only fill metadata. `orderbook` is the other: its one row
|
|
27
|
+
* is a whole `OrderbookEvent`, because every live orderbook event already
|
|
28
|
+
* restates the full book, so the snapshot row and a live event are the same
|
|
29
|
+
* state in the same shape.
|
|
27
30
|
*
|
|
28
31
|
* A channel whose server arm is not implemented yet simply never sends the
|
|
29
32
|
* frame, so its callback is never invoked. That is a silent no-op, never an
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
* own callback instead of the event handler: reducing both would apply the
|
|
21
21
|
* same state twice, in two different shapes.
|
|
22
22
|
* - **The row type is the channel's own `…EventData`**, so the baseline and the
|
|
23
|
-
* diffs that follow it describe state identically. `orders` is
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* diffs that follow it describe state identically. `orders` is one exception
|
|
24
|
+
* and has its own {@link OrderSnapshotItem}: a resting order carries fields no
|
|
25
|
+
* single order event does (`status` alongside the fill totals) and carries
|
|
26
|
+
* none of the change-only fill metadata. `orderbook` is the other: its one row
|
|
27
|
+
* is a whole `OrderbookEvent`, because every live orderbook event already
|
|
28
|
+
* restates the full book, so the snapshot row and a live event are the same
|
|
29
|
+
* state in the same shape.
|
|
27
30
|
*
|
|
28
31
|
* A channel whose server arm is not implemented yet simply never sends the
|
|
29
32
|
* frame, so its callback is never invoked. That is a silent no-op, never an
|
package/dist/wire/schema.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was auto-generated by
|
|
2
|
+
* This file was auto-generated by scripts/gen-wire-schema.ts (`make ts-wire-gen`)
|
|
3
|
+
* from docs/src/proto-openapi/api/openapi.yaml.
|
|
3
4
|
* Do not make direct changes to the file.
|
|
4
5
|
*/
|
|
5
6
|
export interface paths {
|
|
@@ -979,16 +980,18 @@ export interface paths {
|
|
|
979
980
|
* Get the caller's region status
|
|
980
981
|
* @description Get the caller's region status.
|
|
981
982
|
*
|
|
982
|
-
* Reports whether
|
|
983
|
-
* frontend can show a region notice instead of failing on
|
|
984
|
-
* Public endpoint — no authentication required — and always
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
*
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
*
|
|
983
|
+
* Reports whether trading is available in the caller's region, so a
|
|
984
|
+
* frontend can show a region notice and hide trading instead of failing on
|
|
985
|
+
* the next write. Public endpoint — no authentication required — and always
|
|
986
|
+
* answers 200, from every region.
|
|
987
|
+
*
|
|
988
|
+
* A caller from a restricted region keeps every read (market data,
|
|
989
|
+
* balances, positions, orders, withdrawal lists), the WebSocket API,
|
|
990
|
+
* signing in (POST /api/v1/auth/challenge, /verify, /refresh, /revoke)
|
|
991
|
+
* and withdrawing (POST /api/v1/withdrawals). Every other write — placing,
|
|
992
|
+
* replacing or cancelling orders, closing positions, deposits, transfers
|
|
993
|
+
* and account changes — is refused with 451 REGION_RESTRICTED (gRPC:
|
|
994
|
+
* PERMISSION_DENIED with a google.rpc.ErrorInfo reason REGION_RESTRICTED).
|
|
992
995
|
*/
|
|
993
996
|
get: operations["get_region_status"];
|
|
994
997
|
put?: never;
|
|
@@ -7243,7 +7246,7 @@ export interface components {
|
|
|
7243
7246
|
};
|
|
7244
7247
|
GetRegionStatusResponse: {
|
|
7245
7248
|
/**
|
|
7246
|
-
* @description True when
|
|
7249
|
+
* @description True when trading is not available in the caller's region; writes other than signing in and withdrawing then answer 451 REGION_RESTRICTED
|
|
7247
7250
|
* @example false
|
|
7248
7251
|
*/
|
|
7249
7252
|
restricted?: boolean | null;
|
package/dist/wire/schema.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://docs.0xmonaco.com/sdk/typescript",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "biome lint ."
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@0xmonaco/contracts": "1.0.
|
|
19
|
+
"@0xmonaco/contracts": "1.0.94",
|
|
20
20
|
"zod": "^4.1.12"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|