flash-sdk 2.16.3 → 2.17.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/CustodyAccount.d.ts +5 -0
- package/dist/OrderAccount.d.ts +25 -0
- package/dist/OrderAccount.js +31 -0
- package/dist/PerpetualsClient.d.ts +156 -16
- package/dist/PerpetualsClient.js +644 -90
- package/dist/PoolConfig.d.ts +1 -0
- package/dist/PoolConfig.js +7 -0
- package/dist/idl/perpetuals.d.ts +2401 -644
- package/dist/idl/perpetuals.js +3830 -2073
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/CustodyAccount.d.ts
CHANGED
@@ -23,6 +23,11 @@ export declare class CustodyAccount implements Custody {
|
|
23
23
|
bump: number;
|
24
24
|
tokenAccountBump: number;
|
25
25
|
sizeFactorForSpread: number;
|
26
|
+
null: number;
|
27
|
+
reservedAmount: BN;
|
28
|
+
minReserveUsd: BN;
|
29
|
+
limitPriceBufferBps: BN;
|
30
|
+
padding: number[];
|
26
31
|
constructor(publicKey: PublicKey, parseData: Custody);
|
27
32
|
static from(publicKey: PublicKey, parseData: Custody): CustodyAccount;
|
28
33
|
updateCustodyData(custody: Custody): void;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/// <reference types="bn.js" />
|
2
|
+
import { BN } from "@coral-xyz/anchor";
|
3
|
+
import { PublicKey } from "@solana/web3.js";
|
4
|
+
import { LimitOrder, Order, Position, TriggerOrder } from "./types";
|
5
|
+
export declare class OrderAccount implements Order {
|
6
|
+
publicKey: PublicKey;
|
7
|
+
owner: PublicKey;
|
8
|
+
market: PublicKey;
|
9
|
+
limitOrders: LimitOrder[];
|
10
|
+
takeProfitOrders: TriggerOrder[];
|
11
|
+
stopLossOrders: TriggerOrder[];
|
12
|
+
isInitialised: boolean;
|
13
|
+
openOrders: number;
|
14
|
+
openSl: number;
|
15
|
+
openTp: number;
|
16
|
+
inactiveSl: number;
|
17
|
+
inactiveTp: number;
|
18
|
+
activeOrders: number;
|
19
|
+
bump: number;
|
20
|
+
padding: BN[];
|
21
|
+
constructor(publicKey: PublicKey, parseData: Position);
|
22
|
+
static from(publicKey: PublicKey, parseData: Position): OrderAccount;
|
23
|
+
clone(): OrderAccount;
|
24
|
+
updatePositionData(position: Position): void;
|
25
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
exports.OrderAccount = void 0;
|
15
|
+
var OrderAccount = (function () {
|
16
|
+
function OrderAccount(publicKey, parseData) {
|
17
|
+
this.publicKey = publicKey;
|
18
|
+
Object.assign(this, parseData);
|
19
|
+
}
|
20
|
+
OrderAccount.from = function (publicKey, parseData) {
|
21
|
+
return new OrderAccount(publicKey, parseData);
|
22
|
+
};
|
23
|
+
OrderAccount.prototype.clone = function () {
|
24
|
+
return __assign({}, this);
|
25
|
+
};
|
26
|
+
OrderAccount.prototype.updatePositionData = function (position) {
|
27
|
+
Object.assign(this, __assign({}, position));
|
28
|
+
};
|
29
|
+
return OrderAccount;
|
30
|
+
}());
|
31
|
+
exports.OrderAccount = OrderAccount;
|
@@ -193,6 +193,11 @@ export declare class PerpetualsClient {
|
|
193
193
|
bump: number;
|
194
194
|
tokenAccountBump: number;
|
195
195
|
sizeFactorForSpread: number;
|
196
|
+
null: number;
|
197
|
+
reservedAmount: BN;
|
198
|
+
minReserveUsd: BN;
|
199
|
+
limitPriceBufferBps: BN;
|
200
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
196
201
|
owner: PublicKey;
|
197
202
|
stakeStats: {
|
198
203
|
pendingActivation: BN;
|
@@ -248,6 +253,17 @@ export declare class PerpetualsClient {
|
|
248
253
|
conf: BN;
|
249
254
|
ema: BN;
|
250
255
|
publishTime: BN;
|
256
|
+
market: PublicKey;
|
257
|
+
limitOrders: unknown;
|
258
|
+
takeProfitOrders: unknown;
|
259
|
+
stopLossOrders: unknown;
|
260
|
+
isInitialised: boolean;
|
261
|
+
openOrders: number;
|
262
|
+
openSl: number;
|
263
|
+
openTp: number;
|
264
|
+
inactiveSl: number;
|
265
|
+
inactiveTp: number;
|
266
|
+
activeOrders: number;
|
251
267
|
pools: PublicKey[];
|
252
268
|
collections: PublicKey[];
|
253
269
|
voltageMultiplier: {
|
@@ -287,7 +303,6 @@ export declare class PerpetualsClient {
|
|
287
303
|
lpMintBump: number;
|
288
304
|
stakedLpVaultBump: number;
|
289
305
|
vpVolumeFactor: number;
|
290
|
-
padding: number[] | BN[] | BN[];
|
291
306
|
stakingFeeBoostBps: BN[];
|
292
307
|
compoundingMint: PublicKey;
|
293
308
|
compoundingLpVault: PublicKey;
|
@@ -300,7 +315,6 @@ export declare class PerpetualsClient {
|
|
300
315
|
};
|
301
316
|
compoundingMintBump: number;
|
302
317
|
compoundingLpVaultBump: number;
|
303
|
-
market: PublicKey;
|
304
318
|
delegate: PublicKey;
|
305
319
|
openTime: BN;
|
306
320
|
updateTime: BN;
|
@@ -467,6 +481,11 @@ export declare class PerpetualsClient {
|
|
467
481
|
bump: number;
|
468
482
|
tokenAccountBump: number;
|
469
483
|
sizeFactorForSpread: number;
|
484
|
+
null: number;
|
485
|
+
reservedAmount: BN;
|
486
|
+
minReserveUsd: BN;
|
487
|
+
limitPriceBufferBps: BN;
|
488
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
470
489
|
owner: PublicKey;
|
471
490
|
stakeStats: {
|
472
491
|
pendingActivation: BN;
|
@@ -522,6 +541,17 @@ export declare class PerpetualsClient {
|
|
522
541
|
conf: BN;
|
523
542
|
ema: BN;
|
524
543
|
publishTime: BN;
|
544
|
+
market: PublicKey;
|
545
|
+
limitOrders: unknown;
|
546
|
+
takeProfitOrders: unknown;
|
547
|
+
stopLossOrders: unknown;
|
548
|
+
isInitialised: boolean;
|
549
|
+
openOrders: number;
|
550
|
+
openSl: number;
|
551
|
+
openTp: number;
|
552
|
+
inactiveSl: number;
|
553
|
+
inactiveTp: number;
|
554
|
+
activeOrders: number;
|
525
555
|
pools: PublicKey[];
|
526
556
|
collections: PublicKey[];
|
527
557
|
voltageMultiplier: {
|
@@ -561,7 +591,6 @@ export declare class PerpetualsClient {
|
|
561
591
|
lpMintBump: number;
|
562
592
|
stakedLpVaultBump: number;
|
563
593
|
vpVolumeFactor: number;
|
564
|
-
padding: number[] | BN[] | BN[];
|
565
594
|
stakingFeeBoostBps: BN[];
|
566
595
|
compoundingMint: PublicKey;
|
567
596
|
compoundingLpVault: PublicKey;
|
@@ -574,7 +603,6 @@ export declare class PerpetualsClient {
|
|
574
603
|
};
|
575
604
|
compoundingMintBump: number;
|
576
605
|
compoundingLpVaultBump: number;
|
577
|
-
market: PublicKey;
|
578
606
|
delegate: PublicKey;
|
579
607
|
openTime: BN;
|
580
608
|
updateTime: BN;
|
@@ -740,6 +768,11 @@ export declare class PerpetualsClient {
|
|
740
768
|
bump: number;
|
741
769
|
tokenAccountBump: number;
|
742
770
|
sizeFactorForSpread: number;
|
771
|
+
null: number;
|
772
|
+
reservedAmount: BN;
|
773
|
+
minReserveUsd: BN;
|
774
|
+
limitPriceBufferBps: BN;
|
775
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
743
776
|
owner: PublicKey;
|
744
777
|
stakeStats: {
|
745
778
|
pendingActivation: BN;
|
@@ -795,6 +828,17 @@ export declare class PerpetualsClient {
|
|
795
828
|
conf: BN;
|
796
829
|
ema: BN;
|
797
830
|
publishTime: BN;
|
831
|
+
market: PublicKey;
|
832
|
+
limitOrders: unknown;
|
833
|
+
takeProfitOrders: unknown;
|
834
|
+
stopLossOrders: unknown;
|
835
|
+
isInitialised: boolean;
|
836
|
+
openOrders: number;
|
837
|
+
openSl: number;
|
838
|
+
openTp: number;
|
839
|
+
inactiveSl: number;
|
840
|
+
inactiveTp: number;
|
841
|
+
activeOrders: number;
|
798
842
|
pools: PublicKey[];
|
799
843
|
collections: PublicKey[];
|
800
844
|
voltageMultiplier: {
|
@@ -834,7 +878,6 @@ export declare class PerpetualsClient {
|
|
834
878
|
lpMintBump: number;
|
835
879
|
stakedLpVaultBump: number;
|
836
880
|
vpVolumeFactor: number;
|
837
|
-
padding: number[] | BN[] | BN[];
|
838
881
|
stakingFeeBoostBps: BN[];
|
839
882
|
compoundingMint: PublicKey;
|
840
883
|
compoundingLpVault: PublicKey;
|
@@ -847,7 +890,6 @@ export declare class PerpetualsClient {
|
|
847
890
|
};
|
848
891
|
compoundingMintBump: number;
|
849
892
|
compoundingLpVaultBump: number;
|
850
|
-
market: PublicKey;
|
851
893
|
delegate: PublicKey;
|
852
894
|
openTime: BN;
|
853
895
|
updateTime: BN;
|
@@ -1017,6 +1059,11 @@ export declare class PerpetualsClient {
|
|
1017
1059
|
bump: number;
|
1018
1060
|
tokenAccountBump: number;
|
1019
1061
|
sizeFactorForSpread: number;
|
1062
|
+
null: number;
|
1063
|
+
reservedAmount: BN;
|
1064
|
+
minReserveUsd: BN;
|
1065
|
+
limitPriceBufferBps: BN;
|
1066
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
1020
1067
|
owner: PublicKey;
|
1021
1068
|
stakeStats: {
|
1022
1069
|
pendingActivation: BN;
|
@@ -1072,6 +1119,17 @@ export declare class PerpetualsClient {
|
|
1072
1119
|
conf: BN;
|
1073
1120
|
ema: BN;
|
1074
1121
|
publishTime: BN;
|
1122
|
+
market: PublicKey;
|
1123
|
+
limitOrders: unknown;
|
1124
|
+
takeProfitOrders: unknown;
|
1125
|
+
stopLossOrders: unknown;
|
1126
|
+
isInitialised: boolean;
|
1127
|
+
openOrders: number;
|
1128
|
+
openSl: number;
|
1129
|
+
openTp: number;
|
1130
|
+
inactiveSl: number;
|
1131
|
+
inactiveTp: number;
|
1132
|
+
activeOrders: number;
|
1075
1133
|
pools: PublicKey[];
|
1076
1134
|
collections: PublicKey[];
|
1077
1135
|
voltageMultiplier: {
|
@@ -1111,7 +1169,6 @@ export declare class PerpetualsClient {
|
|
1111
1169
|
lpMintBump: number;
|
1112
1170
|
stakedLpVaultBump: number;
|
1113
1171
|
vpVolumeFactor: number;
|
1114
|
-
padding: number[] | BN[] | BN[];
|
1115
1172
|
stakingFeeBoostBps: BN[];
|
1116
1173
|
compoundingMint: PublicKey;
|
1117
1174
|
compoundingLpVault: PublicKey;
|
@@ -1124,7 +1181,6 @@ export declare class PerpetualsClient {
|
|
1124
1181
|
};
|
1125
1182
|
compoundingMintBump: number;
|
1126
1183
|
compoundingLpVaultBump: number;
|
1127
|
-
market: PublicKey;
|
1128
1184
|
delegate: PublicKey;
|
1129
1185
|
openTime: BN;
|
1130
1186
|
updateTime: BN;
|
@@ -1292,6 +1348,11 @@ export declare class PerpetualsClient {
|
|
1292
1348
|
bump: number;
|
1293
1349
|
tokenAccountBump: number;
|
1294
1350
|
sizeFactorForSpread: number;
|
1351
|
+
null: number;
|
1352
|
+
reservedAmount: BN;
|
1353
|
+
minReserveUsd: BN;
|
1354
|
+
limitPriceBufferBps: BN;
|
1355
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
1295
1356
|
owner: PublicKey;
|
1296
1357
|
stakeStats: {
|
1297
1358
|
pendingActivation: BN;
|
@@ -1347,6 +1408,17 @@ export declare class PerpetualsClient {
|
|
1347
1408
|
conf: BN;
|
1348
1409
|
ema: BN;
|
1349
1410
|
publishTime: BN;
|
1411
|
+
market: PublicKey;
|
1412
|
+
limitOrders: unknown;
|
1413
|
+
takeProfitOrders: unknown;
|
1414
|
+
stopLossOrders: unknown;
|
1415
|
+
isInitialised: boolean;
|
1416
|
+
openOrders: number;
|
1417
|
+
openSl: number;
|
1418
|
+
openTp: number;
|
1419
|
+
inactiveSl: number;
|
1420
|
+
inactiveTp: number;
|
1421
|
+
activeOrders: number;
|
1350
1422
|
pools: PublicKey[];
|
1351
1423
|
collections: PublicKey[];
|
1352
1424
|
voltageMultiplier: {
|
@@ -1386,7 +1458,6 @@ export declare class PerpetualsClient {
|
|
1386
1458
|
lpMintBump: number;
|
1387
1459
|
stakedLpVaultBump: number;
|
1388
1460
|
vpVolumeFactor: number;
|
1389
|
-
padding: number[] | BN[] | BN[];
|
1390
1461
|
stakingFeeBoostBps: BN[];
|
1391
1462
|
compoundingMint: PublicKey;
|
1392
1463
|
compoundingLpVault: PublicKey;
|
@@ -1399,7 +1470,6 @@ export declare class PerpetualsClient {
|
|
1399
1470
|
};
|
1400
1471
|
compoundingMintBump: number;
|
1401
1472
|
compoundingLpVaultBump: number;
|
1402
|
-
market: PublicKey;
|
1403
1473
|
delegate: PublicKey;
|
1404
1474
|
openTime: BN;
|
1405
1475
|
updateTime: BN;
|
@@ -1565,6 +1635,11 @@ export declare class PerpetualsClient {
|
|
1565
1635
|
bump: number;
|
1566
1636
|
tokenAccountBump: number;
|
1567
1637
|
sizeFactorForSpread: number;
|
1638
|
+
null: number;
|
1639
|
+
reservedAmount: BN;
|
1640
|
+
minReserveUsd: BN;
|
1641
|
+
limitPriceBufferBps: BN;
|
1642
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
1568
1643
|
owner: PublicKey;
|
1569
1644
|
stakeStats: {
|
1570
1645
|
pendingActivation: BN;
|
@@ -1620,6 +1695,17 @@ export declare class PerpetualsClient {
|
|
1620
1695
|
conf: BN;
|
1621
1696
|
ema: BN;
|
1622
1697
|
publishTime: BN;
|
1698
|
+
market: PublicKey;
|
1699
|
+
limitOrders: unknown;
|
1700
|
+
takeProfitOrders: unknown;
|
1701
|
+
stopLossOrders: unknown;
|
1702
|
+
isInitialised: boolean;
|
1703
|
+
openOrders: number;
|
1704
|
+
openSl: number;
|
1705
|
+
openTp: number;
|
1706
|
+
inactiveSl: number;
|
1707
|
+
inactiveTp: number;
|
1708
|
+
activeOrders: number;
|
1623
1709
|
pools: PublicKey[];
|
1624
1710
|
collections: PublicKey[];
|
1625
1711
|
voltageMultiplier: {
|
@@ -1659,7 +1745,6 @@ export declare class PerpetualsClient {
|
|
1659
1745
|
lpMintBump: number;
|
1660
1746
|
stakedLpVaultBump: number;
|
1661
1747
|
vpVolumeFactor: number;
|
1662
|
-
padding: number[] | BN[] | BN[];
|
1663
1748
|
stakingFeeBoostBps: BN[];
|
1664
1749
|
compoundingMint: PublicKey;
|
1665
1750
|
compoundingLpVault: PublicKey;
|
@@ -1672,7 +1757,6 @@ export declare class PerpetualsClient {
|
|
1672
1757
|
};
|
1673
1758
|
compoundingMintBump: number;
|
1674
1759
|
compoundingLpVaultBump: number;
|
1675
|
-
market: PublicKey;
|
1676
1760
|
delegate: PublicKey;
|
1677
1761
|
openTime: BN;
|
1678
1762
|
updateTime: BN;
|
@@ -1871,6 +1955,11 @@ export declare class PerpetualsClient {
|
|
1871
1955
|
bump: number;
|
1872
1956
|
tokenAccountBump: number;
|
1873
1957
|
sizeFactorForSpread: number;
|
1958
|
+
null: number;
|
1959
|
+
reservedAmount: BN;
|
1960
|
+
minReserveUsd: BN;
|
1961
|
+
limitPriceBufferBps: BN;
|
1962
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
1874
1963
|
owner: PublicKey;
|
1875
1964
|
stakeStats: {
|
1876
1965
|
pendingActivation: BN;
|
@@ -1926,6 +2015,17 @@ export declare class PerpetualsClient {
|
|
1926
2015
|
conf: BN;
|
1927
2016
|
ema: BN;
|
1928
2017
|
publishTime: BN;
|
2018
|
+
market: PublicKey;
|
2019
|
+
limitOrders: unknown;
|
2020
|
+
takeProfitOrders: unknown;
|
2021
|
+
stopLossOrders: unknown;
|
2022
|
+
isInitialised: boolean;
|
2023
|
+
openOrders: number;
|
2024
|
+
openSl: number;
|
2025
|
+
openTp: number;
|
2026
|
+
inactiveSl: number;
|
2027
|
+
inactiveTp: number;
|
2028
|
+
activeOrders: number;
|
1929
2029
|
pools: PublicKey[];
|
1930
2030
|
collections: PublicKey[];
|
1931
2031
|
voltageMultiplier: {
|
@@ -1965,7 +2065,6 @@ export declare class PerpetualsClient {
|
|
1965
2065
|
lpMintBump: number;
|
1966
2066
|
stakedLpVaultBump: number;
|
1967
2067
|
vpVolumeFactor: number;
|
1968
|
-
padding: number[] | BN[] | BN[];
|
1969
2068
|
stakingFeeBoostBps: BN[];
|
1970
2069
|
compoundingMint: PublicKey;
|
1971
2070
|
compoundingLpVault: PublicKey;
|
@@ -1978,7 +2077,6 @@ export declare class PerpetualsClient {
|
|
1978
2077
|
};
|
1979
2078
|
compoundingMintBump: number;
|
1980
2079
|
compoundingLpVaultBump: number;
|
1981
|
-
market: PublicKey;
|
1982
2080
|
delegate: PublicKey;
|
1983
2081
|
openTime: BN;
|
1984
2082
|
updateTime: BN;
|
@@ -2144,6 +2242,11 @@ export declare class PerpetualsClient {
|
|
2144
2242
|
bump: number;
|
2145
2243
|
tokenAccountBump: number;
|
2146
2244
|
sizeFactorForSpread: number;
|
2245
|
+
null: number;
|
2246
|
+
reservedAmount: BN;
|
2247
|
+
minReserveUsd: BN;
|
2248
|
+
limitPriceBufferBps: BN;
|
2249
|
+
padding: number[] | BN[] | number[] | BN[] | BN[];
|
2147
2250
|
owner: PublicKey;
|
2148
2251
|
stakeStats: {
|
2149
2252
|
pendingActivation: BN;
|
@@ -2199,6 +2302,17 @@ export declare class PerpetualsClient {
|
|
2199
2302
|
conf: BN;
|
2200
2303
|
ema: BN;
|
2201
2304
|
publishTime: BN;
|
2305
|
+
market: PublicKey;
|
2306
|
+
limitOrders: unknown;
|
2307
|
+
takeProfitOrders: unknown;
|
2308
|
+
stopLossOrders: unknown;
|
2309
|
+
isInitialised: boolean;
|
2310
|
+
openOrders: number;
|
2311
|
+
openSl: number;
|
2312
|
+
openTp: number;
|
2313
|
+
inactiveSl: number;
|
2314
|
+
inactiveTp: number;
|
2315
|
+
activeOrders: number;
|
2202
2316
|
pools: PublicKey[];
|
2203
2317
|
collections: PublicKey[];
|
2204
2318
|
voltageMultiplier: {
|
@@ -2238,7 +2352,6 @@ export declare class PerpetualsClient {
|
|
2238
2352
|
lpMintBump: number;
|
2239
2353
|
stakedLpVaultBump: number;
|
2240
2354
|
vpVolumeFactor: number;
|
2241
|
-
padding: number[] | BN[] | BN[];
|
2242
2355
|
stakingFeeBoostBps: BN[];
|
2243
2356
|
compoundingMint: PublicKey;
|
2244
2357
|
compoundingLpVault: PublicKey;
|
@@ -2251,7 +2364,6 @@ export declare class PerpetualsClient {
|
|
2251
2364
|
};
|
2252
2365
|
compoundingMintBump: number;
|
2253
2366
|
compoundingLpVaultBump: number;
|
2254
|
-
market: PublicKey;
|
2255
2367
|
delegate: PublicKey;
|
2256
2368
|
openTime: BN;
|
2257
2369
|
updateTime: BN;
|
@@ -2525,6 +2637,34 @@ export declare class PerpetualsClient {
|
|
2525
2637
|
instructions: TransactionInstruction[];
|
2526
2638
|
additionalSigners: Signer[];
|
2527
2639
|
}>;
|
2640
|
+
forceClosePartial: (positionAccount: PositionAccount, targetSymbol: string, collateralSymbol: string, side: Side, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, isStopLoss: boolean, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean) => Promise<{
|
2641
|
+
instructions: TransactionInstruction[];
|
2642
|
+
additionalSigners: Signer[];
|
2643
|
+
}>;
|
2644
|
+
placeLimitOrder: (targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, limitPrice: ContractOraclePrice, reserveAmount: BN, sizeAmount: BN, stopLossPrice: ContractOraclePrice, takeProfitPrice: ContractOraclePrice, receiveCustodyId: number, poolConfig: PoolConfig, skipBalanceChecks?: boolean) => Promise<{
|
2645
|
+
instructions: TransactionInstruction[];
|
2646
|
+
additionalSigners: Signer[];
|
2647
|
+
}>;
|
2648
|
+
editLimitOrder: (targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, limitPrice: ContractOraclePrice, sizeAmount: BN, stopLossPrice: ContractOraclePrice, takeProfitPrice: ContractOraclePrice, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
2649
|
+
instructions: TransactionInstruction[];
|
2650
|
+
additionalSigners: Signer[];
|
2651
|
+
}>;
|
2652
|
+
executeLimitOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, privilege: Privilege, nftTradingAccount: PublicKey, nftReferralAccount: PublicKey, nftRebateTokenAccount: PublicKey, poolConfig: PoolConfig) => Promise<{
|
2653
|
+
instructions: TransactionInstruction[];
|
2654
|
+
additionalSigners: Signer[];
|
2655
|
+
}>;
|
2656
|
+
placeTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, receiveCustodyId: number, poolConfig: PoolConfig) => Promise<{
|
2657
|
+
instructions: TransactionInstruction[];
|
2658
|
+
additionalSigners: Signer[];
|
2659
|
+
}>;
|
2660
|
+
editTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
|
2661
|
+
instructions: TransactionInstruction[];
|
2662
|
+
additionalSigners: Signer[];
|
2663
|
+
}>;
|
2664
|
+
executeTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
2665
|
+
instructions: TransactionInstruction[];
|
2666
|
+
additionalSigners: Signer[];
|
2667
|
+
}>;
|
2528
2668
|
getPositionData: (position: PositionAccount, poolConfig: PoolConfig) => Promise<any>;
|
2529
2669
|
protocolWithdrawFees: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
2530
2670
|
instructions: TransactionInstruction[];
|