aftermath-ts-sdk 1.3.23-perps.25 → 1.3.23-perps.27
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/packages/perpetuals/perpetuals.d.ts +539 -14
- package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetuals.js +540 -57
- package/dist/packages/perpetuals/perpetualsAccount.d.ts +474 -8
- package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetualsAccount.js +489 -25
- package/dist/packages/perpetuals/perpetualsMarket.d.ts +337 -3
- package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetualsMarket.js +321 -1
- package/dist/packages/perpetuals/perpetualsTypes.d.ts +910 -33
- package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetualsTypes.js +70 -0
- package/dist/packages/perpetuals/perpetualsVault.d.ts +3 -2
- package/dist/packages/perpetuals/perpetualsVault.d.ts.map +1 -1
- package/dist/packages/perpetuals/perpetualsVault.js +29 -24
- package/package.json +1 -1
|
@@ -1,14 +1,92 @@
|
|
|
1
1
|
import { Caller } from "../../general/utils/caller";
|
|
2
|
-
import { Balance, PerpetualsAccountCap, PerpetualsAccountObject, PerpetualsMarketId, PerpetualsOrderId, PerpetualsPosition, SdkPerpetualsPlaceLimitOrderInputs, SdkPerpetualsPlaceMarketOrderInputs, SuiAddress, ObjectId, PerpetualsOrderData, Percentage, ApiDataWithCursorBody, Timestamp, PerpetualsAccountCollateralChangesWithCursor, PerpetualsAccountTradesWithCursor, PerpetualsAccountId, CallerConfig, SdkPerpetualsCancelOrdersPreviewInputs, PerpetualsStopOrderData, SdkPerpetualsPlaceStopOrdersInputs, ApiPerpetualsEditStopOrdersBody, SdkPerpetualsPlaceSlTpOrdersInputs, ApiPerpetualsWithdrawCollateralResponse, SdkPerpetualsPlaceMarketOrderPreviewInputs, SdkPerpetualsPlaceLimitOrderPreviewInputs,
|
|
2
|
+
import { Balance, PerpetualsAccountCap, PerpetualsAccountObject, PerpetualsMarketId, PerpetualsOrderId, PerpetualsPosition, SdkPerpetualsPlaceLimitOrderInputs, SdkPerpetualsPlaceMarketOrderInputs, SuiAddress, ObjectId, PerpetualsOrderData, Percentage, ApiDataWithCursorBody, Timestamp, PerpetualsAccountCollateralChangesWithCursor, PerpetualsAccountTradesWithCursor, PerpetualsAccountId, CallerConfig, SdkPerpetualsCancelOrdersPreviewInputs, PerpetualsStopOrderData, SdkPerpetualsPlaceStopOrdersInputs, ApiPerpetualsEditStopOrdersBody, SdkPerpetualsPlaceSlTpOrdersInputs, ApiPerpetualsWithdrawCollateralResponse, SdkPerpetualsPlaceMarketOrderPreviewInputs, SdkPerpetualsPlaceLimitOrderPreviewInputs, ApiTransactionResponse, PerpetualsAccountMarginData, PerpetualsPartialVaultCap } from "../../types";
|
|
3
3
|
import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
|
|
4
4
|
import { AftermathApi } from "../../general/providers";
|
|
5
|
+
/**
|
|
6
|
+
* High-level wrapper around a single Perpetuals account or vault account.
|
|
7
|
+
*
|
|
8
|
+
* This class encapsulates:
|
|
9
|
+
*
|
|
10
|
+
* - Transaction builders for:
|
|
11
|
+
* - Collateral actions (deposit, withdraw, allocate, deallocate, transfer)
|
|
12
|
+
* - Orders (market/limit, cancel, stop orders, SL/TP, set leverage)
|
|
13
|
+
* - Read-only account helpers:
|
|
14
|
+
* - Stop-order message signing
|
|
15
|
+
* - Order & stop-order metadata
|
|
16
|
+
* - Collateral & trade history
|
|
17
|
+
* - Convenience helpers to:
|
|
18
|
+
* - Fetch and categorize SL/TP stop orders
|
|
19
|
+
* - Resolve account/vault identifiers and owner addresses
|
|
20
|
+
*
|
|
21
|
+
* You typically do not construct `PerpetualsAccount` directly. Instead, use
|
|
22
|
+
* {@link Perpetuals.getAccount} or {@link Perpetuals.getAccounts}, which
|
|
23
|
+
* fetch all required on-chain data and wrap it for you:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
27
|
+
* await afSdk.init();
|
|
28
|
+
*
|
|
29
|
+
* const perps = afSdk.Perpetuals();
|
|
30
|
+
* const [accountCap] = await perps.getOwnedAccountCaps({
|
|
31
|
+
* walletAddress: "0x...",
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const account = await perps.getAccount({ accountCap });
|
|
35
|
+
*
|
|
36
|
+
* // Build a deposit transaction
|
|
37
|
+
* const depositTx = await account.getDepositCollateralTx({
|
|
38
|
+
* depositAmount: BigInt("1000000000"),
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
5
42
|
export declare class PerpetualsAccount extends Caller {
|
|
6
43
|
readonly account: PerpetualsAccountObject;
|
|
7
|
-
readonly accountCap: PerpetualsAccountCap |
|
|
44
|
+
readonly accountCap: PerpetualsAccountCap | PerpetualsPartialVaultCap;
|
|
8
45
|
readonly Provider?: AftermathApi | undefined;
|
|
9
|
-
|
|
46
|
+
/**
|
|
47
|
+
* If this account is backed by a vault, this holds the vault object ID.
|
|
48
|
+
* Otherwise, `undefined` for "direct" user accounts.
|
|
49
|
+
*/
|
|
10
50
|
private readonly vaultId;
|
|
11
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Create a new {@link PerpetualsAccount} wrapper.
|
|
53
|
+
*
|
|
54
|
+
* @param account - Raw account object with positions and equity data.
|
|
55
|
+
* @param accountCap - Account cap or vault-cap-extended object containing
|
|
56
|
+
* ownership and collateral metadata.
|
|
57
|
+
* @param config - Optional {@link CallerConfig} (network, auth, etc.).
|
|
58
|
+
* @param Provider - Optional shared {@link AftermathApi} provider instance
|
|
59
|
+
* used to derive serialized transaction kinds (`txKind`) from
|
|
60
|
+
* {@link Transaction} objects.
|
|
61
|
+
*/
|
|
62
|
+
constructor(account: PerpetualsAccountObject, accountCap: PerpetualsAccountCap | PerpetualsPartialVaultCap, config?: CallerConfig, Provider?: AftermathApi | undefined);
|
|
63
|
+
/**
|
|
64
|
+
* Build a `deposit-collateral` transaction for this account.
|
|
65
|
+
*
|
|
66
|
+
* For non-vault accounts, this endpoint constructs a transaction that:
|
|
67
|
+
* - Optionally extends an existing {@link Transaction}, and
|
|
68
|
+
* - Deposits collateral into the Perpetuals account.
|
|
69
|
+
*
|
|
70
|
+
* **Note:** Vault accounts are currently not supported and will throw.
|
|
71
|
+
*
|
|
72
|
+
* @param inputs.tx - Optional existing transaction to extend. If omitted,
|
|
73
|
+
* a new {@link Transaction} is created under the hood.
|
|
74
|
+
* @param inputs.isSponsoredTx - Optional flag indicating whether the
|
|
75
|
+
* transaction is gas-sponsored.
|
|
76
|
+
* @param inputs.depositAmount - Amount of collateral to deposit, if paying
|
|
77
|
+
* directly from the wallet.
|
|
78
|
+
* @param inputs.depositCoinArg - Transaction object argument referencing a
|
|
79
|
+
* coin to deposit (mutually exclusive with `depositAmount`).
|
|
80
|
+
*
|
|
81
|
+
* @returns Transaction response containing a serialized `txKind`.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const { txKind } = await account.getDepositCollateralTx({
|
|
86
|
+
* depositAmount: BigInt("1000000000"),
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
12
90
|
getDepositCollateralTx(inputs: {
|
|
13
91
|
tx?: Transaction;
|
|
14
92
|
isSponsoredTx?: boolean;
|
|
@@ -19,6 +97,31 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
19
97
|
})): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
20
98
|
tx: Transaction;
|
|
21
99
|
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Build a `withdraw-collateral` transaction for this account.
|
|
102
|
+
*
|
|
103
|
+
* For non-vault accounts, this endpoint constructs a transaction to:
|
|
104
|
+
* - Withdraw collateral from the Perpetuals account, and
|
|
105
|
+
* - Optionally transfer it to a `recipientAddress` (otherwise coin is left
|
|
106
|
+
* as a transaction argument).
|
|
107
|
+
*
|
|
108
|
+
* **Note:** Vault accounts are currently not supported and will throw.
|
|
109
|
+
*
|
|
110
|
+
* @param inputs.withdrawAmount - Amount of collateral to withdraw.
|
|
111
|
+
* @param inputs.recipientAddress - Optional address to receive the withdrawn
|
|
112
|
+
* coins directly.
|
|
113
|
+
* @param inputs.tx - Optional transaction to extend (defaults to new `Transaction()`).
|
|
114
|
+
*
|
|
115
|
+
* @returns A response containing `txKind` and the `coinOutArg` where the
|
|
116
|
+
* withdrawn coins end up if `recipientAddress` is not used.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const { txKind, coinOutArg } = await account.getWithdrawCollateralTx({
|
|
121
|
+
* withdrawAmount: BigInt("1000000000"),
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
22
125
|
getWithdrawCollateralTx(inputs: {
|
|
23
126
|
withdrawAmount: Balance;
|
|
24
127
|
recipientAddress?: SuiAddress;
|
|
@@ -26,6 +129,18 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
26
129
|
}): Promise<Omit<ApiPerpetualsWithdrawCollateralResponse, "txKind"> & {
|
|
27
130
|
tx: Transaction;
|
|
28
131
|
}>;
|
|
132
|
+
/**
|
|
133
|
+
* Build an `allocate-collateral` transaction, moving collateral from this
|
|
134
|
+
* account into a specific market (clearing house).
|
|
135
|
+
*
|
|
136
|
+
* Works for both account-backed and vault-backed accounts.
|
|
137
|
+
*
|
|
138
|
+
* @param inputs.marketId - Market to allocate collateral to.
|
|
139
|
+
* @param inputs.allocateAmount - Amount of collateral to allocate.
|
|
140
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
141
|
+
*
|
|
142
|
+
* @returns Transaction response containing a serialized `txKind`.
|
|
143
|
+
*/
|
|
29
144
|
getAllocateCollateralTx(inputs: {
|
|
30
145
|
marketId: PerpetualsMarketId;
|
|
31
146
|
allocateAmount: Balance;
|
|
@@ -33,6 +148,18 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
33
148
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
34
149
|
tx: Transaction;
|
|
35
150
|
}>;
|
|
151
|
+
/**
|
|
152
|
+
* Build a `deallocate-collateral` transaction, moving collateral from a
|
|
153
|
+
* specific market back to this account.
|
|
154
|
+
*
|
|
155
|
+
* Works for both account-backed and vault-backed accounts.
|
|
156
|
+
*
|
|
157
|
+
* @param inputs.marketId - Market to deallocate collateral from.
|
|
158
|
+
* @param inputs.deallocateAmount - Amount of collateral to deallocate.
|
|
159
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
160
|
+
*
|
|
161
|
+
* @returns Transaction response containing a serialized `txKind`.
|
|
162
|
+
*/
|
|
36
163
|
getDeallocateCollateralTx(inputs: {
|
|
37
164
|
marketId: PerpetualsMarketId;
|
|
38
165
|
deallocateAmount: Balance;
|
|
@@ -40,6 +167,17 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
40
167
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
41
168
|
tx: Transaction;
|
|
42
169
|
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Build a `transfer-collateral` transaction between two Perpetuals accounts.
|
|
172
|
+
*
|
|
173
|
+
* Only supported for direct accounts, **not** vault-backed accounts.
|
|
174
|
+
*
|
|
175
|
+
* @param inputs.transferAmount - Amount of collateral to transfer.
|
|
176
|
+
* @param inputs.toAccountId - Destination account ID.
|
|
177
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
178
|
+
*
|
|
179
|
+
* @returns Transaction response containing a serialized `txKind`.
|
|
180
|
+
*/
|
|
43
181
|
getTransferCollateralTx(inputs: {
|
|
44
182
|
transferAmount: Balance;
|
|
45
183
|
toAccountId: PerpetualsAccountId;
|
|
@@ -47,12 +185,63 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
47
185
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
48
186
|
tx: Transaction;
|
|
49
187
|
}>;
|
|
188
|
+
/**
|
|
189
|
+
* Build a `place-market-order` transaction for this account.
|
|
190
|
+
*
|
|
191
|
+
* This is the primary entrypoint for opening/closing positions via market orders.
|
|
192
|
+
* It automatically:
|
|
193
|
+
* - Injects the account/vault identity into the payload.
|
|
194
|
+
* - Derives `hasPosition` based on the current account state for the given market.
|
|
195
|
+
* - Optionally attaches SL/TP stop orders via the `slTp` input.
|
|
196
|
+
*
|
|
197
|
+
* @param inputs - See {@link SdkPerpetualsPlaceMarketOrderInputs} for details.
|
|
198
|
+
* Notably:
|
|
199
|
+
* - `marketId`, `side`, `size`, `collateralChange`, `reduceOnly`
|
|
200
|
+
* - Optional `leverage`
|
|
201
|
+
* - Optional `slTp` params
|
|
202
|
+
* - Optional `tx` to extend
|
|
203
|
+
*
|
|
204
|
+
* @returns Transaction response containing `txKind`.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```ts
|
|
208
|
+
* const { txKind } = await account.getPlaceMarketOrderTx({
|
|
209
|
+
* marketId: "0x...",
|
|
210
|
+
* side: PerpetualsOrderSide.Bid,
|
|
211
|
+
* size: BigInt("1000000000"),
|
|
212
|
+
* collateralChange: 10,
|
|
213
|
+
* reduceOnly: false,
|
|
214
|
+
* });
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
50
217
|
getPlaceMarketOrderTx(inputs: SdkPerpetualsPlaceMarketOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
51
218
|
tx: Transaction;
|
|
52
219
|
}>;
|
|
220
|
+
/**
|
|
221
|
+
* Build a `place-limit-order` transaction for this account.
|
|
222
|
+
*
|
|
223
|
+
* Similar to {@link getPlaceMarketOrderTx}, but uses limit order semantics:
|
|
224
|
+
* - Requires `price` and `orderType`.
|
|
225
|
+
* - Supports reduce-only flags, expiry, optional leverage, and SL/TP stop orders.
|
|
226
|
+
*
|
|
227
|
+
* @param inputs - See {@link SdkPerpetualsPlaceLimitOrderInputs}.
|
|
228
|
+
*
|
|
229
|
+
* @returns Transaction response containing `txKind`.
|
|
230
|
+
*/
|
|
53
231
|
getPlaceLimitOrderTx(inputs: SdkPerpetualsPlaceLimitOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
54
232
|
tx: Transaction;
|
|
55
233
|
}>;
|
|
234
|
+
/**
|
|
235
|
+
* Build a `cancel-orders` transaction for this account.
|
|
236
|
+
*
|
|
237
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
238
|
+
* @param inputs.marketIdsToData - Mapping from market IDs to:
|
|
239
|
+
* - `orderIds`: order IDs to cancel
|
|
240
|
+
* - `collateralChange`: net collateral impact (if any)
|
|
241
|
+
* - `leverage`: current leverage used for estimating effects
|
|
242
|
+
*
|
|
243
|
+
* @returns Transaction response containing `txKind`.
|
|
244
|
+
*/
|
|
56
245
|
getCancelOrdersTx(inputs: {
|
|
57
246
|
tx?: Transaction;
|
|
58
247
|
marketIdsToData: Record<PerpetualsMarketId, {
|
|
@@ -63,23 +252,76 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
63
252
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
64
253
|
tx: Transaction;
|
|
65
254
|
}>;
|
|
255
|
+
/**
|
|
256
|
+
* Build a `cancel-stop-orders` transaction for this account.
|
|
257
|
+
*
|
|
258
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
259
|
+
* @param inputs.stopOrderIds - Array of stop-order ticket IDs to cancel.
|
|
260
|
+
*
|
|
261
|
+
* @returns Transaction response containing `txKind`.
|
|
262
|
+
*/
|
|
66
263
|
getCancelStopOrdersTx(inputs: {
|
|
67
264
|
tx?: Transaction;
|
|
68
265
|
stopOrderIds: ObjectId[];
|
|
69
266
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
70
267
|
tx: Transaction;
|
|
71
268
|
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Build a `place-stop-orders` transaction for this account.
|
|
271
|
+
*
|
|
272
|
+
* This allows placing one or more stop orders in a single transaction,
|
|
273
|
+
* optionally with a dedicated gas coin and a sponsored gas flag.
|
|
274
|
+
*
|
|
275
|
+
* @param inputs - See {@link SdkPerpetualsPlaceStopOrdersInputs}.
|
|
276
|
+
*
|
|
277
|
+
* @returns Transaction response containing `txKind`.
|
|
278
|
+
*/
|
|
72
279
|
getPlaceStopOrdersTx(inputs: SdkPerpetualsPlaceStopOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
73
280
|
tx: Transaction;
|
|
74
281
|
}>;
|
|
282
|
+
/**
|
|
283
|
+
* Build a `place-sl-tp-orders` transaction for this account.
|
|
284
|
+
*
|
|
285
|
+
* This helper constructs SL/TP stop orders for an **existing** position
|
|
286
|
+
* in a given market. If the account has no position for `marketId`, this
|
|
287
|
+
* throws an error.
|
|
288
|
+
*
|
|
289
|
+
* @param inputs - See {@link SdkPerpetualsPlaceSlTpOrdersInputs}.
|
|
290
|
+
*
|
|
291
|
+
* @returns Transaction response containing `txKind`.
|
|
292
|
+
*/
|
|
75
293
|
getPlaceSlTpOrdersTx(inputs: SdkPerpetualsPlaceSlTpOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
76
294
|
tx: Transaction;
|
|
77
295
|
}>;
|
|
296
|
+
/**
|
|
297
|
+
* Build an `edit-stop-orders` transaction for this account.
|
|
298
|
+
*
|
|
299
|
+
* This endpoint lets you update existing stop orders in batch.
|
|
300
|
+
*
|
|
301
|
+
* @param inputs.stopOrders - Full updated stop-order payloads to apply.
|
|
302
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
303
|
+
*
|
|
304
|
+
* @returns Transaction response containing `txKind`.
|
|
305
|
+
*/
|
|
78
306
|
getEditStopOrdersTx(inputs: Omit<ApiPerpetualsEditStopOrdersBody, "txKind" | "accountObjectId"> & {
|
|
79
307
|
tx?: Transaction;
|
|
80
308
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
81
309
|
tx: Transaction;
|
|
82
310
|
}>;
|
|
311
|
+
/**
|
|
312
|
+
* Build a `set-leverage` transaction for a given market.
|
|
313
|
+
*
|
|
314
|
+
* This updates the effective leverage for the position (or potential position)
|
|
315
|
+
* in `marketId`, and optionally adjusts collateral in tandem.
|
|
316
|
+
*
|
|
317
|
+
* @param inputs.tx - Optional transaction to extend.
|
|
318
|
+
* @param inputs.leverage - Target leverage value.
|
|
319
|
+
* @param inputs.collateralChange - Net collateral change to apply alongside
|
|
320
|
+
* the leverage update.
|
|
321
|
+
* @param inputs.marketId - Market whose leverage to adjust.
|
|
322
|
+
*
|
|
323
|
+
* @returns Transaction response containing `txKind`.
|
|
324
|
+
*/
|
|
83
325
|
getSetLeverageTx(inputs: {
|
|
84
326
|
tx?: Transaction;
|
|
85
327
|
leverage: number;
|
|
@@ -88,6 +330,26 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
88
330
|
}): Promise<Omit<ApiTransactionResponse, "txKind"> & {
|
|
89
331
|
tx: Transaction;
|
|
90
332
|
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Build a deterministic message payload to sign when querying stop orders
|
|
335
|
+
* from the backend.
|
|
336
|
+
*
|
|
337
|
+
* This payload is intended to be signed off-chain and then submitted to
|
|
338
|
+
* `getStopOrderDatas` as a proof of account ownership.
|
|
339
|
+
*
|
|
340
|
+
* @param inputs.marketIds - Optional list of market IDs to scope the query.
|
|
341
|
+
*
|
|
342
|
+
* @returns An object describing the action and account/market IDs, suitable
|
|
343
|
+
* for message signing.
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```ts
|
|
347
|
+
* const message = account.getStopOrdersMessageToSign({ marketIds: ["0x..."] });
|
|
348
|
+
* const { signature } = await wallet.signMessage({
|
|
349
|
+
* message: new TextEncoder().encode(JSON.stringify(message)),
|
|
350
|
+
* });
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
91
353
|
getStopOrdersMessageToSign(inputs?: {
|
|
92
354
|
marketIds: PerpetualsMarketId[];
|
|
93
355
|
}): {
|
|
@@ -95,10 +357,24 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
95
357
|
account_id: string;
|
|
96
358
|
clearing_house_ids: string[];
|
|
97
359
|
};
|
|
360
|
+
/**
|
|
361
|
+
* Preview the effects of placing a market order (without building a tx).
|
|
362
|
+
*
|
|
363
|
+
* @param inputs - See {@link SdkPerpetualsPlaceMarketOrderPreviewInputs}.
|
|
364
|
+
* @param abortSignal - Optional `AbortSignal` to cancel the request.
|
|
365
|
+
*
|
|
366
|
+
* @returns Either an error message or a preview including:
|
|
367
|
+
* - `updatedPosition`
|
|
368
|
+
* - `priceSlippage`, `percentSlippage`
|
|
369
|
+
* - `filledSize`, `filledSizeUsd`
|
|
370
|
+
* - `postedSize`, `postedSizeUsd`
|
|
371
|
+
* - `collateralChange`
|
|
372
|
+
* - `executionPrice`
|
|
373
|
+
*/
|
|
98
374
|
getPlaceMarketOrderPreview(inputs: SdkPerpetualsPlaceMarketOrderPreviewInputs, abortSignal?: AbortSignal): Promise<{
|
|
99
375
|
error: string;
|
|
100
376
|
} | {
|
|
101
|
-
|
|
377
|
+
updatedPosition: PerpetualsPosition;
|
|
102
378
|
priceSlippage: number;
|
|
103
379
|
percentSlippage: Percentage;
|
|
104
380
|
filledSize: number;
|
|
@@ -108,10 +384,19 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
108
384
|
collateralChange: number;
|
|
109
385
|
executionPrice: number;
|
|
110
386
|
}>;
|
|
387
|
+
/**
|
|
388
|
+
* Preview the effects of placing a limit order (without building a tx).
|
|
389
|
+
*
|
|
390
|
+
* @param inputs - See {@link SdkPerpetualsPlaceLimitOrderPreviewInputs}.
|
|
391
|
+
* @param abortSignal - Optional `AbortSignal` to cancel the request.
|
|
392
|
+
*
|
|
393
|
+
* @returns Either an error message or a preview object similar to
|
|
394
|
+
* {@link getPlaceMarketOrderPreview}.
|
|
395
|
+
*/
|
|
111
396
|
getPlaceLimitOrderPreview(inputs: SdkPerpetualsPlaceLimitOrderPreviewInputs, abortSignal?: AbortSignal): Promise<{
|
|
112
397
|
error: string;
|
|
113
398
|
} | {
|
|
114
|
-
|
|
399
|
+
updatedPosition: PerpetualsPosition;
|
|
115
400
|
priceSlippage: number;
|
|
116
401
|
percentSlippage: Percentage;
|
|
117
402
|
filledSize: number;
|
|
@@ -121,42 +406,187 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
121
406
|
collateralChange: number;
|
|
122
407
|
executionPrice: number;
|
|
123
408
|
}>;
|
|
409
|
+
/**
|
|
410
|
+
* Preview the effects of canceling orders across one or more markets.
|
|
411
|
+
*
|
|
412
|
+
* If `marketIdsToData` is empty, this returns a trivial preview with:
|
|
413
|
+
* - `collateralChange: 0`
|
|
414
|
+
* - `updatedPositions: []`
|
|
415
|
+
*
|
|
416
|
+
* @param inputs - See {@link SdkPerpetualsCancelOrdersPreviewInputs}.
|
|
417
|
+
* @param abortSignal - Optional `AbortSignal` to cancel the request.
|
|
418
|
+
*
|
|
419
|
+
* @returns Either:
|
|
420
|
+
* - `{ updatedPositions, collateralChange }`, or
|
|
421
|
+
* - `{ error }`.
|
|
422
|
+
*/
|
|
124
423
|
getCancelOrdersPreview(inputs: SdkPerpetualsCancelOrdersPreviewInputs, abortSignal?: AbortSignal): Promise<{
|
|
125
|
-
|
|
424
|
+
updatedPositions: PerpetualsPosition[];
|
|
126
425
|
collateralChange: number;
|
|
127
426
|
} | {
|
|
128
427
|
error: string;
|
|
129
428
|
}>;
|
|
429
|
+
/**
|
|
430
|
+
* Preview the effects of setting leverage for a given market.
|
|
431
|
+
*
|
|
432
|
+
* @param inputs.marketId - Market whose leverage you want to adjust.
|
|
433
|
+
* @param inputs.leverage - Target leverage value.
|
|
434
|
+
* @param abortSignal - Optional `AbortSignal` to cancel the request.
|
|
435
|
+
*
|
|
436
|
+
* @returns Either:
|
|
437
|
+
* - `{ updatedPosition, collateralChange }`, or
|
|
438
|
+
* - `{ error }`.
|
|
439
|
+
*/
|
|
130
440
|
getSetLeveragePreview(inputs: {
|
|
131
441
|
marketId: PerpetualsMarketId;
|
|
132
442
|
leverage: number;
|
|
133
443
|
}, abortSignal?: AbortSignal): Promise<{
|
|
134
|
-
|
|
444
|
+
updatedPosition: PerpetualsPosition;
|
|
135
445
|
collateralChange: number;
|
|
136
446
|
} | {
|
|
137
447
|
error: string;
|
|
138
448
|
}>;
|
|
449
|
+
/**
|
|
450
|
+
* Preview the effects of allocating/deallocating collateral for the position in
|
|
451
|
+
* a given market.
|
|
452
|
+
*
|
|
453
|
+
* @param inputs.marketId - Market of whose position you want to allocate/deallocate
|
|
454
|
+
* collateral to/from.
|
|
455
|
+
* @param inputs.collateralChange - The target collateral change (a positive number
|
|
456
|
+
* for allocating collateral, negative for deallocating collateral).
|
|
457
|
+
* @param abortSignal - Optional `AbortSignal` to cancel the request.
|
|
458
|
+
*
|
|
459
|
+
* @returns Either:
|
|
460
|
+
* - `{ updatedPosition, collateralChange }`, or
|
|
461
|
+
* - `{ error }`.
|
|
462
|
+
*/
|
|
463
|
+
getEditCollateralPreview(inputs: {
|
|
464
|
+
marketId: PerpetualsMarketId;
|
|
465
|
+
collateralChange: Balance;
|
|
466
|
+
}, abortSignal?: AbortSignal): Promise<{
|
|
467
|
+
updatedPosition: PerpetualsPosition;
|
|
468
|
+
collateralChange: number;
|
|
469
|
+
} | {
|
|
470
|
+
error: string;
|
|
471
|
+
}>;
|
|
472
|
+
/**
|
|
473
|
+
* Fetch the latest order metadata (sizes, IDs) for this account.
|
|
474
|
+
*
|
|
475
|
+
* This is especially useful after a long-running session where on-chain
|
|
476
|
+
* pending orders may have changed relative to the local `account` state.
|
|
477
|
+
*
|
|
478
|
+
* @returns Array of {@link PerpetualsOrderData} describing each pending order.
|
|
479
|
+
* Returns `[]` if there are no pending orders.
|
|
480
|
+
*/
|
|
139
481
|
getOrderDatas(): Promise<PerpetualsOrderData[]>;
|
|
482
|
+
/**
|
|
483
|
+
* Fetch stop-order ticket data for this account, using an off-chain signed
|
|
484
|
+
* payload.
|
|
485
|
+
*
|
|
486
|
+
* @param inputs.bytes - Serialized message that was signed (e.g. from
|
|
487
|
+
* {@link getStopOrdersMessageToSign}).
|
|
488
|
+
* @param inputs.signature - Signature over `bytes`.
|
|
489
|
+
* @param inputs.marketIds - Optional subset of markets to filter results by.
|
|
490
|
+
*
|
|
491
|
+
* @returns Array of {@link PerpetualsStopOrderData}.
|
|
492
|
+
*/
|
|
140
493
|
getStopOrderDatas(inputs: {
|
|
141
494
|
bytes: string;
|
|
142
495
|
signature: string;
|
|
143
496
|
marketIds?: PerpetualsMarketId[];
|
|
144
497
|
}): Promise<PerpetualsStopOrderData[]>;
|
|
498
|
+
/**
|
|
499
|
+
* Fetch paginated collateral-change history for this account, including
|
|
500
|
+
* deposits, withdrawals, funding settlements, liquidations, etc.
|
|
501
|
+
*
|
|
502
|
+
* @param inputs.cursor - Optional cursor for pagination.
|
|
503
|
+
* @param inputs.limit - Optional limit per page.
|
|
504
|
+
*
|
|
505
|
+
* @returns {@link PerpetualsAccountCollateralChangesWithCursor} containing
|
|
506
|
+
* an array of changes and a `nextCursor`.
|
|
507
|
+
*/
|
|
145
508
|
getCollateralHistory(inputs: ApiDataWithCursorBody<Timestamp>): Promise<PerpetualsAccountCollateralChangesWithCursor>;
|
|
509
|
+
/**
|
|
510
|
+
* Fetch paginated trade (order fill) history for this account.
|
|
511
|
+
*
|
|
512
|
+
* @param inputs.cursor - Optional cursor for pagination.
|
|
513
|
+
* @param inputs.limit - Optional limit per page.
|
|
514
|
+
*
|
|
515
|
+
* @returns {@link PerpetualsAccountTradesWithCursor} containing a list of
|
|
516
|
+
* trades and a `nextCursor`.
|
|
517
|
+
*/
|
|
146
518
|
getOrderHistory(inputs: ApiDataWithCursorBody<Timestamp>): Promise<PerpetualsAccountTradesWithCursor>;
|
|
519
|
+
getMarginHistory(): Promise<PerpetualsAccountMarginData[]>;
|
|
520
|
+
/**
|
|
521
|
+
* Find the current position for a given market ID, if any.
|
|
522
|
+
*
|
|
523
|
+
* @param inputs.marketId - Market ID to search for.
|
|
524
|
+
* @returns {@link PerpetualsPosition} if found, otherwise `undefined`.
|
|
525
|
+
*/
|
|
147
526
|
positionForMarketId(inputs: {
|
|
148
527
|
marketId: PerpetualsMarketId;
|
|
149
528
|
}): PerpetualsPosition | undefined;
|
|
529
|
+
/**
|
|
530
|
+
* Filter a list of stop orders to only include non-SL/TP orders.
|
|
531
|
+
*
|
|
532
|
+
* A stop order is considered SL/TP if it appears in the combined set of
|
|
533
|
+
* SL/TP orders across **all** markets (see {@link slTpStopOrderDatas}).
|
|
534
|
+
*
|
|
535
|
+
* @param inputs.stopOrderDatas - Full array of stop-order ticket data.
|
|
536
|
+
* @returns An array of non-SL/TP stop orders, or `undefined` if none exist.
|
|
537
|
+
*/
|
|
150
538
|
nonSlTpStopOrderDatas(inputs: {
|
|
151
539
|
stopOrderDatas: PerpetualsStopOrderData[];
|
|
152
540
|
}): PerpetualsStopOrderData[] | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* Extract all SL/TP-style stop orders across **all** markets for this
|
|
543
|
+
* account.
|
|
544
|
+
*
|
|
545
|
+
* SL/TP orders are stop orders which:
|
|
546
|
+
* - Have an `slTp` payload, and
|
|
547
|
+
* - Target the opposite side of the current position.
|
|
548
|
+
*
|
|
549
|
+
* This combines:
|
|
550
|
+
* - "Full" SL/TP orders (size >= `i64MaxBigInt`)
|
|
551
|
+
* - "Partial" SL/TP orders (size < `i64MaxBigInt`)
|
|
552
|
+
*
|
|
553
|
+
* @param inputs.stopOrderDatas - Full list of stop-order tickets.
|
|
554
|
+
* @returns Array of SL/TP stop orders, or `undefined` if none exist.
|
|
555
|
+
*/
|
|
153
556
|
slTpStopOrderDatas(inputs: {
|
|
154
557
|
stopOrderDatas: PerpetualsStopOrderData[];
|
|
155
558
|
}): PerpetualsStopOrderData[] | undefined;
|
|
559
|
+
/**
|
|
560
|
+
* Filter stop orders for a single market to only include non-SL/TP orders.
|
|
561
|
+
*
|
|
562
|
+
* Uses {@link slTpStopOrderDatasForMarketId} under the hood.
|
|
563
|
+
*
|
|
564
|
+
* @param inputs.marketId - Market ID to filter for.
|
|
565
|
+
* @param inputs.stopOrderDatas - Full list of stop orders.
|
|
566
|
+
* @returns Non-SL/TP stop orders for the given market, or `undefined` if none exist.
|
|
567
|
+
*/
|
|
156
568
|
nonSlTpStopOrderDatasForMarketId(inputs: {
|
|
157
569
|
marketId: PerpetualsMarketId;
|
|
158
570
|
stopOrderDatas: PerpetualsStopOrderData[];
|
|
159
571
|
}): PerpetualsStopOrderData[] | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* Categorize stop orders for a specific market into:
|
|
574
|
+
* - A "full" SL/TP order (size >= `i64MaxBigInt`) if any.
|
|
575
|
+
* - A set of "partial" SL/TP orders (size < `i64MaxBigInt`).
|
|
576
|
+
*
|
|
577
|
+
* SL/TP stop orders are defined as:
|
|
578
|
+
* - Market ID matches the input market.
|
|
579
|
+
* - `slTp` field is present.
|
|
580
|
+
* - Order side is opposite of the position side.
|
|
581
|
+
* - At least a `stopLossIndexPrice` or `takeProfitIndexPrice` is set.
|
|
582
|
+
*
|
|
583
|
+
* @param inputs.marketId - Market to categorize stop orders for.
|
|
584
|
+
* @param inputs.stopOrderDatas - Full list of stop orders.
|
|
585
|
+
*
|
|
586
|
+
* @returns Object containing:
|
|
587
|
+
* - `fullSlTpOrder` (if any)
|
|
588
|
+
* - `partialSlTpOrders` (if any, otherwise `undefined`)
|
|
589
|
+
*/
|
|
160
590
|
slTpStopOrderDatasForMarketId(inputs: {
|
|
161
591
|
marketId: PerpetualsMarketId;
|
|
162
592
|
stopOrderDatas: PerpetualsStopOrderData[];
|
|
@@ -164,11 +594,47 @@ export declare class PerpetualsAccount extends Caller {
|
|
|
164
594
|
fullSlTpOrder: PerpetualsStopOrderData | undefined;
|
|
165
595
|
partialSlTpOrders: PerpetualsStopOrderData[] | undefined;
|
|
166
596
|
};
|
|
597
|
+
/**
|
|
598
|
+
* Convenience accessor for the account's available collateral (in coin units).
|
|
599
|
+
*
|
|
600
|
+
* @returns Available collateral as a `number`.
|
|
601
|
+
*/
|
|
167
602
|
collateral(): number;
|
|
603
|
+
/**
|
|
604
|
+
* Check whether this {@link PerpetualsAccount} is vault-backed.
|
|
605
|
+
*
|
|
606
|
+
* @returns `true` if the underlying `accountCap` is a vault cap; otherwise `false`.
|
|
607
|
+
*/
|
|
168
608
|
isVault(): boolean;
|
|
609
|
+
/**
|
|
610
|
+
* Resolve the owner wallet address of this account or vault.
|
|
611
|
+
*
|
|
612
|
+
* - For direct accounts, returns the `walletAddress` field.
|
|
613
|
+
* - For vault-backed accounts, returns `ownerAddress`.
|
|
614
|
+
*
|
|
615
|
+
* @returns Owner wallet {@link SuiAddress}.
|
|
616
|
+
*/
|
|
169
617
|
ownerAddress(): SuiAddress;
|
|
618
|
+
/**
|
|
619
|
+
* Get the underlying account object ID.
|
|
620
|
+
*
|
|
621
|
+
* @returns {@link ObjectId} of the account object.
|
|
622
|
+
*/
|
|
170
623
|
accountObjectId(): ObjectId;
|
|
624
|
+
/**
|
|
625
|
+
* Get the numeric perpetuals account ID.
|
|
626
|
+
*
|
|
627
|
+
* @returns {@link PerpetualsAccountId} for this account.
|
|
628
|
+
*/
|
|
171
629
|
accountId(): PerpetualsAccountId;
|
|
630
|
+
/**
|
|
631
|
+
* Get the account cap object ID, if this is a direct account.
|
|
632
|
+
*
|
|
633
|
+
* **Note:** This is **not** available for vault-backed accounts and will
|
|
634
|
+
* throw an error if called on one.
|
|
635
|
+
*
|
|
636
|
+
* @returns {@link ObjectId} of the account cap.
|
|
637
|
+
*/
|
|
172
638
|
accountCapId(): ObjectId;
|
|
173
639
|
}
|
|
174
640
|
//# sourceMappingURL=perpetualsAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perpetualsAccount.d.ts","sourceRoot":"","sources":["../../../src/packages/perpetuals/perpetualsAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAMN,OAAO,EACP,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"perpetualsAccount.d.ts","sourceRoot":"","sources":["../../../src/packages/perpetuals/perpetualsAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAMN,OAAO,EACP,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kCAAkC,EAClC,mCAAmC,EACnC,UAAU,EAEV,QAAQ,EAER,mBAAmB,EACnB,UAAU,EAEV,qBAAqB,EACrB,SAAS,EACT,4CAA4C,EAC5C,iCAAiC,EACjC,mBAAmB,EAanB,YAAY,EACZ,sCAAsC,EAEtC,uBAAuB,EAGvB,kCAAkC,EAClC,+BAA+B,EAC/B,kCAAkC,EAGlC,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,EAGzC,sBAAsB,EAGtB,2BAA2B,EAG3B,yBAAyB,EACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACN,WAAW,EACX,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,qBAAa,iBAAkB,SAAQ,MAAM;aA2B3B,OAAO,EAAE,uBAAuB;aAChC,UAAU,EACvB,oBAAoB,GACpB,yBAAyB;aAEZ,QAAQ,CAAC,EAAE,YAAY;IA3BxC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAM/C;;;;;;;;;;OAUG;gBAEc,OAAO,EAAE,uBAAuB,EAChC,UAAU,EACvB,oBAAoB,GACpB,yBAAyB,EAC5B,MAAM,CAAC,EA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