@0xmonaco/types 1.0.67 → 1.0.69
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/index.d.ts +4 -4
- package/dist/buildercodes/index.js +1 -1
- package/dist/buildercodes/responses.d.ts +45 -1
- package/dist/buildercodes/responses.js +25 -1
- package/dist/faucet/index.d.ts +3 -2
- package/dist/positions/index.d.ts +8 -2
- package/dist/profile/index.d.ts +14 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/trading/orders.d.ts +6 -0
- package/dist/trading/responses.d.ts +7 -11
- package/dist/websocket/events/conditional-order-events.d.ts +34 -14
- package/dist/websocket/events/orders-events.d.ts +74 -18
- package/dist/websocket/snapshots.d.ts +8 -1
- package/dist/whitelist/index.d.ts +5 -16
- package/dist/whitelist/index.js +2 -8
- package/dist/wire/schema.d.ts +85 -18
- package/package.json +2 -2
|
@@ -18,9 +18,9 @@ import type { ClaimBuildercodeRewardsParams, ClaimBuildercodeRewardsResponse, Ge
|
|
|
18
18
|
export interface BuildercodesAPI extends BaseAPI {
|
|
19
19
|
/** Read this authenticated frontend's enrollment, payout address, and live budget. */
|
|
20
20
|
getConfig(): Promise<GetBuildercodesConfigResponse>;
|
|
21
|
-
/** List this authenticated frontend's per-trade BuilderCodes credits
|
|
21
|
+
/** List this authenticated frontend's per-trade BuilderCodes credits, optionally of one payout `kind`. */
|
|
22
22
|
listPayouts(params?: ListBuildercodePayoutsParams): Promise<ListBuildercodePayoutsResponse>;
|
|
23
|
-
/** Summarize this authenticated frontend's BuilderCodes credits by token. */
|
|
23
|
+
/** Summarize this authenticated frontend's BuilderCodes credits by token, and by token and payout kind. */
|
|
24
24
|
getPayoutSummary(): Promise<GetBuildercodePayoutSummaryResponse>;
|
|
25
25
|
/** Read the authenticated wallet's available reserved reward balances. */
|
|
26
26
|
getRewardsBalance(): Promise<GetBuildercodeRewardsBalanceResponse>;
|
|
@@ -67,5 +67,5 @@ export interface BuildercodesAPI extends BaseAPI {
|
|
|
67
67
|
*/
|
|
68
68
|
claimBuildercodeRewards(params: ClaimBuildercodeRewardsParams): Promise<ClaimBuildercodeRewardsResponse>;
|
|
69
69
|
}
|
|
70
|
-
export type { BuildercodePayout, BuildercodePayoutTokenTotal, BuildercodeRewardsBalance, ClaimBuildercodeRewardsParams, ClaimBuildercodeRewardsResponse, GetBuildercodePayoutSummaryResponse, GetBuildercodeRewardsBalanceResponse, GetBuildercodesConfigResponse, ListBuildercodePayoutsParams, ListBuildercodePayoutsResponse, } from "./responses";
|
|
71
|
-
export { BuildercodePayoutSchema, BuildercodePayoutTokenTotalSchema, BuildercodeRewardsBalanceSchema, ClaimBuildercodeRewardsParamsSchema, ClaimBuildercodeRewardsResponseSchema, GetBuildercodePayoutSummaryResponseSchema, GetBuildercodeRewardsBalanceResponseSchema, GetBuildercodesConfigResponseSchema, ListBuildercodePayoutsParamsSchema, ListBuildercodePayoutsResponseSchema, } from "./responses";
|
|
70
|
+
export type { BuildercodePayout, BuildercodePayoutKind, BuildercodePayoutTokenKindTotal, BuildercodePayoutTokenTotal, BuildercodeRewardsBalance, ClaimBuildercodeRewardsParams, ClaimBuildercodeRewardsResponse, GetBuildercodePayoutSummaryResponse, GetBuildercodeRewardsBalanceResponse, GetBuildercodesConfigResponse, ListBuildercodePayoutsParams, ListBuildercodePayoutsResponse, } from "./responses";
|
|
71
|
+
export { BuildercodePayoutKindSchema, BuildercodePayoutSchema, BuildercodePayoutTokenKindTotalSchema, BuildercodePayoutTokenTotalSchema, BuildercodeRewardsBalanceSchema, ClaimBuildercodeRewardsParamsSchema, ClaimBuildercodeRewardsResponseSchema, GetBuildercodePayoutSummaryResponseSchema, GetBuildercodeRewardsBalanceResponseSchema, GetBuildercodesConfigResponseSchema, ListBuildercodePayoutsParamsSchema, ListBuildercodePayoutsResponseSchema, } from "./responses";
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Types for the BuilderCodes API: reading and claiming an enrolled frontend's
|
|
5
5
|
* per-trade revenue share.
|
|
6
6
|
*/
|
|
7
|
-
export { BuildercodePayoutSchema, BuildercodePayoutTokenTotalSchema, BuildercodeRewardsBalanceSchema, ClaimBuildercodeRewardsParamsSchema, ClaimBuildercodeRewardsResponseSchema, GetBuildercodePayoutSummaryResponseSchema, GetBuildercodeRewardsBalanceResponseSchema, GetBuildercodesConfigResponseSchema, ListBuildercodePayoutsParamsSchema, ListBuildercodePayoutsResponseSchema, } from "./responses";
|
|
7
|
+
export { BuildercodePayoutKindSchema, BuildercodePayoutSchema, BuildercodePayoutTokenKindTotalSchema, BuildercodePayoutTokenTotalSchema, BuildercodeRewardsBalanceSchema, ClaimBuildercodeRewardsParamsSchema, ClaimBuildercodeRewardsResponseSchema, GetBuildercodePayoutSummaryResponseSchema, GetBuildercodeRewardsBalanceResponseSchema, GetBuildercodesConfigResponseSchema, ListBuildercodePayoutsParamsSchema, ListBuildercodePayoutsResponseSchema, } from "./responses";
|
|
@@ -13,10 +13,23 @@ export declare const GetBuildercodesConfigResponseSchema: z.ZodObject<{
|
|
|
13
13
|
buildercodesEnabled: z.ZodBoolean;
|
|
14
14
|
buildercodesBudgetBps: z.ZodNumber;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The payout stream a BuilderCodes credit belongs to. `REVENUE_SHARE` is the
|
|
18
|
+
* frontend's share of Monaco's fee; `BUILDER_FEE` is the frontend's own builder
|
|
19
|
+
* fee, paid by the taker. Both land in the same claimable balance.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BuildercodePayoutKindSchema: z.ZodEnum<{
|
|
22
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
23
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
24
|
+
}>;
|
|
25
|
+
/** Pagination and filter accepted by the per-trade payout history endpoint. */
|
|
17
26
|
export declare const ListBuildercodePayoutsParamsSchema: z.ZodObject<{
|
|
18
27
|
page: z.ZodOptional<z.ZodNumber>;
|
|
19
28
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
31
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
32
|
+
}>>;
|
|
20
33
|
}, z.core.$strip>;
|
|
21
34
|
/** One per-trade BuilderCodes credit. Amounts are RAW atomic units. */
|
|
22
35
|
export declare const BuildercodePayoutSchema: z.ZodObject<{
|
|
@@ -26,6 +39,10 @@ export declare const BuildercodePayoutSchema: z.ZodObject<{
|
|
|
26
39
|
amount: z.ZodString;
|
|
27
40
|
appliedBps: z.ZodNumber;
|
|
28
41
|
createdAt: z.ZodString;
|
|
42
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
44
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
45
|
+
}>>;
|
|
29
46
|
}, z.core.$strip>;
|
|
30
47
|
/** Schema for the paginated per-trade payout history. */
|
|
31
48
|
export declare const ListBuildercodePayoutsResponseSchema: z.ZodObject<{
|
|
@@ -36,6 +53,10 @@ export declare const ListBuildercodePayoutsResponseSchema: z.ZodObject<{
|
|
|
36
53
|
amount: z.ZodString;
|
|
37
54
|
appliedBps: z.ZodNumber;
|
|
38
55
|
createdAt: z.ZodString;
|
|
56
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
58
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
59
|
+
}>>;
|
|
39
60
|
}, z.core.$strip>>;
|
|
40
61
|
total: z.ZodNumber;
|
|
41
62
|
page: z.ZodNumber;
|
|
@@ -49,6 +70,17 @@ export declare const BuildercodePayoutTokenTotalSchema: z.ZodObject<{
|
|
|
49
70
|
payoutCount: z.ZodNumber;
|
|
50
71
|
lastCreditedAt: z.ZodString;
|
|
51
72
|
}, z.core.$strip>;
|
|
73
|
+
/** One token-denominated BuilderCodes earnings total for one payout kind. */
|
|
74
|
+
export declare const BuildercodePayoutTokenKindTotalSchema: z.ZodObject<{
|
|
75
|
+
token: z.ZodString;
|
|
76
|
+
kind: z.ZodEnum<{
|
|
77
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
78
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
79
|
+
}>;
|
|
80
|
+
totalAmount: z.ZodString;
|
|
81
|
+
payoutCount: z.ZodNumber;
|
|
82
|
+
lastCreditedAt: z.ZodString;
|
|
83
|
+
}, z.core.$strip>;
|
|
52
84
|
/** Schema for this frontend's payout summary. */
|
|
53
85
|
export declare const GetBuildercodePayoutSummaryResponseSchema: z.ZodObject<{
|
|
54
86
|
totalPayouts: z.ZodNumber;
|
|
@@ -59,6 +91,16 @@ export declare const GetBuildercodePayoutSummaryResponseSchema: z.ZodObject<{
|
|
|
59
91
|
payoutCount: z.ZodNumber;
|
|
60
92
|
lastCreditedAt: z.ZodString;
|
|
61
93
|
}, z.core.$strip>>;
|
|
94
|
+
byTokenAndKind: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
token: z.ZodString;
|
|
96
|
+
kind: z.ZodEnum<{
|
|
97
|
+
REVENUE_SHARE: "REVENUE_SHARE";
|
|
98
|
+
BUILDER_FEE: "BUILDER_FEE";
|
|
99
|
+
}>;
|
|
100
|
+
totalAmount: z.ZodString;
|
|
101
|
+
payoutCount: z.ZodNumber;
|
|
102
|
+
lastCreditedAt: z.ZodString;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
62
104
|
}, z.core.$strip>;
|
|
63
105
|
/** One available balance in the reserved BuilderCodes reward bucket. */
|
|
64
106
|
export declare const BuildercodeRewardsBalanceSchema: z.ZodObject<{
|
|
@@ -86,9 +128,11 @@ export type ClaimBuildercodeRewardsParams = z.infer<typeof ClaimBuildercodeRewar
|
|
|
86
128
|
export type ClaimBuildercodeRewardsResponse = z.infer<typeof ClaimBuildercodeRewardsResponseSchema>;
|
|
87
129
|
export type GetBuildercodesConfigResponse = z.infer<typeof GetBuildercodesConfigResponseSchema>;
|
|
88
130
|
export type ListBuildercodePayoutsParams = z.infer<typeof ListBuildercodePayoutsParamsSchema>;
|
|
131
|
+
export type BuildercodePayoutKind = z.infer<typeof BuildercodePayoutKindSchema>;
|
|
89
132
|
export type BuildercodePayout = z.infer<typeof BuildercodePayoutSchema>;
|
|
90
133
|
export type ListBuildercodePayoutsResponse = z.infer<typeof ListBuildercodePayoutsResponseSchema>;
|
|
91
134
|
export type BuildercodePayoutTokenTotal = z.infer<typeof BuildercodePayoutTokenTotalSchema>;
|
|
135
|
+
export type BuildercodePayoutTokenKindTotal = z.infer<typeof BuildercodePayoutTokenKindTotalSchema>;
|
|
92
136
|
export type GetBuildercodePayoutSummaryResponse = z.infer<typeof GetBuildercodePayoutSummaryResponseSchema>;
|
|
93
137
|
export type BuildercodeRewardsBalance = z.infer<typeof BuildercodeRewardsBalanceSchema>;
|
|
94
138
|
export type GetBuildercodeRewardsBalanceResponse = z.infer<typeof GetBuildercodeRewardsBalanceResponseSchema>;
|
|
@@ -17,10 +17,18 @@ export const GetBuildercodesConfigResponseSchema = z.object({
|
|
|
17
17
|
buildercodesEnabled: z.boolean(),
|
|
18
18
|
buildercodesBudgetBps: z.number().int().min(0).max(10_000),
|
|
19
19
|
});
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* The payout stream a BuilderCodes credit belongs to. `REVENUE_SHARE` is the
|
|
22
|
+
* frontend's share of Monaco's fee; `BUILDER_FEE` is the frontend's own builder
|
|
23
|
+
* fee, paid by the taker. Both land in the same claimable balance.
|
|
24
|
+
*/
|
|
25
|
+
export const BuildercodePayoutKindSchema = z.enum(["REVENUE_SHARE", "BUILDER_FEE"]);
|
|
26
|
+
/** Pagination and filter accepted by the per-trade payout history endpoint. */
|
|
21
27
|
export const ListBuildercodePayoutsParamsSchema = z.object({
|
|
22
28
|
page: z.number().int().min(1).max(10_000).optional(),
|
|
23
29
|
pageSize: z.number().int().min(1).max(100).optional(),
|
|
30
|
+
/** Only return credits of this kind; `total` counts the filtered rows. Omit for every kind. */
|
|
31
|
+
kind: BuildercodePayoutKindSchema.optional(),
|
|
24
32
|
});
|
|
25
33
|
/** One per-trade BuilderCodes credit. Amounts are RAW atomic units. */
|
|
26
34
|
export const BuildercodePayoutSchema = z.object({
|
|
@@ -30,6 +38,8 @@ export const BuildercodePayoutSchema = z.object({
|
|
|
30
38
|
amount: z.string(),
|
|
31
39
|
appliedBps: z.number().int(),
|
|
32
40
|
createdAt: z.string(),
|
|
41
|
+
/** Payout stream of this credit. Absent from servers older than this field, whose credits are all `REVENUE_SHARE`. */
|
|
42
|
+
kind: BuildercodePayoutKindSchema.optional(),
|
|
33
43
|
});
|
|
34
44
|
/** Schema for the paginated per-trade payout history. */
|
|
35
45
|
export const ListBuildercodePayoutsResponseSchema = z.object({
|
|
@@ -46,11 +56,25 @@ export const BuildercodePayoutTokenTotalSchema = z.object({
|
|
|
46
56
|
payoutCount: z.number().int().nonnegative(),
|
|
47
57
|
lastCreditedAt: z.string(),
|
|
48
58
|
});
|
|
59
|
+
/** One token-denominated BuilderCodes earnings total for one payout kind. */
|
|
60
|
+
export const BuildercodePayoutTokenKindTotalSchema = z.object({
|
|
61
|
+
token: z.string(),
|
|
62
|
+
kind: BuildercodePayoutKindSchema,
|
|
63
|
+
totalAmount: z.string(),
|
|
64
|
+
payoutCount: z.number().int().nonnegative(),
|
|
65
|
+
lastCreditedAt: z.string(),
|
|
66
|
+
});
|
|
49
67
|
/** Schema for this frontend's payout summary. */
|
|
50
68
|
export const GetBuildercodePayoutSummaryResponseSchema = z.object({
|
|
51
69
|
totalPayouts: z.number().int().nonnegative(),
|
|
52
70
|
lastCreditedAt: z.string().nullable().optional(),
|
|
71
|
+
/** Per-token totals, summed across every payout kind. */
|
|
53
72
|
byToken: z.array(BuildercodePayoutTokenTotalSchema),
|
|
73
|
+
/**
|
|
74
|
+
* The same totals split by token AND kind; a token's rows sum to its
|
|
75
|
+
* `byToken` total. Absent from servers older than this field.
|
|
76
|
+
*/
|
|
77
|
+
byTokenAndKind: z.array(BuildercodePayoutTokenKindTotalSchema).optional(),
|
|
54
78
|
});
|
|
55
79
|
/** One available balance in the reserved BuilderCodes reward bucket. */
|
|
56
80
|
export const BuildercodeRewardsBalanceSchema = z.object({
|
package/dist/faucet/index.d.ts
CHANGED
|
@@ -117,8 +117,9 @@ export interface FaucetAPI extends BaseAPI {
|
|
|
117
117
|
* Fetches the authenticated wallet's faucet quota and recent requests.
|
|
118
118
|
*
|
|
119
119
|
* Read-only: remaining requests in the rolling 24h window, when the next
|
|
120
|
-
* request becomes available, and the 5 most recent requests.
|
|
121
|
-
*
|
|
120
|
+
* request becomes available, and the 5 most recent requests. Scoped to the
|
|
121
|
+
* wallet on this app (each app has its own quota), matching mint
|
|
122
|
+
* enforcement.
|
|
122
123
|
*
|
|
123
124
|
* @returns Promise resolving to the quota and recent-request history
|
|
124
125
|
*/
|
|
@@ -66,11 +66,16 @@ export interface Position {
|
|
|
66
66
|
/**
|
|
67
67
|
* Lifetime realized PnL net of trading fees and funding. Terminal rows
|
|
68
68
|
* only; absent when the position's reducing executions are unavailable.
|
|
69
|
+
* Deducts whole-life `cumFees` once. Also absent until its final close is
|
|
70
|
+
* recorded in the PnL sample and fee history is complete; poll again while
|
|
71
|
+
* pending. With no sample, remains absent for 28 days after close, then
|
|
72
|
+
* falls back to closing-execution net without unavailable opening fees.
|
|
69
73
|
*/
|
|
70
74
|
netRealizedPnl?: string;
|
|
71
75
|
/**
|
|
72
76
|
* Lifetime realized return on the total allocated initial margin, as a
|
|
73
|
-
* percentage. Terminal rows only; absent when unavailable
|
|
77
|
+
* percentage. Terminal rows only; absent when unavailable, including under
|
|
78
|
+
* the same conditions as `netRealizedPnl`.
|
|
74
79
|
*/
|
|
75
80
|
realizedRoe?: string;
|
|
76
81
|
/**
|
|
@@ -101,7 +106,8 @@ export interface Position {
|
|
|
101
106
|
* terminal rows alike. Null when the opening-fill fees are unavailable —
|
|
102
107
|
* before the position's first PnL sample flushes, after its samples age out
|
|
103
108
|
* of PnL retention, or for positions predating the PnL service — rather than
|
|
104
|
-
* an understated partial.
|
|
109
|
+
* an understated partial. On a terminal row it is also null until the
|
|
110
|
+
* final close is recorded in its PnL sample, or while fee data is incomplete.
|
|
105
111
|
*/
|
|
106
112
|
cumFees?: string;
|
|
107
113
|
/**
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -235,8 +235,21 @@ export interface UserTrade {
|
|
|
235
235
|
quoteVolume: string;
|
|
236
236
|
/** Side of the trade */
|
|
237
237
|
side: OrderSide;
|
|
238
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* Total fee paid for this trade (as string to preserve precision). For a
|
|
240
|
+
* taker this is Monaco's taker fee plus the frontend's builder fee; for a
|
|
241
|
+
* maker it is the maker fee (negative for a rebate). Equals
|
|
242
|
+
* `monacoFee + builderFee`.
|
|
243
|
+
*/
|
|
239
244
|
fee: string;
|
|
245
|
+
/** Monaco's component of `fee`. Absent from servers older than this field. */
|
|
246
|
+
monacoFee?: string;
|
|
247
|
+
/**
|
|
248
|
+
* The frontend's builder fee component of `fee`. Always `"0"` for a maker:
|
|
249
|
+
* builder fees are charged to takers only. Absent from servers older than
|
|
250
|
+
* this field.
|
|
251
|
+
*/
|
|
252
|
+
builderFee?: string;
|
|
240
253
|
/** Timestamp when the trade was executed (ISO string) */
|
|
241
254
|
executedAt: string;
|
|
242
255
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export interface MonacoSDK {
|
|
|
120
120
|
/** Deposit-address registration (sweeper) API; requires a session */
|
|
121
121
|
sweeper: SweeperAPI;
|
|
122
122
|
managedMarkets: ManagedMarketsAPI;
|
|
123
|
-
/** Public whitelist
|
|
123
|
+
/** @deprecated Public whitelist applications are closed; submissions return HTTP 403. */
|
|
124
124
|
whitelist: WhitelistAPI;
|
|
125
125
|
/** Profile operations API */
|
|
126
126
|
profile: ProfileAPI;
|
package/dist/trading/orders.d.ts
CHANGED
|
@@ -125,6 +125,12 @@ export interface Order {
|
|
|
125
125
|
* close means unknown, not "placed by hand". Wire: `conditionalOrderId`.
|
|
126
126
|
*/
|
|
127
127
|
conditionalOrderId?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Present only on a TWAP child order: the TWAP parent that placed it. The
|
|
130
|
+
* same id the `orders` WebSocket frames and snapshot rows carry for the
|
|
131
|
+
* child. Wire: `parentOrderId`.
|
|
132
|
+
*/
|
|
133
|
+
parentOrderId?: string;
|
|
128
134
|
/**
|
|
129
135
|
* Opaque, compare-only revision counter for this order's state: a strictly
|
|
130
136
|
* higher value is strictly newer state for that order, and equal values
|
|
@@ -609,18 +609,14 @@ export interface ConditionalOrder {
|
|
|
609
609
|
* the sequencer step that wrote it (0XM-2440). A strictly higher value is
|
|
610
610
|
* strictly newer state for that conditional order.
|
|
611
611
|
*
|
|
612
|
-
* Present on REST reads and on the
|
|
613
|
-
* snapshot frame
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
* announced — a client merging on `>=` would let a snapshot read at that
|
|
617
|
-
* version win the tie and undo the transition.
|
|
618
|
-
*
|
|
619
|
-
* So seed conditional state from the snapshot and REST, comparing with
|
|
620
|
-
* `snapshot.version >= local.version`, and apply live events as state without
|
|
621
|
-
* ranking them. `>=` rather than `>`: one sequencer step can write several
|
|
612
|
+
* Present on REST reads, on live `conditionalOrders` updates and on the
|
|
613
|
+
* subscribe-time snapshot frame, always the version of the row described.
|
|
614
|
+
* When both sides carry one, merge with `incoming.version >= local.version`:
|
|
615
|
+
* `>=` rather than `>`, because one sequencer step can write several
|
|
622
616
|
* conditional rows (a trigger writes the triggered row and cancels its OCO
|
|
623
|
-
* sibling), so equal means "same step", not identical state.
|
|
617
|
+
* sibling), so equal means "same step", not identical state. Never compare
|
|
618
|
+
* an absent version numerically: a versioned row supersedes an unversioned
|
|
619
|
+
* one, and two unversioned rows compare on `updatedAt`.
|
|
624
620
|
*
|
|
625
621
|
* Absent means unknown — a row last written before the field existed — never
|
|
626
622
|
* zero. Wire: `version`.
|
|
@@ -8,12 +8,32 @@ import type { ConditionalOrderConditionType, ConditionalOrderState, ConditionalO
|
|
|
8
8
|
* alias is documentation and a narrowing aid only. Match on it with a default
|
|
9
9
|
* branch; see `ConditionalOrderEventData.reason`.
|
|
10
10
|
*
|
|
11
|
+
* Every transition of a conditional order sends exactly one update:
|
|
12
|
+
*
|
|
13
|
+
* - `created`: the order was placed (`ACTIVE`, or `PENDING_PARENT` while it
|
|
14
|
+
* waits on an entry order).
|
|
15
|
+
* - `activated`: a `PENDING_PARENT` order went `ACTIVE` when its entry order
|
|
16
|
+
* filled as a resting maker.
|
|
17
|
+
* - `triggered`: the trigger fired and placed its close; `state` is
|
|
18
|
+
* `TRIGGERED` and `triggeredOrderId` / `triggeredAt` name that close.
|
|
19
|
+
* - `oco_cancelled`: cancelled because its linked sibling triggered.
|
|
20
|
+
* - `parent_cancelled`: a `PENDING_PARENT` order cancelled because its entry
|
|
21
|
+
* order was cancelled, expired, replaced away or swept.
|
|
22
|
+
* - `position_closed`: cancelled because its position closed.
|
|
23
|
+
* - `cancelled`: any other cancel — a user cancel, a new full-close order
|
|
24
|
+
* superseding it, or a trailing stop refused because its position already
|
|
25
|
+
* has one (`failureReason` says so).
|
|
26
|
+
* - `reparented`: a `PENDING_PARENT` order moved onto the entry order's
|
|
27
|
+
* replacement; `parentOrderId` names the replacement, `state` is unchanged.
|
|
28
|
+
* - `failed`: the trigger fired but its close could not be placed.
|
|
29
|
+
* - `expired`: the trigger found its position no longer open.
|
|
30
|
+
*
|
|
11
31
|
* A `TRAILING_STOP` row adds two: `armed` when tracking begins (its
|
|
12
32
|
* `activationPrice` was reached, or immediately when none was set) and
|
|
13
33
|
* `ratcheted` on every move of its trigger, carrying the new `triggerPrice`
|
|
14
34
|
* and the `watermarkPrice` it was derived from (0XM-2827).
|
|
15
35
|
*/
|
|
16
|
-
export type ConditionalOrderEventReason = "created" | "activated" | "cancelled" | "parent_cancelled" | "triggered" | "failed" | "oco_cancelled" | "armed" | "ratcheted";
|
|
36
|
+
export type ConditionalOrderEventReason = "created" | "activated" | "cancelled" | "parent_cancelled" | "position_closed" | "reparented" | "triggered" | "failed" | "expired" | "oco_cancelled" | "armed" | "ratcheted";
|
|
17
37
|
/**
|
|
18
38
|
* A conditional (TP/SL) order's current state.
|
|
19
39
|
*
|
|
@@ -81,6 +101,10 @@ export interface ConditionalOrderEventData {
|
|
|
81
101
|
*/
|
|
82
102
|
timeInForce?: TimeInForce | (string & {});
|
|
83
103
|
state: ConditionalOrderState | (string & {});
|
|
104
|
+
/**
|
|
105
|
+
* The close order the trigger placed. Set from the `triggered` update on,
|
|
106
|
+
* together with `triggeredAt`. Wire: `triggered_order_id`.
|
|
107
|
+
*/
|
|
84
108
|
triggeredOrderId?: string;
|
|
85
109
|
triggeredAt?: string;
|
|
86
110
|
activatedAt?: string;
|
|
@@ -130,21 +154,17 @@ export interface ConditionalOrderEventData {
|
|
|
130
154
|
* the sequencer step that wrote it (0XM-2440). A strictly higher value is
|
|
131
155
|
* strictly newer state for that conditional order.
|
|
132
156
|
*
|
|
133
|
-
* Present on
|
|
134
|
-
* snapshot frame
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* So seed conditional state from the snapshot and REST, comparing with
|
|
141
|
-
* `snapshot.version >= local.version`, and apply live events as state without
|
|
142
|
-
* ranking them. `>=` rather than `>`: one sequencer step can write several
|
|
143
|
-
* conditional rows (a trigger writes the triggered row and cancels its OCO
|
|
144
|
-
* sibling), so equal means "same step", not identical state.
|
|
157
|
+
* Present on live updates, on the subscribe-time `conditional_orders`
|
|
158
|
+
* snapshot frame and on REST reads, always the version of the row the
|
|
159
|
+
* update describes. When both sides carry one, merge with `incoming.version
|
|
160
|
+
* >= local.version`: `>=` rather than `>`, because one step can write several
|
|
161
|
+
* conditional rows at one version (a trigger writes the triggered row and
|
|
162
|
+
* cancels its OCO sibling), so equal means "same step", not identical state.
|
|
145
163
|
*
|
|
146
164
|
* Absent means unknown — a row last written before the field existed — never
|
|
147
|
-
* zero
|
|
165
|
+
* zero, so never compare it numerically (`42 >= undefined` is false). A
|
|
166
|
+
* versioned row supersedes an unversioned one; between two unversioned rows,
|
|
167
|
+
* compare `updatedAt`. Wire: `version`.
|
|
148
168
|
*/
|
|
149
169
|
version?: number;
|
|
150
170
|
}
|
|
@@ -150,6 +150,17 @@ export interface CommonOrderEventData {
|
|
|
150
150
|
* Wire: `self_trade_prevention_mode`.
|
|
151
151
|
*/
|
|
152
152
|
selfTradePreventionMode?: SelfTradePreventionMode | (string & {});
|
|
153
|
+
/**
|
|
154
|
+
* The TWAP parent of a child order: the same id REST `getOrder` returns as
|
|
155
|
+
* `parentOrderId`, so a subscriber can group a TWAP's children from the
|
|
156
|
+
* socket alone. Carried on every frame of a TWAP child: its `OrderPlaced`
|
|
157
|
+
* acknowledgement, taker fills and remainder cancels, maker fills,
|
|
158
|
+
* cancellation and expiry frames, and its `orders` snapshot row. Omitted
|
|
159
|
+
* for an order that is not a TWAP child, and by servers predating the
|
|
160
|
+
* field.
|
|
161
|
+
* Wire: `parent_order_id`.
|
|
162
|
+
*/
|
|
163
|
+
parentOrderId?: string;
|
|
153
164
|
}
|
|
154
165
|
/**
|
|
155
166
|
* OrderPlaced event - emitted when a new order is placed
|
|
@@ -197,10 +208,11 @@ export interface OrderMatchedEvent extends OrderEvent {
|
|
|
197
208
|
/** `remainingQuantity` in RAW (integer, base-unit) precision. Wire: `remaining_quantity_raw`. */
|
|
198
209
|
remainingQuantityRaw: string;
|
|
199
210
|
/**
|
|
200
|
-
*
|
|
201
|
-
* units (negative = maker rebate)
|
|
202
|
-
*
|
|
203
|
-
*
|
|
211
|
+
* Total fee for the fills this event covers, in normalized decimal QUOTE
|
|
212
|
+
* units (negative = maker rebate): `monacoFee + builderFee`. For a taker
|
|
213
|
+
* this is Monaco's taker fee plus the frontend's builder fee, the same
|
|
214
|
+
* total as the order echo's `totalTakerFees`; for a maker it is the maker
|
|
215
|
+
* fee. Wire: `fee`.
|
|
204
216
|
*/
|
|
205
217
|
fee: string;
|
|
206
218
|
/**
|
|
@@ -210,6 +222,22 @@ export interface OrderMatchedEvent extends OrderEvent {
|
|
|
210
222
|
* 10^quoteDecimals, and `BigInt(feeRaw)` is safe. Wire: `fee_raw`.
|
|
211
223
|
*/
|
|
212
224
|
feeRaw: string;
|
|
225
|
+
/**
|
|
226
|
+
* Monaco's component of `fee`, in normalized decimal QUOTE units. Optional
|
|
227
|
+
* because a server older than this field omits it. Wire: `monaco_fee`.
|
|
228
|
+
*/
|
|
229
|
+
monacoFee?: string;
|
|
230
|
+
/** `monacoFee` in RAW quote-unit precision. Wire: `monaco_fee_raw`. */
|
|
231
|
+
monacoFeeRaw?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The frontend's builder fee component of `fee`, in normalized decimal
|
|
234
|
+
* QUOTE units. Always `"0"` for a maker: builder fees are charged to
|
|
235
|
+
* takers only. Optional because a server older than this field omits it.
|
|
236
|
+
* Wire: `builder_fee`.
|
|
237
|
+
*/
|
|
238
|
+
builderFee?: string;
|
|
239
|
+
/** `builderFee` in RAW quote-unit precision. Wire: `builder_fee_raw`. */
|
|
240
|
+
builderFeeRaw?: string;
|
|
213
241
|
/** Execution timestamp of the first trade this event covers (ISO 8601). `null` when it covers none. */
|
|
214
242
|
executedAt: string | null;
|
|
215
243
|
/** Reference price used for slippage calculation. `null` when unset. */
|
|
@@ -289,14 +317,16 @@ export interface OrderPartiallyFilledEvent extends OrderEvent {
|
|
|
289
317
|
/** `remainingQuantity` in RAW (integer, base-unit) precision. Wire: `remaining_quantity_raw`. */
|
|
290
318
|
remainingQuantityRaw?: string;
|
|
291
319
|
/**
|
|
292
|
-
*
|
|
293
|
-
* units (negative = maker rebate)
|
|
294
|
-
* taker and maker carry the same field. A
|
|
295
|
-
* trade it covers; a maker event is one
|
|
320
|
+
* Total fee for the fills this event covers, in normalized decimal QUOTE
|
|
321
|
+
* units (negative = maker rebate): `monacoFee + builderFee`. The wire
|
|
322
|
+
* field is `fee`, not `makerFee`; taker and maker carry the same field. A
|
|
323
|
+
* taker event aggregates every trade it covers; a maker event is one
|
|
324
|
+
* trade.
|
|
296
325
|
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* held the raw integer value now exposed as
|
|
326
|
+
* For a taker this is Monaco's taker fee plus the frontend's builder fee,
|
|
327
|
+
* the same total as the order echo's `totalTakerFees`; for a maker it is
|
|
328
|
+
* the maker fee. It previously held the raw integer value now exposed as
|
|
329
|
+
* `feeRaw`, and before that Monaco's fee alone.
|
|
300
330
|
*/
|
|
301
331
|
fee?: string;
|
|
302
332
|
/**
|
|
@@ -306,6 +336,18 @@ export interface OrderPartiallyFilledEvent extends OrderEvent {
|
|
|
306
336
|
* 10^quoteDecimals, and `BigInt(feeRaw)` is safe. Wire: `fee_raw`.
|
|
307
337
|
*/
|
|
308
338
|
feeRaw?: string;
|
|
339
|
+
/** Monaco's component of `fee`, in normalized decimal QUOTE units. Wire: `monaco_fee`. */
|
|
340
|
+
monacoFee?: string;
|
|
341
|
+
/** `monacoFee` in RAW quote-unit precision. Wire: `monaco_fee_raw`. */
|
|
342
|
+
monacoFeeRaw?: string;
|
|
343
|
+
/**
|
|
344
|
+
* The frontend's builder fee component of `fee`, in normalized decimal
|
|
345
|
+
* QUOTE units. Always `"0"` for a maker: builder fees are charged to
|
|
346
|
+
* takers only. Wire: `builder_fee`.
|
|
347
|
+
*/
|
|
348
|
+
builderFee?: string;
|
|
349
|
+
/** `builderFee` in RAW quote-unit precision. Wire: `builder_fee_raw`. */
|
|
350
|
+
builderFeeRaw?: string;
|
|
309
351
|
/** Trade execution timestamp (maker orders only) */
|
|
310
352
|
executedAt?: string;
|
|
311
353
|
/** Role of the order in the trade (taker or maker) */
|
|
@@ -369,14 +411,16 @@ export interface OrderFilledEvent extends OrderEvent {
|
|
|
369
411
|
/** `remainingQuantity` in RAW (integer, base-unit) precision. Wire: `remaining_quantity_raw`. */
|
|
370
412
|
remainingQuantityRaw?: string;
|
|
371
413
|
/**
|
|
372
|
-
*
|
|
373
|
-
* units (negative = maker rebate)
|
|
374
|
-
* taker and maker carry the same field. A
|
|
375
|
-
* trade it covers; a maker event is one
|
|
414
|
+
* Total fee for the fills this event covers, in normalized decimal QUOTE
|
|
415
|
+
* units (negative = maker rebate): `monacoFee + builderFee`. The wire
|
|
416
|
+
* field is `fee`, not `makerFee`; taker and maker carry the same field. A
|
|
417
|
+
* taker event aggregates every trade it covers; a maker event is one
|
|
418
|
+
* trade.
|
|
376
419
|
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* held the raw integer value now exposed as
|
|
420
|
+
* For a taker this is Monaco's taker fee plus the frontend's builder fee,
|
|
421
|
+
* the same total as the order echo's `totalTakerFees`; for a maker it is
|
|
422
|
+
* the maker fee. It previously held the raw integer value now exposed as
|
|
423
|
+
* `feeRaw`, and before that Monaco's fee alone.
|
|
380
424
|
*/
|
|
381
425
|
fee?: string;
|
|
382
426
|
/**
|
|
@@ -386,6 +430,18 @@ export interface OrderFilledEvent extends OrderEvent {
|
|
|
386
430
|
* 10^quoteDecimals, and `BigInt(feeRaw)` is safe. Wire: `fee_raw`.
|
|
387
431
|
*/
|
|
388
432
|
feeRaw?: string;
|
|
433
|
+
/** Monaco's component of `fee`, in normalized decimal QUOTE units. Wire: `monaco_fee`. */
|
|
434
|
+
monacoFee?: string;
|
|
435
|
+
/** `monacoFee` in RAW quote-unit precision. Wire: `monaco_fee_raw`. */
|
|
436
|
+
monacoFeeRaw?: string;
|
|
437
|
+
/**
|
|
438
|
+
* The frontend's builder fee component of `fee`, in normalized decimal
|
|
439
|
+
* QUOTE units. Always `"0"` for a maker: builder fees are charged to
|
|
440
|
+
* takers only. Wire: `builder_fee`.
|
|
441
|
+
*/
|
|
442
|
+
builderFee?: string;
|
|
443
|
+
/** `builderFee` in RAW quote-unit precision. Wire: `builder_fee_raw`. */
|
|
444
|
+
builderFeeRaw?: string;
|
|
389
445
|
/** Trade execution timestamp (maker orders only) */
|
|
390
446
|
executedAt?: string;
|
|
391
447
|
/** Role of the order in the trade (taker or maker) */
|
|
@@ -53,7 +53,8 @@ export type SnapshotHandler<T> = (items: T[]) => void;
|
|
|
53
53
|
* The change-only fill metadata of an order EVENT is deliberately absent: a
|
|
54
54
|
* snapshot describes resting state, not a fill, so there is no `eventType`,
|
|
55
55
|
* `tradeId`, `executionPrice`, `lastFillQuantity`, `role`, `fee`, `feeRaw`,
|
|
56
|
-
* `
|
|
56
|
+
* `monacoFee`, `builderFee` (and their `Raw` twins), `tradesCount` or
|
|
57
|
+
* slippage. The cumulative `filledQuantity` /
|
|
57
58
|
* `averageFillPrice` totals are present, because those are state.
|
|
58
59
|
*
|
|
59
60
|
* Nullability mirrors the wire exactly. Every optional field below is a Rust
|
|
@@ -130,6 +131,12 @@ export interface OrderSnapshotItem {
|
|
|
130
131
|
* never the resolved wallet or platform default.
|
|
131
132
|
*/
|
|
132
133
|
selfTradePreventionMode?: SelfTradePreventionMode | (string & {});
|
|
134
|
+
/**
|
|
135
|
+
* The TWAP parent of a child order: the same id REST `getOrder` returns as
|
|
136
|
+
* `parentOrderId`. Omitted — not `null` — for an order that is not a TWAP
|
|
137
|
+
* child, matching the live event payload. Wire: `parent_order_id`.
|
|
138
|
+
*/
|
|
139
|
+
parentOrderId?: string;
|
|
133
140
|
/**
|
|
134
141
|
* Sequencer step this order's state was last written by — the SAME counter
|
|
135
142
|
* the live order events and the REST endpoints carry (0XM-2440).
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Types for the public whitelist (waitlist) application endpoint. Wire shapes
|
|
5
|
-
* are snake_case.
|
|
6
|
-
*
|
|
7
|
-
* NOTE: This endpoint is **public (unauthenticated)** and creates an inactive
|
|
8
|
-
* user pending manual approval — it is an onboarding/waitlist submission, not a
|
|
9
|
-
* trading operation.
|
|
2
|
+
* Compatibility types for the retired public whitelist endpoint.
|
|
3
|
+
* Submissions return HTTP 403 FORBIDDEN without changing applicant data.
|
|
10
4
|
*/
|
|
11
5
|
import type { BaseAPI } from "../api";
|
|
12
6
|
/** Body for a whitelist application. */
|
|
@@ -20,7 +14,7 @@ export interface SubmitWhitelistRequest {
|
|
|
20
14
|
/** Applicant Telegram username (5-32 chars) */
|
|
21
15
|
telegramUsername?: string;
|
|
22
16
|
}
|
|
23
|
-
/**
|
|
17
|
+
/** Legacy success response, retained for compatibility; retired submissions return HTTP 403. */
|
|
24
18
|
export interface SubmitWhitelistResponse {
|
|
25
19
|
/** Human-readable status message */
|
|
26
20
|
message: string;
|
|
@@ -32,13 +26,8 @@ export interface SubmitWhitelistResponse {
|
|
|
32
26
|
*/
|
|
33
27
|
export interface WhitelistAPI extends BaseAPI {
|
|
34
28
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Public/unauthenticated. The server validates and de-duplicates by wallet
|
|
38
|
-
* address and email, creating an inactive user pending approval.
|
|
39
|
-
*
|
|
40
|
-
* @param body - Applicant details
|
|
41
|
-
* @returns Promise resolving to the status message and created user id
|
|
29
|
+
* @deprecated Public whitelist applications are closed. The server returns HTTP 403.
|
|
30
|
+
* @param body - Legacy applicant details; the request shape is retained for compatibility.
|
|
42
31
|
*/
|
|
43
32
|
submit(body: SubmitWhitelistRequest): Promise<SubmitWhitelistResponse>;
|
|
44
33
|
}
|
package/dist/whitelist/index.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Types for the public whitelist (waitlist) application endpoint. Wire shapes
|
|
5
|
-
* are snake_case.
|
|
6
|
-
*
|
|
7
|
-
* NOTE: This endpoint is **public (unauthenticated)** and creates an inactive
|
|
8
|
-
* user pending manual approval — it is an onboarding/waitlist submission, not a
|
|
9
|
-
* trading operation.
|
|
2
|
+
* Compatibility types for the retired public whitelist endpoint.
|
|
3
|
+
* Submissions return HTTP 403 FORBIDDEN without changing applicant data.
|
|
10
4
|
*/
|
package/dist/wire/schema.d.ts
CHANGED
|
@@ -998,9 +998,9 @@ export interface paths {
|
|
|
998
998
|
*
|
|
999
999
|
* Returns the authenticated wallet's remaining faucet requests in the
|
|
1000
1000
|
* rolling 24h window, when the next request becomes available, and the
|
|
1001
|
-
* 5 most recent faucet requests. Quota is wallet
|
|
1002
|
-
*
|
|
1003
|
-
* enforcement.
|
|
1001
|
+
* 5 most recent faucet requests. Quota is per wallet and app: the same
|
|
1002
|
+
* wallet has its own quota on each app, and only the calling app's
|
|
1003
|
+
* requests are counted and listed, matching mint enforcement.
|
|
1004
1004
|
*/
|
|
1005
1005
|
get: operations["get_faucet_info"];
|
|
1006
1006
|
put?: never;
|
|
@@ -1025,7 +1025,8 @@ export interface paths {
|
|
|
1025
1025
|
* @description Mint all testnet tokens.
|
|
1026
1026
|
*
|
|
1027
1027
|
* Mint all available testnet tokens to the authenticated user's address.
|
|
1028
|
-
* Rate limited per 24 hours
|
|
1028
|
+
* Rate limited per 24 hours, per wallet and app: the same wallet has its
|
|
1029
|
+
* own quota on each app. The request is synchronous: it returns 200
|
|
1029
1030
|
* only once every faucet transaction is confirmed on-chain.
|
|
1030
1031
|
*/
|
|
1031
1032
|
post: operations["mint_tokens"];
|
|
@@ -2576,11 +2577,13 @@ export interface paths {
|
|
|
2576
2577
|
get?: never;
|
|
2577
2578
|
put?: never;
|
|
2578
2579
|
/**
|
|
2579
|
-
*
|
|
2580
|
-
* @
|
|
2580
|
+
* Whitelist applications closed
|
|
2581
|
+
* @deprecated
|
|
2582
|
+
* @description Public whitelist applications are closed.
|
|
2581
2583
|
*
|
|
2582
|
-
*
|
|
2583
|
-
*
|
|
2584
|
+
* Retained for client compatibility. Every decoded submission is rejected with
|
|
2585
|
+
* HTTP 403 Forbidden / gRPC PERMISSION_DENIED and no applicant data is changed.
|
|
2586
|
+
* Existing applications and administrative approvals remain available.
|
|
2584
2587
|
*/
|
|
2585
2588
|
post: operations["submit_whitelist"];
|
|
2586
2589
|
delete?: never;
|
|
@@ -3406,6 +3409,40 @@ export interface components {
|
|
|
3406
3409
|
* @description RFC 3339 credit timestamp.
|
|
3407
3410
|
*/
|
|
3408
3411
|
createdAt?: string | null;
|
|
3412
|
+
/**
|
|
3413
|
+
* @description Payout stream this credit belongs to: `REVENUE_SHARE` (the frontend's share of Monaco's fee) or `BUILDER_FEE` (the frontend's own builder fee, paid by the taker). Both land in the same claimable balance.
|
|
3414
|
+
* @example REVENUE_SHARE
|
|
3415
|
+
* @enum {string|null}
|
|
3416
|
+
*/
|
|
3417
|
+
kind?: "REVENUE_SHARE" | "BUILDER_FEE" | null;
|
|
3418
|
+
};
|
|
3419
|
+
BuildercodePayoutTokenKindTotal: {
|
|
3420
|
+
/**
|
|
3421
|
+
* @description Credit token contract address.
|
|
3422
|
+
* @example 0x0000000000000000000000000000000000000002
|
|
3423
|
+
*/
|
|
3424
|
+
token?: string | null;
|
|
3425
|
+
/**
|
|
3426
|
+
* @description Payout stream these totals cover: `REVENUE_SHARE` or `BUILDER_FEE`.
|
|
3427
|
+
* @example REVENUE_SHARE
|
|
3428
|
+
* @enum {string|null}
|
|
3429
|
+
*/
|
|
3430
|
+
kind?: "REVENUE_SHARE" | "BUILDER_FEE" | null;
|
|
3431
|
+
/**
|
|
3432
|
+
* @description Summed credits of this kind in RAW atomic units of this token.
|
|
3433
|
+
* @example 5000000
|
|
3434
|
+
*/
|
|
3435
|
+
totalAmount?: string | null;
|
|
3436
|
+
/**
|
|
3437
|
+
* Format: int64
|
|
3438
|
+
* @description Number of credits of this kind included in this total.
|
|
3439
|
+
*/
|
|
3440
|
+
payoutCount?: number | null;
|
|
3441
|
+
/**
|
|
3442
|
+
* Format: date-time
|
|
3443
|
+
* @description RFC 3339 timestamp of the newest credit of this kind in this token.
|
|
3444
|
+
*/
|
|
3445
|
+
lastCreditedAt?: string | null;
|
|
3409
3446
|
};
|
|
3410
3447
|
BuildercodePayoutTokenTotal: {
|
|
3411
3448
|
/**
|
|
@@ -3691,7 +3728,7 @@ export interface components {
|
|
|
3691
3728
|
activatedAt?: string | null;
|
|
3692
3729
|
/**
|
|
3693
3730
|
* Format: int64
|
|
3694
|
-
* @description Opaque, compare-only revision counter for this conditional order's state: the sequencer step that wrote it. A strictly higher value is strictly newer state for that conditional order. The SAME counter is carried on
|
|
3731
|
+
* @description Opaque, compare-only revision counter for this conditional order's state: the sequencer step that wrote it. A strictly higher value is strictly newer state for that conditional order. The SAME counter is carried on every live `conditional_orders` WebSocket event and on the subscribe-time snapshot frame, always the version of the row the frame describes. Reconcile all three on `(conditionalOrderId, version)`: take the incoming row when `incoming.version >= local.version`, else keep local state. Note `>=`, not `>`: equal versions mean the SAME STEP rather than identical state, because one step can write several conditional rows (a trigger writes the triggered row and cancels its OCO sibling under one step). A REST row is that step's FINAL state, so it wins a tie. One consequence to plan for: the snapshot is read from the database, which lags the matching engine, so a transition that fires during the read is in neither the snapshot nor the delivered stream and cannot be ranked — re-read the affected rows if a conditional order's state matters at reconnect. Do not read anything else into the number: it is drawn from the same global sequence plain orders use, so values are sparse, gaps are normal, and it is not comparable across different conditional orders — nor against a plain order's version. Absent means unknown: a row last written before this field existed. Fall back to a full field comparison for those rather than treating absent as version zero.
|
|
3695
3732
|
* @example 918342
|
|
3696
3733
|
*/
|
|
3697
3734
|
version?: number | null;
|
|
@@ -4521,8 +4558,10 @@ export interface components {
|
|
|
4521
4558
|
* @description RFC 3339 timestamp of the newest credit, or null when none exists.
|
|
4522
4559
|
*/
|
|
4523
4560
|
lastCreditedAt?: string | null;
|
|
4524
|
-
/** @description Per-token earnings totals. Empty when this application has no payouts. */
|
|
4561
|
+
/** @description Per-token earnings totals, summed across every payout kind. Empty when this application has no payouts. */
|
|
4525
4562
|
byToken?: components["schemas"]["BuildercodePayoutTokenTotal"][] | null;
|
|
4563
|
+
/** @description The same totals split by token AND payout kind. One row per (token, kind) pair with at least one credit; a token's rows sum to its `byToken` total. Empty when this application has no payouts. */
|
|
4564
|
+
byTokenAndKind?: components["schemas"]["BuildercodePayoutTokenKindTotal"][] | null;
|
|
4526
4565
|
};
|
|
4527
4566
|
GetBuildercodeRewardsBalanceResponse: {
|
|
4528
4567
|
/** @description One entry per reward token with a non-zero available balance. */
|
|
@@ -5541,6 +5580,11 @@ export interface components {
|
|
|
5541
5580
|
/**
|
|
5542
5581
|
* @description Lifetime realized PnL net of trading fees and funding. Terminal rows
|
|
5543
5582
|
* only; absent when the position's reducing executions are unavailable.
|
|
5583
|
+
* Deducts whole-life `cum_fees` once. Also absent after close until the
|
|
5584
|
+
* final close is recorded in the PnL sample and the fee history is complete.
|
|
5585
|
+
* A position with no PnL sample stays absent for 28 days after close while
|
|
5586
|
+
* its sample may be pending. Beyond that it serves the closing-execution
|
|
5587
|
+
* net, without opening fees that are no longer available.
|
|
5544
5588
|
*/
|
|
5545
5589
|
netRealizedPnl?: string | null;
|
|
5546
5590
|
/**
|
|
@@ -5550,7 +5594,8 @@ export interface components {
|
|
|
5550
5594
|
* costs rather than posted collateral, and funding is signed, so folding it
|
|
5551
5595
|
* into the denominator could drive it to zero or negative. Terminal rows
|
|
5552
5596
|
* only; absent when unavailable, including when the position's reducing
|
|
5553
|
-
* executions do not account for its whole lifetime
|
|
5597
|
+
* executions do not account for its whole lifetime, and under the same
|
|
5598
|
+
* conditions as `net_realized_pnl`.
|
|
5554
5599
|
*/
|
|
5555
5600
|
realizedRoe?: string | null;
|
|
5556
5601
|
/**
|
|
@@ -5583,7 +5628,8 @@ export interface components {
|
|
|
5583
5628
|
* Null when the opening-fill fees are unavailable — before the position's
|
|
5584
5629
|
* first PnL sample flushes, after its samples age out of PnL retention, or
|
|
5585
5630
|
* for positions predating the PnL service — rather than an understated
|
|
5586
|
-
* partial.
|
|
5631
|
+
* partial. On a terminal row it is also null until the final close is
|
|
5632
|
+
* recorded in the position's PnL sample, or while fee data is incomplete.
|
|
5587
5633
|
*/
|
|
5588
5634
|
cumFees?: string | null;
|
|
5589
5635
|
/**
|
|
@@ -7219,6 +7265,11 @@ export interface components {
|
|
|
7219
7265
|
/**
|
|
7220
7266
|
* @description Lifetime realized PnL net of trading fees and funding. Terminal rows
|
|
7221
7267
|
* only; absent when the position's reducing executions are unavailable.
|
|
7268
|
+
* Deducts whole-life `cum_fees` once. Also absent after close until the
|
|
7269
|
+
* final close is recorded in the PnL sample and the fee history is complete.
|
|
7270
|
+
* A position with no PnL sample stays absent for 28 days after close while
|
|
7271
|
+
* its sample may be pending. Beyond that it serves the closing-execution
|
|
7272
|
+
* net, without opening fees that are no longer available.
|
|
7222
7273
|
*/
|
|
7223
7274
|
netRealizedPnl?: string | null;
|
|
7224
7275
|
/**
|
|
@@ -7228,7 +7279,8 @@ export interface components {
|
|
|
7228
7279
|
* costs rather than posted collateral, and funding is signed, so folding it
|
|
7229
7280
|
* into the denominator could drive it to zero or negative. Terminal rows
|
|
7230
7281
|
* only; absent when unavailable, including when the position's reducing
|
|
7231
|
-
* executions do not account for its whole lifetime
|
|
7282
|
+
* executions do not account for its whole lifetime, and under the same
|
|
7283
|
+
* conditions as `net_realized_pnl`.
|
|
7232
7284
|
*/
|
|
7233
7285
|
realizedRoe?: string | null;
|
|
7234
7286
|
/**
|
|
@@ -7261,7 +7313,8 @@ export interface components {
|
|
|
7261
7313
|
* Null when the opening-fill fees are unavailable — before the position's
|
|
7262
7314
|
* first PnL sample flushes, after its samples age out of PnL retention, or
|
|
7263
7315
|
* for positions predating the PnL service — rather than an understated
|
|
7264
|
-
* partial.
|
|
7316
|
+
* partial. On a terminal row it is also null until the final close is
|
|
7317
|
+
* recorded in the position's PnL sample, or while fee data is incomplete.
|
|
7265
7318
|
*/
|
|
7266
7319
|
cumFees?: string | null;
|
|
7267
7320
|
/**
|
|
@@ -8346,13 +8399,13 @@ export interface components {
|
|
|
8346
8399
|
};
|
|
8347
8400
|
SubmitWhitelistResponse: {
|
|
8348
8401
|
/**
|
|
8349
|
-
* @description
|
|
8402
|
+
* @description Legacy success message; submissions now return HTTP 403 / gRPC PERMISSION_DENIED
|
|
8350
8403
|
* @example Your whitelist application has been submitted successfully! We'll review it and get back to you soon.
|
|
8351
8404
|
*/
|
|
8352
8405
|
message?: string | null;
|
|
8353
8406
|
/**
|
|
8354
8407
|
* Format: uuid
|
|
8355
|
-
* @description
|
|
8408
|
+
* @description Legacy created user UUID; retired submissions do not create users
|
|
8356
8409
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
8357
8410
|
*/
|
|
8358
8411
|
userId?: string | null;
|
|
@@ -9169,9 +9222,21 @@ export interface components {
|
|
|
9169
9222
|
price?: string | null;
|
|
9170
9223
|
quantity?: string | null;
|
|
9171
9224
|
liquidityRole?: string | null;
|
|
9225
|
+
/**
|
|
9226
|
+
* @description Total fee this user paid on the trade, in raw quote units: for a taker,
|
|
9227
|
+
* Monaco's taker fee plus the frontend's builder fee; for a maker, the maker
|
|
9228
|
+
* fee (negative for a rebate). Equals `monaco_fee + builder_fee`.
|
|
9229
|
+
*/
|
|
9172
9230
|
fee?: string | null;
|
|
9173
9231
|
realizedPnl?: string | null;
|
|
9174
9232
|
timestamp?: string | null;
|
|
9233
|
+
/** @description Monaco's component of `fee`, in raw quote units. */
|
|
9234
|
+
monacoFee?: string | null;
|
|
9235
|
+
/**
|
|
9236
|
+
* @description The frontend's builder fee component of `fee`, in raw quote units. Always
|
|
9237
|
+
* "0" for a maker: builder fees are charged to takers only.
|
|
9238
|
+
*/
|
|
9239
|
+
builderFee?: string | null;
|
|
9175
9240
|
};
|
|
9176
9241
|
VerifyRequest: {
|
|
9177
9242
|
/**
|
|
@@ -10997,6 +11062,8 @@ export interface operations {
|
|
|
10997
11062
|
page?: number;
|
|
10998
11063
|
/** @description Items per page (max 100) */
|
|
10999
11064
|
pageSize?: number;
|
|
11065
|
+
/** @description Only return BuilderCodes payouts of this payout kind: REVENUE_SHARE (the frontend's share of Monaco's fee) or BUILDER_FEE (the frontend's own builder fee). Omit for every kind. */
|
|
11066
|
+
kind?: "REVENUE_SHARE" | "BUILDER_FEE";
|
|
11000
11067
|
};
|
|
11001
11068
|
header?: never;
|
|
11002
11069
|
path?: never;
|
|
@@ -14724,8 +14791,8 @@ export interface operations {
|
|
|
14724
14791
|
};
|
|
14725
14792
|
content?: never;
|
|
14726
14793
|
};
|
|
14727
|
-
/** @description
|
|
14728
|
-
|
|
14794
|
+
/** @description Public whitelist applications are closed. No applicant data is changed. */
|
|
14795
|
+
403: {
|
|
14729
14796
|
headers: {
|
|
14730
14797
|
[name: string]: unknown;
|
|
14731
14798
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
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.69",
|
|
20
20
|
"zod": "^4.1.12"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|