@0xmonaco/types 1.0.73-develop.af0f5d0 → 1.0.74-develop.367860f
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/api/index.d.ts +0 -7
- package/dist/applications/index.d.ts +14 -15
- package/dist/applications/index.js +2 -2
- package/dist/applications/requests.d.ts +70 -15
- package/dist/applications/requests.js +2 -3
- package/dist/applications/responses.d.ts +35 -39
- package/dist/applications/responses.js +1 -1
- package/dist/buildercodes/index.d.ts +3 -4
- package/dist/buildercodes/responses.d.ts +10 -3
- package/dist/buildercodes/responses.js +24 -4
- package/dist/fees/responses.js +2 -2
- package/dist/managed-markets/index.d.ts +21 -2
- package/dist/margin-accounts/index.d.ts +72 -12
- package/dist/market/index.d.ts +76 -6
- package/dist/pitpass/index.d.ts +16 -11
- package/dist/pitpass/index.js +1 -1
- package/dist/pitpass/responses.d.ts +21 -0
- package/dist/pitpass/responses.js +43 -14
- package/dist/positions/index.d.ts +81 -14
- package/dist/profile/index.d.ts +114 -44
- package/dist/sdk/index.d.ts +12 -4
- package/dist/trading/index.d.ts +1 -1
- package/dist/trading/orders.d.ts +6 -32
- package/dist/trading/responses.d.ts +9 -14
- package/dist/validation/applications.d.ts +51 -0
- package/dist/validation/applications.js +45 -0
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.js +2 -0
- package/dist/validation/managed-markets.d.ts +17 -0
- package/dist/validation/managed-markets.js +17 -0
- package/dist/validation/margin-accounts.d.ts +10 -3
- package/dist/validation/margin-accounts.js +17 -6
- package/dist/validation/market.d.ts +45 -0
- package/dist/validation/market.js +43 -0
- package/dist/validation/positions.d.ts +5 -3
- package/dist/validation/positions.js +12 -5
- package/dist/validation/profile.d.ts +19 -2
- package/dist/validation/profile.js +36 -4
- package/dist/validation/trading.d.ts +2 -2
- package/dist/validation/vault.d.ts +14 -0
- package/dist/validation/vault.js +14 -0
- package/dist/websocket/base.d.ts +56 -6
- package/dist/websocket/client.d.ts +8 -3
- package/dist/websocket/events/index.d.ts +1 -0
- package/dist/websocket/events/index.js +1 -0
- package/dist/websocket/events/market-stats-events.d.ts +33 -3
- package/dist/websocket/events/market-stats-events.js +3 -2
- package/dist/websocket/events/orders-events.d.ts +30 -3
- package/dist/websocket/events/position-events.d.ts +15 -0
- package/dist/websocket/events/position-valuation-events.d.ts +60 -0
- package/dist/websocket/events/position-valuation-events.js +15 -0
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +2 -0
- package/dist/wire/schema.d.ts +906 -284
- package/dist/withdrawals/index.d.ts +27 -6
- package/package.json +2 -2
package/dist/api/index.d.ts
CHANGED
|
@@ -16,11 +16,4 @@ export interface BaseAPI {
|
|
|
16
16
|
* @param credentials - Hex-encoded session keypair, or `undefined` to clear.
|
|
17
17
|
*/
|
|
18
18
|
setSessionKeypair(credentials: SessionCredentials | undefined): void;
|
|
19
|
-
/**
|
|
20
|
-
* Set (or clear) the application secret key used for backend-authenticated
|
|
21
|
-
* requests. When set, it is sent in the `x-server-key` header.
|
|
22
|
-
*
|
|
23
|
-
* @param serverKey - The application secret key (`sk_...`), or `undefined` to clear.
|
|
24
|
-
*/
|
|
25
|
-
setServerKey(serverKey: string | undefined): void;
|
|
26
19
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Applications Types
|
|
3
3
|
*
|
|
4
|
-
* Types for application configuration and the
|
|
5
|
-
*
|
|
4
|
+
* Types for application configuration and the public application reporting
|
|
5
|
+
* endpoints.
|
|
6
6
|
*/
|
|
7
7
|
import type { BaseAPI } from "../api";
|
|
8
8
|
import type { GetAppStatsParams, ListAppBalancesParams, ListAppMovementsParams, ListAppOrdersParams, ListAppUsersParams } from "./requests";
|
|
@@ -11,9 +11,8 @@ import type { ApplicationConfigResponse, GetAppStatsResponse, ListAppBalancesRes
|
|
|
11
11
|
* Applications API interface.
|
|
12
12
|
*
|
|
13
13
|
* `getApplicationConfig` is session-authenticated (signed with the session
|
|
14
|
-
* key). The reporting methods are
|
|
15
|
-
*
|
|
16
|
-
* request sends it in the `x-server-key` header.
|
|
14
|
+
* key). The reporting methods are public: each selects its application by
|
|
15
|
+
* `clientId` and is rate limited per client IP.
|
|
17
16
|
*/
|
|
18
17
|
export interface ApplicationsAPI extends BaseAPI {
|
|
19
18
|
/**
|
|
@@ -26,40 +25,40 @@ export interface ApplicationsAPI extends BaseAPI {
|
|
|
26
25
|
*/
|
|
27
26
|
getApplicationConfig(): Promise<ApplicationConfigResponse>;
|
|
28
27
|
/**
|
|
29
|
-
* Lists orders placed by the application's users.
|
|
28
|
+
* Lists orders placed by the application's users. Public, selected by `clientId`.
|
|
30
29
|
*
|
|
31
30
|
* @param params - Pagination and filter options
|
|
32
31
|
* @returns Promise resolving to a paginated list of orders
|
|
33
32
|
*/
|
|
34
|
-
listApplicationOrders(params
|
|
33
|
+
listApplicationOrders(params: ListAppOrdersParams): Promise<ListAppOrdersResponse>;
|
|
35
34
|
/**
|
|
36
|
-
* Lists the application's users.
|
|
35
|
+
* Lists the application's users. Public, selected by `clientId`.
|
|
37
36
|
*
|
|
38
37
|
* @param params - Pagination and filter options
|
|
39
38
|
* @returns Promise resolving to a paginated list of users
|
|
40
39
|
*/
|
|
41
|
-
listApplicationUsers(params
|
|
40
|
+
listApplicationUsers(params: ListAppUsersParams): Promise<ListAppUsersResponse>;
|
|
42
41
|
/**
|
|
43
|
-
* Lists ledger movements for the application's users.
|
|
42
|
+
* Lists ledger movements for the application's users. Public, selected by `clientId`.
|
|
44
43
|
*
|
|
45
44
|
* @param params - Pagination and filter options
|
|
46
45
|
* @returns Promise resolving to a paginated list of movements
|
|
47
46
|
*/
|
|
48
|
-
listApplicationMovements(params
|
|
47
|
+
listApplicationMovements(params: ListAppMovementsParams): Promise<ListAppMovementsResponse>;
|
|
49
48
|
/**
|
|
50
|
-
* Lists user balances held within the application.
|
|
49
|
+
* Lists user balances held within the application. Public, selected by `clientId`.
|
|
51
50
|
*
|
|
52
51
|
* @param params - Pagination and filter options
|
|
53
52
|
* @returns Promise resolving to a paginated list of balances
|
|
54
53
|
*/
|
|
55
|
-
listApplicationBalances(params
|
|
54
|
+
listApplicationBalances(params: ListAppBalancesParams): Promise<ListAppBalancesResponse>;
|
|
56
55
|
/**
|
|
57
|
-
* Gets aggregate volume and fee stats for the application.
|
|
56
|
+
* Gets aggregate volume and fee stats for the application. Public, selected by `clientId`.
|
|
58
57
|
*
|
|
59
58
|
* @param params - Optional `since` filter
|
|
60
59
|
* @returns Promise resolving to the application stats
|
|
61
60
|
*/
|
|
62
|
-
getApplicationStats(params
|
|
61
|
+
getApplicationStats(params: GetAppStatsParams): Promise<GetAppStatsResponse>;
|
|
63
62
|
}
|
|
64
63
|
export type { GetAppStatsParams, ListAppBalancesParams, ListAppMovementsParams, ListAppOrdersParams, ListAppUsersParams } from "./requests";
|
|
65
64
|
export type { AppBalance, ApplicationConfigResponse, AppMovement, AppOrder, AppUser, GetAppStatsResponse, ListAppBalancesResponse, ListAppMovementsResponse, ListAppOrdersResponse, ListAppUsersResponse, } from "./responses";
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Applications Request Types
|
|
3
3
|
*
|
|
4
|
-
* Query parameters for the
|
|
5
|
-
*
|
|
6
|
-
* straight through to the query string.
|
|
4
|
+
* Query parameters for the public application reporting endpoints. Each one
|
|
5
|
+
* selects its application by `clientId`.
|
|
7
6
|
*/
|
|
8
7
|
/**
|
|
9
8
|
* Query parameters for listing application orders.
|
|
10
9
|
*/
|
|
11
10
|
export interface ListAppOrdersParams {
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Items per page (
|
|
11
|
+
/** Public client ID of the application to list (required). An unknown or inactive one is a `404`. */
|
|
12
|
+
clientId: string;
|
|
13
|
+
/** Items per page, 1 to 1000 (default 20). Rejected if larger. */
|
|
15
14
|
pageSize?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Pagination cursor with two states:
|
|
17
|
+
* - Omitted (`undefined`) or empty string (`""`): start a cursor walk with
|
|
18
|
+
* no prior position.
|
|
19
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
20
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
21
|
+
*
|
|
22
|
+
* Page-number pagination was removed (0XM-2822): there is no `page`, and
|
|
23
|
+
* sending one is a `400`. The response carries no item count — follow
|
|
24
|
+
* `nextPageToken` until it comes back empty. Filters must match the request
|
|
25
|
+
* that minted the token.
|
|
26
|
+
*/
|
|
27
|
+
pageToken?: string;
|
|
16
28
|
/** Filter by order status (e.g. SUBMITTED, PARTIALLY_FILLED, FILLED, SETTLED, CANCELLED, EXPIRED, REJECTED) */
|
|
17
29
|
status?: string;
|
|
18
30
|
/** Filter by user UUID */
|
|
@@ -28,10 +40,24 @@ export interface ListAppOrdersParams {
|
|
|
28
40
|
* Query parameters for listing application users.
|
|
29
41
|
*/
|
|
30
42
|
export interface ListAppUsersParams {
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/** Items per page (
|
|
43
|
+
/** Public client ID of the application to list (required). An unknown or inactive one is a `404`. */
|
|
44
|
+
clientId: string;
|
|
45
|
+
/** Items per page, 1 to 1000 (default 20). Rejected if larger. */
|
|
34
46
|
pageSize?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Pagination cursor with two states:
|
|
49
|
+
* - Omitted (`undefined`) or empty string (`""`): start a cursor walk with
|
|
50
|
+
* no prior position.
|
|
51
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
52
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
53
|
+
*
|
|
54
|
+
* Page-number pagination was removed (0XM-2822): there is no `page`, and
|
|
55
|
+
* sending one is a `400`. Ordered by id ascending, not newest-first.
|
|
56
|
+
* `total` / `totalPages` are populated, bounded by the server count
|
|
57
|
+
* ceiling — see `totalCapped`. Filters must match the request that minted
|
|
58
|
+
* the token.
|
|
59
|
+
*/
|
|
60
|
+
pageToken?: string;
|
|
35
61
|
/** Filter by active status */
|
|
36
62
|
isActive?: boolean;
|
|
37
63
|
/** Filter by account type: master or sub */
|
|
@@ -43,10 +69,23 @@ export interface ListAppUsersParams {
|
|
|
43
69
|
* Query parameters for listing application movements.
|
|
44
70
|
*/
|
|
45
71
|
export interface ListAppMovementsParams {
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
/** Items per page (
|
|
72
|
+
/** Public client ID of the application to list (required). An unknown or inactive one is a `404`. */
|
|
73
|
+
clientId: string;
|
|
74
|
+
/** Items per page, 1 to 1000 (default 20). Rejected if larger. */
|
|
49
75
|
pageSize?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Pagination cursor with two states:
|
|
78
|
+
* - Omitted (`undefined`) or empty string (`""`): start a cursor walk with
|
|
79
|
+
* no prior position.
|
|
80
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
81
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
82
|
+
*
|
|
83
|
+
* Page-number pagination was removed (0XM-2822): there is no `page`, and
|
|
84
|
+
* sending one is a `400`. The response carries no item count — follow
|
|
85
|
+
* `nextPageToken` until it comes back empty. Filters must match the request
|
|
86
|
+
* that minted the token.
|
|
87
|
+
*/
|
|
88
|
+
pageToken?: string;
|
|
50
89
|
/** Filter by user UUID */
|
|
51
90
|
userId?: string;
|
|
52
91
|
/** Filter by transaction type (e.g. DEPOSIT, WITHDRAWAL, TRADE, FEE, FUNDING, LIQUIDATION, INTEREST, REWARD) */
|
|
@@ -60,10 +99,24 @@ export interface ListAppMovementsParams {
|
|
|
60
99
|
* Query parameters for listing application balances.
|
|
61
100
|
*/
|
|
62
101
|
export interface ListAppBalancesParams {
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
/** Items per page (
|
|
102
|
+
/** Public client ID of the application to list (required). An unknown or inactive one is a `404`. */
|
|
103
|
+
clientId: string;
|
|
104
|
+
/** Items per page, 1 to 1000 (default 20). Rejected if larger. */
|
|
66
105
|
pageSize?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Pagination cursor with two states:
|
|
108
|
+
* - Omitted (`undefined`) or empty string (`""`): start a cursor walk with
|
|
109
|
+
* no prior position.
|
|
110
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
111
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
112
|
+
*
|
|
113
|
+
* Page-number pagination was removed (0XM-2822): there is no `page`, and
|
|
114
|
+
* sending one is a `400`. Ordered by id ascending, not newest-first.
|
|
115
|
+
* `total` / `totalPages` are populated, bounded by the server count
|
|
116
|
+
* ceiling — see `totalCapped`. Filters must match the request that minted
|
|
117
|
+
* the token.
|
|
118
|
+
*/
|
|
119
|
+
pageToken?: string;
|
|
67
120
|
/** Filter by user UUID */
|
|
68
121
|
userId?: string;
|
|
69
122
|
/** Filter by asset UUID */
|
|
@@ -73,6 +126,8 @@ export interface ListAppBalancesParams {
|
|
|
73
126
|
* Query parameters for application stats.
|
|
74
127
|
*/
|
|
75
128
|
export interface GetAppStatsParams {
|
|
129
|
+
/** Public client ID of the application to list (required). An unknown or inactive one is a `404`. */
|
|
130
|
+
clientId: string;
|
|
76
131
|
/** ISO 8601 datetime to filter stats from (e.g. 2026-01-01T00:00:00Z). Omit for all-time. */
|
|
77
132
|
since?: string;
|
|
78
133
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Applications Request Types
|
|
3
3
|
*
|
|
4
|
-
* Query parameters for the
|
|
5
|
-
*
|
|
6
|
-
* straight through to the query string.
|
|
4
|
+
* Query parameters for the public application reporting endpoints. Each one
|
|
5
|
+
* selects its application by `clientId`.
|
|
7
6
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Applications Response Types
|
|
3
3
|
*
|
|
4
4
|
* Response types for application configuration operations and the
|
|
5
|
-
*
|
|
5
|
+
* public application reporting endpoints. Reporting types use
|
|
6
6
|
* the wire shape (snake_case); optional fields are `null` rather than omitted.
|
|
7
7
|
*/
|
|
8
8
|
import type { Address } from "viem";
|
|
@@ -72,16 +72,10 @@ export interface AppUser {
|
|
|
72
72
|
username: string | null;
|
|
73
73
|
/** Account type: master or sub */
|
|
74
74
|
accountType: string;
|
|
75
|
-
/** Whether the user is allowed to withdraw */
|
|
76
|
-
canWithdraw: boolean;
|
|
77
75
|
/** Account creation timestamp (ISO 8601) */
|
|
78
76
|
createdAt: string | null;
|
|
79
|
-
/** Email address */
|
|
80
|
-
email: string | null;
|
|
81
77
|
/** Whether the user account is active */
|
|
82
78
|
isActive: boolean | null;
|
|
83
|
-
/** Whether the user is banned */
|
|
84
|
-
isBanned: boolean | null;
|
|
85
79
|
/** Master account ID (for sub-accounts) */
|
|
86
80
|
masterAccountId: string | null;
|
|
87
81
|
/** Last update timestamp (ISO 8601) */
|
|
@@ -162,72 +156,74 @@ export interface AppBalance {
|
|
|
162
156
|
*/
|
|
163
157
|
export interface ListAppOrdersResponse {
|
|
164
158
|
orders: AppOrder[];
|
|
165
|
-
/**
|
|
166
|
-
* Matching orders. Exact up to 10,000 pages of the requested page size
|
|
167
|
-
* (`pageSize` x 10,000 rows) and saturates there, so an application with
|
|
168
|
-
* more matching orders than the listing can page through reads the cap,
|
|
169
|
-
* not its lifetime total.
|
|
170
|
-
*/
|
|
171
|
-
total: number;
|
|
172
|
-
/** Current page number */
|
|
173
|
-
page: number;
|
|
174
159
|
/** Items per page */
|
|
175
160
|
pageSize: number;
|
|
176
161
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
162
|
+
* Cursor for the next page, minted from the last row of an over-fetched
|
|
163
|
+
* page: this listing is one ordered read, so a page shorter than `pageSize`
|
|
164
|
+
* proves the walk is exhausted and this is `""`.
|
|
179
165
|
*/
|
|
180
|
-
|
|
166
|
+
nextPageToken: string;
|
|
181
167
|
}
|
|
182
168
|
/**
|
|
183
169
|
* Paginated list of application users.
|
|
184
170
|
*/
|
|
185
171
|
export interface ListAppUsersResponse {
|
|
186
172
|
users: AppUser[];
|
|
187
|
-
/**
|
|
173
|
+
/** Users matching the filter, bounded by the server count ceiling. */
|
|
188
174
|
total: number;
|
|
189
|
-
/** Current page number */
|
|
190
|
-
page: number;
|
|
191
175
|
/** Items per page */
|
|
192
176
|
pageSize: number;
|
|
193
|
-
/**
|
|
177
|
+
/** Pages at this `pageSize`, bounded by the same ceiling as `total`. */
|
|
194
178
|
totalPages: number;
|
|
179
|
+
/**
|
|
180
|
+
* Cursor for the next page, minted from the last row of an over-fetched
|
|
181
|
+
* page: this listing is one ordered read, so a page shorter than `pageSize`
|
|
182
|
+
* proves the walk is exhausted and this is `""`.
|
|
183
|
+
*/
|
|
184
|
+
nextPageToken: string;
|
|
185
|
+
/**
|
|
186
|
+
* `true` when MORE than the server ceiling matched, so the count stopped
|
|
187
|
+
* there and `total` / `totalPages` are a lower bound.
|
|
188
|
+
*/
|
|
189
|
+
totalCapped: boolean;
|
|
195
190
|
}
|
|
196
191
|
/**
|
|
197
192
|
* Paginated list of application movements.
|
|
198
193
|
*/
|
|
199
194
|
export interface ListAppMovementsResponse {
|
|
200
195
|
movements: AppMovement[];
|
|
201
|
-
/**
|
|
202
|
-
* Matching movements. Exact up to 10,000 pages of the requested page size
|
|
203
|
-
* (`pageSize` x 10,000 rows) and saturates there, so an application with
|
|
204
|
-
* more matching movements than the listing can page through reads the cap,
|
|
205
|
-
* not its lifetime total.
|
|
206
|
-
*/
|
|
207
|
-
total: number;
|
|
208
|
-
/** Current page number */
|
|
209
|
-
page: number;
|
|
210
196
|
/** Items per page */
|
|
211
197
|
pageSize: number;
|
|
212
198
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
199
|
+
* Cursor for the next page, minted from the last row of an over-fetched
|
|
200
|
+
* page: this listing is one ordered read, so a page shorter than `pageSize`
|
|
201
|
+
* proves the walk is exhausted and this is `""`.
|
|
215
202
|
*/
|
|
216
|
-
|
|
203
|
+
nextPageToken: string;
|
|
217
204
|
}
|
|
218
205
|
/**
|
|
219
206
|
* Paginated list of application balances.
|
|
220
207
|
*/
|
|
221
208
|
export interface ListAppBalancesResponse {
|
|
222
209
|
balances: AppBalance[];
|
|
223
|
-
/**
|
|
210
|
+
/** Balances matching the filter, bounded by the server count ceiling. */
|
|
224
211
|
total: number;
|
|
225
|
-
/** Current page number */
|
|
226
|
-
page: number;
|
|
227
212
|
/** Items per page */
|
|
228
213
|
pageSize: number;
|
|
229
|
-
/**
|
|
214
|
+
/** Pages at this `pageSize`, bounded by the same ceiling as `total`. */
|
|
230
215
|
totalPages: number;
|
|
216
|
+
/**
|
|
217
|
+
* Cursor for the next page, minted from the last row of an over-fetched
|
|
218
|
+
* page: this listing is one ordered read, so a page shorter than `pageSize`
|
|
219
|
+
* proves the walk is exhausted and this is `""`.
|
|
220
|
+
*/
|
|
221
|
+
nextPageToken: string;
|
|
222
|
+
/**
|
|
223
|
+
* `true` when MORE than the server ceiling matched, so the count stopped
|
|
224
|
+
* there and `total` / `totalPages` are a lower bound.
|
|
225
|
+
*/
|
|
226
|
+
totalCapped: boolean;
|
|
231
227
|
}
|
|
232
228
|
/**
|
|
233
229
|
* Aggregate volume and fee stats for an application.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Applications Response Types
|
|
3
3
|
*
|
|
4
4
|
* Response types for application configuration operations and the
|
|
5
|
-
*
|
|
5
|
+
* public application reporting endpoints. Reporting types use
|
|
6
6
|
* the wire shape (snake_case); optional fields are `null` rather than omitted.
|
|
7
7
|
*/
|
|
@@ -51,10 +51,9 @@ export interface BuildercodesAPI extends BaseAPI {
|
|
|
51
51
|
* A wallet that *used to be* a payout address keeps what it accrued back then
|
|
52
52
|
* and can still claim it — payout-address changes are not retroactive.
|
|
53
53
|
*
|
|
54
|
-
* Throws 403 when the
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* rollout state. Throws 409 when the payout balance is insufficient for the
|
|
54
|
+
* Throws 403 when the session is a delegated agent — a permanent
|
|
55
|
+
* restriction on that session type, not a rollout state. No program switch
|
|
56
|
+
* gates the claim, so a balance already credited stays claimable. Throws 409 when the payout balance is insufficient for the
|
|
58
57
|
* requested amount. Throws 503 when the matching engine is unreachable,
|
|
59
58
|
* restarting, or slow to answer — an UNKNOWN outcome, not a rejection: the
|
|
60
59
|
* claim is admitted to the sequencer before its reply is sent, so it may
|
|
@@ -72,10 +72,17 @@ export declare const BuildercodePayoutKindSchema: z.ZodEnum<{
|
|
|
72
72
|
REVENUE_SHARE: "REVENUE_SHARE";
|
|
73
73
|
BUILDER_FEE: "BUILDER_FEE";
|
|
74
74
|
}>;
|
|
75
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Pagination and filter accepted by the per-trade payout history endpoint.
|
|
77
|
+
*
|
|
78
|
+
* Cursor paged (0XM-2821). `page` is REJECTED rather than omitted, so a caller
|
|
79
|
+
* still looping on it fails loudly instead of being handed the first cursor page
|
|
80
|
+
* on every call.
|
|
81
|
+
*/
|
|
76
82
|
export declare const ListBuildercodePayoutsParamsSchema: z.ZodObject<{
|
|
77
|
-
page: z.ZodOptional<z.
|
|
83
|
+
page: z.ZodOptional<z.ZodNever>;
|
|
78
84
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
79
86
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
80
87
|
REVENUE_SHARE: "REVENUE_SHARE";
|
|
81
88
|
BUILDER_FEE: "BUILDER_FEE";
|
|
@@ -109,9 +116,9 @@ export declare const ListBuildercodePayoutsResponseSchema: z.ZodObject<{
|
|
|
109
116
|
}>>;
|
|
110
117
|
}, z.core.$strip>>;
|
|
111
118
|
total: z.ZodNumber;
|
|
112
|
-
page: z.ZodNumber;
|
|
113
119
|
pageSize: z.ZodNumber;
|
|
114
120
|
totalPages: z.ZodNumber;
|
|
121
|
+
nextPageToken: z.ZodString;
|
|
115
122
|
}, z.core.$strip>;
|
|
116
123
|
/** One token-denominated BuilderCodes earnings total. */
|
|
117
124
|
export declare const BuildercodePayoutTokenTotalSchema: z.ZodObject<{
|
|
@@ -58,10 +58,24 @@ export const ListBuilderFeeChangesResponseSchema = z.object({
|
|
|
58
58
|
* Monaco revenue share; `BUILDER_FEE` records builder fees charged to takers.
|
|
59
59
|
*/
|
|
60
60
|
export const BuildercodePayoutKindSchema = z.enum(["REVENUE_SHARE", "BUILDER_FEE"]);
|
|
61
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Pagination and filter accepted by the per-trade payout history endpoint.
|
|
63
|
+
*
|
|
64
|
+
* Cursor paged (0XM-2821). `page` is REJECTED rather than omitted, so a caller
|
|
65
|
+
* still looping on it fails loudly instead of being handed the first cursor page
|
|
66
|
+
* on every call.
|
|
67
|
+
*/
|
|
62
68
|
export const ListBuildercodePayoutsParamsSchema = z.object({
|
|
63
|
-
page: z.
|
|
64
|
-
pageSize: z.number().int().min(1).max(
|
|
69
|
+
page: z.never().optional(),
|
|
70
|
+
pageSize: z.number().int().min(1).max(1000).optional(),
|
|
71
|
+
/**
|
|
72
|
+
* Cursor with two states: omitted or `""` starts a walk from the newest
|
|
73
|
+
* credit; a previous response's `nextPageToken` resumes it. The walk seeks on
|
|
74
|
+
* `(createdAt, id)` descending — both NOT NULL and fixed for a credit's
|
|
75
|
+
* lifetime. The filter must match the request that minted the token, or the
|
|
76
|
+
* request is rejected with a `400`.
|
|
77
|
+
*/
|
|
78
|
+
pageToken: z.string().optional(),
|
|
65
79
|
/** Only return credits of this kind; `total` counts the filtered rows. Omit for every kind. */
|
|
66
80
|
kind: BuildercodePayoutKindSchema.optional(),
|
|
67
81
|
});
|
|
@@ -80,9 +94,15 @@ export const BuildercodePayoutSchema = z.object({
|
|
|
80
94
|
export const ListBuildercodePayoutsResponseSchema = z.object({
|
|
81
95
|
payouts: z.array(BuildercodePayoutSchema),
|
|
82
96
|
total: z.number().int().nonnegative(),
|
|
83
|
-
page: z.number().int().positive(),
|
|
84
97
|
pageSize: z.number().int().positive(),
|
|
85
98
|
totalPages: z.number().int().nonnegative(),
|
|
99
|
+
/**
|
|
100
|
+
* Cursor for the next page, minted from the last row of an over-fetched read:
|
|
101
|
+
* this listing is one ordered read, so an empty string is a definitive end.
|
|
102
|
+
* Pass it back as `pageToken`; do not drive the walk off `total` or
|
|
103
|
+
* `totalPages`.
|
|
104
|
+
*/
|
|
105
|
+
nextPageToken: z.string(),
|
|
86
106
|
});
|
|
87
107
|
/** One token-denominated BuilderCodes earnings total. */
|
|
88
108
|
export const BuildercodePayoutTokenTotalSchema = z.object({
|
package/dist/fees/responses.js
CHANGED
|
@@ -126,7 +126,7 @@ export const FeeTierScheduleRowSchema = z.object({
|
|
|
126
126
|
* Zod schema for the "my fee tier" response
|
|
127
127
|
*/
|
|
128
128
|
export const GetMyFeeTierResponseSchema = z.object({
|
|
129
|
-
/** Caller's resolved tier (1–6) from their wallet's
|
|
129
|
+
/** Caller's resolved tier (1–6) from the higher of their wallet's weighted 14-day volume and any volume floor set on the wallet. A floor that is set or changed counts once it applies to the wallet's fills, usually within a minute, and likewise for an account the wallet opens in a new application; a removed or expired floor stops counting at once */
|
|
130
130
|
currentTierLevel: z.number().int(),
|
|
131
131
|
/** Caller's weighted 14-day volume (perp + 2.5× spot), summed across every application the wallet trades through */
|
|
132
132
|
weightedVolume14d: z.string(),
|
|
@@ -134,7 +134,7 @@ export const GetMyFeeTierResponseSchema = z.object({
|
|
|
134
134
|
spotVolume14d: z.string(),
|
|
135
135
|
/** Caller's rolling 14-day perp volume, summed across every application the wallet trades through */
|
|
136
136
|
perpVolume14d: z.string(),
|
|
137
|
-
/** Additional weighted volume needed to reach the next tier; absent at tier 6 */
|
|
137
|
+
/** Additional weighted volume needed to reach the next tier, counted from the volume the current tier resolved from; absent at tier 6 */
|
|
138
138
|
volumeToNextTier: z.string().nullable().optional(),
|
|
139
139
|
/** Next tier level; absent when already at tier 6 */
|
|
140
140
|
nextTierLevel: z.number().int().nullable().optional(),
|
|
@@ -23,15 +23,34 @@ export interface ManagedMarketAssignment {
|
|
|
23
23
|
quoteEnabled: boolean;
|
|
24
24
|
}
|
|
25
25
|
export interface ListManagedMarketAssignmentsRequest {
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Items per page (1–1000). This listing defaults it to **100**, not the
|
|
28
|
+
* shared 20. A larger value is rejected, not clamped.
|
|
29
|
+
*/
|
|
27
30
|
pageSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Pagination cursor with two states: omitted or `""` starts a walk from the
|
|
33
|
+
* OLDEST assignment; a previous response's `nextPageToken` resumes it.
|
|
34
|
+
*
|
|
35
|
+
* The walk seeks on `(createdAt, id)` **ascending** — oldest first, the order
|
|
36
|
+
* this listing already read in — served by
|
|
37
|
+
* `idx_market_launch_maker_inventory (makerUserId, makerApplicationId,
|
|
38
|
+
* createdAt, id)`; both key columns are fixed for an assignment's lifetime.
|
|
39
|
+
* Page-number pagination was removed (0XM-2788).
|
|
40
|
+
*/
|
|
41
|
+
pageToken?: string;
|
|
28
42
|
}
|
|
29
43
|
export interface ListManagedMarketAssignmentsResponse {
|
|
30
44
|
items: ManagedMarketAssignment[];
|
|
31
45
|
total: number;
|
|
32
|
-
page: number;
|
|
33
46
|
pageSize: number;
|
|
34
47
|
inventoryObservedAt: string;
|
|
48
|
+
/**
|
|
49
|
+
* Cursor for the next page, minted from the last row of an over-fetched read:
|
|
50
|
+
* this listing is one ordered read, so an empty string is a definitive end.
|
|
51
|
+
* Pass it back as `pageToken`.
|
|
52
|
+
*/
|
|
53
|
+
nextPageToken: string;
|
|
35
54
|
}
|
|
36
55
|
export interface ClaimManagedMarketLeaseRequest {
|
|
37
56
|
ownerId: string;
|