@0xmonaco/types 1.0.69 → 1.0.72
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/auth/index.d.ts +4 -2
- package/dist/auth/responses.d.ts +3 -1
- package/dist/copy-trading/index.d.ts +143 -0
- package/dist/copy-trading/index.js +8 -0
- package/dist/copy-trading/responses.d.ts +416 -0
- package/dist/copy-trading/responses.js +317 -0
- package/dist/delegated-agents/index.d.ts +9 -0
- package/dist/fees/index.d.ts +3 -0
- package/dist/fees/responses.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/margin-accounts/index.d.ts +18 -0
- package/dist/portfolio/index.d.ts +12 -0
- package/dist/profile/index.d.ts +30 -40
- package/dist/sdk/index.d.ts +3 -0
- package/dist/trading/responses.d.ts +3 -46
- package/dist/validation/copy-trading.d.ts +124 -0
- package/dist/validation/copy-trading.js +156 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/positions.d.ts +1 -1
- package/dist/validation/profile.d.ts +1 -1
- package/dist/validation/profile.js +8 -16
- package/dist/validation/trading.d.ts +4 -5
- package/dist/validation/trading.js +25 -50
- package/dist/websocket/client.d.ts +9 -1
- package/dist/websocket/events/copy-events.d.ts +133 -0
- package/dist/websocket/events/copy-events.js +17 -0
- package/dist/websocket/events/index.d.ts +1 -0
- package/dist/websocket/events/index.js +1 -0
- package/dist/websocket/events/orders-events.d.ts +51 -0
- package/dist/websocket/events/position-events.d.ts +14 -10
- package/dist/websocket/events/twap-order-events.d.ts +7 -0
- package/dist/websocket/snapshots.d.ts +24 -2
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +16 -0
- package/dist/wire/schema.d.ts +2218 -325
- package/package.json +2 -2
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy trading WebSocket event types (owner-private `copy` channel, 0XM-2848).
|
|
3
|
+
*
|
|
4
|
+
* The channel streams to the FOLLOWER: every change to one of your copy
|
|
5
|
+
* relationships (follows), and every leader fill a relationship could not
|
|
6
|
+
* mirror. A leader receives nothing on this channel.
|
|
7
|
+
*
|
|
8
|
+
* Field names mirror the backend payloads (snake_case on the wire, camelCased
|
|
9
|
+
* by the client). The SDK parser normalizes explicit `null` values to absent,
|
|
10
|
+
* so nullable wire fields are optional here.
|
|
11
|
+
*
|
|
12
|
+
* **The value unions below are the values the server sends today, not a
|
|
13
|
+
* runtime guarantee**, which is why each value field is typed
|
|
14
|
+
* `Union | (string & {})`: `@0xmonaco/core` validates no value field, so an
|
|
15
|
+
* unrecognized status, policy or reason arrives as-is rather than dropping the
|
|
16
|
+
* update (0XM-2628). `switch` over one with a `default` branch.
|
|
17
|
+
*/
|
|
18
|
+
/** Lifecycle status of a copy relationship (follow). */
|
|
19
|
+
export type CopyRelationshipStatus = "ACTIVE" | "CLOSE_ONLY" | "STOPPED";
|
|
20
|
+
/** How a follow picks the margin mode of each copied position. */
|
|
21
|
+
export type CopyMarginModePolicy = "FOLLOW" | "CROSS" | "ISOLATED";
|
|
22
|
+
/** How a follow sizes each copied order. */
|
|
23
|
+
export type CopySizingMode = "PROPORTIONAL" | "FIXED_MARGIN";
|
|
24
|
+
/** How a follow picks the leverage of each copied order. */
|
|
25
|
+
export type CopyLeverageMode = "FOLLOW" | "FIXED";
|
|
26
|
+
/** Why a follow stopped. */
|
|
27
|
+
export type CopyStopReason = "FOLLOWER" | "STOP_LOSS" | "SKIP_LIMIT" | "ADMIN" | "LEADER_SUSPENDED";
|
|
28
|
+
/**
|
|
29
|
+
* Why a leader fill was not mirrored. Only `INSUFFICIENT_MARGIN` advances the
|
|
30
|
+
* relationship's `consecutiveSkips` streak.
|
|
31
|
+
*/
|
|
32
|
+
export type CopySkipReason = "INSUFFICIENT_MARGIN" | "BELOW_MIN" | "LEVERAGE_MISMATCH" | "MARKET_STATE" | "LEADER_EQUITY" | "NO_LIQUIDITY";
|
|
33
|
+
/**
|
|
34
|
+
* Why a relationship frame was sent. `snapshot` marks a subscribe-time
|
|
35
|
+
* baseline row; every other value names the change that produced a live
|
|
36
|
+
* frame.
|
|
37
|
+
*/
|
|
38
|
+
export type CopyRelationshipChange = "created" | "updated" | "close_only" | "stopped" | "skip_recorded" | "reactivated" | "snapshot";
|
|
39
|
+
/**
|
|
40
|
+
* A copy relationship's full state after one sequencer step: the
|
|
41
|
+
* `copy_relationship_update` payload, and (with `change: "snapshot"`) each
|
|
42
|
+
* subscribe-time snapshot row. Every frame carries the whole row, so it
|
|
43
|
+
* supersedes the previous one for the same `relationshipId`; compare
|
|
44
|
+
* `version` to order frames for one relationship.
|
|
45
|
+
*/
|
|
46
|
+
export interface CopyRelationshipEventData {
|
|
47
|
+
/** The follow's id — the same value as `Follow.followId` over REST */
|
|
48
|
+
relationshipId: string;
|
|
49
|
+
/** The leader's wallet address (lowercase hex) */
|
|
50
|
+
leaderWallet: string;
|
|
51
|
+
status: CopyRelationshipStatus | (string & {});
|
|
52
|
+
marginModePolicy: CopyMarginModePolicy | (string & {});
|
|
53
|
+
/** The copy account: the follow's cross risk bucket in your margin account */
|
|
54
|
+
copyRiskBucketId: string;
|
|
55
|
+
sizingMode: CopySizingMode | (string & {});
|
|
56
|
+
/** Margin per leader order in quote units, for `FIXED_MARGIN` */
|
|
57
|
+
sizingParam?: string;
|
|
58
|
+
leverageMode: CopyLeverageMode | (string & {});
|
|
59
|
+
/** Leverage for every copy, for `FIXED` */
|
|
60
|
+
fixedLeverage?: string;
|
|
61
|
+
/** Collateral allocated to the follow, in quote units */
|
|
62
|
+
allocation: string;
|
|
63
|
+
/** Copy stop-loss as a fraction of the allocation; absent when none */
|
|
64
|
+
slPct?: string;
|
|
65
|
+
/** Whether the follow copied the leader's open positions at creation */
|
|
66
|
+
copyExisting: boolean;
|
|
67
|
+
/** Markets mirrored; empty means every market the leader trades */
|
|
68
|
+
tradingPairIds: string[];
|
|
69
|
+
/**
|
|
70
|
+
* The relationship's realized PnL net of fees since `startedAt`, in quote
|
|
71
|
+
* units — the profit-share basis. This is NOT the copy risk bucket's
|
|
72
|
+
* balance: that bucket's `realizedPnl` is its cash balance, which also moves
|
|
73
|
+
* on transfers with no trade.
|
|
74
|
+
*/
|
|
75
|
+
cumNetRealized: string;
|
|
76
|
+
/** High-water mark of `cumNetRealized` — the profit-share basis, not a balance */
|
|
77
|
+
hwm: string;
|
|
78
|
+
/** Consecutive mirrors skipped for insufficient margin */
|
|
79
|
+
consecutiveSkips: number;
|
|
80
|
+
/** When the follow started (RFC 3339) */
|
|
81
|
+
startedAt: string;
|
|
82
|
+
/** When the follow stopped (RFC 3339); absent while live */
|
|
83
|
+
stoppedAt?: string;
|
|
84
|
+
/** Why the follow stopped; absent while live */
|
|
85
|
+
stopReason?: CopyStopReason | (string & {});
|
|
86
|
+
/** Why this frame was sent */
|
|
87
|
+
change: CopyRelationshipChange | (string & {});
|
|
88
|
+
/**
|
|
89
|
+
* Durable-log sequence of the entry that produced this state; higher is
|
|
90
|
+
* newer for one relationship. Absent when unknown.
|
|
91
|
+
*/
|
|
92
|
+
version?: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* One leader fill a relationship did NOT mirror: the `copy_skip` payload.
|
|
96
|
+
* Events only; the subscribe-time snapshot carries no skips.
|
|
97
|
+
*/
|
|
98
|
+
export interface CopySkipEventData {
|
|
99
|
+
/** The follow's id */
|
|
100
|
+
relationshipId: string;
|
|
101
|
+
/** The leader's wallet address (lowercase hex) */
|
|
102
|
+
leaderWallet: string;
|
|
103
|
+
/** The leader's trade that was not mirrored */
|
|
104
|
+
leaderTradeId: string;
|
|
105
|
+
/** The leader's order behind that trade */
|
|
106
|
+
leaderOrderId: string;
|
|
107
|
+
tradingPairId: string;
|
|
108
|
+
reason: CopySkipReason | (string & {});
|
|
109
|
+
/** The copy size the sizing step asked for before the skip, in base units */
|
|
110
|
+
requestedQuantity: string;
|
|
111
|
+
/** The relationship's streak after this skip */
|
|
112
|
+
consecutiveSkips: number;
|
|
113
|
+
/** Optional human-readable diagnostics */
|
|
114
|
+
detail?: string;
|
|
115
|
+
/** Durable-log sequence of the entry that recorded the skip, when known */
|
|
116
|
+
version?: number;
|
|
117
|
+
}
|
|
118
|
+
/** A `copy_relationship_update` frame. */
|
|
119
|
+
export interface CopyRelationshipEvent {
|
|
120
|
+
eventType: "copy_relationship_update";
|
|
121
|
+
/** The follower (you) */
|
|
122
|
+
userId: string;
|
|
123
|
+
data: CopyRelationshipEventData;
|
|
124
|
+
}
|
|
125
|
+
/** A `copy_skip` frame. */
|
|
126
|
+
export interface CopySkipEvent {
|
|
127
|
+
eventType: "copy_skip";
|
|
128
|
+
/** The follower (you) */
|
|
129
|
+
userId: string;
|
|
130
|
+
data: CopySkipEventData;
|
|
131
|
+
}
|
|
132
|
+
/** Any `copy` channel frame; narrow on `eventType`. */
|
|
133
|
+
export type CopyEvent = CopyRelationshipEvent | CopySkipEvent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy trading WebSocket event types (owner-private `copy` channel, 0XM-2848).
|
|
3
|
+
*
|
|
4
|
+
* The channel streams to the FOLLOWER: every change to one of your copy
|
|
5
|
+
* relationships (follows), and every leader fill a relationship could not
|
|
6
|
+
* mirror. A leader receives nothing on this channel.
|
|
7
|
+
*
|
|
8
|
+
* Field names mirror the backend payloads (snake_case on the wire, camelCased
|
|
9
|
+
* by the client). The SDK parser normalizes explicit `null` values to absent,
|
|
10
|
+
* so nullable wire fields are optional here.
|
|
11
|
+
*
|
|
12
|
+
* **The value unions below are the values the server sends today, not a
|
|
13
|
+
* runtime guarantee**, which is why each value field is typed
|
|
14
|
+
* `Union | (string & {})`: `@0xmonaco/core` validates no value field, so an
|
|
15
|
+
* unrecognized status, policy or reason arrives as-is rather than dropping the
|
|
16
|
+
* update (0XM-2628). `switch` over one with a `default` branch.
|
|
17
|
+
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./account-events";
|
|
2
2
|
export * from "./balance-events";
|
|
3
3
|
export * from "./conditional-order-events";
|
|
4
|
+
export * from "./copy-events";
|
|
4
5
|
export * from "./instrument-events";
|
|
5
6
|
export * from "./liquidation-events";
|
|
6
7
|
export * from "./market-stats-events";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./account-events";
|
|
2
2
|
export * from "./balance-events";
|
|
3
3
|
export * from "./conditional-order-events";
|
|
4
|
+
export * from "./copy-events";
|
|
4
5
|
export * from "./instrument-events";
|
|
5
6
|
export * from "./liquidation-events";
|
|
6
7
|
export * from "./market-stats-events";
|
|
@@ -150,6 +150,24 @@ export interface CommonOrderEventData {
|
|
|
150
150
|
* Wire: `self_trade_prevention_mode`.
|
|
151
151
|
*/
|
|
152
152
|
selfTradePreventionMode?: SelfTradePreventionMode | (string & {});
|
|
153
|
+
/**
|
|
154
|
+
* What placed the order (0XM-2848): `"USER"`, `"LIQUIDATION"`, `"SYSTEM"`,
|
|
155
|
+
* `"ADL"` or `"COPY"` (a copy trading order the engine placed for one of
|
|
156
|
+
* your follows).
|
|
157
|
+
*
|
|
158
|
+
* Absent means **not reported**, never `"USER"`: the key is omitted until
|
|
159
|
+
* the event's producer fills it, and `"USER"` is sent explicitly once it
|
|
160
|
+
* does. Widened past {@link OrderOrigin} because the parser passes an
|
|
161
|
+
* unrecognized value through rather than dropping the frame.
|
|
162
|
+
* Wire: `origin`.
|
|
163
|
+
*/
|
|
164
|
+
origin?: OrderOrigin | (string & {});
|
|
165
|
+
/**
|
|
166
|
+
* The follow (copy relationship) a `"COPY"` order was placed for — the same
|
|
167
|
+
* id as `Follow.followId` and the `copy` channel's `relationshipId`.
|
|
168
|
+
* Omitted on every other order. Wire: `copy_relationship_id`.
|
|
169
|
+
*/
|
|
170
|
+
copyRelationshipId?: string;
|
|
153
171
|
/**
|
|
154
172
|
* The TWAP parent of a child order: the same id REST `getOrder` returns as
|
|
155
173
|
* `parentOrderId`, so a subscriber can group a TWAP's children from the
|
|
@@ -161,7 +179,24 @@ export interface CommonOrderEventData {
|
|
|
161
179
|
* Wire: `parent_order_id`.
|
|
162
180
|
*/
|
|
163
181
|
parentOrderId?: string;
|
|
182
|
+
/**
|
|
183
|
+
* The margin position this order is bound to: the same id REST `getOrder`
|
|
184
|
+
* returns as `positionId`. A margin order placed while its margin account
|
|
185
|
+
* (cross) or risk bucket (isolated) already holds an open position in the
|
|
186
|
+
* pair is bound when it is admitted, so a resting close or reduce-only order
|
|
187
|
+
* names its position before it fills; otherwise its first fill binds it.
|
|
188
|
+
* Carried on the `OrderPlaced` acknowledgement, taker and maker fills,
|
|
189
|
+
* remainder cancels, and the resting order's cancel, partial-cancel and
|
|
190
|
+
* expiry frames. Omitted while the order is unbound, always for spot, and by
|
|
191
|
+
* servers predating the field. Wire: `position_id`.
|
|
192
|
+
*/
|
|
193
|
+
positionId?: string;
|
|
164
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* What placed an order, as carried on order events' `origin` (0XM-2848).
|
|
197
|
+
* The values the server sends today; see {@link CommonOrderEventData.origin}.
|
|
198
|
+
*/
|
|
199
|
+
export type OrderOrigin = "USER" | "LIQUIDATION" | "SYSTEM" | "ADL" | "COPY";
|
|
165
200
|
/**
|
|
166
201
|
* OrderPlaced event - emitted when a new order is placed
|
|
167
202
|
*/
|
|
@@ -170,6 +205,22 @@ export interface OrderPlacedEvent extends OrderEvent {
|
|
|
170
205
|
data: CommonOrderEventData & {
|
|
171
206
|
/** Order status */
|
|
172
207
|
status: OrderStatus | (string & {});
|
|
208
|
+
/**
|
|
209
|
+
* Margin account backing a margin order (UUID), as REST reports it.
|
|
210
|
+
* Omitted for spot. Wire: `margin_account_id`.
|
|
211
|
+
*/
|
|
212
|
+
marginAccountId?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Requested leverage of a margin order (decimal string). Omitted for spot
|
|
215
|
+
* and for a margin order placed without one. Wire: `leverage`.
|
|
216
|
+
*/
|
|
217
|
+
leverage?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Whether the margin order can only reduce exposure. Present on every
|
|
220
|
+
* margin order, `false` included, like REST's `reduceOnly`; omitted for
|
|
221
|
+
* spot. Wire: `reduce_only`.
|
|
222
|
+
*/
|
|
223
|
+
reduceOnly?: boolean;
|
|
173
224
|
};
|
|
174
225
|
}
|
|
175
226
|
/**
|
|
@@ -107,7 +107,7 @@ export interface PositionEventData {
|
|
|
107
107
|
/**
|
|
108
108
|
* What triggered the update. Free-form, but the server uses a canonical set:
|
|
109
109
|
* `trade`, `close`, `liquidation`, `adl`, `funding`, `margin_added`,
|
|
110
|
-
* `margin_reduced
|
|
110
|
+
* `margin_reduced`.
|
|
111
111
|
*/
|
|
112
112
|
reason: string;
|
|
113
113
|
/**
|
|
@@ -147,8 +147,8 @@ export interface PositionEventData {
|
|
|
147
147
|
* anything was persisted. Four cases reach it: the frame came from a
|
|
148
148
|
* producer that predates this field; the emit path wrote no row;
|
|
149
149
|
* the path DID write the row but re-reads live risk state after sequencing
|
|
150
|
-
* (funding
|
|
151
|
-
*
|
|
150
|
+
* (`funding`), so the mutation did advance the persisted version; or the
|
|
151
|
+
* frame is a different projection of the row
|
|
152
152
|
* than persistence stores (terminal frames report `size` 0 and
|
|
153
153
|
* `LIQUIDATED`, while the stored row keeps its size and records `CLOSED`).
|
|
154
154
|
* In the last two, a REST read or a fresh snapshot ranks the mutation.
|
|
@@ -172,13 +172,17 @@ export interface PositionEventData {
|
|
|
172
172
|
* mutation — up to the one-hour funding interval.
|
|
173
173
|
*
|
|
174
174
|
* A frame is ranked only when it is a faithful projection of the row
|
|
175
|
-
* persisted at that sequence:
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* the
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
175
|
+
* persisted at that sequence: fills that leave a position OPEN, direct
|
|
176
|
+
* isolated-position margin adds/reductions, and copy-position margin adds.
|
|
177
|
+
* The copy add refreshes the isolated child and its copy-cross siblings at
|
|
178
|
+
* the same version. Cross-risk-bucket ALLOCATE/RELEASE and copy follow/stop
|
|
179
|
+
* refreshes use `margin_added`/`margin_reduced` but are UNRANKED because
|
|
180
|
+
* those commands write no position rows. Funding re-reads live state after
|
|
181
|
+
* sequencing and is also unranked. TERMINAL frames are unranked because
|
|
182
|
+
* they report `size` 0 and `LIQUIDATED` while the stored row keeps its size
|
|
183
|
+
* and records `CLOSED`. Wallet IN/OUT and plain isolated allocation emit no
|
|
184
|
+
* position frame. Transfer frames use captured post-command state and are
|
|
185
|
+
* released only after durable acknowledgement.
|
|
182
186
|
*/
|
|
183
187
|
version?: number;
|
|
184
188
|
}
|
|
@@ -29,6 +29,13 @@ export type TwapOrderEventReason = "created" | "slice_placed" | "slice_skipped"
|
|
|
29
29
|
*/
|
|
30
30
|
export interface TwapOrderEventData {
|
|
31
31
|
twapOrderId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Opaque same-parent reconciliation revision. Compare only updates for this
|
|
34
|
+
* `twapOrderId`: accept an update when its version is greater than or equal
|
|
35
|
+
* to the stored version, ignore lower versions, and expect gaps. A snapshot
|
|
36
|
+
* wins ties. Absent on legacy updates whose revision is unknown.
|
|
37
|
+
*/
|
|
38
|
+
version?: number;
|
|
32
39
|
tradingPairId: string;
|
|
33
40
|
side: OrderSide | (string & {});
|
|
34
41
|
tradingMode: TradingMode | (string & {});
|
|
@@ -60,8 +60,9 @@ export type SnapshotHandler<T> = (items: T[]) => void;
|
|
|
60
60
|
* Nullability mirrors the wire exactly. Every optional field below is a Rust
|
|
61
61
|
* `Option` serialized WITHOUT `skip_serializing_if`, so the key is always
|
|
62
62
|
* present and carries `null` when unset — hence `| null` rather than `?`.
|
|
63
|
-
* `clientOrderId`, `selfTradePreventionMode`
|
|
64
|
-
*
|
|
63
|
+
* `clientOrderId`, `selfTradePreventionMode`, `parentOrderId`, `postOnly`,
|
|
64
|
+
* `expirationDate`, `triggerPrice`, `positionSide` and `version` are the fields
|
|
65
|
+
* the server omits outright, so they are the `?`s.
|
|
65
66
|
*
|
|
66
67
|
* The value unions are widened (`Union | (string & {})`) for the same reason
|
|
67
68
|
* the order event's are: the parser hands an unrecognized value through rather
|
|
@@ -117,6 +118,27 @@ export interface OrderSnapshotItem {
|
|
|
117
118
|
leverage: string | null;
|
|
118
119
|
/** Whether the order can only reduce existing exposure */
|
|
119
120
|
reduceOnly: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* `true` when the order rests post-only. Omitted — never `false` — otherwise,
|
|
123
|
+
* matching REST's `postOnly` and the live order events. Wire: `post_only`.
|
|
124
|
+
*/
|
|
125
|
+
postOnly?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Custom GTC expiry (RFC 3339), as REST returns it. Omitted when the order
|
|
128
|
+
* has none. Wire: `expiration_date`.
|
|
129
|
+
*/
|
|
130
|
+
expirationDate?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Trigger price (decimal string) of an order a conditional placed, as REST
|
|
133
|
+
* returns it. Omitted otherwise. Wire: `trigger_price`.
|
|
134
|
+
*/
|
|
135
|
+
triggerPrice?: string;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated REST's derived compatibility label (`"Long" | "Short"`),
|
|
138
|
+
* passed through; `side` is authoritative. Omitted when REST omits it.
|
|
139
|
+
* Wire: `position_side`.
|
|
140
|
+
*/
|
|
141
|
+
positionSide?: string;
|
|
120
142
|
/**
|
|
121
143
|
* Client-assigned correlation handle, carried so the baseline and the live
|
|
122
144
|
* events that follow it identify orders the same way. Omitted — not `null` —
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* hand-written SDK surface. CI regenerates it and fails on a diff, identical to
|
|
11
11
|
* the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
|
|
12
12
|
*/
|
|
13
|
-
export declare const OPERATION_IDS: readonly ["attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_referral_downline", "get_my_referral_position", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_pulse", "get_rewards_balance", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_buildercode_payouts", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_managed_market_assignments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "list_twap_orders", "mint_tokens", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "revoke_delegated_agent", "revoke_session", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
|
|
13
|
+
export declare const OPERATION_IDS: readonly ["add_follow_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_all_copy_positions", "close_follow_positions", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_follow", "get_funding_state", "get_index_price", "get_lead_trader", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_lead_trader", "get_my_referral_downline", "get_my_referral_position", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_pulse", "get_rewards_balance", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_buildercode_payouts", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_follow_leader_positions", "list_funding_history", "list_funding_payments", "list_lead_trader_closed_trades", "list_lead_trader_open_positions", "list_lead_traders", "list_managed_market_assignments", "list_margin_accounts", "list_my_followers", "list_my_follows", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "list_twap_orders", "mint_tokens", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "revoke_delegated_agent", "revoke_session", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "stop_follow", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "verify_signature"];
|
|
14
14
|
/** Union of every OpenAPI operationId in the spec. */
|
|
15
15
|
export type OperationId = (typeof OPERATION_IDS)[number];
|
package/dist/wire/operations.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
|
|
12
12
|
*/
|
|
13
13
|
export const OPERATION_IDS = [
|
|
14
|
+
"add_follow_position_margin",
|
|
14
15
|
"attach_position_tp_sl",
|
|
15
16
|
"batch_cancel_all",
|
|
16
17
|
"batch_cancel_all_by_pair",
|
|
@@ -25,6 +26,8 @@ export const OPERATION_IDS = [
|
|
|
25
26
|
"claim_buildercode_rewards",
|
|
26
27
|
"claim_managed_market_lease",
|
|
27
28
|
"clear_trader_code",
|
|
29
|
+
"close_all_copy_positions",
|
|
30
|
+
"close_follow_positions",
|
|
28
31
|
"close_position",
|
|
29
32
|
"create_challenge",
|
|
30
33
|
"create_delegated_session",
|
|
@@ -41,14 +44,17 @@ export const OPERATION_IDS = [
|
|
|
41
44
|
"get_candles",
|
|
42
45
|
"get_conditional_order",
|
|
43
46
|
"get_faucet_info",
|
|
47
|
+
"get_follow",
|
|
44
48
|
"get_funding_state",
|
|
45
49
|
"get_index_price",
|
|
50
|
+
"get_lead_trader",
|
|
46
51
|
"get_margin_account_movements",
|
|
47
52
|
"get_margin_account_summary",
|
|
48
53
|
"get_mark_price",
|
|
49
54
|
"get_market_metadata",
|
|
50
55
|
"get_market_stats",
|
|
51
56
|
"get_my_fee_tier",
|
|
57
|
+
"get_my_lead_trader",
|
|
52
58
|
"get_my_referral_downline",
|
|
53
59
|
"get_my_referral_position",
|
|
54
60
|
"get_my_trader_code",
|
|
@@ -99,10 +105,16 @@ export const OPERATION_IDS = [
|
|
|
99
105
|
"list_conditional_orders",
|
|
100
106
|
"list_delegated_agent_owners",
|
|
101
107
|
"list_delegated_agents",
|
|
108
|
+
"list_follow_leader_positions",
|
|
102
109
|
"list_funding_history",
|
|
103
110
|
"list_funding_payments",
|
|
111
|
+
"list_lead_trader_closed_trades",
|
|
112
|
+
"list_lead_trader_open_positions",
|
|
113
|
+
"list_lead_traders",
|
|
104
114
|
"list_managed_market_assignments",
|
|
105
115
|
"list_margin_accounts",
|
|
116
|
+
"list_my_followers",
|
|
117
|
+
"list_my_follows",
|
|
106
118
|
"list_pending_withdrawals",
|
|
107
119
|
"list_position_history",
|
|
108
120
|
"list_positions",
|
|
@@ -110,6 +122,7 @@ export const OPERATION_IDS = [
|
|
|
110
122
|
"list_trading_pairs",
|
|
111
123
|
"list_twap_orders",
|
|
112
124
|
"mint_tokens",
|
|
125
|
+
"preview_follow",
|
|
113
126
|
"refresh_managed_market_quotes",
|
|
114
127
|
"refresh_session",
|
|
115
128
|
"register_deposit_address",
|
|
@@ -122,6 +135,7 @@ export const OPERATION_IDS = [
|
|
|
122
135
|
"simulate_order_risk",
|
|
123
136
|
"simulate_parent_margin_order_risk",
|
|
124
137
|
"simulate_risk_bucket_order_risk",
|
|
138
|
+
"stop_follow",
|
|
125
139
|
"submit_whitelist",
|
|
126
140
|
"transfer_collateral_from_margin_account",
|
|
127
141
|
"transfer_collateral_from_parent_margin_account",
|
|
@@ -131,5 +145,7 @@ export const OPERATION_IDS = [
|
|
|
131
145
|
"transfer_rewards",
|
|
132
146
|
"update_sub_account_limit",
|
|
133
147
|
"upsert_delegated_agent",
|
|
148
|
+
"upsert_follow",
|
|
149
|
+
"upsert_lead_trader",
|
|
134
150
|
"verify_signature",
|
|
135
151
|
];
|