@0xmonaco/types 1.0.81 → 1.0.83
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 +2 -2
- package/dist/copy-trading/responses.d.ts +19 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/market/index.d.ts +23 -8
- package/dist/pitpass/index.d.ts +9 -137
- package/dist/pitpass/index.js +5 -3
- package/dist/positions/index.d.ts +14 -2
- package/dist/profile/index.d.ts +40 -25
- package/dist/sdk/index.d.ts +9 -1
- package/dist/sdk/network.d.ts +1 -1
- package/dist/tradercodes/index.d.ts +142 -0
- package/dist/tradercodes/index.js +6 -0
- package/dist/trading/index.d.ts +8 -2
- package/dist/trading/orders.d.ts +24 -5
- package/dist/trading/responses.d.ts +38 -0
- package/dist/validation/positions.d.ts +6 -1
- package/dist/validation/positions.js +18 -2
- package/dist/validation/trading.d.ts +12 -2
- package/dist/validation/trading.js +9 -0
- package/dist/websocket/base.d.ts +34 -5
- package/dist/websocket/client.d.ts +17 -1
- package/dist/websocket/events/market-stats-events.d.ts +13 -9
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +11 -0
- package/dist/wire/schema.d.ts +1093 -160
- package/package.json +2 -2
- /package/dist/{pitpass → tradercodes}/responses.d.ts +0 -0
- /package/dist/{pitpass → tradercodes}/responses.js +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TraderCodes Types (`sdk.tradercodes`)
|
|
3
|
+
*
|
|
4
|
+
* Types for the TraderCodes API: code lookup, rewards balance, and transfer.
|
|
5
|
+
*/
|
|
6
|
+
import type { BaseAPI } from "../api";
|
|
7
|
+
import type { GetMyReferralDownlineParams, GetMyReferralDownlineResponse, GetMyReferralPositionResponse, GetMyReferralTreeParams, GetMyReferralTreeResponse, GetRewardsBalanceResponse, TraderCodeAvailabilityResponse, TraderCodeInfoResponse, TraderCodeResponse, TransferRewardsParams, TransferRewardsResponse } from "./responses";
|
|
8
|
+
/**
|
|
9
|
+
* TraderCodes API interface (`sdk.tradercodes`).
|
|
10
|
+
*
|
|
11
|
+
* Provides methods for reading your wallet-derived TraderCode, looking up a
|
|
12
|
+
* referral code at sign-up, reading your accrued rewards balance, and
|
|
13
|
+
* transferring rewards into a tradeable balance.
|
|
14
|
+
*/
|
|
15
|
+
export interface TraderCodesAPI extends BaseAPI {
|
|
16
|
+
/**
|
|
17
|
+
* Return the authenticated caller's TraderCode.
|
|
18
|
+
*
|
|
19
|
+
* Never 404s — every signed-in wallet has a derivable code. Ensures the
|
|
20
|
+
* backing row so referrals attributed to this wallet have a code to link.
|
|
21
|
+
* The response carries both the permanent wallet-derived `code` and the
|
|
22
|
+
* custom-handle fields (`customCode`, `isCustom`, `display`).
|
|
23
|
+
*
|
|
24
|
+
* @returns Promise resolving to the caller's TraderCode identity and its creation timestamp
|
|
25
|
+
*/
|
|
26
|
+
getMyTraderCode(): Promise<TraderCodeResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Claim or edit the authenticated caller's custom (vanity) TraderCode handle.
|
|
29
|
+
*
|
|
30
|
+
* The handle is stored exactly as entered (case preserved); uniqueness is
|
|
31
|
+
* enforced case-insensitively by the server. The client validates the handle
|
|
32
|
+
* (letter-first `[A-Za-z0-9_]`, length 5–20) before sending. The server is
|
|
33
|
+
* the authoritative gate: it returns 409 when the handle is taken, 422 with a
|
|
34
|
+
* reason on validation failure, 429 when the per-hour edit limit is hit, and
|
|
35
|
+
* 403 when the feature is disabled.
|
|
36
|
+
*
|
|
37
|
+
* @param code - The custom handle to claim or edit to, exactly as entered
|
|
38
|
+
* @returns Promise resolving to the caller's updated TraderCode identity
|
|
39
|
+
*/
|
|
40
|
+
setTraderCode(code: string): Promise<TraderCodeResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Clear the caller's custom TraderCode handle, reverting to the
|
|
43
|
+
* wallet-derived default. The freed handle enters a cooldown before anyone
|
|
44
|
+
* else can claim it.
|
|
45
|
+
*
|
|
46
|
+
* @returns Promise resolving to the caller's TraderCode identity after the revert
|
|
47
|
+
*/
|
|
48
|
+
clearTraderCode(): Promise<TraderCodeResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Public, unauthenticated advisory check of whether a custom TraderCode
|
|
51
|
+
* handle is available (as-you-type UX).
|
|
52
|
+
*
|
|
53
|
+
* Advisory only — the authoritative gate is the atomic claim in
|
|
54
|
+
* {@link setTraderCode}, so a positive result here is not a reservation.
|
|
55
|
+
* Returns `available` plus, when unavailable, a `reason` code.
|
|
56
|
+
*
|
|
57
|
+
* @param code - The custom handle to check
|
|
58
|
+
* @returns Promise resolving to availability and, when unavailable, the reason
|
|
59
|
+
*/
|
|
60
|
+
checkTraderCodeAvailability(code: string): Promise<TraderCodeAvailabilityResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Public, unauthenticated lookup of a TraderCode.
|
|
63
|
+
*
|
|
64
|
+
* Used to validate a referral code at sign-up. The code is a wallet address
|
|
65
|
+
* (the `Monaco - <address>` display form is also accepted). Returns the
|
|
66
|
+
* normalized code when it resolves to a known wallet, or throws a 404 when
|
|
67
|
+
* the code does not resolve to any user.
|
|
68
|
+
*
|
|
69
|
+
* @param code - The TraderCode (wallet address or `Monaco - <address>` form) to look up
|
|
70
|
+
* @returns Promise resolving to the normalized TraderCode
|
|
71
|
+
*/
|
|
72
|
+
getTraderCodeInfo(code: string): Promise<TraderCodeInfoResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Return the caller's current TraderCodes rewards-bucket balances.
|
|
75
|
+
*
|
|
76
|
+
* Rewards accumulate here as referred users trade. Call
|
|
77
|
+
* {@link transferRewards} to move them into a tradeable balance.
|
|
78
|
+
* Returns an empty `balances` array when no rewards have been earned yet.
|
|
79
|
+
*
|
|
80
|
+
* @returns Promise resolving to the list of per-token reward balances
|
|
81
|
+
*/
|
|
82
|
+
getRewardsBalance(): Promise<GetRewardsBalanceResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Transfer earned TraderCodes rewards into a trading balance.
|
|
85
|
+
*
|
|
86
|
+
* Moves the specified amount of a reward token from the caller's rewards
|
|
87
|
+
* bucket into their trading balance under the authenticated application.
|
|
88
|
+
* Ledger-only — no on-chain transaction, immediately tradeable.
|
|
89
|
+
*
|
|
90
|
+
* @param params - Token address and raw-unit amount to transfer
|
|
91
|
+
* @returns Promise resolving to the post-transfer rewards and trading balances
|
|
92
|
+
*/
|
|
93
|
+
transferRewards(params: TransferRewardsParams): Promise<TransferRewardsResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Read your own referral position: your referral chain upward (`upline`, L1
|
|
96
|
+
* then L2 and onward, as many levels as your trades on this client
|
|
97
|
+
* application pay), your direct referrer, total earned, and most recent
|
|
98
|
+
* reward rows.
|
|
99
|
+
*
|
|
100
|
+
* Self-scoped — the server derives your identity from the session, so you can
|
|
101
|
+
* only ever read your own chain. `referrer` is the empty string when you were
|
|
102
|
+
* not referred (use it to gate the "already referred" UX). Every other user is
|
|
103
|
+
* identified by their public wallet address (with a `display` handle-or-wallet
|
|
104
|
+
* variant), never an internal id.
|
|
105
|
+
*
|
|
106
|
+
* @returns Promise resolving to your upline, referrer, total earned, and recent rewards
|
|
107
|
+
*/
|
|
108
|
+
getMyReferralPosition(): Promise<GetMyReferralPositionResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* Read your own downline: one page of who you earn from and how much
|
|
111
|
+
* (earnings by source across every reward level, largest first), your L1
|
|
112
|
+
* direct-referee roster (including referees who have not traded yet), and a
|
|
113
|
+
* per-level earnings summary that covers every level and source on every
|
|
114
|
+
* page. Without `pageSize` / `pageToken` you get the first page (100 rows),
|
|
115
|
+
* not every row: follow `nextPageToken` until it is empty.
|
|
116
|
+
*
|
|
117
|
+
* Self-scoped and read-only. Every source and referee is a public wallet
|
|
118
|
+
* address plus a `display` handle-or-wallet variant, never an internal id.
|
|
119
|
+
*
|
|
120
|
+
* @param params - Optional `pageSize` (1-500, default 100) and `pageToken`
|
|
121
|
+
* @returns Promise resolving to the earnings page, the direct-referee roster, a summary, and the next page token
|
|
122
|
+
*/
|
|
123
|
+
getMyReferralDownline(params?: GetMyReferralDownlineParams): Promise<GetMyReferralDownlineResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Read one level of your own referral tree: the wallets `parent` directly
|
|
126
|
+
* referred (yourself when `parent` is omitted), a page at a time, newest
|
|
127
|
+
* first. Expand a node by calling again with `parent` set to its wallet;
|
|
128
|
+
* nodes with `refereeCount > 0` are expandable, down to the deepest level
|
|
129
|
+
* any client application rewards (at most 10). Your direct referees (L1)
|
|
130
|
+
* are always listed.
|
|
131
|
+
*
|
|
132
|
+
* Self-scoped: `parent` must be you or one of your own referees above that
|
|
133
|
+
* deepest level — any other wallet is a 404. Each wallet appears once, under the referrer that
|
|
134
|
+
* earns from it.
|
|
135
|
+
*
|
|
136
|
+
* @param params - Optional `parent` wallet, `pageSize` (1-200), and `pageToken`
|
|
137
|
+
* @returns Promise resolving to the page of nodes and the next page token
|
|
138
|
+
*/
|
|
139
|
+
getMyReferralTree(params?: GetMyReferralTreeParams): Promise<GetMyReferralTreeResponse>;
|
|
140
|
+
}
|
|
141
|
+
export type { GetMyReferralDownlineParams, GetMyReferralDownlineResponse, GetMyReferralPositionResponse, GetMyReferralTreeParams, GetMyReferralTreeResponse, GetRewardsBalanceResponse, LevelEarnings, ReferralDirectReferee, ReferralEarningsSource, ReferralEarningsSummary, ReferralRewardEntry, ReferralTreeNode, ReferralUplineEntry, RewardsBalanceEntry, SetTraderCodeParams, TraderCodeAvailabilityReason, TraderCodeAvailabilityResponse, TraderCodeInfoResponse, TraderCodeResponse, TransferRewardsParams, TransferRewardsResponse, } from "./responses";
|
|
142
|
+
export { GetMyReferralDownlineParamsSchema, GetMyReferralDownlineResponseSchema, GetMyReferralPositionResponseSchema, GetMyReferralTreeParamsSchema, GetMyReferralTreeResponseSchema, GetRewardsBalanceResponseSchema, LevelEarningsSchema, ReferralDirectRefereeSchema, ReferralEarningsSourceSchema, ReferralEarningsSummarySchema, ReferralRewardEntrySchema, ReferralTreeNodeSchema, ReferralUplineEntrySchema, RewardsBalanceEntrySchema, SetTraderCodeParamsSchema, TraderCodeAvailabilityReasonSchema, TraderCodeAvailabilityResponseSchema, TraderCodeInfoResponseSchema, TraderCodeResponseSchema, TransferRewardsParamsSchema, TransferRewardsResponseSchema, } from "./responses";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TraderCodes Types (`sdk.tradercodes`)
|
|
3
|
+
*
|
|
4
|
+
* Types for the TraderCodes API: code lookup, rewards balance, and transfer.
|
|
5
|
+
*/
|
|
6
|
+
export { GetMyReferralDownlineParamsSchema, GetMyReferralDownlineResponseSchema, GetMyReferralPositionResponseSchema, GetMyReferralTreeParamsSchema, GetMyReferralTreeResponseSchema, GetRewardsBalanceResponseSchema, LevelEarningsSchema, ReferralDirectRefereeSchema, ReferralEarningsSourceSchema, ReferralEarningsSummarySchema, ReferralRewardEntrySchema, ReferralTreeNodeSchema, ReferralUplineEntrySchema, RewardsBalanceEntrySchema, SetTraderCodeParamsSchema, TraderCodeAvailabilityReasonSchema, TraderCodeAvailabilityResponseSchema, TraderCodeInfoResponseSchema, TraderCodeResponseSchema, TransferRewardsParamsSchema, TransferRewardsResponseSchema, } from "./responses";
|
package/dist/trading/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { BaseAPI } from "../api/index";
|
|
7
7
|
import type { MarginMode } from "../margin-accounts";
|
|
8
8
|
import type { Order, OrderSide, PositionSide, SelfTradePreventionMode, TimeInForce, TradingMode } from "./orders";
|
|
9
|
-
import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CancelTwapOrderResponse, ConditionalOrder, CreateOrderResponse, CreateTwapOrderOptions, CreateTwapOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, GetTwapOrderTcaResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, ListTwapOrdersParams, ListTwapOrdersResponse, ParentTpSlLegParams, ParentTrailingStopLegParams, ReplaceOrderResponse, TwapOrder } from "./responses";
|
|
9
|
+
import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelConditionalOrderResponse, CancelOrderResponse, CancelTwapOrderResponse, ConditionalOrder, CreateOrderResponse, CreateTwapOrderOptions, CreateTwapOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, GetTwapOrderTcaResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, ListTwapOrderSlicesParams, ListTwapOrderSlicesResponse, ListTwapOrdersParams, ListTwapOrdersResponse, ParentTpSlLegParams, ParentTrailingStopLegParams, ReplaceOrderResponse, TwapOrder } from "./responses";
|
|
10
10
|
/**
|
|
11
11
|
* Trading API interface.
|
|
12
12
|
* Provides methods for placing and managing orders.
|
|
@@ -281,7 +281,13 @@ export interface TradingAPI extends BaseAPI {
|
|
|
281
281
|
* optional state / trading pair filters.
|
|
282
282
|
*/
|
|
283
283
|
listTwapOrders(params?: ListTwapOrdersParams): Promise<ListTwapOrdersResponse>;
|
|
284
|
+
/**
|
|
285
|
+
* Lists one TWAP parent's slices: the child orders it placed, each as
|
|
286
|
+
* `getOrder` returns it, oldest first by default. Users can only access
|
|
287
|
+
* their own TWAP orders.
|
|
288
|
+
*/
|
|
289
|
+
listTwapOrderSlices(twapOrderId: string, params?: ListTwapOrderSlicesParams): Promise<ListTwapOrderSlicesResponse>;
|
|
284
290
|
}
|
|
285
291
|
export type { ConditionalOrderConditionType, ConditionalOrderState, ConditionalOrderTriggerSource, Order, OrderRole, OrderSide, OrderStatus, OrderStatusFilter, OrderTerminalReason, OrderType, PositionSide, SelfTradePreventionMode, TimeInForce, TradingMode, TwapExecutionStyle, TwapOrderState, } from "./orders";
|
|
286
292
|
export { ORDER_STATUS_VALUES } from "./orders";
|
|
287
|
-
export type { BatchCancelError, BatchCancelOrdersResponse, BatchCancelResult, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchCreateResult, BatchError, BatchReplaceOrderParams, BatchReplaceOrdersResponse, BatchReplaceResult, CancelConditionalOrderResponse, CancelOrderResponse, CancelTwapOrderResponse, ConditionalOrder, CreateOrderResponse, CreateTwapOrderOptions, CreateTwapOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, GetTwapOrderTcaResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, ListTwapOrdersParams, ListTwapOrdersResponse, MatchResult, ParentTpSlLegParams, ParentTrailingStopLegParams, ReplaceOrderResponse, TriggeredOrderSummary, TwapOrder, UpdatedFields, } from "./responses";
|
|
293
|
+
export type { BatchCancelError, BatchCancelOrdersResponse, BatchCancelResult, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchCreateResult, BatchError, BatchReplaceOrderParams, BatchReplaceOrdersResponse, BatchReplaceResult, CancelConditionalOrderResponse, CancelOrderResponse, CancelTwapOrderResponse, ConditionalOrder, CreateOrderResponse, CreateTwapOrderOptions, CreateTwapOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, GetTwapOrderTcaResponse, ListConditionalOrdersParams, ListConditionalOrdersResponse, ListTwapOrderSlicesParams, ListTwapOrderSlicesResponse, ListTwapOrdersParams, ListTwapOrdersResponse, MatchResult, ParentTpSlLegParams, ParentTrailingStopLegParams, ReplaceOrderResponse, TriggeredOrderSummary, TwapOrder, UpdatedFields, } from "./responses";
|
package/dist/trading/orders.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Types for trading operations and order management.
|
|
5
5
|
*/
|
|
6
|
+
import type { OrderOrigin } from "../websocket/events/orders-events";
|
|
6
7
|
/**
|
|
7
8
|
* Standard order structure used across all order-related responses.
|
|
8
9
|
* This represents the complete order information as returned by the API.
|
|
@@ -55,17 +56,17 @@ export interface Order {
|
|
|
55
56
|
updatedAt?: string;
|
|
56
57
|
/** Optional expiry for a GTC order (ISO 8601, max 1 year) */
|
|
57
58
|
expirationDate?: string;
|
|
58
|
-
/** Application taker fee in
|
|
59
|
+
/** Application (builder) taker fee paid, in quote currency, summed over the fills where this order was the taker. A replacement also includes the fills of the order it replaced; 0 on a liquidation order. An amount, not a rate */
|
|
59
60
|
applicationTakerFee?: string;
|
|
60
|
-
/** Monaco protocol taker fee in
|
|
61
|
+
/** Monaco protocol taker fee paid, in quote currency, summed over the fills where this order was the taker. A replacement also includes the fills of the order it replaced; a liquidation order carries the liquidation fee it was charged instead. An amount, not a rate */
|
|
61
62
|
monacoTakerFee?: string;
|
|
62
|
-
/** Monaco
|
|
63
|
+
/** Monaco maker fee, in quote currency, summed over the fills where this order was the maker; negative is a rebate. A replacement also includes the fills of the order it replaced. An amount, not a rate */
|
|
63
64
|
monacoMakerRebate?: string;
|
|
64
65
|
/** Total taker fees paid in quote currency - populated after fills */
|
|
65
66
|
totalTakerFees?: string;
|
|
66
|
-
/** Total
|
|
67
|
+
/** Total the taker paid, in quote currency: the filled notional as the ledger booked it (each fill rounded down to the smallest unit) plus totalTakerFees. A replacement also includes the fills of the order it replaced */
|
|
67
68
|
takerTotalPayment?: string;
|
|
68
|
-
/** Total
|
|
69
|
+
/** Total the maker received, in quote currency: the notional of its maker fills as the ledger booked it minus monacoMakerRebate (a rebate adds). A replacement also includes the fills of the order it replaced */
|
|
69
70
|
makerTotalReceipt?: string;
|
|
70
71
|
/** Margin account ID for margin/perp orders */
|
|
71
72
|
marginAccountId?: string;
|
|
@@ -118,6 +119,24 @@ export interface Order {
|
|
|
118
119
|
* child. Wire: `parentOrderId`.
|
|
119
120
|
*/
|
|
120
121
|
parentOrderId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* What placed the order: `"USER"` (the account itself, including its TP/SL
|
|
124
|
+
* triggers and TWAP slices), `"LIQUIDATION"` (the liquidation engine
|
|
125
|
+
* closing the account's position), `"ADL"` (an auto-deleveraging close),
|
|
126
|
+
* `"COPY"` (the copy trading engine, for one of the account's follows) or
|
|
127
|
+
* `"SYSTEM"`.
|
|
128
|
+
*
|
|
129
|
+
* Use it to label a row in order history. A liquidation is a reduce-only
|
|
130
|
+
* IOC limit order, so `orderType`, `timeInForce` and `reduceOnly` alone read
|
|
131
|
+
* the same as an order the user placed; this is the only field that tells
|
|
132
|
+
* them apart. The same labels as `origin` on the order WebSocket events.
|
|
133
|
+
*
|
|
134
|
+
* Present on every book order. Absent on a TWAP parent row and a
|
|
135
|
+
* conditional order row (the account's own instructions), and from servers
|
|
136
|
+
* predating the field. Widened past {@link OrderOrigin} so a value this
|
|
137
|
+
* SDK version does not know still reaches you. Wire: `origin`.
|
|
138
|
+
*/
|
|
139
|
+
origin?: OrderOrigin | (string & {});
|
|
121
140
|
/**
|
|
122
141
|
* Opaque, compare-only revision counter for this order's state: a strictly
|
|
123
142
|
* higher value is strictly newer state for that order, and equal values
|
|
@@ -933,3 +933,41 @@ export interface ListTwapOrdersResponse {
|
|
|
933
933
|
*/
|
|
934
934
|
nextPageToken: string;
|
|
935
935
|
}
|
|
936
|
+
/**
|
|
937
|
+
* Query parameters for listing one TWAP parent's slices.
|
|
938
|
+
*/
|
|
939
|
+
export interface ListTwapOrderSlicesParams {
|
|
940
|
+
/** Sort direction for `createdAt`: `"ASC"` (oldest slice first, the default) or `"DESC"` */
|
|
941
|
+
orderBy?: "ASC" | "DESC";
|
|
942
|
+
/** Items per page (max 1000, default 20) */
|
|
943
|
+
pageSize?: number;
|
|
944
|
+
/**
|
|
945
|
+
* Pagination cursor:
|
|
946
|
+
* - Omitted or empty string (`""`): start a cursor walk from the first slice
|
|
947
|
+
* in `orderBy` order.
|
|
948
|
+
* - Non-empty: an opaque cursor from a previous response's `nextPageToken`;
|
|
949
|
+
* results resume immediately after that position.
|
|
950
|
+
*
|
|
951
|
+
* A token is pinned to the TWAP order and `orderBy` that minted it.
|
|
952
|
+
*/
|
|
953
|
+
pageToken?: string;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Response from listing one TWAP parent's slices.
|
|
957
|
+
*/
|
|
958
|
+
export interface ListTwapOrderSlicesResponse {
|
|
959
|
+
/**
|
|
960
|
+
* The parent's child orders, each as `getOrder` returns it and carrying the
|
|
961
|
+
* parent's id in `parentOrderId`. A `PASSIVE` parent's reprices and deadline
|
|
962
|
+
* sweeps are child orders too, so there can be more than `slicesPlaced`.
|
|
963
|
+
*/
|
|
964
|
+
slices: Order[];
|
|
965
|
+
/** Items per page */
|
|
966
|
+
pageSize: number;
|
|
967
|
+
/**
|
|
968
|
+
* Cursor for the next page, minted only while a further page exists. Empty on
|
|
969
|
+
* the final page — the definitive end of the walk. Do not feed the empty
|
|
970
|
+
* token back as `pageToken`; an empty input restarts the walk.
|
|
971
|
+
*/
|
|
972
|
+
nextPageToken: string;
|
|
973
|
+
}
|
|
@@ -33,8 +33,13 @@ export declare const ClosePositionSchema: z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export declare const BatchCloseAllSchema: z.ZodObject<{
|
|
35
35
|
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
36
|
+
tradingPairIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
37
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
LONG: "LONG";
|
|
39
|
+
SHORT: "SHORT";
|
|
40
|
+
}>>;
|
|
36
41
|
slippageToleranceBps: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$strict>;
|
|
38
43
|
export declare const GetPositionRiskSchema: z.ZodObject<{
|
|
39
44
|
positionId: z.ZodUUID;
|
|
40
45
|
}, z.core.$strip>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Positions API Validation Schemas
|
|
3
3
|
*/
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { ConditionalTimeInForceSchema, ISO8601DateSchema, OrderTypeSchema, PositiveDecimalStringSchema, SlippageToleranceBpsSchema, TrailingStopLegSchema, UUIDSchema, } from "./trading";
|
|
5
|
+
import { ClosePositionSideSchema, ConditionalTimeInForceSchema, ISO8601DateSchema, OrderTypeSchema, PositiveDecimalStringSchema, SlippageToleranceBpsSchema, TrailingStopLegSchema, UUIDSchema, } from "./trading";
|
|
6
6
|
const CursorPaginationSchema = z.object({
|
|
7
7
|
/**
|
|
8
8
|
* Rejected, not ignored. A non-strict object would let a JS or `any` caller
|
|
@@ -50,9 +50,25 @@ export const ClosePositionSchema = PositionIdSchema.extend({
|
|
|
50
50
|
message: "limitPrice is not allowed for MARKET close requests",
|
|
51
51
|
path: ["request", "limitPrice"],
|
|
52
52
|
});
|
|
53
|
-
export const BatchCloseAllSchema = z
|
|
53
|
+
export const BatchCloseAllSchema = z
|
|
54
|
+
.object({
|
|
54
55
|
tradingPairId: UUIDSchema.optional(),
|
|
56
|
+
// At least one id: the server reads an empty set as no pair filter, so a
|
|
57
|
+
// caller whose own filter matched no pair would close every position.
|
|
58
|
+
tradingPairIds: z
|
|
59
|
+
.array(UUIDSchema)
|
|
60
|
+
.min(1, { message: "tradingPairIds must list at least one trading pair; omit it to close every pair" })
|
|
61
|
+
.max(256, { message: "tradingPairIds accepts at most 256 trading pairs" })
|
|
62
|
+
.optional(),
|
|
63
|
+
side: ClosePositionSideSchema.optional(),
|
|
55
64
|
slippageToleranceBps: SlippageToleranceBpsSchema.optional(),
|
|
65
|
+
})
|
|
66
|
+
// Strict: the client builds the body from the known fields, so a misspelled
|
|
67
|
+
// filter would be dropped and the close would cover every position.
|
|
68
|
+
.strict()
|
|
69
|
+
.refine((data) => data.tradingPairId === undefined || data.tradingPairIds === undefined, {
|
|
70
|
+
message: "Pass tradingPairId or tradingPairIds, not both",
|
|
71
|
+
path: ["tradingPairIds"],
|
|
56
72
|
});
|
|
57
73
|
export const GetPositionRiskSchema = PositionIdSchema;
|
|
58
74
|
const TpSlLegSchema = z
|
|
@@ -375,11 +375,11 @@ export declare const ConditionalOrderTriggerSourceSchema: z.ZodEnum<{
|
|
|
375
375
|
export declare const ConditionalOrderStateSchema: z.ZodEnum<{
|
|
376
376
|
CANCELLED: "CANCELLED";
|
|
377
377
|
EXPIRED: "EXPIRED";
|
|
378
|
+
FAILED: "FAILED";
|
|
378
379
|
PENDING_PARENT: "PENDING_PARENT";
|
|
379
380
|
ACTIVE: "ACTIVE";
|
|
380
381
|
TRIGGERING: "TRIGGERING";
|
|
381
382
|
TRIGGERED: "TRIGGERED";
|
|
382
|
-
FAILED: "FAILED";
|
|
383
383
|
}>;
|
|
384
384
|
export declare const ClosePositionSideSchema: z.ZodEnum<{
|
|
385
385
|
LONG: "LONG";
|
|
@@ -395,11 +395,11 @@ export declare const ListConditionalOrdersSchema: z.ZodObject<{
|
|
|
395
395
|
state: z.ZodOptional<z.ZodEnum<{
|
|
396
396
|
CANCELLED: "CANCELLED";
|
|
397
397
|
EXPIRED: "EXPIRED";
|
|
398
|
+
FAILED: "FAILED";
|
|
398
399
|
PENDING_PARENT: "PENDING_PARENT";
|
|
399
400
|
ACTIVE: "ACTIVE";
|
|
400
401
|
TRIGGERING: "TRIGGERING";
|
|
401
402
|
TRIGGERED: "TRIGGERED";
|
|
402
|
-
FAILED: "FAILED";
|
|
403
403
|
}>>;
|
|
404
404
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
405
405
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
@@ -466,6 +466,16 @@ export declare const ListTwapOrdersSchema: z.ZodObject<{
|
|
|
466
466
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
467
467
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
468
468
|
}, z.core.$strip>;
|
|
469
|
+
export declare const ListTwapOrderSlicesSchema: z.ZodObject<{
|
|
470
|
+
page: z.ZodOptional<z.ZodNever>;
|
|
471
|
+
twapOrderId: z.ZodUUID;
|
|
472
|
+
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
473
|
+
ASC: "ASC";
|
|
474
|
+
DESC: "DESC";
|
|
475
|
+
}>>;
|
|
476
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
477
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
478
|
+
}, z.core.$strip>;
|
|
469
479
|
/**
|
|
470
480
|
* Single batch create order item validation schema
|
|
471
481
|
*
|
|
@@ -560,6 +560,15 @@ export const ListTwapOrdersSchema = z.object({
|
|
|
560
560
|
pageSize: z.number().int().min(1, "Page size must be at least 1").max(1000, "Page size cannot exceed 1000").optional(),
|
|
561
561
|
pageToken: z.string().optional(),
|
|
562
562
|
});
|
|
563
|
+
export const ListTwapOrderSlicesSchema = z.object({
|
|
564
|
+
// Rejected, not ignored, as on the sibling cursor listings: a caller
|
|
565
|
+
// looping on `page` would otherwise re-fetch the first page forever.
|
|
566
|
+
page: z.never().optional(),
|
|
567
|
+
twapOrderId: UUIDSchema,
|
|
568
|
+
orderBy: z.enum(["ASC", "DESC"]).optional(),
|
|
569
|
+
pageSize: z.number().int().min(1, "Page size must be at least 1").max(1000, "Page size cannot exceed 1000").optional(),
|
|
570
|
+
pageToken: z.string().optional(),
|
|
571
|
+
});
|
|
563
572
|
/**
|
|
564
573
|
* Single batch create order item validation schema
|
|
565
574
|
*
|
package/dist/websocket/base.d.ts
CHANGED
|
@@ -7,6 +7,35 @@
|
|
|
7
7
|
* WebSocket connection status
|
|
8
8
|
*/
|
|
9
9
|
export type WebSocketStatus = "connected" | "connecting" | "disconnected" | "reconnecting";
|
|
10
|
+
/**
|
|
11
|
+
* Where one channel stands between what this client asked for and what the
|
|
12
|
+
* server confirmed, from `MonacoWebSocket.getSubscriptionState`:
|
|
13
|
+
*
|
|
14
|
+
* - `"idle"` — not wanted, and not held server-side.
|
|
15
|
+
* - `"pending"` — wanted; a `Subscribe` was sent and its acknowledgement has
|
|
16
|
+
* not arrived yet.
|
|
17
|
+
* - `"subscribed"` — wanted, and the server's acknowledgement named it.
|
|
18
|
+
* - `"unconfirmed"` — wanted, but not held: the server rejected it (its
|
|
19
|
+
* `Error` reached `onError`), or the connection that held it closed. A
|
|
20
|
+
* channel rejected with `AUTH_REQUIRED` is retried once the connection
|
|
21
|
+
* authenticates; a reconnect re-sends every wanted channel.
|
|
22
|
+
* - `"unsubscribing"` — released; an `Unsubscribe` was sent and the server
|
|
23
|
+
* still holds the channel until its acknowledgement arrives.
|
|
24
|
+
*/
|
|
25
|
+
export type WebSocketSubscriptionState = "idle" | "pending" | "subscribed" | "unconfirmed" | "unsubscribing";
|
|
26
|
+
/**
|
|
27
|
+
* A server-confirmed change to one channel, delivered to every
|
|
28
|
+
* `MonacoWebSocket.onSubscriptionChange` listener: `"subscribed"` when a
|
|
29
|
+
* `Subscribed` acknowledgement names a channel this client still wants, and
|
|
30
|
+
* `"unsubscribed"` when an `Unsubscribed` acknowledgement names one.
|
|
31
|
+
* `channel` is the exact channel string this client sent.
|
|
32
|
+
*/
|
|
33
|
+
export interface WebSocketSubscriptionChange {
|
|
34
|
+
channel: string;
|
|
35
|
+
state: "subscribed" | "unsubscribed";
|
|
36
|
+
}
|
|
37
|
+
/** Listener for {@link WebSocketSubscriptionChange}. */
|
|
38
|
+
export type SubscriptionChangeHandler = (change: WebSocketSubscriptionChange) => void;
|
|
10
39
|
/**
|
|
11
40
|
* Connection-attempt context delivered with every status change.
|
|
12
41
|
*
|
|
@@ -215,11 +244,11 @@ export interface MonacoWebSocketConfig {
|
|
|
215
244
|
* - `SESSION_INVALID` — the session was revoked or expired; the connection
|
|
216
245
|
* closes and {@link onReauthenticationRequired} follows. No `channel`.
|
|
217
246
|
* - `AUTH_REQUIRED` — a rejected SUBSCRIBE of `channel`, not an invalidated
|
|
218
|
-
* session: it was never registered
|
|
219
|
-
*
|
|
220
|
-
* `
|
|
221
|
-
*
|
|
222
|
-
*
|
|
247
|
+
* session: it was never registered. This client keeps your handler and
|
|
248
|
+
* reports the channel as `"unconfirmed"`; once the connection
|
|
249
|
+
* authenticates (`setSessionKeypair`, or the SDK's `login`) it re-sends
|
|
250
|
+
* the `Subscribe` once, and the channel becomes `"subscribed"` when the
|
|
251
|
+
* server acknowledges it.
|
|
223
252
|
*/
|
|
224
253
|
onError?: ErrorHandler;
|
|
225
254
|
/**
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
import type { SessionCredentials } from "../auth/index";
|
|
56
56
|
import type { Interval } from "../market";
|
|
57
57
|
import type { TradingMode } from "../trading";
|
|
58
|
-
import type { WebSocketStatus } from "./base";
|
|
58
|
+
import type { SubscriptionChangeHandler, WebSocketStatus, WebSocketSubscriptionState } from "./base";
|
|
59
59
|
import type { OrderbookQuotationMode } from "./clients/orderbook-client";
|
|
60
60
|
import type { AccountEvent, AccountEventData, ConditionalOrderEvent, ConditionalOrderEventData, CopyEvent, CopyRelationshipEventData, InstrumentEvent, InstrumentEventData, LiquidationEvent, LiquidationEventData, MarketStatsAllEvent, MarketStatsData, MarketStatsEvent, MarketStatsSummary, OHLCVEvent, OHLCVPriceType, OrderbookEvent, OrderEvent, PositionEvent, PositionEventData, PositionValuationEvent, TradeEvent, TradeEventData, TwapOrderEvent, TwapOrderEventData, UserBalanceEvent, UserBalanceEventData, UserMovementEvent } from "./events";
|
|
61
61
|
import type { OHLCVSnapshotCandle, OrderSnapshotItem, SnapshotHandler } from "./snapshots";
|
|
@@ -71,6 +71,22 @@ export interface MonacoWebSocket {
|
|
|
71
71
|
getStatus: () => WebSocketStatus;
|
|
72
72
|
/** Set (or clear) the session keypair used to authenticate the connection */
|
|
73
73
|
setSessionKeypair: (credentials: SessionCredentials | undefined) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Where `channel` (the exact channel string a helper subscribes to, e.g.
|
|
76
|
+
* `trades:<tradingPairId>`) stands between what this client asked for and
|
|
77
|
+
* what the server confirmed. Calling a subscription helper only REQUESTS a
|
|
78
|
+
* channel: it reads `"pending"` until the server's acknowledgement names it.
|
|
79
|
+
*/
|
|
80
|
+
getSubscriptionState: (channel: string) => WebSocketSubscriptionState;
|
|
81
|
+
/**
|
|
82
|
+
* Register a listener for server-confirmed subscription changes; returns a
|
|
83
|
+
* function that removes it. Fires `"subscribed"` when the server
|
|
84
|
+
* acknowledges a channel this client still wants, and `"unsubscribed"`
|
|
85
|
+
* when it acknowledges an unsubscribe. A rejected channel fires nothing
|
|
86
|
+
* here; its `Error` reaches `onError`. An error thrown by a listener is
|
|
87
|
+
* logged and does not affect the connection or other listeners.
|
|
88
|
+
*/
|
|
89
|
+
onSubscriptionChange: (listener: SubscriptionChangeHandler) => () => void;
|
|
74
90
|
/** Subscribe to order events (requires authentication); `onSnapshot` receives every resting order on the pair */
|
|
75
91
|
orders: (tradingPairId: string, tradingMode: TradingMode, handler: MessageHandler<OrderEvent>, onSnapshot?: SnapshotHandler<OrderSnapshotItem>) => () => void;
|
|
76
92
|
/** Subscribe to orderbook events (public) */
|
|
@@ -45,8 +45,9 @@ export interface MarketStatsData {
|
|
|
45
45
|
/** Best ask price (decimal string) */
|
|
46
46
|
bestAskPrice?: string;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* (never zero) until the market's
|
|
48
|
+
* Gross open interest (longs plus shorts) in base units (decimal string).
|
|
49
|
+
* Perp-only; omitted for spot, and omitted (never zero) until the market's
|
|
50
|
+
* open interest is known.
|
|
50
51
|
*/
|
|
51
52
|
openInterest?: string;
|
|
52
53
|
/**
|
|
@@ -57,9 +58,10 @@ export interface MarketStatsData {
|
|
|
57
58
|
openInterestLimit?: string;
|
|
58
59
|
/**
|
|
59
60
|
* What is left of `openInterestLimit` at the mark, in quote (USD) notional,
|
|
60
|
-
* never below zero (decimal string)
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* never below zero (decimal string): the cap minus the gross `openInterest`
|
|
62
|
+
* × `markPrice`. At zero, orders that open exposure are refused until open
|
|
63
|
+
* interest or the mark falls. Perp-only; omitted for spot, when there is no
|
|
64
|
+
* mark, and until open interest is known.
|
|
63
65
|
*/
|
|
64
66
|
openInterestHeadroom?: string;
|
|
65
67
|
/** Last trade price (decimal string) */
|
|
@@ -145,8 +147,9 @@ export interface MarketStatsSummary {
|
|
|
145
147
|
/** 24h low price (decimal string) */
|
|
146
148
|
dailyPriceLow?: string;
|
|
147
149
|
/**
|
|
148
|
-
*
|
|
149
|
-
* (never zero) until the market's
|
|
150
|
+
* Gross open interest (longs plus shorts) in base units (decimal string).
|
|
151
|
+
* Perp-only; omitted for spot, and omitted (never zero) until the market's
|
|
152
|
+
* open interest is known.
|
|
150
153
|
*/
|
|
151
154
|
openInterest?: string;
|
|
152
155
|
/** Current (last settled) funding rate (decimal string). Perp-only; omitted for spot. */
|
|
@@ -166,8 +169,9 @@ export interface MarketStatsSummary {
|
|
|
166
169
|
/** Funding premium (decimal string). Perp-only; omitted for spot. */
|
|
167
170
|
premium?: string;
|
|
168
171
|
/**
|
|
169
|
-
*
|
|
170
|
-
* the mark, falling back to the last trade
|
|
172
|
+
* Gross open interest (longs plus shorts) in quote notional (decimal
|
|
173
|
+
* string): `openInterest` priced at the mark, falling back to the last trade
|
|
174
|
+
* price. Perp-only; omitted for spot,
|
|
171
175
|
* and omitted (never zero) until both open interest and a price are known.
|
|
172
176
|
*/
|
|
173
177
|
openInterestNotional?: string;
|
|
@@ -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 ["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", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_sub_account", "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_pnl", "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_referral_tree", "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_builder_fee_changes", "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_builder_fee", "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", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "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", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_sub_account", "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_pnl", "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_referral_tree", "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_builder_fee_changes", "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_order_slices", "list_twap_orders", "mint_tokens", "pitpass_check_trader_code_availability", "pitpass_clear_trader_code", "pitpass_get_my_referral_downline", "pitpass_get_my_referral_position", "pitpass_get_my_referral_tree", "pitpass_get_my_trader_code", "pitpass_get_rewards_balance", "pitpass_get_trader_code_info", "pitpass_set_trader_code", "pitpass_transfer_rewards", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "revoke_delegated_agent", "revoke_session", "set_builder_fee", "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", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "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
|
@@ -125,8 +125,19 @@ export const OPERATION_IDS = [
|
|
|
125
125
|
"list_positions",
|
|
126
126
|
"list_sub_accounts_with_balances",
|
|
127
127
|
"list_trading_pairs",
|
|
128
|
+
"list_twap_order_slices",
|
|
128
129
|
"list_twap_orders",
|
|
129
130
|
"mint_tokens",
|
|
131
|
+
"pitpass_check_trader_code_availability",
|
|
132
|
+
"pitpass_clear_trader_code",
|
|
133
|
+
"pitpass_get_my_referral_downline",
|
|
134
|
+
"pitpass_get_my_referral_position",
|
|
135
|
+
"pitpass_get_my_referral_tree",
|
|
136
|
+
"pitpass_get_my_trader_code",
|
|
137
|
+
"pitpass_get_rewards_balance",
|
|
138
|
+
"pitpass_get_trader_code_info",
|
|
139
|
+
"pitpass_set_trader_code",
|
|
140
|
+
"pitpass_transfer_rewards",
|
|
130
141
|
"preview_follow",
|
|
131
142
|
"refresh_managed_market_quotes",
|
|
132
143
|
"refresh_session",
|