@crypticdot/defituna-api 1.10.16 → 3.0.0

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.
@@ -0,0 +1,3689 @@
1
+ import { EventSource } from 'eventsource';
2
+
3
+ interface CloseSpotPositionQuoteDto {
4
+ /** Confirmed position decrease percentage (100% = 1.0) */
5
+ decreasePercent: number;
6
+ /** Unsigned 64-bit integer encoded as a decimal string */
7
+ estimatedWithdrawnCollateral: bigint;
8
+ /** Price impact in percents (100% = 1.0) */
9
+ priceImpact: number;
10
+ /** Unsigned 64-bit integer encoded as a decimal string */
11
+ requiredSwapAmount: bigint;
12
+ }
13
+ interface DecreaseSpotPositionQuoteDto {
14
+ /** Position decrease percentage */
15
+ decreasePercent: number;
16
+ /** Unsigned 64-bit integer encoded as a decimal string */
17
+ estimatedAmount: bigint;
18
+ /** Unsigned 64-bit integer encoded as a decimal string */
19
+ estimatedWithdrawnCollateral: bigint;
20
+ /** Liquidation price */
21
+ liquidationPrice: number;
22
+ /** Price impact in percents (100% = 1.0) */
23
+ priceImpact: number;
24
+ /** Unsigned 64-bit integer encoded as a decimal string */
25
+ requiredSwapAmount: bigint;
26
+ }
27
+ interface FeeAmountWithUsd {
28
+ amount: bigint;
29
+ usd: number;
30
+ }
31
+ interface FeesStatsGroupDto {
32
+ addLiquidityFees: number;
33
+ failedNetworkFees: number;
34
+ jitoLimitOrderFees: number;
35
+ jitoLiquidationFees: number;
36
+ jitoRebalanceFees: number;
37
+ jitoYieldCompoundingFees: number;
38
+ limitOrderFees: number;
39
+ liquidationFees: number;
40
+ processedNetworkFees: number;
41
+ rebalanceFees: number;
42
+ runningAddLiquidityFees: number;
43
+ runningFailedNetworkFees: number;
44
+ runningJitoLimitOrderFees: number;
45
+ runningJitoLiquidationFees: number;
46
+ runningJitoRebalanceFees: number;
47
+ runningJitoYieldCompoundingFees: number;
48
+ runningLimitOrderFees: number;
49
+ runningLiquidationFees: number;
50
+ runningProcessedNetworkFees: number;
51
+ runningRebalanceFees: number;
52
+ runningTotalCollectedFees: number;
53
+ runningTotalFusionFees: number;
54
+ runningTotalLimitOrdersNetworkFees: number;
55
+ runningTotalLiquidationsNetworkFees: number;
56
+ runningTotalNetworkFees: number;
57
+ runningTotalYieldCompoundingNetworkFees: number;
58
+ runningYieldCompoundingFees: number;
59
+ time: Date;
60
+ totalCollectedFees: number;
61
+ totalFusionFees: number;
62
+ totalLimitOrdersNetworkFees: number;
63
+ totalLiquidationsNetworkFees: number;
64
+ totalNetworkFees: number;
65
+ totalRebalanceNetworkFees: number;
66
+ totalYieldCompoundingNetworkFees: number;
67
+ yieldCompoundingFees: number;
68
+ }
69
+ interface FusionFeesStatsGroupDto {
70
+ /** Solana public key (base58) */
71
+ pool: string;
72
+ runningTotalCollectedFees: number;
73
+ time: Date;
74
+ totalCollectedFees: number;
75
+ }
76
+ type GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaDataItem = {
77
+ /** Solana public key (base58) */
78
+ authority: string;
79
+ lpBaseValueUsd: number;
80
+ lpPeriodPnlPercent: number;
81
+ lpPeriodPnlUsd: number;
82
+ /** @minimum 0 */
83
+ lpPositionsCount: number;
84
+ /** @minimum 0 */
85
+ rank: number;
86
+ spotBaseValueUsd: number;
87
+ spotPeriodPnlPercent: number;
88
+ spotPeriodPnlUsd: number;
89
+ /** @minimum 0 */
90
+ spotPositionsCount: number;
91
+ totalPeriodPnlPercent: number;
92
+ totalPeriodPnlUsd: number;
93
+ };
94
+ type GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaMeta = {
95
+ total: bigint;
96
+ };
97
+ interface GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMeta {
98
+ data: GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaDataItem[];
99
+ meta: GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaMeta;
100
+ }
101
+ type GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaDataItem = {
102
+ /** Solana public key (base58) */
103
+ address: string;
104
+ /** Solana public key (base58) */
105
+ owner: string;
106
+ /** @minimum 0 */
107
+ rank: number;
108
+ staked: TokenAmountWithUsd;
109
+ };
110
+ type GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaMeta = {
111
+ total: bigint;
112
+ };
113
+ interface GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMeta {
114
+ data: GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaDataItem[];
115
+ meta: GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaMeta;
116
+ }
117
+ type GenericHttpResponseCloseSpotPositionQuoteDtoData = {
118
+ /** Confirmed position decrease percentage (100% = 1.0) */
119
+ decreasePercent: number;
120
+ /** Unsigned 64-bit integer encoded as a decimal string */
121
+ estimatedWithdrawnCollateral: bigint;
122
+ /** Price impact in percents (100% = 1.0) */
123
+ priceImpact: number;
124
+ /** Unsigned 64-bit integer encoded as a decimal string */
125
+ requiredSwapAmount: bigint;
126
+ };
127
+ interface GenericHttpResponseCloseSpotPositionQuoteDto {
128
+ data: GenericHttpResponseCloseSpotPositionQuoteDtoData;
129
+ }
130
+ type GenericHttpResponseDecreaseSpotPositionQuoteDtoData = {
131
+ /** Position decrease percentage */
132
+ decreasePercent: number;
133
+ /** Unsigned 64-bit integer encoded as a decimal string */
134
+ estimatedAmount: bigint;
135
+ /** Unsigned 64-bit integer encoded as a decimal string */
136
+ estimatedWithdrawnCollateral: bigint;
137
+ /** Liquidation price */
138
+ liquidationPrice: number;
139
+ /** Price impact in percents (100% = 1.0) */
140
+ priceImpact: number;
141
+ /** Unsigned 64-bit integer encoded as a decimal string */
142
+ requiredSwapAmount: bigint;
143
+ };
144
+ interface GenericHttpResponseDecreaseSpotPositionQuoteDto {
145
+ data: GenericHttpResponseDecreaseSpotPositionQuoteDtoData;
146
+ }
147
+ type GenericHttpResponseHttpStatusDataData = {
148
+ status: string;
149
+ };
150
+ interface GenericHttpResponseHttpStatusData {
151
+ data: GenericHttpResponseHttpStatusDataData;
152
+ }
153
+ type GenericHttpResponseIncreaseSpotPositionQuoteDtoData = {
154
+ /** Unsigned 64-bit integer encoded as a decimal string */
155
+ borrowAmount: bigint;
156
+ /** Unsigned 64-bit integer encoded as a decimal string */
157
+ collateralAmount: bigint;
158
+ /** Unsigned 64-bit integer encoded as a decimal string */
159
+ estimatedAmount: bigint;
160
+ /** Liquidation price */
161
+ liquidationPrice: number;
162
+ /** Unsigned 64-bit integer encoded as a decimal string */
163
+ minSwapOutputAmount: bigint;
164
+ /** Price impact in percents */
165
+ priceImpact: number;
166
+ /** Unsigned 64-bit integer encoded as a decimal string */
167
+ protocolFeeA: bigint;
168
+ /** Unsigned 64-bit integer encoded as a decimal string */
169
+ protocolFeeB: bigint;
170
+ /** Unsigned 64-bit integer encoded as a decimal string */
171
+ swapInputAmount: bigint;
172
+ };
173
+ interface GenericHttpResponseIncreaseSpotPositionQuoteDto {
174
+ data: GenericHttpResponseIncreaseSpotPositionQuoteDtoData;
175
+ }
176
+ type GenericHttpResponseLimitOrderQuoteByInputDtoData = {
177
+ /** Unsigned 64-bit integer encoded as a decimal string */
178
+ amountOut: bigint;
179
+ };
180
+ interface GenericHttpResponseLimitOrderQuoteByInputDto {
181
+ data: GenericHttpResponseLimitOrderQuoteByInputDtoData;
182
+ }
183
+ type GenericHttpResponseLimitOrderQuoteByOutputDtoData = {
184
+ /** Unsigned 64-bit integer encoded as a decimal string */
185
+ amountIn: bigint;
186
+ };
187
+ interface GenericHttpResponseLimitOrderQuoteByOutputDto {
188
+ data: GenericHttpResponseLimitOrderQuoteByOutputDtoData;
189
+ }
190
+ type GenericHttpResponseMarketDtoData = {
191
+ /** Solana public key (base58) */
192
+ address: string;
193
+ /** Solana public key (base58) */
194
+ addressLookupTable: string;
195
+ borrowLimitA: TokenAmountWithUsd;
196
+ borrowLimitB: TokenAmountWithUsd;
197
+ borrowedFundsA: TokenAmountWithUsd;
198
+ borrowedFundsB: TokenAmountWithUsd;
199
+ createdAt: Date;
200
+ disabled: boolean;
201
+ /** @minimum 0 */
202
+ liquidationFee: number;
203
+ /** @minimum 0 */
204
+ liquidationThreshold: number;
205
+ /** @minimum 0 */
206
+ maxLeverage: number;
207
+ maxSpotPositionSizeA: TokenAmountWithUsd;
208
+ maxSpotPositionSizeB: TokenAmountWithUsd;
209
+ /** @minimum 0 */
210
+ maxSwapSlippage: number;
211
+ /** @minimum 0 */
212
+ oraclePriceDeviationThreshold: number;
213
+ pool: PoolDto;
214
+ /** @minimum 0 */
215
+ protocolFee: number;
216
+ /** @minimum 0 */
217
+ protocolFeeOnCollateral: number;
218
+ /** @minimum 0 */
219
+ rebalanceProtocolFee: number;
220
+ };
221
+ interface GenericHttpResponseMarketDto {
222
+ data: GenericHttpResponseMarketDtoData;
223
+ }
224
+ type GenericHttpResponseMintDtoData = {
225
+ /** Solana public key (base58) */
226
+ address: string;
227
+ decimals: number;
228
+ logo: string;
229
+ name: string;
230
+ symbol: string;
231
+ };
232
+ interface GenericHttpResponseMintDto {
233
+ data: GenericHttpResponseMintDtoData;
234
+ }
235
+ type GenericHttpResponseOptionLendingPositionDtoDataOneOf = {
236
+ /** Solana public key (base58) */
237
+ address: string;
238
+ /** Solana public key (base58) */
239
+ authority: string;
240
+ earned: TokenAmountWithUsd;
241
+ funds: TokenAmountWithUsd;
242
+ /** Solana public key (base58) */
243
+ mint: string;
244
+ /** Unsigned 64-bit integer encoded as a decimal string */
245
+ shares: bigint;
246
+ /** Unsigned 64-bit integer encoded as a decimal string */
247
+ updatedAtSlot: bigint;
248
+ /** Solana public key (base58) */
249
+ vault: string;
250
+ };
251
+ type GenericHttpResponseOptionLendingPositionDtoData = null | GenericHttpResponseOptionLendingPositionDtoDataOneOf;
252
+ interface GenericHttpResponseOptionLendingPositionDto {
253
+ data: GenericHttpResponseOptionLendingPositionDtoData;
254
+ }
255
+ type GenericHttpResponseOptionLimitOrderDtoDataOneOfCloseTxSignature = string | null;
256
+ type GenericHttpResponseOptionLimitOrderDtoDataOneOfClosedAt = Date | null;
257
+ type GenericHttpResponseOptionLimitOrderDtoDataOneOf = {
258
+ aToB: boolean;
259
+ /** Solana public key (base58) */
260
+ address: string;
261
+ amountIn: TokenAmountWithUsd;
262
+ amountOut: TokenAmountWithUsd;
263
+ /** Solana public key (base58) */
264
+ authority: string;
265
+ closeTxSignature?: GenericHttpResponseOptionLimitOrderDtoDataOneOfCloseTxSignature;
266
+ closedAt?: GenericHttpResponseOptionLimitOrderDtoDataOneOfClosedAt;
267
+ fillRatio: number;
268
+ id: string;
269
+ openTxSignature: string;
270
+ openedAt: Date;
271
+ /** Solana public key (base58) */
272
+ orderMint: string;
273
+ pool: PoolDto;
274
+ state: LimitOrderStatus;
275
+ tickIndex: number;
276
+ };
277
+ type GenericHttpResponseOptionLimitOrderDtoData = null | GenericHttpResponseOptionLimitOrderDtoDataOneOf;
278
+ interface GenericHttpResponseOptionLimitOrderDto {
279
+ data: GenericHttpResponseOptionLimitOrderDtoData;
280
+ }
281
+ type GenericHttpResponseOptionTunaPositionDtoDataOneOfClosedAt = Date | null;
282
+ type GenericHttpResponseOptionTunaPositionDtoDataOneOf = {
283
+ /** Solana public key (base58) */
284
+ address: string;
285
+ /** Solana public key (base58) */
286
+ authority: string;
287
+ closedAt?: GenericHttpResponseOptionTunaPositionDtoDataOneOfClosedAt;
288
+ compoundedYieldA: TokenAmountWithUsd;
289
+ compoundedYieldB: TokenAmountWithUsd;
290
+ currentDebtA: TokenAmountWithUsd;
291
+ currentDebtB: TokenAmountWithUsd;
292
+ depositedCollateralA: TunaPositionTokenDepositedCollateral;
293
+ depositedCollateralB: TunaPositionTokenDepositedCollateral;
294
+ entryPrice: number;
295
+ flags: TunaLpPositionFlags;
296
+ initialDebtA: TokenAmountWithUsd;
297
+ initialDebtB: TokenAmountWithUsd;
298
+ leftoversA: TokenAmountWithUsd;
299
+ leftoversB: TokenAmountWithUsd;
300
+ leverage: number;
301
+ liquidationPriceLower: number;
302
+ liquidationPriceUpper: number;
303
+ /** Unsigned 128-bit integer encoded as a decimal string */
304
+ liquidity: bigint;
305
+ lowerLimitOrderPrice: number;
306
+ marketMaker: TunaPositionMarketMaker;
307
+ maxLeverage: number;
308
+ openedAt: Date;
309
+ /** Total PnL denominated/expressed in token A */
310
+ pnlA: TunaPositionTokenPnl;
311
+ /** Total PnL denominated/expressed in token B */
312
+ pnlB: TunaPositionTokenPnl;
313
+ pnlUsd: TunaPositionUsdPnl;
314
+ pool: PoolDto;
315
+ /** Solana public key (base58) */
316
+ positionMint: string;
317
+ state: TunaPositionDtoState;
318
+ tickLowerIndex: number;
319
+ tickUpperIndex: number;
320
+ totalA: TokenAmountWithUsd;
321
+ totalB: TokenAmountWithUsd;
322
+ upperLimitOrderPrice: number;
323
+ /** @minimum 0 */
324
+ version: number;
325
+ yieldA: TokenAmountWithUsd;
326
+ yieldB: TokenAmountWithUsd;
327
+ };
328
+ type GenericHttpResponseOptionTunaPositionDtoData = null | GenericHttpResponseOptionTunaPositionDtoDataOneOf;
329
+ interface GenericHttpResponseOptionTunaPositionDto {
330
+ data: GenericHttpResponseOptionTunaPositionDtoData;
331
+ }
332
+ type GenericHttpResponseOraclePriceDtoData = {
333
+ decimals: number;
334
+ /** Solana public key (base58) */
335
+ mint: string;
336
+ /** Unsigned 64-bit integer encoded as a decimal string */
337
+ price: bigint;
338
+ time: Date;
339
+ };
340
+ interface GenericHttpResponseOraclePriceDto {
341
+ data: GenericHttpResponseOraclePriceDtoData;
342
+ }
343
+ type GenericHttpResponseOrderBookDtoData = {
344
+ entries: OrderBookEntryDto[];
345
+ /** Solana public key (base58) */
346
+ poolAddress: string;
347
+ poolPrice: number;
348
+ };
349
+ interface GenericHttpResponseOrderBookDto {
350
+ data: GenericHttpResponseOrderBookDtoData;
351
+ }
352
+ type GenericHttpResponsePoolDtoDataOlpFeeRate = number | null;
353
+ type GenericHttpResponsePoolDtoDataStats = null | PoolStatsDto;
354
+ type GenericHttpResponsePoolDtoData = {
355
+ /** Solana public key (base58) */
356
+ address: string;
357
+ /** @minimum 0 */
358
+ feeRate: number;
359
+ /** Unsigned 128-bit integer encoded as a decimal string */
360
+ liquidity: bigint;
361
+ mintA: MintDto;
362
+ mintB: MintDto;
363
+ olpFeeRate?: GenericHttpResponsePoolDtoDataOlpFeeRate;
364
+ price: number;
365
+ /** @minimum 0 */
366
+ protocolFeeRate: number;
367
+ provider: PoolProvider;
368
+ /** Unsigned 128-bit integer encoded as a decimal string */
369
+ sqrtPrice: bigint;
370
+ stats?: GenericHttpResponsePoolDtoDataStats;
371
+ tickCurrentIndex: number;
372
+ /** @minimum 0 */
373
+ tickSpacing: number;
374
+ /** Solana public key (base58) */
375
+ tokenAVault: string;
376
+ /** Solana public key (base58) */
377
+ tokenBVault: string;
378
+ };
379
+ interface GenericHttpResponsePoolDto {
380
+ data: GenericHttpResponsePoolDtoData;
381
+ }
382
+ type GenericHttpResponsePoolTicksDtoData = {
383
+ /** @minimum 0 */
384
+ tickSpacing: number;
385
+ ticks: TickDto[];
386
+ };
387
+ interface GenericHttpResponsePoolTicksDto {
388
+ data: GenericHttpResponsePoolTicksDtoData;
389
+ }
390
+ type GenericHttpResponseSseResponseData = StreamInitalMessage | NotificationDtoPoolSwapDto | NotificationDtoStakingPositionDto | NotificationDtoLendingPositionDto | NotificationDtoTradeHistoryEntryDto | NotificationDtoOrderHistoryEntryDto | SnapshotContainer;
391
+ interface GenericHttpResponseSseResponse {
392
+ data: GenericHttpResponseSseResponseData;
393
+ }
394
+ type GenericHttpResponseStakingPositionDtoDataLastUnstakedAt = Date | null;
395
+ /**
396
+ * @minimum 0
397
+ */
398
+ type GenericHttpResponseStakingPositionDtoDataRank = number | null;
399
+ type GenericHttpResponseStakingPositionDtoDataWithdrawAvailableAt = Date | null;
400
+ type GenericHttpResponseStakingPositionDtoData = {
401
+ /** Solana public key (base58) */
402
+ address: string;
403
+ claimedReward: TokenAmountWithUsd;
404
+ lastUnstakedAt?: GenericHttpResponseStakingPositionDtoDataLastUnstakedAt;
405
+ /** Solana public key (base58) */
406
+ owner: string;
407
+ /** @minimum 0 */
408
+ rank?: GenericHttpResponseStakingPositionDtoDataRank;
409
+ staked: TokenAmountWithUsd;
410
+ unclaimedReward: TokenAmountWithUsd;
411
+ unstaked: TokenAmountWithUsd;
412
+ vesting: VestingDto;
413
+ withdrawAvailableAt?: GenericHttpResponseStakingPositionDtoDataWithdrawAvailableAt;
414
+ };
415
+ interface GenericHttpResponseStakingPositionDto {
416
+ data: GenericHttpResponseStakingPositionDtoData;
417
+ }
418
+ type GenericHttpResponseSwapQuoteByInputDtoData = {
419
+ /** Unsigned 64-bit integer encoded as a decimal string */
420
+ estimatedAmountOut: bigint;
421
+ /** Unsigned 64-bit integer encoded as a decimal string */
422
+ feeAmount: bigint;
423
+ feeUsd: number;
424
+ /** Unsigned 64-bit integer encoded as a decimal string */
425
+ minAmountOut: bigint;
426
+ /** Price impact in percents */
427
+ priceImpact: number;
428
+ };
429
+ interface GenericHttpResponseSwapQuoteByInputDto {
430
+ data: GenericHttpResponseSwapQuoteByInputDtoData;
431
+ }
432
+ type GenericHttpResponseSwapQuoteByOutputDtoData = {
433
+ /** Unsigned 64-bit integer encoded as a decimal string */
434
+ estimatedAmountIn: bigint;
435
+ /** Unsigned 64-bit integer encoded as a decimal string */
436
+ feeAmount: bigint;
437
+ feeUsd: number;
438
+ /** Unsigned 64-bit integer encoded as a decimal string */
439
+ maxAmountIn: bigint;
440
+ /** Price impact in percents */
441
+ priceImpact: number;
442
+ };
443
+ interface GenericHttpResponseSwapQuoteByOutputDto {
444
+ data: GenericHttpResponseSwapQuoteByOutputDtoData;
445
+ }
446
+ type GenericHttpResponseTradableAmountDtoData = {
447
+ /** Unsigned 64-bit integer encoded as a decimal string */
448
+ amount: bigint;
449
+ usd: number;
450
+ };
451
+ interface GenericHttpResponseTradableAmountDto {
452
+ data: GenericHttpResponseTradableAmountDtoData;
453
+ }
454
+ type GenericHttpResponseTreasuryDtoData = {
455
+ /** Solana public key (base58) */
456
+ address: string;
457
+ apy: number;
458
+ isStakingEnabled: boolean;
459
+ isUnstakingEnabled: boolean;
460
+ isWithdrawEnabled: boolean;
461
+ /** Solana public key (base58) */
462
+ rewardTokenMint: string;
463
+ /** Solana public key (base58) */
464
+ stakedTokenMint: string;
465
+ totalReward: TokenAmountWithUsd;
466
+ totalStaked: TokenAmountWithUsd;
467
+ /** @minimum 0 */
468
+ uniqueStakers: number;
469
+ /**
470
+ * The minimum required interval in seconds between the last staking and a possible withdrawal.
471
+ * @minimum 0
472
+ */
473
+ unstakeCooldownSeconds: number;
474
+ };
475
+ interface GenericHttpResponseTreasuryDto {
476
+ data: GenericHttpResponseTreasuryDtoData;
477
+ }
478
+ type GenericHttpResponseTunaSpotPositionDtoDataClosedAt = Date | null;
479
+ type GenericHttpResponseTunaSpotPositionDtoData = {
480
+ /** Solana public key (base58) */
481
+ address: string;
482
+ /** Solana public key (base58) */
483
+ authority: string;
484
+ closedAt?: GenericHttpResponseTunaSpotPositionDtoDataClosedAt;
485
+ collateralToken: TunaPositionPoolToken;
486
+ currentDebt: TokenAmountWithUsd;
487
+ depositedCollateral: TokenAmountWithUsd;
488
+ entryPrice: number;
489
+ initialDebt: TokenAmountWithUsd;
490
+ leverage: number;
491
+ liquidationPrice: number;
492
+ lowerLimitOrderPrice: number;
493
+ marketMaker: TunaPositionMarketMaker;
494
+ maxLeverage: number;
495
+ openedAt: Date;
496
+ pnlUsd: TunaPositionUsdPnl;
497
+ pool: PoolDto;
498
+ positionToken: TunaPositionPoolToken;
499
+ state: TunaSpotPositionDtoState;
500
+ total: TokenAmountWithUsd;
501
+ upperLimitOrderPrice: number;
502
+ /** @minimum 0 */
503
+ version: number;
504
+ };
505
+ interface GenericHttpResponseTunaSpotPositionDto {
506
+ data: GenericHttpResponseTunaSpotPositionDtoData;
507
+ }
508
+ type GenericHttpResponseVaultDtoData = {
509
+ /** Solana public key (base58) */
510
+ address: string;
511
+ borrowApy: number;
512
+ borrowedFunds: TokenAmountWithUsd;
513
+ /** Unsigned 64-bit integer encoded as a decimal string */
514
+ borrowedShares: bigint;
515
+ depositedFunds: TokenAmountWithUsd;
516
+ /** Unsigned 64-bit integer encoded as a decimal string */
517
+ depositedShares: bigint;
518
+ /** Unsigned 64-bit integer encoded as a decimal string */
519
+ interestRate: bigint;
520
+ /** Solana public key (base58) */
521
+ mint: string;
522
+ /** Solana public key (base58) */
523
+ pythOracleFeedId: string;
524
+ /** Solana public key (base58) */
525
+ pythOraclePriceUpdate: string;
526
+ supplyApy: number;
527
+ supplyLimit: TokenAmountWithUsd;
528
+ utilization: number;
529
+ };
530
+ interface GenericHttpResponseVaultDto {
531
+ data: GenericHttpResponseVaultDtoData;
532
+ }
533
+ type GenericHttpResponseVecFeesStatsGroupDtoDataItem = {
534
+ addLiquidityFees: number;
535
+ failedNetworkFees: number;
536
+ jitoLimitOrderFees: number;
537
+ jitoLiquidationFees: number;
538
+ jitoRebalanceFees: number;
539
+ jitoYieldCompoundingFees: number;
540
+ limitOrderFees: number;
541
+ liquidationFees: number;
542
+ processedNetworkFees: number;
543
+ rebalanceFees: number;
544
+ runningAddLiquidityFees: number;
545
+ runningFailedNetworkFees: number;
546
+ runningJitoLimitOrderFees: number;
547
+ runningJitoLiquidationFees: number;
548
+ runningJitoRebalanceFees: number;
549
+ runningJitoYieldCompoundingFees: number;
550
+ runningLimitOrderFees: number;
551
+ runningLiquidationFees: number;
552
+ runningProcessedNetworkFees: number;
553
+ runningRebalanceFees: number;
554
+ runningTotalCollectedFees: number;
555
+ runningTotalFusionFees: number;
556
+ runningTotalLimitOrdersNetworkFees: number;
557
+ runningTotalLiquidationsNetworkFees: number;
558
+ runningTotalNetworkFees: number;
559
+ runningTotalYieldCompoundingNetworkFees: number;
560
+ runningYieldCompoundingFees: number;
561
+ time: Date;
562
+ totalCollectedFees: number;
563
+ totalFusionFees: number;
564
+ totalLimitOrdersNetworkFees: number;
565
+ totalLiquidationsNetworkFees: number;
566
+ totalNetworkFees: number;
567
+ totalRebalanceNetworkFees: number;
568
+ totalYieldCompoundingNetworkFees: number;
569
+ yieldCompoundingFees: number;
570
+ };
571
+ interface GenericHttpResponseVecFeesStatsGroupDto {
572
+ data: GenericHttpResponseVecFeesStatsGroupDtoDataItem[];
573
+ }
574
+ type GenericHttpResponseVecFusionFeesStatsGroupDtoDataItem = {
575
+ /** Solana public key (base58) */
576
+ pool: string;
577
+ runningTotalCollectedFees: number;
578
+ time: Date;
579
+ totalCollectedFees: number;
580
+ };
581
+ interface GenericHttpResponseVecFusionFeesStatsGroupDto {
582
+ data: GenericHttpResponseVecFusionFeesStatsGroupDtoDataItem[];
583
+ }
584
+ type GenericHttpResponseVecLendingPositionDtoDataItem = {
585
+ /** Solana public key (base58) */
586
+ address: string;
587
+ /** Solana public key (base58) */
588
+ authority: string;
589
+ earned: TokenAmountWithUsd;
590
+ funds: TokenAmountWithUsd;
591
+ /** Solana public key (base58) */
592
+ mint: string;
593
+ /** Unsigned 64-bit integer encoded as a decimal string */
594
+ shares: bigint;
595
+ /** Unsigned 64-bit integer encoded as a decimal string */
596
+ updatedAtSlot: bigint;
597
+ /** Solana public key (base58) */
598
+ vault: string;
599
+ };
600
+ interface GenericHttpResponseVecLendingPositionDto {
601
+ data: GenericHttpResponseVecLendingPositionDtoDataItem[];
602
+ }
603
+ type GenericHttpResponseVecLimitOrderDtoDataItemCloseTxSignature = string | null;
604
+ type GenericHttpResponseVecLimitOrderDtoDataItemClosedAt = Date | null;
605
+ type GenericHttpResponseVecLimitOrderDtoDataItem = {
606
+ aToB: boolean;
607
+ /** Solana public key (base58) */
608
+ address: string;
609
+ amountIn: TokenAmountWithUsd;
610
+ amountOut: TokenAmountWithUsd;
611
+ /** Solana public key (base58) */
612
+ authority: string;
613
+ closeTxSignature?: GenericHttpResponseVecLimitOrderDtoDataItemCloseTxSignature;
614
+ closedAt?: GenericHttpResponseVecLimitOrderDtoDataItemClosedAt;
615
+ fillRatio: number;
616
+ id: string;
617
+ openTxSignature: string;
618
+ openedAt: Date;
619
+ /** Solana public key (base58) */
620
+ orderMint: string;
621
+ pool: PoolDto;
622
+ state: LimitOrderStatus;
623
+ tickIndex: number;
624
+ };
625
+ interface GenericHttpResponseVecLimitOrderDto {
626
+ data: GenericHttpResponseVecLimitOrderDtoDataItem[];
627
+ }
628
+ type GenericHttpResponseVecMarketDtoDataItem = {
629
+ /** Solana public key (base58) */
630
+ address: string;
631
+ /** Solana public key (base58) */
632
+ addressLookupTable: string;
633
+ borrowLimitA: TokenAmountWithUsd;
634
+ borrowLimitB: TokenAmountWithUsd;
635
+ borrowedFundsA: TokenAmountWithUsd;
636
+ borrowedFundsB: TokenAmountWithUsd;
637
+ createdAt: Date;
638
+ disabled: boolean;
639
+ /** @minimum 0 */
640
+ liquidationFee: number;
641
+ /** @minimum 0 */
642
+ liquidationThreshold: number;
643
+ /** @minimum 0 */
644
+ maxLeverage: number;
645
+ maxSpotPositionSizeA: TokenAmountWithUsd;
646
+ maxSpotPositionSizeB: TokenAmountWithUsd;
647
+ /** @minimum 0 */
648
+ maxSwapSlippage: number;
649
+ /** @minimum 0 */
650
+ oraclePriceDeviationThreshold: number;
651
+ pool: PoolDto;
652
+ /** @minimum 0 */
653
+ protocolFee: number;
654
+ /** @minimum 0 */
655
+ protocolFeeOnCollateral: number;
656
+ /** @minimum 0 */
657
+ rebalanceProtocolFee: number;
658
+ };
659
+ interface GenericHttpResponseVecMarketDto {
660
+ data: GenericHttpResponseVecMarketDtoDataItem[];
661
+ }
662
+ type GenericHttpResponseVecMintDtoDataItem = {
663
+ /** Solana public key (base58) */
664
+ address: string;
665
+ decimals: number;
666
+ logo: string;
667
+ name: string;
668
+ symbol: string;
669
+ };
670
+ interface GenericHttpResponseVecMintDto {
671
+ data: GenericHttpResponseVecMintDtoDataItem[];
672
+ }
673
+ type GenericHttpResponseVecOraclePriceDtoDataItem = {
674
+ decimals: number;
675
+ /** Solana public key (base58) */
676
+ mint: string;
677
+ /** Unsigned 64-bit integer encoded as a decimal string */
678
+ price: bigint;
679
+ time: Date;
680
+ };
681
+ interface GenericHttpResponseVecOraclePriceDto {
682
+ data: GenericHttpResponseVecOraclePriceDtoDataItem[];
683
+ }
684
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemBaseTokenConsumedAmount = null | TokenAmountWithUsd;
685
+ /**
686
+ * Filled for swaps (spot)
687
+ Flatten transaction instruction index
688
+ */
689
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemIxIndex = number | null;
690
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemQuoteTokenFilledAmount = null | TokenAmountWithUsd;
691
+ /**
692
+ * Filled for swaps (spot) and margin positions
693
+ */
694
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemTxSignature = string | null;
695
+ /**
696
+ * A decimal price based on the action.
697
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee
698
+ */
699
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiExecutionPrice = number | null;
700
+ /**
701
+ * A decimal price based on the action.
702
+ Only for limit orders & trigger actions.
703
+
704
+ * For limit order fills - price derived from order tick_index
705
+ * For take profit / stop loss / liquidation - trigger price
706
+ */
707
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiPrice = number | null;
708
+ type GenericHttpResponseVecOrderHistoryEntryDtoDataItem = {
709
+ /** Mints (Tokens) Pair direction in pool
710
+ When TRUE - Base token is Mint A, Quote token is Mint B
711
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
712
+ aToB: boolean;
713
+ /** Solana public key (base58) */
714
+ authority: string;
715
+ baseToken: TokenAmountWithUsd;
716
+ baseTokenConsumedAmount?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemBaseTokenConsumedAmount;
717
+ id: string;
718
+ isReduceOnly: boolean;
719
+ /** Filled for swaps (spot)
720
+ Flatten transaction instruction index */
721
+ ixIndex?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemIxIndex;
722
+ orderType: OrderHistoryType;
723
+ pool: PoolDto;
724
+ /** Solana public key (base58) */
725
+ positionAddress?: string;
726
+ quoteToken: TokenAmountWithUsd;
727
+ quoteTokenFilledAmount?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemQuoteTokenFilledAmount;
728
+ /** Unsigned 64-bit integer encoded as a decimal string */
729
+ slot: bigint;
730
+ status: OrderHistoryStatus;
731
+ /** Block time of slot this entry was create from */
732
+ ts: Date;
733
+ /** Filled for swaps (spot) and margin positions */
734
+ txSignature?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemTxSignature;
735
+ uiDirection: OrderHistoryUIDirection;
736
+ /** A decimal price based on the action.
737
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee */
738
+ uiExecutionPrice?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiExecutionPrice;
739
+ /** A decimal price based on the action.
740
+ Only for limit orders & trigger actions.
741
+
742
+ * For limit order fills - price derived from order tick_index
743
+ * For take profit / stop loss / liquidation - trigger price */
744
+ uiPrice?: GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiPrice;
745
+ };
746
+ interface GenericHttpResponseVecOrderHistoryEntryDto {
747
+ data: GenericHttpResponseVecOrderHistoryEntryDtoDataItem[];
748
+ }
749
+ type GenericHttpResponseVecPoolDtoDataItemOlpFeeRate = number | null;
750
+ type GenericHttpResponseVecPoolDtoDataItemStats = null | PoolStatsDto;
751
+ type GenericHttpResponseVecPoolDtoDataItem = {
752
+ /** Solana public key (base58) */
753
+ address: string;
754
+ /** @minimum 0 */
755
+ feeRate: number;
756
+ /** Unsigned 128-bit integer encoded as a decimal string */
757
+ liquidity: bigint;
758
+ mintA: MintDto;
759
+ mintB: MintDto;
760
+ olpFeeRate?: GenericHttpResponseVecPoolDtoDataItemOlpFeeRate;
761
+ price: number;
762
+ /** @minimum 0 */
763
+ protocolFeeRate: number;
764
+ provider: PoolProvider;
765
+ /** Unsigned 128-bit integer encoded as a decimal string */
766
+ sqrtPrice: bigint;
767
+ stats?: GenericHttpResponseVecPoolDtoDataItemStats;
768
+ tickCurrentIndex: number;
769
+ /** @minimum 0 */
770
+ tickSpacing: number;
771
+ /** Solana public key (base58) */
772
+ tokenAVault: string;
773
+ /** Solana public key (base58) */
774
+ tokenBVault: string;
775
+ };
776
+ interface GenericHttpResponseVecPoolDto {
777
+ data: GenericHttpResponseVecPoolDtoDataItem[];
778
+ }
779
+ type GenericHttpResponseVecPoolPriceCandleDtoDataItem = {
780
+ close: number;
781
+ high: number;
782
+ low: number;
783
+ open: number;
784
+ time: number;
785
+ volume: number;
786
+ };
787
+ interface GenericHttpResponseVecPoolPriceCandleDto {
788
+ data: GenericHttpResponseVecPoolPriceCandleDtoDataItem[];
789
+ }
790
+ type GenericHttpResponseVecPoolSwapDtoDataItem = {
791
+ aToB: boolean;
792
+ /** Unsigned 64-bit integer encoded as a decimal string */
793
+ amountIn: bigint;
794
+ /** Unsigned 64-bit integer encoded as a decimal string */
795
+ amountOut: bigint;
796
+ amountUsd: number;
797
+ id: string;
798
+ /** Solana public key (base58) */
799
+ pool: string;
800
+ time: Date;
801
+ txSignature: string;
802
+ };
803
+ interface GenericHttpResponseVecPoolSwapDto {
804
+ data: GenericHttpResponseVecPoolSwapDtoDataItem[];
805
+ }
806
+ type GenericHttpResponseVecStakingDepositsStatsDtoDataItem = {
807
+ /** Unsigned 64-bit integer encoded as a decimal string */
808
+ runningTotalDepositsSol: bigint;
809
+ runningTotalDepositsUsd: number;
810
+ time: Date;
811
+ /** Unsigned 64-bit integer encoded as a decimal string */
812
+ totalDepositsSol: bigint;
813
+ totalDepositsUsd: number;
814
+ };
815
+ interface GenericHttpResponseVecStakingDepositsStatsDto {
816
+ data: GenericHttpResponseVecStakingDepositsStatsDtoDataItem[];
817
+ }
818
+ type GenericHttpResponseVecStakingPositionActionDtoDataItem = {
819
+ action: StakingPositionActionType;
820
+ /** Unsigned 64-bit integer encoded as a decimal string */
821
+ amount: bigint;
822
+ /** Solana public key (base58) */
823
+ position: string;
824
+ time: Date;
825
+ txSignature: string;
826
+ };
827
+ interface GenericHttpResponseVecStakingPositionActionDto {
828
+ data: GenericHttpResponseVecStakingPositionActionDtoDataItem[];
829
+ }
830
+ /**
831
+ * Filled for swaps (spot)
832
+ Flatten transaction instruction index
833
+ */
834
+ type GenericHttpResponseVecTradeHistoryEntryDtoDataItemIxIndex = number | null;
835
+ type GenericHttpResponseVecTradeHistoryEntryDtoDataItemPnl = null | TradeHistoryEntryPnlUsd;
836
+ /**
837
+ * Filled for swaps (spot) and margin positions
838
+ */
839
+ type GenericHttpResponseVecTradeHistoryEntryDtoDataItemTxSignature = string | null;
840
+ type GenericHttpResponseVecTradeHistoryEntryDtoDataItem = {
841
+ /** Mints (Tokens) Pair direction in pool
842
+ When TRUE - Base token is Mint A, Quote token is Mint B
843
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
844
+ aToB: boolean;
845
+ action: TradeHistoryAction;
846
+ /** Solana public key (base58) */
847
+ authority: string;
848
+ baseToken: TokenAmountWithUsd;
849
+ /** Positive for taker trades (swaps + spot) and negative for maker trades (limit orders)
850
+ Measured in quote tokens for limit orders */
851
+ fee: FeeAmountWithUsd;
852
+ id: string;
853
+ /** Filled for swaps (spot)
854
+ Flatten transaction instruction index */
855
+ ixIndex?: GenericHttpResponseVecTradeHistoryEntryDtoDataItemIxIndex;
856
+ pnl?: GenericHttpResponseVecTradeHistoryEntryDtoDataItemPnl;
857
+ pool: PoolDto;
858
+ /** Solana public key (base58) */
859
+ positionAddress?: string;
860
+ quoteToken: TokenAmountWithUsd;
861
+ /** Unsigned 64-bit integer encoded as a decimal string */
862
+ slot: bigint;
863
+ ts: Date;
864
+ /** Filled for swaps (spot) and margin positions */
865
+ txSignature?: GenericHttpResponseVecTradeHistoryEntryDtoDataItemTxSignature;
866
+ uiDirection: TradeHistoryUIDirection;
867
+ /** A decimal price based on the action.
868
+
869
+ * For spot and margin positions - average execution price excluding the fee.
870
+ * For limit order fills - price derived from order tick_index. */
871
+ uiPrice: number;
872
+ };
873
+ interface GenericHttpResponseVecTradeHistoryEntryDto {
874
+ data: GenericHttpResponseVecTradeHistoryEntryDtoDataItem[];
875
+ }
876
+ type GenericHttpResponseVecTunaLpPositionActionDtoDataItem = {
877
+ action: TunaLpPositionsActionType;
878
+ data: TunaLpPositionActionComposite;
879
+ txSignature: string;
880
+ txTimestamp: Date;
881
+ };
882
+ interface GenericHttpResponseVecTunaLpPositionActionDto {
883
+ data: GenericHttpResponseVecTunaLpPositionActionDtoDataItem[];
884
+ }
885
+ type GenericHttpResponseVecTunaLpPositionDtoDataItemClosedAt = Date | null;
886
+ type GenericHttpResponseVecTunaLpPositionDtoDataItemExitPrice = number | null;
887
+ type GenericHttpResponseVecTunaLpPositionDtoDataItemLowerLimitOrder = number | null;
888
+ type GenericHttpResponseVecTunaLpPositionDtoDataItemUpperLimitOrder = number | null;
889
+ type GenericHttpResponseVecTunaLpPositionDtoDataItem = {
890
+ /** Solana public key (base58) */
891
+ authority: string;
892
+ closedAt?: GenericHttpResponseVecTunaLpPositionDtoDataItemClosedAt;
893
+ closedPnlSumUsd: number;
894
+ entryPrice: number;
895
+ exitPrice?: GenericHttpResponseVecTunaLpPositionDtoDataItemExitPrice;
896
+ feesSumUsd: number;
897
+ initialLeverage: number;
898
+ leverage: number;
899
+ lowerLimitOrder?: GenericHttpResponseVecTunaLpPositionDtoDataItemLowerLimitOrder;
900
+ lowerPrice: number;
901
+ marketMaker: PoolProvider;
902
+ openedAt: Date;
903
+ /** Solana public key (base58) */
904
+ pool: string;
905
+ /** Solana public key (base58) */
906
+ positionAddress: string;
907
+ state: TunaPositionDtoState;
908
+ totalDepositUsd: number;
909
+ totalValueUsd: number;
910
+ totalWithdrawnUsd: number;
911
+ updatedAt: Date;
912
+ upperLimitOrder?: GenericHttpResponseVecTunaLpPositionDtoDataItemUpperLimitOrder;
913
+ upperPrice: number;
914
+ };
915
+ interface GenericHttpResponseVecTunaLpPositionDto {
916
+ data: GenericHttpResponseVecTunaLpPositionDtoDataItem[];
917
+ }
918
+ type GenericHttpResponseVecTunaPositionDtoDataItemClosedAt = Date | null;
919
+ type GenericHttpResponseVecTunaPositionDtoDataItem = {
920
+ /** Solana public key (base58) */
921
+ address: string;
922
+ /** Solana public key (base58) */
923
+ authority: string;
924
+ closedAt?: GenericHttpResponseVecTunaPositionDtoDataItemClosedAt;
925
+ compoundedYieldA: TokenAmountWithUsd;
926
+ compoundedYieldB: TokenAmountWithUsd;
927
+ currentDebtA: TokenAmountWithUsd;
928
+ currentDebtB: TokenAmountWithUsd;
929
+ depositedCollateralA: TunaPositionTokenDepositedCollateral;
930
+ depositedCollateralB: TunaPositionTokenDepositedCollateral;
931
+ entryPrice: number;
932
+ flags: TunaLpPositionFlags;
933
+ initialDebtA: TokenAmountWithUsd;
934
+ initialDebtB: TokenAmountWithUsd;
935
+ leftoversA: TokenAmountWithUsd;
936
+ leftoversB: TokenAmountWithUsd;
937
+ leverage: number;
938
+ liquidationPriceLower: number;
939
+ liquidationPriceUpper: number;
940
+ /** Unsigned 128-bit integer encoded as a decimal string */
941
+ liquidity: bigint;
942
+ lowerLimitOrderPrice: number;
943
+ marketMaker: TunaPositionMarketMaker;
944
+ maxLeverage: number;
945
+ openedAt: Date;
946
+ /** Total PnL denominated/expressed in token A */
947
+ pnlA: TunaPositionTokenPnl;
948
+ /** Total PnL denominated/expressed in token B */
949
+ pnlB: TunaPositionTokenPnl;
950
+ pnlUsd: TunaPositionUsdPnl;
951
+ pool: PoolDto;
952
+ /** Solana public key (base58) */
953
+ positionMint: string;
954
+ state: TunaPositionDtoState;
955
+ tickLowerIndex: number;
956
+ tickUpperIndex: number;
957
+ totalA: TokenAmountWithUsd;
958
+ totalB: TokenAmountWithUsd;
959
+ upperLimitOrderPrice: number;
960
+ /** @minimum 0 */
961
+ version: number;
962
+ yieldA: TokenAmountWithUsd;
963
+ yieldB: TokenAmountWithUsd;
964
+ };
965
+ interface GenericHttpResponseVecTunaPositionDto {
966
+ data: GenericHttpResponseVecTunaPositionDtoDataItem[];
967
+ }
968
+ type GenericHttpResponseVecTunaSpotPositionDtoDataItemClosedAt = Date | null;
969
+ type GenericHttpResponseVecTunaSpotPositionDtoDataItem = {
970
+ /** Solana public key (base58) */
971
+ address: string;
972
+ /** Solana public key (base58) */
973
+ authority: string;
974
+ closedAt?: GenericHttpResponseVecTunaSpotPositionDtoDataItemClosedAt;
975
+ collateralToken: TunaPositionPoolToken;
976
+ currentDebt: TokenAmountWithUsd;
977
+ depositedCollateral: TokenAmountWithUsd;
978
+ entryPrice: number;
979
+ initialDebt: TokenAmountWithUsd;
980
+ leverage: number;
981
+ liquidationPrice: number;
982
+ lowerLimitOrderPrice: number;
983
+ marketMaker: TunaPositionMarketMaker;
984
+ maxLeverage: number;
985
+ openedAt: Date;
986
+ pnlUsd: TunaPositionUsdPnl;
987
+ pool: PoolDto;
988
+ positionToken: TunaPositionPoolToken;
989
+ state: TunaSpotPositionDtoState;
990
+ total: TokenAmountWithUsd;
991
+ upperLimitOrderPrice: number;
992
+ /** @minimum 0 */
993
+ version: number;
994
+ };
995
+ interface GenericHttpResponseVecTunaSpotPositionDto {
996
+ data: GenericHttpResponseVecTunaSpotPositionDtoDataItem[];
997
+ }
998
+ type GenericHttpResponseVecVaultDtoDataItem = {
999
+ /** Solana public key (base58) */
1000
+ address: string;
1001
+ borrowApy: number;
1002
+ borrowedFunds: TokenAmountWithUsd;
1003
+ /** Unsigned 64-bit integer encoded as a decimal string */
1004
+ borrowedShares: bigint;
1005
+ depositedFunds: TokenAmountWithUsd;
1006
+ /** Unsigned 64-bit integer encoded as a decimal string */
1007
+ depositedShares: bigint;
1008
+ /** Unsigned 64-bit integer encoded as a decimal string */
1009
+ interestRate: bigint;
1010
+ /** Solana public key (base58) */
1011
+ mint: string;
1012
+ /** Solana public key (base58) */
1013
+ pythOracleFeedId: string;
1014
+ /** Solana public key (base58) */
1015
+ pythOraclePriceUpdate: string;
1016
+ supplyApy: number;
1017
+ supplyLimit: TokenAmountWithUsd;
1018
+ utilization: number;
1019
+ };
1020
+ interface GenericHttpResponseVecVaultDto {
1021
+ data: GenericHttpResponseVecVaultDtoDataItem[];
1022
+ }
1023
+ type GenericHttpResponseVecVaultStatsDtoDataItem = {
1024
+ borrow: TokenAmountWithUsd;
1025
+ borrowApr: number;
1026
+ date: Date;
1027
+ supply: TokenAmountWithUsd;
1028
+ supplyApy: number;
1029
+ };
1030
+ interface GenericHttpResponseVecVaultStatsDto {
1031
+ data: GenericHttpResponseVecVaultStatsDtoDataItem[];
1032
+ }
1033
+ interface GenericHttpResponseI64 {
1034
+ data: bigint;
1035
+ }
1036
+ interface HashMap {
1037
+ [key: string]: {
1038
+ feesUsd: number;
1039
+ priceChange: number;
1040
+ volumeUsd: number;
1041
+ };
1042
+ }
1043
+ interface HttpStatusData {
1044
+ status: string;
1045
+ }
1046
+ interface IncreaseSpotPositionQuoteDto {
1047
+ /** Unsigned 64-bit integer encoded as a decimal string */
1048
+ borrowAmount: bigint;
1049
+ /** Unsigned 64-bit integer encoded as a decimal string */
1050
+ collateralAmount: bigint;
1051
+ /** Unsigned 64-bit integer encoded as a decimal string */
1052
+ estimatedAmount: bigint;
1053
+ /** Liquidation price */
1054
+ liquidationPrice: number;
1055
+ /** Unsigned 64-bit integer encoded as a decimal string */
1056
+ minSwapOutputAmount: bigint;
1057
+ /** Price impact in percents */
1058
+ priceImpact: number;
1059
+ /** Unsigned 64-bit integer encoded as a decimal string */
1060
+ protocolFeeA: bigint;
1061
+ /** Unsigned 64-bit integer encoded as a decimal string */
1062
+ protocolFeeB: bigint;
1063
+ /** Unsigned 64-bit integer encoded as a decimal string */
1064
+ swapInputAmount: bigint;
1065
+ }
1066
+ interface LeaderboardItemDto {
1067
+ /** Solana public key (base58) */
1068
+ authority: string;
1069
+ lpBaseValueUsd: number;
1070
+ lpPeriodPnlPercent: number;
1071
+ lpPeriodPnlUsd: number;
1072
+ /** @minimum 0 */
1073
+ lpPositionsCount: number;
1074
+ /** @minimum 0 */
1075
+ rank: number;
1076
+ spotBaseValueUsd: number;
1077
+ spotPeriodPnlPercent: number;
1078
+ spotPeriodPnlUsd: number;
1079
+ /** @minimum 0 */
1080
+ spotPositionsCount: number;
1081
+ totalPeriodPnlPercent: number;
1082
+ totalPeriodPnlUsd: number;
1083
+ }
1084
+ type LeaderboardPeriod = typeof LeaderboardPeriod[keyof typeof LeaderboardPeriod];
1085
+ declare const LeaderboardPeriod: {
1086
+ readonly week: "week";
1087
+ };
1088
+ type LeaderboardSortBy = typeof LeaderboardSortBy[keyof typeof LeaderboardSortBy];
1089
+ declare const LeaderboardSortBy: {
1090
+ readonly profit: "profit";
1091
+ readonly percent: "percent";
1092
+ };
1093
+ interface LendingPositionDto {
1094
+ /** Solana public key (base58) */
1095
+ address: string;
1096
+ /** Solana public key (base58) */
1097
+ authority: string;
1098
+ earned: TokenAmountWithUsd;
1099
+ funds: TokenAmountWithUsd;
1100
+ /** Solana public key (base58) */
1101
+ mint: string;
1102
+ /** Unsigned 64-bit integer encoded as a decimal string */
1103
+ shares: bigint;
1104
+ /** Unsigned 64-bit integer encoded as a decimal string */
1105
+ updatedAtSlot: bigint;
1106
+ /** Solana public key (base58) */
1107
+ vault: string;
1108
+ }
1109
+ type LimitOrderDtoCloseTxSignature = string | null;
1110
+ type LimitOrderDtoClosedAt = Date | null;
1111
+ interface LimitOrderDto {
1112
+ aToB: boolean;
1113
+ /** Solana public key (base58) */
1114
+ address: string;
1115
+ amountIn: TokenAmountWithUsd;
1116
+ amountOut: TokenAmountWithUsd;
1117
+ /** Solana public key (base58) */
1118
+ authority: string;
1119
+ closeTxSignature?: LimitOrderDtoCloseTxSignature;
1120
+ closedAt?: LimitOrderDtoClosedAt;
1121
+ fillRatio: number;
1122
+ id: string;
1123
+ openTxSignature: string;
1124
+ openedAt: Date;
1125
+ /** Solana public key (base58) */
1126
+ orderMint: string;
1127
+ pool: PoolDto;
1128
+ state: LimitOrderStatus;
1129
+ tickIndex: number;
1130
+ }
1131
+ interface LimitOrderQuoteByInputDto {
1132
+ /** Unsigned 64-bit integer encoded as a decimal string */
1133
+ amountOut: bigint;
1134
+ }
1135
+ interface LimitOrderQuoteByOutputDto {
1136
+ /** Unsigned 64-bit integer encoded as a decimal string */
1137
+ amountIn: bigint;
1138
+ }
1139
+ type LimitOrderStatus = typeof LimitOrderStatus[keyof typeof LimitOrderStatus];
1140
+ declare const LimitOrderStatus: {
1141
+ readonly open: "open";
1142
+ readonly partiallyFilled: "partially_filled";
1143
+ readonly filled: "filled";
1144
+ readonly complete: "complete";
1145
+ readonly cancelled: "cancelled";
1146
+ };
1147
+ type LpPositionsHistoryQueryFilter = typeof LpPositionsHistoryQueryFilter[keyof typeof LpPositionsHistoryQueryFilter];
1148
+ declare const LpPositionsHistoryQueryFilter: {
1149
+ readonly opened: "opened";
1150
+ readonly closed: "closed";
1151
+ readonly all: "all";
1152
+ };
1153
+ interface MarketDto {
1154
+ /** Solana public key (base58) */
1155
+ address: string;
1156
+ /** Solana public key (base58) */
1157
+ addressLookupTable: string;
1158
+ borrowLimitA: TokenAmountWithUsd;
1159
+ borrowLimitB: TokenAmountWithUsd;
1160
+ borrowedFundsA: TokenAmountWithUsd;
1161
+ borrowedFundsB: TokenAmountWithUsd;
1162
+ createdAt: Date;
1163
+ disabled: boolean;
1164
+ /** @minimum 0 */
1165
+ liquidationFee: number;
1166
+ /** @minimum 0 */
1167
+ liquidationThreshold: number;
1168
+ /** @minimum 0 */
1169
+ maxLeverage: number;
1170
+ maxSpotPositionSizeA: TokenAmountWithUsd;
1171
+ maxSpotPositionSizeB: TokenAmountWithUsd;
1172
+ /** @minimum 0 */
1173
+ maxSwapSlippage: number;
1174
+ /** @minimum 0 */
1175
+ oraclePriceDeviationThreshold: number;
1176
+ pool: PoolDto;
1177
+ /** @minimum 0 */
1178
+ protocolFee: number;
1179
+ /** @minimum 0 */
1180
+ protocolFeeOnCollateral: number;
1181
+ /** @minimum 0 */
1182
+ rebalanceProtocolFee: number;
1183
+ }
1184
+ interface MintDto {
1185
+ /** Solana public key (base58) */
1186
+ address: string;
1187
+ decimals: number;
1188
+ logo: string;
1189
+ name: string;
1190
+ symbol: string;
1191
+ }
1192
+ type NotificationAction = typeof NotificationAction[keyof typeof NotificationAction];
1193
+ declare const NotificationAction: {
1194
+ readonly create: "create";
1195
+ readonly update: "update";
1196
+ };
1197
+ type NotificationDtoLendingPositionDtoData = {
1198
+ /** Solana public key (base58) */
1199
+ address: string;
1200
+ /** Solana public key (base58) */
1201
+ authority: string;
1202
+ earned: TokenAmountWithUsd;
1203
+ funds: TokenAmountWithUsd;
1204
+ /** Solana public key (base58) */
1205
+ mint: string;
1206
+ /** Unsigned 64-bit integer encoded as a decimal string */
1207
+ shares: bigint;
1208
+ /** Unsigned 64-bit integer encoded as a decimal string */
1209
+ updatedAtSlot: bigint;
1210
+ /** Solana public key (base58) */
1211
+ vault: string;
1212
+ };
1213
+ interface NotificationDtoLendingPositionDto {
1214
+ action: NotificationAction;
1215
+ /** Solana public key (base58) */
1216
+ authority?: string;
1217
+ data: NotificationDtoLendingPositionDtoData;
1218
+ entity: NotificationEntity;
1219
+ id: string;
1220
+ }
1221
+ type NotificationDtoOrderHistoryEntryDtoDataBaseTokenConsumedAmount = null | TokenAmountWithUsd;
1222
+ /**
1223
+ * Filled for swaps (spot)
1224
+ Flatten transaction instruction index
1225
+ */
1226
+ type NotificationDtoOrderHistoryEntryDtoDataIxIndex = number | null;
1227
+ type NotificationDtoOrderHistoryEntryDtoDataQuoteTokenFilledAmount = null | TokenAmountWithUsd;
1228
+ /**
1229
+ * Filled for swaps (spot) and margin positions
1230
+ */
1231
+ type NotificationDtoOrderHistoryEntryDtoDataTxSignature = string | null;
1232
+ /**
1233
+ * A decimal price based on the action.
1234
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee
1235
+ */
1236
+ type NotificationDtoOrderHistoryEntryDtoDataUiExecutionPrice = number | null;
1237
+ /**
1238
+ * A decimal price based on the action.
1239
+ Only for limit orders & trigger actions.
1240
+
1241
+ * For limit order fills - price derived from order tick_index
1242
+ * For take profit / stop loss / liquidation - trigger price
1243
+ */
1244
+ type NotificationDtoOrderHistoryEntryDtoDataUiPrice = number | null;
1245
+ type NotificationDtoOrderHistoryEntryDtoData = {
1246
+ /** Mints (Tokens) Pair direction in pool
1247
+ When TRUE - Base token is Mint A, Quote token is Mint B
1248
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
1249
+ aToB: boolean;
1250
+ /** Solana public key (base58) */
1251
+ authority: string;
1252
+ baseToken: TokenAmountWithUsd;
1253
+ baseTokenConsumedAmount?: NotificationDtoOrderHistoryEntryDtoDataBaseTokenConsumedAmount;
1254
+ id: string;
1255
+ isReduceOnly: boolean;
1256
+ /** Filled for swaps (spot)
1257
+ Flatten transaction instruction index */
1258
+ ixIndex?: NotificationDtoOrderHistoryEntryDtoDataIxIndex;
1259
+ orderType: OrderHistoryType;
1260
+ pool: PoolDto;
1261
+ /** Solana public key (base58) */
1262
+ positionAddress?: string;
1263
+ quoteToken: TokenAmountWithUsd;
1264
+ quoteTokenFilledAmount?: NotificationDtoOrderHistoryEntryDtoDataQuoteTokenFilledAmount;
1265
+ /** Unsigned 64-bit integer encoded as a decimal string */
1266
+ slot: bigint;
1267
+ status: OrderHistoryStatus;
1268
+ /** Block time of slot this entry was create from */
1269
+ ts: Date;
1270
+ /** Filled for swaps (spot) and margin positions */
1271
+ txSignature?: NotificationDtoOrderHistoryEntryDtoDataTxSignature;
1272
+ uiDirection: OrderHistoryUIDirection;
1273
+ /** A decimal price based on the action.
1274
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee */
1275
+ uiExecutionPrice?: NotificationDtoOrderHistoryEntryDtoDataUiExecutionPrice;
1276
+ /** A decimal price based on the action.
1277
+ Only for limit orders & trigger actions.
1278
+
1279
+ * For limit order fills - price derived from order tick_index
1280
+ * For take profit / stop loss / liquidation - trigger price */
1281
+ uiPrice?: NotificationDtoOrderHistoryEntryDtoDataUiPrice;
1282
+ };
1283
+ interface NotificationDtoOrderHistoryEntryDto {
1284
+ action: NotificationAction;
1285
+ /** Solana public key (base58) */
1286
+ authority?: string;
1287
+ data: NotificationDtoOrderHistoryEntryDtoData;
1288
+ entity: NotificationEntity;
1289
+ id: string;
1290
+ }
1291
+ type NotificationDtoPoolSwapDtoData = {
1292
+ aToB: boolean;
1293
+ /** Unsigned 64-bit integer encoded as a decimal string */
1294
+ amountIn: bigint;
1295
+ /** Unsigned 64-bit integer encoded as a decimal string */
1296
+ amountOut: bigint;
1297
+ amountUsd: number;
1298
+ id: string;
1299
+ /** Solana public key (base58) */
1300
+ pool: string;
1301
+ time: Date;
1302
+ txSignature: string;
1303
+ };
1304
+ interface NotificationDtoPoolSwapDto {
1305
+ action: NotificationAction;
1306
+ /** Solana public key (base58) */
1307
+ authority?: string;
1308
+ data: NotificationDtoPoolSwapDtoData;
1309
+ entity: NotificationEntity;
1310
+ id: string;
1311
+ }
1312
+ type NotificationDtoStakingPositionDtoDataLastUnstakedAt = Date | null;
1313
+ /**
1314
+ * @minimum 0
1315
+ */
1316
+ type NotificationDtoStakingPositionDtoDataRank = number | null;
1317
+ type NotificationDtoStakingPositionDtoDataWithdrawAvailableAt = Date | null;
1318
+ type NotificationDtoStakingPositionDtoData = {
1319
+ /** Solana public key (base58) */
1320
+ address: string;
1321
+ claimedReward: TokenAmountWithUsd;
1322
+ lastUnstakedAt?: NotificationDtoStakingPositionDtoDataLastUnstakedAt;
1323
+ /** Solana public key (base58) */
1324
+ owner: string;
1325
+ /** @minimum 0 */
1326
+ rank?: NotificationDtoStakingPositionDtoDataRank;
1327
+ staked: TokenAmountWithUsd;
1328
+ unclaimedReward: TokenAmountWithUsd;
1329
+ unstaked: TokenAmountWithUsd;
1330
+ vesting: VestingDto;
1331
+ withdrawAvailableAt?: NotificationDtoStakingPositionDtoDataWithdrawAvailableAt;
1332
+ };
1333
+ interface NotificationDtoStakingPositionDto {
1334
+ action: NotificationAction;
1335
+ /** Solana public key (base58) */
1336
+ authority?: string;
1337
+ data: NotificationDtoStakingPositionDtoData;
1338
+ entity: NotificationEntity;
1339
+ id: string;
1340
+ }
1341
+ /**
1342
+ * Filled for swaps (spot)
1343
+ Flatten transaction instruction index
1344
+ */
1345
+ type NotificationDtoTradeHistoryEntryDtoDataIxIndex = number | null;
1346
+ type NotificationDtoTradeHistoryEntryDtoDataPnl = null | TradeHistoryEntryPnlUsd;
1347
+ /**
1348
+ * Filled for swaps (spot) and margin positions
1349
+ */
1350
+ type NotificationDtoTradeHistoryEntryDtoDataTxSignature = string | null;
1351
+ type NotificationDtoTradeHistoryEntryDtoData = {
1352
+ /** Mints (Tokens) Pair direction in pool
1353
+ When TRUE - Base token is Mint A, Quote token is Mint B
1354
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
1355
+ aToB: boolean;
1356
+ action: TradeHistoryAction;
1357
+ /** Solana public key (base58) */
1358
+ authority: string;
1359
+ baseToken: TokenAmountWithUsd;
1360
+ /** Positive for taker trades (swaps + spot) and negative for maker trades (limit orders)
1361
+ Measured in quote tokens for limit orders */
1362
+ fee: FeeAmountWithUsd;
1363
+ id: string;
1364
+ /** Filled for swaps (spot)
1365
+ Flatten transaction instruction index */
1366
+ ixIndex?: NotificationDtoTradeHistoryEntryDtoDataIxIndex;
1367
+ pnl?: NotificationDtoTradeHistoryEntryDtoDataPnl;
1368
+ pool: PoolDto;
1369
+ /** Solana public key (base58) */
1370
+ positionAddress?: string;
1371
+ quoteToken: TokenAmountWithUsd;
1372
+ /** Unsigned 64-bit integer encoded as a decimal string */
1373
+ slot: bigint;
1374
+ ts: Date;
1375
+ /** Filled for swaps (spot) and margin positions */
1376
+ txSignature?: NotificationDtoTradeHistoryEntryDtoDataTxSignature;
1377
+ uiDirection: TradeHistoryUIDirection;
1378
+ /** A decimal price based on the action.
1379
+
1380
+ * For spot and margin positions - average execution price excluding the fee.
1381
+ * For limit order fills - price derived from order tick_index. */
1382
+ uiPrice: number;
1383
+ };
1384
+ interface NotificationDtoTradeHistoryEntryDto {
1385
+ action: NotificationAction;
1386
+ /** Solana public key (base58) */
1387
+ authority?: string;
1388
+ data: NotificationDtoTradeHistoryEntryDtoData;
1389
+ entity: NotificationEntity;
1390
+ id: string;
1391
+ }
1392
+ type NotificationEntity = typeof NotificationEntity[keyof typeof NotificationEntity];
1393
+ declare const NotificationEntity: {
1394
+ readonly initialMessage: "initial_message";
1395
+ readonly poolSwap: "pool_swap";
1396
+ readonly orderBook: "order_book";
1397
+ readonly oraclePrice: "oracle_price";
1398
+ readonly market: "market";
1399
+ readonly tunaPosition: "tuna_position";
1400
+ readonly tunaSpotPosition: "tuna_spot_position";
1401
+ readonly stakingPosition: "staking_position";
1402
+ readonly lendingPosition: "lending_position";
1403
+ readonly fusionLimitOrder: "fusion_limit_order";
1404
+ readonly tradeHistoryEntry: "trade_history_entry";
1405
+ readonly orderHistoryEntry: "order_history_entry";
1406
+ readonly stateSnapshot: "state_snapshot";
1407
+ };
1408
+ interface OraclePriceDto {
1409
+ decimals: number;
1410
+ /** Solana public key (base58) */
1411
+ mint: string;
1412
+ /** Unsigned 64-bit integer encoded as a decimal string */
1413
+ price: bigint;
1414
+ time: Date;
1415
+ }
1416
+ interface OrderBookDto {
1417
+ entries: OrderBookEntryDto[];
1418
+ /** Solana public key (base58) */
1419
+ poolAddress: string;
1420
+ poolPrice: number;
1421
+ }
1422
+ interface OrderBookEntryDto {
1423
+ askSide: boolean;
1424
+ /** Unsigned 64-bit integer encoded as a decimal string */
1425
+ concentratedAmount: bigint;
1426
+ /** Unsigned 64-bit integer encoded as a decimal string */
1427
+ concentratedAmountQuote: bigint;
1428
+ /** Unsigned 64-bit integer encoded as a decimal string */
1429
+ concentratedTotal: bigint;
1430
+ /** Unsigned 64-bit integer encoded as a decimal string */
1431
+ concentratedTotalQuote: bigint;
1432
+ /** Unsigned 64-bit integer encoded as a decimal string */
1433
+ limitAmount: bigint;
1434
+ /** Unsigned 64-bit integer encoded as a decimal string */
1435
+ limitAmountQuote: bigint;
1436
+ /** Unsigned 64-bit integer encoded as a decimal string */
1437
+ limitTotal: bigint;
1438
+ /** Unsigned 64-bit integer encoded as a decimal string */
1439
+ limitTotalQuote: bigint;
1440
+ price: number;
1441
+ }
1442
+ type OrderBookWrapper = OrderBookDto;
1443
+ type OrderHistoryEntryDtoBaseTokenConsumedAmount = null | TokenAmountWithUsd;
1444
+ /**
1445
+ * Filled for swaps (spot)
1446
+ Flatten transaction instruction index
1447
+ */
1448
+ type OrderHistoryEntryDtoIxIndex = number | null;
1449
+ type OrderHistoryEntryDtoQuoteTokenFilledAmount = null | TokenAmountWithUsd;
1450
+ /**
1451
+ * Filled for swaps (spot) and margin positions
1452
+ */
1453
+ type OrderHistoryEntryDtoTxSignature = string | null;
1454
+ /**
1455
+ * A decimal price based on the action.
1456
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee
1457
+ */
1458
+ type OrderHistoryEntryDtoUiExecutionPrice = number | null;
1459
+ /**
1460
+ * A decimal price based on the action.
1461
+ Only for limit orders & trigger actions.
1462
+
1463
+ * For limit order fills - price derived from order tick_index
1464
+ * For take profit / stop loss / liquidation - trigger price
1465
+ */
1466
+ type OrderHistoryEntryDtoUiPrice = number | null;
1467
+ interface OrderHistoryEntryDto {
1468
+ /** Mints (Tokens) Pair direction in pool
1469
+ When TRUE - Base token is Mint A, Quote token is Mint B
1470
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
1471
+ aToB: boolean;
1472
+ /** Solana public key (base58) */
1473
+ authority: string;
1474
+ baseToken: TokenAmountWithUsd;
1475
+ baseTokenConsumedAmount?: OrderHistoryEntryDtoBaseTokenConsumedAmount;
1476
+ id: string;
1477
+ isReduceOnly: boolean;
1478
+ /** Filled for swaps (spot)
1479
+ Flatten transaction instruction index */
1480
+ ixIndex?: OrderHistoryEntryDtoIxIndex;
1481
+ orderType: OrderHistoryType;
1482
+ pool: PoolDto;
1483
+ /** Solana public key (base58) */
1484
+ positionAddress?: string;
1485
+ quoteToken: TokenAmountWithUsd;
1486
+ quoteTokenFilledAmount?: OrderHistoryEntryDtoQuoteTokenFilledAmount;
1487
+ /** Unsigned 64-bit integer encoded as a decimal string */
1488
+ slot: bigint;
1489
+ status: OrderHistoryStatus;
1490
+ /** Block time of slot this entry was create from */
1491
+ ts: Date;
1492
+ /** Filled for swaps (spot) and margin positions */
1493
+ txSignature?: OrderHistoryEntryDtoTxSignature;
1494
+ uiDirection: OrderHistoryUIDirection;
1495
+ /** A decimal price based on the action.
1496
+ For market (swaps + margin) orders, displays average execution price for the order excluding the fee */
1497
+ uiExecutionPrice?: OrderHistoryEntryDtoUiExecutionPrice;
1498
+ /** A decimal price based on the action.
1499
+ Only for limit orders & trigger actions.
1500
+
1501
+ * For limit order fills - price derived from order tick_index
1502
+ * For take profit / stop loss / liquidation - trigger price */
1503
+ uiPrice?: OrderHistoryEntryDtoUiPrice;
1504
+ }
1505
+ /**
1506
+ * Swaps && Spot Positions (Margin) can be only only in these statuses:
1507
+ * filled when is_tx_failed = FALSE
1508
+ * rejected when is_tx_failed = TRUE
1509
+ */
1510
+ type OrderHistoryStatus = typeof OrderHistoryStatus[keyof typeof OrderHistoryStatus];
1511
+ declare const OrderHistoryStatus: {
1512
+ readonly open: "open";
1513
+ readonly partiallyFilled: "partially_filled";
1514
+ readonly filled: "filled";
1515
+ readonly cancelled: "cancelled";
1516
+ readonly claimed: "claimed";
1517
+ readonly rejected: "rejected";
1518
+ };
1519
+ type OrderHistoryType = typeof OrderHistoryType[keyof typeof OrderHistoryType];
1520
+ declare const OrderHistoryType: {
1521
+ readonly market: "market";
1522
+ readonly limit: "limit";
1523
+ readonly takeProfitMarket: "take_profit_market";
1524
+ readonly stopLossMarket: "stop_loss_market";
1525
+ readonly liquidationMarket: "liquidation_market";
1526
+ };
1527
+ type OrderHistoryUIDirection = typeof OrderHistoryUIDirection[keyof typeof OrderHistoryUIDirection];
1528
+ declare const OrderHistoryUIDirection: {
1529
+ readonly buy: "buy";
1530
+ readonly sell: "sell";
1531
+ readonly long: "long";
1532
+ readonly short: "short";
1533
+ };
1534
+ interface PaginationMeta {
1535
+ total: bigint;
1536
+ }
1537
+ type PoolDtoOlpFeeRate = number | null;
1538
+ type PoolDtoStats = null | PoolStatsDto;
1539
+ interface PoolDto {
1540
+ /** Solana public key (base58) */
1541
+ address: string;
1542
+ /** @minimum 0 */
1543
+ feeRate: number;
1544
+ /** Unsigned 128-bit integer encoded as a decimal string */
1545
+ liquidity: bigint;
1546
+ mintA: MintDto;
1547
+ mintB: MintDto;
1548
+ olpFeeRate?: PoolDtoOlpFeeRate;
1549
+ price: number;
1550
+ /** @minimum 0 */
1551
+ protocolFeeRate: number;
1552
+ provider: PoolProvider;
1553
+ /** Unsigned 128-bit integer encoded as a decimal string */
1554
+ sqrtPrice: bigint;
1555
+ stats?: PoolDtoStats;
1556
+ tickCurrentIndex: number;
1557
+ /** @minimum 0 */
1558
+ tickSpacing: number;
1559
+ /** Solana public key (base58) */
1560
+ tokenAVault: string;
1561
+ /** Solana public key (base58) */
1562
+ tokenBVault: string;
1563
+ }
1564
+ interface PoolPriceCandleDto {
1565
+ close: number;
1566
+ high: number;
1567
+ low: number;
1568
+ open: number;
1569
+ time: number;
1570
+ volume: number;
1571
+ }
1572
+ type PoolProvider = typeof PoolProvider[keyof typeof PoolProvider];
1573
+ declare const PoolProvider: {
1574
+ readonly orca: "orca";
1575
+ readonly fusion: "fusion";
1576
+ };
1577
+ interface PoolStatsDto {
1578
+ groups: HashMap;
1579
+ tvlUsd: number;
1580
+ }
1581
+ type PoolSubscriptionIsInverted = boolean | null;
1582
+ type PoolSubscriptionOrderBookPriceStep = number | null;
1583
+ interface PoolSubscription {
1584
+ address: string;
1585
+ isInverted?: PoolSubscriptionIsInverted;
1586
+ orderBookPriceStep?: PoolSubscriptionOrderBookPriceStep;
1587
+ topics: PoolSubscriptionTopic[];
1588
+ }
1589
+ type PoolSubscriptionTopic = typeof PoolSubscriptionTopic[keyof typeof PoolSubscriptionTopic];
1590
+ declare const PoolSubscriptionTopic: {
1591
+ readonly poolSwaps: "pool_swaps";
1592
+ readonly orderBook: "order_book";
1593
+ readonly poolPrices: "pool_prices";
1594
+ };
1595
+ interface PoolSwapDto {
1596
+ aToB: boolean;
1597
+ /** Unsigned 64-bit integer encoded as a decimal string */
1598
+ amountIn: bigint;
1599
+ /** Unsigned 64-bit integer encoded as a decimal string */
1600
+ amountOut: bigint;
1601
+ amountUsd: number;
1602
+ id: string;
1603
+ /** Solana public key (base58) */
1604
+ pool: string;
1605
+ time: Date;
1606
+ txSignature: string;
1607
+ }
1608
+ interface PoolTicksDto {
1609
+ /** @minimum 0 */
1610
+ tickSpacing: number;
1611
+ ticks: TickDto[];
1612
+ }
1613
+ type SnapshotFusionLimitOrders = LimitOrderDto[] | null;
1614
+ type SnapshotMarkets = MarketDto[] | null;
1615
+ type SnapshotOraclePricesAnyOf = {
1616
+ [key: string]: string;
1617
+ };
1618
+ type SnapshotOraclePrices = SnapshotOraclePricesAnyOf | null;
1619
+ type SnapshotOrderBooks = OrderBookWrapper[] | null;
1620
+ type SnapshotTunaLpPositions = TunaPositionDto[] | null;
1621
+ type SnapshotTunaSpotPositions = TunaSpotPositionDto[] | null;
1622
+ interface Snapshot {
1623
+ blockTime: Date;
1624
+ fusionLimitOrders?: SnapshotFusionLimitOrders;
1625
+ markets?: SnapshotMarkets;
1626
+ oraclePrices?: SnapshotOraclePrices;
1627
+ orderBooks?: SnapshotOrderBooks;
1628
+ /** @minimum 0 */
1629
+ slot: bigint;
1630
+ tunaLpPositions?: SnapshotTunaLpPositions;
1631
+ tunaSpotPositions?: SnapshotTunaSpotPositions;
1632
+ }
1633
+ interface SnapshotContainer {
1634
+ action: string;
1635
+ data: Snapshot;
1636
+ entity: string;
1637
+ id: string;
1638
+ }
1639
+ type SseResponse = StreamInitalMessage | NotificationDtoPoolSwapDto | NotificationDtoStakingPositionDto | NotificationDtoLendingPositionDto | NotificationDtoTradeHistoryEntryDto | NotificationDtoOrderHistoryEntryDto | SnapshotContainer;
1640
+ interface StakingDepositsStatsDto {
1641
+ /** Unsigned 64-bit integer encoded as a decimal string */
1642
+ runningTotalDepositsSol: bigint;
1643
+ runningTotalDepositsUsd: number;
1644
+ time: Date;
1645
+ /** Unsigned 64-bit integer encoded as a decimal string */
1646
+ totalDepositsSol: bigint;
1647
+ totalDepositsUsd: number;
1648
+ }
1649
+ interface StakingLeaderboardPositionDto {
1650
+ /** Solana public key (base58) */
1651
+ address: string;
1652
+ /** Solana public key (base58) */
1653
+ owner: string;
1654
+ /** @minimum 0 */
1655
+ rank: number;
1656
+ staked: TokenAmountWithUsd;
1657
+ }
1658
+ interface StakingPositionActionDto {
1659
+ action: StakingPositionActionType;
1660
+ /** Unsigned 64-bit integer encoded as a decimal string */
1661
+ amount: bigint;
1662
+ /** Solana public key (base58) */
1663
+ position: string;
1664
+ time: Date;
1665
+ txSignature: string;
1666
+ }
1667
+ type StakingPositionActionType = typeof StakingPositionActionType[keyof typeof StakingPositionActionType];
1668
+ declare const StakingPositionActionType: {
1669
+ readonly stake: "stake";
1670
+ readonly unstake: "unstake";
1671
+ readonly withdraw: "withdraw";
1672
+ readonly claimRewards: "claim_rewards";
1673
+ readonly compoundRewards: "compound_rewards";
1674
+ };
1675
+ type StakingPositionDtoLastUnstakedAt = Date | null;
1676
+ /**
1677
+ * @minimum 0
1678
+ */
1679
+ type StakingPositionDtoRank = number | null;
1680
+ type StakingPositionDtoWithdrawAvailableAt = Date | null;
1681
+ interface StakingPositionDto {
1682
+ /** Solana public key (base58) */
1683
+ address: string;
1684
+ claimedReward: TokenAmountWithUsd;
1685
+ lastUnstakedAt?: StakingPositionDtoLastUnstakedAt;
1686
+ /** Solana public key (base58) */
1687
+ owner: string;
1688
+ /** @minimum 0 */
1689
+ rank?: StakingPositionDtoRank;
1690
+ staked: TokenAmountWithUsd;
1691
+ unclaimedReward: TokenAmountWithUsd;
1692
+ unstaked: TokenAmountWithUsd;
1693
+ vesting: VestingDto;
1694
+ withdrawAvailableAt?: StakingPositionDtoWithdrawAvailableAt;
1695
+ }
1696
+ /**
1697
+ * First message sent to the client containing stream id for subscription updates
1698
+ */
1699
+ interface StreamInitalMessage {
1700
+ entity: NotificationEntity;
1701
+ streamId: string;
1702
+ }
1703
+ type SubscriptionOptionsMarkets = string[] | null;
1704
+ type SubscriptionOptionsMints = string[] | null;
1705
+ type SubscriptionOptionsPools = PoolSubscription[] | null;
1706
+ type SubscriptionOptionsWallet = null | WalletSubscription;
1707
+ interface SubscriptionOptions {
1708
+ markets?: SubscriptionOptionsMarkets;
1709
+ mints?: SubscriptionOptionsMints;
1710
+ pools?: SubscriptionOptionsPools;
1711
+ wallet?: SubscriptionOptionsWallet;
1712
+ }
1713
+ interface SwapQuoteByInputDto {
1714
+ /** Unsigned 64-bit integer encoded as a decimal string */
1715
+ estimatedAmountOut: bigint;
1716
+ /** Unsigned 64-bit integer encoded as a decimal string */
1717
+ feeAmount: bigint;
1718
+ feeUsd: number;
1719
+ /** Unsigned 64-bit integer encoded as a decimal string */
1720
+ minAmountOut: bigint;
1721
+ /** Price impact in percents */
1722
+ priceImpact: number;
1723
+ }
1724
+ interface SwapQuoteByOutputDto {
1725
+ /** Unsigned 64-bit integer encoded as a decimal string */
1726
+ estimatedAmountIn: bigint;
1727
+ /** Unsigned 64-bit integer encoded as a decimal string */
1728
+ feeAmount: bigint;
1729
+ feeUsd: number;
1730
+ /** Unsigned 64-bit integer encoded as a decimal string */
1731
+ maxAmountIn: bigint;
1732
+ /** Price impact in percents */
1733
+ priceImpact: number;
1734
+ }
1735
+ interface TickDto {
1736
+ index: number;
1737
+ /** Signed 128-bit integer encoded as a decimal string */
1738
+ liquidity: bigint;
1739
+ }
1740
+ interface TokenAmountWithUsd {
1741
+ /** Unsigned 64-bit integer encoded as a decimal string */
1742
+ amount: bigint;
1743
+ usd: number;
1744
+ }
1745
+ interface TradableAmountDto {
1746
+ /** Unsigned 64-bit integer encoded as a decimal string */
1747
+ amount: bigint;
1748
+ usd: number;
1749
+ }
1750
+ type TradeHistoryAction = typeof TradeHistoryAction[keyof typeof TradeHistoryAction];
1751
+ declare const TradeHistoryAction: {
1752
+ readonly swap: "swap";
1753
+ readonly limitOrderFill: "limit_order_fill";
1754
+ readonly positionIncrease: "position_increase";
1755
+ readonly positionDecrease: "position_decrease";
1756
+ readonly takeProfit: "take_profit";
1757
+ readonly stopLoss: "stop_loss";
1758
+ readonly liquidation: "liquidation";
1759
+ };
1760
+ /**
1761
+ * Filled for swaps (spot)
1762
+ Flatten transaction instruction index
1763
+ */
1764
+ type TradeHistoryEntryDtoIxIndex = number | null;
1765
+ type TradeHistoryEntryDtoPnl = null | TradeHistoryEntryPnlUsd;
1766
+ /**
1767
+ * Filled for swaps (spot) and margin positions
1768
+ */
1769
+ type TradeHistoryEntryDtoTxSignature = string | null;
1770
+ interface TradeHistoryEntryDto {
1771
+ /** Mints (Tokens) Pair direction in pool
1772
+ When TRUE - Base token is Mint A, Quote token is Mint B
1773
+ WHEN FALSE - Base token is Mint B, Quote token is MInt A */
1774
+ aToB: boolean;
1775
+ action: TradeHistoryAction;
1776
+ /** Solana public key (base58) */
1777
+ authority: string;
1778
+ baseToken: TokenAmountWithUsd;
1779
+ /** Positive for taker trades (swaps + spot) and negative for maker trades (limit orders)
1780
+ Measured in quote tokens for limit orders */
1781
+ fee: FeeAmountWithUsd;
1782
+ id: string;
1783
+ /** Filled for swaps (spot)
1784
+ Flatten transaction instruction index */
1785
+ ixIndex?: TradeHistoryEntryDtoIxIndex;
1786
+ pnl?: TradeHistoryEntryDtoPnl;
1787
+ pool: PoolDto;
1788
+ /** Solana public key (base58) */
1789
+ positionAddress?: string;
1790
+ quoteToken: TokenAmountWithUsd;
1791
+ /** Unsigned 64-bit integer encoded as a decimal string */
1792
+ slot: bigint;
1793
+ ts: Date;
1794
+ /** Filled for swaps (spot) and margin positions */
1795
+ txSignature?: TradeHistoryEntryDtoTxSignature;
1796
+ uiDirection: TradeHistoryUIDirection;
1797
+ /** A decimal price based on the action.
1798
+
1799
+ * For spot and margin positions - average execution price excluding the fee.
1800
+ * For limit order fills - price derived from order tick_index. */
1801
+ uiPrice: number;
1802
+ }
1803
+ interface TradeHistoryEntryPnlUsd {
1804
+ bps: number;
1805
+ usd: number;
1806
+ }
1807
+ type TradeHistoryUIDirection = typeof TradeHistoryUIDirection[keyof typeof TradeHistoryUIDirection];
1808
+ declare const TradeHistoryUIDirection: {
1809
+ readonly buy: "buy";
1810
+ readonly sell: "sell";
1811
+ readonly openLong: "open_long";
1812
+ readonly closeLong: "close_long";
1813
+ readonly openShort: "open_short";
1814
+ readonly closeShort: "close_short";
1815
+ };
1816
+ interface TreasuryDto {
1817
+ /** Solana public key (base58) */
1818
+ address: string;
1819
+ apy: number;
1820
+ isStakingEnabled: boolean;
1821
+ isUnstakingEnabled: boolean;
1822
+ isWithdrawEnabled: boolean;
1823
+ /** Solana public key (base58) */
1824
+ rewardTokenMint: string;
1825
+ /** Solana public key (base58) */
1826
+ stakedTokenMint: string;
1827
+ totalReward: TokenAmountWithUsd;
1828
+ totalStaked: TokenAmountWithUsd;
1829
+ /** @minimum 0 */
1830
+ uniqueStakers: number;
1831
+ /**
1832
+ * The minimum required interval in seconds between the last staking and a possible withdrawal.
1833
+ * @minimum 0
1834
+ */
1835
+ unstakeCooldownSeconds: number;
1836
+ }
1837
+ type TunaLpPositionActionCompositeClosedPnlUsd = number | null;
1838
+ type TunaLpPositionActionCompositeCollectedFees = null | TunaLpPositionTransfer;
1839
+ type TunaLpPositionActionCompositeFromLending = null | TunaLpPositionTransfer;
1840
+ type TunaLpPositionActionCompositeFromOwner = null | TunaLpPositionTransfer;
1841
+ type TunaLpPositionActionCompositeFromParameters = null | TunaLpPositionParameters;
1842
+ type TunaLpPositionActionCompositeFromPosition = null | TunaLpPositionValue;
1843
+ type TunaLpPositionActionCompositeParameters = null | TunaLpPositionParameters;
1844
+ type TunaLpPositionActionCompositePosition = null | TunaLpPositionValue;
1845
+ type TunaLpPositionActionCompositePrices = null | TunaLpPositionTokenPrices;
1846
+ type TunaLpPositionActionCompositeProtocolFees = null | TunaLpPositionTransfer;
1847
+ type TunaLpPositionActionCompositeToLending = null | TunaLpPositionTransfer;
1848
+ type TunaLpPositionActionCompositeToOwner = null | TunaLpPositionTransfer;
1849
+ type TunaLpPositionActionCompositeToParameters = null | TunaLpPositionParameters;
1850
+ type TunaLpPositionActionCompositeToPosition = null | TunaLpPositionValue;
1851
+ type TunaLpPositionActionCompositeWithdrawPercent = number | null;
1852
+ interface TunaLpPositionActionComposite {
1853
+ closedPnlUsd?: TunaLpPositionActionCompositeClosedPnlUsd;
1854
+ collectedFees?: TunaLpPositionActionCompositeCollectedFees;
1855
+ fromLending?: TunaLpPositionActionCompositeFromLending;
1856
+ fromOwner?: TunaLpPositionActionCompositeFromOwner;
1857
+ fromParameters?: TunaLpPositionActionCompositeFromParameters;
1858
+ fromPosition?: TunaLpPositionActionCompositeFromPosition;
1859
+ parameters?: TunaLpPositionActionCompositeParameters;
1860
+ position?: TunaLpPositionActionCompositePosition;
1861
+ prices?: TunaLpPositionActionCompositePrices;
1862
+ protocolFees?: TunaLpPositionActionCompositeProtocolFees;
1863
+ toLending?: TunaLpPositionActionCompositeToLending;
1864
+ toOwner?: TunaLpPositionActionCompositeToOwner;
1865
+ toParameters?: TunaLpPositionActionCompositeToParameters;
1866
+ toPosition?: TunaLpPositionActionCompositeToPosition;
1867
+ withdrawPercent?: TunaLpPositionActionCompositeWithdrawPercent;
1868
+ }
1869
+ interface TunaLpPositionActionDto {
1870
+ action: TunaLpPositionsActionType;
1871
+ data: TunaLpPositionActionComposite;
1872
+ txSignature: string;
1873
+ txTimestamp: Date;
1874
+ }
1875
+ type TunaLpPositionAutoCompound = typeof TunaLpPositionAutoCompound[keyof typeof TunaLpPositionAutoCompound];
1876
+ declare const TunaLpPositionAutoCompound: {
1877
+ readonly noAutoCompound: "no_auto_compound";
1878
+ readonly autoCompound: "auto_compound";
1879
+ readonly autoCompoundWithLeverage: "auto_compound_with_leverage";
1880
+ };
1881
+ type TunaLpPositionAutoCompounding = typeof TunaLpPositionAutoCompounding[keyof typeof TunaLpPositionAutoCompounding];
1882
+ declare const TunaLpPositionAutoCompounding: {
1883
+ readonly withLeverage: "with_leverage";
1884
+ readonly withoutLeverage: "without_leverage";
1885
+ };
1886
+ type TunaLpPositionDtoClosedAt = Date | null;
1887
+ type TunaLpPositionDtoExitPrice = number | null;
1888
+ type TunaLpPositionDtoLowerLimitOrder = number | null;
1889
+ type TunaLpPositionDtoUpperLimitOrder = number | null;
1890
+ interface TunaLpPositionDto {
1891
+ /** Solana public key (base58) */
1892
+ authority: string;
1893
+ closedAt?: TunaLpPositionDtoClosedAt;
1894
+ closedPnlSumUsd: number;
1895
+ entryPrice: number;
1896
+ exitPrice?: TunaLpPositionDtoExitPrice;
1897
+ feesSumUsd: number;
1898
+ initialLeverage: number;
1899
+ leverage: number;
1900
+ lowerLimitOrder?: TunaLpPositionDtoLowerLimitOrder;
1901
+ lowerPrice: number;
1902
+ marketMaker: PoolProvider;
1903
+ openedAt: Date;
1904
+ /** Solana public key (base58) */
1905
+ pool: string;
1906
+ /** Solana public key (base58) */
1907
+ positionAddress: string;
1908
+ state: TunaPositionDtoState;
1909
+ totalDepositUsd: number;
1910
+ totalValueUsd: number;
1911
+ totalWithdrawnUsd: number;
1912
+ updatedAt: Date;
1913
+ upperLimitOrder?: TunaLpPositionDtoUpperLimitOrder;
1914
+ upperPrice: number;
1915
+ }
1916
+ type TunaLpPositionFlagsAutoCompounding = null | TunaLpPositionAutoCompounding;
1917
+ type TunaLpPositionFlagsLowerLimitOrderSwapToToken = null | TunaPositionPoolToken;
1918
+ type TunaLpPositionFlagsUpperLimitOrderSwapToToken = null | TunaPositionPoolToken;
1919
+ interface TunaLpPositionFlags {
1920
+ autoCompounding?: TunaLpPositionFlagsAutoCompounding;
1921
+ autoRebalancing: boolean;
1922
+ lowerLimitOrderSwapToToken?: TunaLpPositionFlagsLowerLimitOrderSwapToToken;
1923
+ upperLimitOrderSwapToToken?: TunaLpPositionFlagsUpperLimitOrderSwapToToken;
1924
+ }
1925
+ type TunaLpPositionLimitOrderSwap = typeof TunaLpPositionLimitOrderSwap[keyof typeof TunaLpPositionLimitOrderSwap];
1926
+ declare const TunaLpPositionLimitOrderSwap: {
1927
+ readonly noSwap: "no_swap";
1928
+ readonly swapToTokenA: "swap_to_token_a";
1929
+ readonly swapToTokenB: "swap_to_token_b";
1930
+ };
1931
+ type TunaLpPositionParametersLowerLimitOrder = number | null;
1932
+ type TunaLpPositionParametersUpperLimitOrder = number | null;
1933
+ interface TunaLpPositionParameters {
1934
+ autoCompound: TunaLpPositionAutoCompound;
1935
+ lowerLimitOrder?: TunaLpPositionParametersLowerLimitOrder;
1936
+ lowerLimitOrderSwap: TunaLpPositionLimitOrderSwap;
1937
+ lowerPrice: number;
1938
+ rebalance: TunaLpPositionRebalance;
1939
+ /** @minimum 0 */
1940
+ rebalanceThresholdTicks: number;
1941
+ upperLimitOrder?: TunaLpPositionParametersUpperLimitOrder;
1942
+ upperLimitOrderSwap: TunaLpPositionLimitOrderSwap;
1943
+ upperPrice: number;
1944
+ }
1945
+ type TunaLpPositionRebalance = typeof TunaLpPositionRebalance[keyof typeof TunaLpPositionRebalance];
1946
+ declare const TunaLpPositionRebalance: {
1947
+ readonly noRebalance: "no_rebalance";
1948
+ readonly autoRebalance: "auto_rebalance";
1949
+ };
1950
+ interface TunaLpPositionTokenPrices {
1951
+ tokenPriceA: number;
1952
+ tokenPriceB: number;
1953
+ }
1954
+ interface TunaLpPositionTransfer {
1955
+ amountA: number;
1956
+ amountB: number;
1957
+ amountUsd: number;
1958
+ }
1959
+ interface TunaLpPositionValue {
1960
+ leverage: number;
1961
+ loanFundsA: number;
1962
+ loanFundsB: number;
1963
+ loanFundsUsd: number;
1964
+ totalValueA: number;
1965
+ totalValueB: number;
1966
+ totalValueUsd: number;
1967
+ }
1968
+ type TunaLpPositionsActionType = typeof TunaLpPositionsActionType[keyof typeof TunaLpPositionsActionType];
1969
+ declare const TunaLpPositionsActionType: {
1970
+ readonly openPosition: "open_position";
1971
+ readonly closePosition: "close_position";
1972
+ readonly increaseLiquidity: "increase_liquidity";
1973
+ readonly decreaseLiquidity: "decrease_liquidity";
1974
+ readonly repayDebt: "repay_debt";
1975
+ readonly liquidate: "liquidate";
1976
+ readonly executeLimitOrder: "execute_limit_order";
1977
+ readonly collectFees: "collect_fees";
1978
+ readonly collectRewards: "collect_rewards";
1979
+ readonly collectAndCompoundFees: "collect_and_compound_fees";
1980
+ readonly rebalancePosition: "rebalance_position";
1981
+ readonly setLimitOrders: "set_limit_orders";
1982
+ readonly setFlags: "set_flags";
1983
+ readonly setRebalanceThreshold: "set_rebalance_threshold";
1984
+ };
1985
+ type TunaLpPositionsStatsFusionClosedByLimitOrderCount = number | null;
1986
+ type TunaLpPositionsStatsFusionLiquidatedCount = number | null;
1987
+ type TunaLpPositionsStatsFusionOpenCount = number | null;
1988
+ type TunaLpPositionsStatsOrcaClosedByLimitOrderCount = number | null;
1989
+ type TunaLpPositionsStatsOrcaLiquidatedCount = number | null;
1990
+ type TunaLpPositionsStatsOrcaOpenCount = number | null;
1991
+ interface TunaLpPositionsStats {
1992
+ fusionClosedByLimitOrderCount?: TunaLpPositionsStatsFusionClosedByLimitOrderCount;
1993
+ fusionDebtUsd: number;
1994
+ fusionLiquidatedCount?: TunaLpPositionsStatsFusionLiquidatedCount;
1995
+ fusionOpenCount?: TunaLpPositionsStatsFusionOpenCount;
1996
+ fusionTotalValueUsd: number;
1997
+ orcaClosedByLimitOrderCount?: TunaLpPositionsStatsOrcaClosedByLimitOrderCount;
1998
+ orcaDebtUsd: number;
1999
+ orcaLiquidatedCount?: TunaLpPositionsStatsOrcaLiquidatedCount;
2000
+ orcaOpenCount?: TunaLpPositionsStatsOrcaOpenCount;
2001
+ orcaTotalValueUsd: number;
2002
+ /** Count of positions over 10000$ */
2003
+ over10kCount: number;
2004
+ /** Count of positions over 1000$ */
2005
+ over1kCount: number;
2006
+ time: Date;
2007
+ /** Total positions count */
2008
+ totalCount: number;
2009
+ }
2010
+ type TunaPositionDtoClosedAt = Date | null;
2011
+ interface TunaPositionDto {
2012
+ /** Solana public key (base58) */
2013
+ address: string;
2014
+ /** Solana public key (base58) */
2015
+ authority: string;
2016
+ closedAt?: TunaPositionDtoClosedAt;
2017
+ compoundedYieldA: TokenAmountWithUsd;
2018
+ compoundedYieldB: TokenAmountWithUsd;
2019
+ currentDebtA: TokenAmountWithUsd;
2020
+ currentDebtB: TokenAmountWithUsd;
2021
+ depositedCollateralA: TunaPositionTokenDepositedCollateral;
2022
+ depositedCollateralB: TunaPositionTokenDepositedCollateral;
2023
+ entryPrice: number;
2024
+ flags: TunaLpPositionFlags;
2025
+ initialDebtA: TokenAmountWithUsd;
2026
+ initialDebtB: TokenAmountWithUsd;
2027
+ leftoversA: TokenAmountWithUsd;
2028
+ leftoversB: TokenAmountWithUsd;
2029
+ leverage: number;
2030
+ liquidationPriceLower: number;
2031
+ liquidationPriceUpper: number;
2032
+ /** Unsigned 128-bit integer encoded as a decimal string */
2033
+ liquidity: bigint;
2034
+ lowerLimitOrderPrice: number;
2035
+ marketMaker: TunaPositionMarketMaker;
2036
+ maxLeverage: number;
2037
+ openedAt: Date;
2038
+ /** Total PnL denominated/expressed in token A */
2039
+ pnlA: TunaPositionTokenPnl;
2040
+ /** Total PnL denominated/expressed in token B */
2041
+ pnlB: TunaPositionTokenPnl;
2042
+ pnlUsd: TunaPositionUsdPnl;
2043
+ pool: PoolDto;
2044
+ /** Solana public key (base58) */
2045
+ positionMint: string;
2046
+ state: TunaPositionDtoState;
2047
+ tickLowerIndex: number;
2048
+ tickUpperIndex: number;
2049
+ totalA: TokenAmountWithUsd;
2050
+ totalB: TokenAmountWithUsd;
2051
+ upperLimitOrderPrice: number;
2052
+ /** @minimum 0 */
2053
+ version: number;
2054
+ yieldA: TokenAmountWithUsd;
2055
+ yieldB: TokenAmountWithUsd;
2056
+ }
2057
+ type TunaPositionDtoState = typeof TunaPositionDtoState[keyof typeof TunaPositionDtoState];
2058
+ declare const TunaPositionDtoState: {
2059
+ readonly open: "open";
2060
+ readonly liquidated: "liquidated";
2061
+ readonly closedByLimitOrder: "closed_by_limit_order";
2062
+ readonly closed: "closed";
2063
+ };
2064
+ type TunaPositionMarketMaker = typeof TunaPositionMarketMaker[keyof typeof TunaPositionMarketMaker];
2065
+ declare const TunaPositionMarketMaker: {
2066
+ readonly fusion: "fusion";
2067
+ readonly orca: "orca";
2068
+ };
2069
+ type TunaPositionPoolToken = typeof TunaPositionPoolToken[keyof typeof TunaPositionPoolToken];
2070
+ declare const TunaPositionPoolToken: {
2071
+ readonly a: "a";
2072
+ readonly b: "b";
2073
+ };
2074
+ interface TunaPositionTokenDepositedCollateral {
2075
+ /** Signed 128-bit integer encoded as a decimal string */
2076
+ amount: bigint;
2077
+ usd: number;
2078
+ }
2079
+ interface TunaPositionTokenPnl {
2080
+ /** Signed 128-bit integer encoded as a decimal string */
2081
+ amount: bigint;
2082
+ rate: number;
2083
+ }
2084
+ interface TunaPositionUsdPnl {
2085
+ amount: number;
2086
+ rate: number;
2087
+ }
2088
+ type TunaSpotPositionDtoClosedAt = Date | null;
2089
+ interface TunaSpotPositionDto {
2090
+ /** Solana public key (base58) */
2091
+ address: string;
2092
+ /** Solana public key (base58) */
2093
+ authority: string;
2094
+ closedAt?: TunaSpotPositionDtoClosedAt;
2095
+ collateralToken: TunaPositionPoolToken;
2096
+ currentDebt: TokenAmountWithUsd;
2097
+ depositedCollateral: TokenAmountWithUsd;
2098
+ entryPrice: number;
2099
+ initialDebt: TokenAmountWithUsd;
2100
+ leverage: number;
2101
+ liquidationPrice: number;
2102
+ lowerLimitOrderPrice: number;
2103
+ marketMaker: TunaPositionMarketMaker;
2104
+ maxLeverage: number;
2105
+ openedAt: Date;
2106
+ pnlUsd: TunaPositionUsdPnl;
2107
+ pool: PoolDto;
2108
+ positionToken: TunaPositionPoolToken;
2109
+ state: TunaSpotPositionDtoState;
2110
+ total: TokenAmountWithUsd;
2111
+ upperLimitOrderPrice: number;
2112
+ /** @minimum 0 */
2113
+ version: number;
2114
+ }
2115
+ type TunaSpotPositionDtoState = typeof TunaSpotPositionDtoState[keyof typeof TunaSpotPositionDtoState];
2116
+ declare const TunaSpotPositionDtoState: {
2117
+ readonly open: "open";
2118
+ readonly closed: "closed";
2119
+ };
2120
+ interface VaultDto {
2121
+ /** Solana public key (base58) */
2122
+ address: string;
2123
+ borrowApy: number;
2124
+ borrowedFunds: TokenAmountWithUsd;
2125
+ /** Unsigned 64-bit integer encoded as a decimal string */
2126
+ borrowedShares: bigint;
2127
+ depositedFunds: TokenAmountWithUsd;
2128
+ /** Unsigned 64-bit integer encoded as a decimal string */
2129
+ depositedShares: bigint;
2130
+ /** Unsigned 64-bit integer encoded as a decimal string */
2131
+ interestRate: bigint;
2132
+ /** Solana public key (base58) */
2133
+ mint: string;
2134
+ /** Solana public key (base58) */
2135
+ pythOracleFeedId: string;
2136
+ /** Solana public key (base58) */
2137
+ pythOraclePriceUpdate: string;
2138
+ supplyApy: number;
2139
+ supplyLimit: TokenAmountWithUsd;
2140
+ utilization: number;
2141
+ }
2142
+ interface VaultStatsDto {
2143
+ borrow: TokenAmountWithUsd;
2144
+ borrowApr: number;
2145
+ date: Date;
2146
+ supply: TokenAmountWithUsd;
2147
+ supplyApy: number;
2148
+ }
2149
+ /**
2150
+ * The timestamp when the position has been locked
2151
+ */
2152
+ type VestingDtoLockedAt = Date | null;
2153
+ interface VestingDto {
2154
+ /** Amount of locked tokens remaining */
2155
+ locked: TokenAmountWithUsd;
2156
+ /** The timestamp when the position has been locked */
2157
+ lockedAt?: VestingDtoLockedAt;
2158
+ /**
2159
+ * The period in seconds after which the unlock starts. The first unlock occurs after 'locked_at (timestamp) + unlock_cliff_seconds + unlock_every_seconds'
2160
+ * @minimum 0
2161
+ */
2162
+ unlockCliffSeconds: number;
2163
+ /**
2164
+ * How often tokens are unlocked in seconds
2165
+ * @minimum 0
2166
+ */
2167
+ unlockEverySeconds: number;
2168
+ /** Unsigned 64-bit integer encoded as a decimal string */
2169
+ unlockRate: bigint;
2170
+ /** Amount of tokens unlocked since the beginning of lock */
2171
+ unlocked: TokenAmountWithUsd;
2172
+ }
2173
+ interface WalletSubscription {
2174
+ address: string;
2175
+ topics: WalletSubscriptionTopic[];
2176
+ }
2177
+ type WalletSubscriptionTopic = typeof WalletSubscriptionTopic[keyof typeof WalletSubscriptionTopic];
2178
+ declare const WalletSubscriptionTopic: {
2179
+ readonly tunaPositions: "tuna_positions";
2180
+ readonly tunaSpotPositions: "tuna_spot_positions";
2181
+ readonly lendingPositions: "lending_positions";
2182
+ readonly fusionLimitOrders: "fusion_limit_orders";
2183
+ readonly stakingPosition: "staking_position";
2184
+ readonly tradeHistory: "trade_history";
2185
+ readonly orderHistory: "order_history";
2186
+ };
2187
+ type GetLpSpotLeaderboardParams = {
2188
+ /**
2189
+ * Period of time to consider (default: week)
2190
+ */
2191
+ period?: LeaderboardPeriod;
2192
+ /**
2193
+ * Sort by profit or percent (default: percent)
2194
+ */
2195
+ sortBy?: LeaderboardSortBy;
2196
+ /**
2197
+ * Search by authority address (default: None)
2198
+ */
2199
+ search?: string;
2200
+ /**
2201
+ * Page in the leaderboard (default: 1)
2202
+ * @minimum 0
2203
+ */
2204
+ page?: number;
2205
+ /**
2206
+ * Page size of the leaderboard (default: 10)
2207
+ * @minimum 0
2208
+ */
2209
+ pageSize?: number;
2210
+ };
2211
+ type GetPoolsParams = {
2212
+ provider?: string;
2213
+ };
2214
+ type GetPoolCandlesParams = {
2215
+ from: Date;
2216
+ to: Date;
2217
+ /**
2218
+ * @minimum 0
2219
+ */
2220
+ candles: number;
2221
+ interval: string;
2222
+ };
2223
+ type GetPoolOrderBookParams = {
2224
+ priceStep: number;
2225
+ inverted?: boolean;
2226
+ };
2227
+ type GetCloseSpotPositionQuoteParams = {
2228
+ /**
2229
+ * Solana public key (base58)
2230
+ */
2231
+ market?: string;
2232
+ /**
2233
+ * @minimum 0
2234
+ */
2235
+ decreasePercent: number;
2236
+ /**
2237
+ * @minimum 0
2238
+ */
2239
+ collateralToken: number;
2240
+ /**
2241
+ * @minimum 0
2242
+ */
2243
+ slippageTolerance?: number;
2244
+ /**
2245
+ * @minimum 0
2246
+ */
2247
+ positionToken: number;
2248
+ /**
2249
+ * @minimum 0
2250
+ */
2251
+ positionAmount: bigint;
2252
+ /**
2253
+ * @minimum 0
2254
+ */
2255
+ positionDebt: bigint;
2256
+ };
2257
+ type GetDecreaseSpotPositionQuoteParams = {
2258
+ /**
2259
+ * Solana public key (base58)
2260
+ */
2261
+ market?: string;
2262
+ /**
2263
+ * @minimum 0
2264
+ */
2265
+ decreaseAmount: bigint;
2266
+ /**
2267
+ * @minimum 0
2268
+ */
2269
+ collateralToken: number;
2270
+ leverage: number;
2271
+ reduceOnly?: boolean;
2272
+ /**
2273
+ * @minimum 0
2274
+ */
2275
+ slippageTolerance?: number;
2276
+ /**
2277
+ * @minimum 0
2278
+ */
2279
+ positionToken: number;
2280
+ /**
2281
+ * @minimum 0
2282
+ */
2283
+ positionAmount: bigint;
2284
+ /**
2285
+ * @minimum 0
2286
+ */
2287
+ positionDebt: bigint;
2288
+ };
2289
+ type GetIncreaseSpotPositionQuoteParams = {
2290
+ /**
2291
+ * Solana public key (base58)
2292
+ */
2293
+ market?: string;
2294
+ /**
2295
+ * @minimum 0
2296
+ */
2297
+ increaseAmount: bigint;
2298
+ /**
2299
+ * @minimum 0
2300
+ */
2301
+ collateralToken: number;
2302
+ /**
2303
+ * @minimum 0
2304
+ */
2305
+ positionToken: number;
2306
+ leverage: number;
2307
+ /**
2308
+ * @minimum 0
2309
+ */
2310
+ slippageTolerance?: number;
2311
+ /**
2312
+ * @minimum 0
2313
+ */
2314
+ positionAmount?: bigint;
2315
+ /**
2316
+ * @minimum 0
2317
+ */
2318
+ positionDebt?: bigint;
2319
+ };
2320
+ type GetLimitOrderQuoteByInputParams = {
2321
+ /**
2322
+ * Solana public key (base58)
2323
+ */
2324
+ pool?: string;
2325
+ /**
2326
+ * @minimum 0
2327
+ */
2328
+ amountIn: bigint;
2329
+ aToB: boolean;
2330
+ tickIndex: number;
2331
+ };
2332
+ type GetLimitOrderQuoteByOutputParams = {
2333
+ /**
2334
+ * Solana public key (base58)
2335
+ */
2336
+ pool?: string;
2337
+ /**
2338
+ * @minimum 0
2339
+ */
2340
+ amountOut: bigint;
2341
+ aToB: boolean;
2342
+ tickIndex: number;
2343
+ };
2344
+ type GetSwapQuoteByInputParams = {
2345
+ /**
2346
+ * Solana public key (base58)
2347
+ */
2348
+ pool?: string;
2349
+ /**
2350
+ * @minimum 0
2351
+ */
2352
+ amountIn: bigint;
2353
+ aToB: boolean;
2354
+ /**
2355
+ * @minimum 0
2356
+ */
2357
+ slippageTolerance?: number;
2358
+ };
2359
+ type GetSwapQuoteByOutputParams = {
2360
+ /**
2361
+ * Solana public key (base58)
2362
+ */
2363
+ pool?: string;
2364
+ /**
2365
+ * @minimum 0
2366
+ */
2367
+ amountOut: bigint;
2368
+ aToB: boolean;
2369
+ /**
2370
+ * @minimum 0
2371
+ */
2372
+ slippageTolerance?: number;
2373
+ };
2374
+ type GetTradableAmountParams = {
2375
+ /**
2376
+ * Solana public key (base58)
2377
+ */
2378
+ market?: string;
2379
+ /**
2380
+ * @minimum 0
2381
+ */
2382
+ collateralToken: number;
2383
+ /**
2384
+ * @minimum 0
2385
+ */
2386
+ availableBalance: bigint;
2387
+ leverage: number;
2388
+ /**
2389
+ * @minimum 0
2390
+ */
2391
+ positionToken: number;
2392
+ /**
2393
+ * @minimum 0
2394
+ */
2395
+ positionAmount: bigint;
2396
+ increase: boolean;
2397
+ };
2398
+ type GetStakingLeaderboardParams = {
2399
+ /**
2400
+ * @minimum 0
2401
+ */
2402
+ page?: number;
2403
+ /**
2404
+ * @minimum 0
2405
+ */
2406
+ pageSize?: number;
2407
+ search?: string;
2408
+ };
2409
+ type GetFeesStatsParams = {
2410
+ from: Date;
2411
+ to: Date;
2412
+ interval?: string;
2413
+ };
2414
+ type GetFusionFeesStatsParams = {
2415
+ from: Date;
2416
+ to: Date;
2417
+ interval?: string;
2418
+ };
2419
+ type GetPositionsStatsParams = {
2420
+ from: Date;
2421
+ to: Date;
2422
+ /**
2423
+ * This is a bugfix for Orval code generation.
2424
+ When handling query parameters, Orval generates a function where all variables are checked uniformly:
2425
+ values of type `Date` are converted using `toISOString()`, and everything else is converted using `toString()`.
2426
+ */
2427
+ Unused?: string;
2428
+ };
2429
+ type GetStakingRevenueStatsParams = {
2430
+ from: string;
2431
+ to: string;
2432
+ };
2433
+ type GetLimitOrdersParams = {
2434
+ /**
2435
+ * List of pool public keys to filter by
2436
+ */
2437
+ pool?: string[];
2438
+ /**
2439
+ * List of limit order statuses to filter by
2440
+ */
2441
+ status?: LimitOrderStatus[];
2442
+ /**
2443
+ * Filter limit orders from timestamp (Unix timestamp format)
2444
+ */
2445
+ openedAtFrom?: bigint;
2446
+ /**
2447
+ * Filter limit orders to timestamp (Unix timestamp format)
2448
+ */
2449
+ openedAtTo?: bigint;
2450
+ /**
2451
+ * Cursor for pagination (id field)
2452
+ */
2453
+ cursor?: string;
2454
+ /**
2455
+ * Descending order flag (default: true)
2456
+ */
2457
+ desc?: boolean;
2458
+ /**
2459
+ * Limit number of returned limit orders (default: 100, max: 500)
2460
+ * @minimum 0
2461
+ */
2462
+ limit?: number;
2463
+ };
2464
+ type GetLpPositionsParams = {
2465
+ /**
2466
+ * Filter by state
2467
+ */
2468
+ filter?: LpPositionsHistoryQueryFilter;
2469
+ /**
2470
+ * Address of the position after which to start fetching results
2471
+ */
2472
+ afterPosition?: string;
2473
+ /**
2474
+ * Minimal opened at time
2475
+ */
2476
+ openedAtMin?: Date;
2477
+ /**
2478
+ * Maximal opened at time
2479
+ */
2480
+ openedAtMax?: Date;
2481
+ /**
2482
+ * Minimal closed at time
2483
+ */
2484
+ closedAtMin?: Date;
2485
+ /**
2486
+ * Maximal closed at time
2487
+ */
2488
+ closedAtMax?: Date;
2489
+ /**
2490
+ * Limit the number of results returned (default: 1000, max: 1000)
2491
+ * @minimum 0
2492
+ */
2493
+ limit?: number;
2494
+ };
2495
+ type GetOrderHistoryParams = {
2496
+ pool?: string[];
2497
+ orderType?: OrderHistoryType[];
2498
+ uiDirection?: OrderHistoryUIDirection[];
2499
+ /**
2500
+ * Cursor is the pagination point to start fetching from.
2501
+
2502
+ - Descending (asc = false): Returns records with ts <= cursor (i.e. earlier or at).
2503
+ - Ascending (asc = true): Returns records with ts >= cursor (i.e. later or at).
2504
+ */
2505
+ cursor?: string;
2506
+ /**
2507
+ * "Until" is an optional range limit to trim the results.
2508
+
2509
+ - Descending: Only includes records with ts >= until (i.e. not too old).
2510
+ - Ascending: Only includes records with ts <= until (i.e. not too new).
2511
+ */
2512
+ until?: string;
2513
+ /**
2514
+ * Desc defines the sort direction of results.
2515
+
2516
+ - If false: Ascending (oldest → newest).
2517
+ - If true: Descending (newest → oldest, default).
2518
+ */
2519
+ desc?: boolean;
2520
+ /**
2521
+ * Limit defines the maximum number of results to return (default: 100, max: 500)
2522
+ * @minimum 0
2523
+ */
2524
+ limit?: number;
2525
+ };
2526
+ type GetTradeHistoryParams = {
2527
+ pool?: string[];
2528
+ action?: TradeHistoryAction[];
2529
+ uiDirection?: TradeHistoryUIDirection[];
2530
+ /**
2531
+ * Cursor is the pagination point to start fetching from.
2532
+
2533
+ - Descending (asc = false): Returns records with ts <= cursor (i.e. earlier or at).
2534
+ - Ascending (asc = true): Returns records with ts >= cursor (i.e. later or at).
2535
+ */
2536
+ cursor?: string;
2537
+ /**
2538
+ * "Until" is an optional range limit to trim the results.
2539
+
2540
+ - Descending: Only includes records with ts >= until (i.e. not too old).
2541
+ - Ascending: Only includes records with ts <= until (i.e. not too new).
2542
+ */
2543
+ until?: string;
2544
+ /**
2545
+ * Desc defines the sort direction of results.
2546
+
2547
+ - If false: Ascending (oldest → newest).
2548
+ - If true: Descending (newest → oldest, default).
2549
+ */
2550
+ desc?: boolean;
2551
+ /**
2552
+ * Limit defines the maximum number of results to return (default: 100, max: 500)
2553
+ * @minimum 0
2554
+ */
2555
+ limit?: number;
2556
+ };
2557
+ type GetVaultHistoryParams = {
2558
+ from: string;
2559
+ to: string;
2560
+ };
2561
+ /**
2562
+ * @summary Request LP and Spot leaderboard
2563
+ */
2564
+ type getLpSpotLeaderboardResponse200 = {
2565
+ data: GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMeta;
2566
+ status: 200;
2567
+ };
2568
+ type getLpSpotLeaderboardResponse400 = {
2569
+ data: void;
2570
+ status: 400;
2571
+ };
2572
+ type getLpSpotLeaderboardResponse500 = {
2573
+ data: void;
2574
+ status: 500;
2575
+ };
2576
+ type getLpSpotLeaderboardResponseSuccess = (getLpSpotLeaderboardResponse200) & {
2577
+ headers: Headers;
2578
+ };
2579
+ type getLpSpotLeaderboardResponseError = (getLpSpotLeaderboardResponse400 | getLpSpotLeaderboardResponse500) & {
2580
+ headers: Headers;
2581
+ };
2582
+ type getLpSpotLeaderboardResponse = (getLpSpotLeaderboardResponseSuccess | getLpSpotLeaderboardResponseError);
2583
+ declare const getGetLpSpotLeaderboardUrl: (params?: GetLpSpotLeaderboardParams) => string;
2584
+ declare const getLpSpotLeaderboard: (params?: GetLpSpotLeaderboardParams, options?: RequestInit) => Promise<getLpSpotLeaderboardResponse>;
2585
+ /**
2586
+ * @summary Request all markets
2587
+ */
2588
+ type getMarketsResponse200 = {
2589
+ data: GenericHttpResponseVecMarketDto;
2590
+ status: 200;
2591
+ };
2592
+ type getMarketsResponse500 = {
2593
+ data: void;
2594
+ status: 500;
2595
+ };
2596
+ type getMarketsResponseSuccess = (getMarketsResponse200) & {
2597
+ headers: Headers;
2598
+ };
2599
+ type getMarketsResponseError = (getMarketsResponse500) & {
2600
+ headers: Headers;
2601
+ };
2602
+ type getMarketsResponse = (getMarketsResponseSuccess | getMarketsResponseError);
2603
+ declare const getGetMarketsUrl: () => string;
2604
+ declare const getMarkets: (options?: RequestInit) => Promise<getMarketsResponse>;
2605
+ /**
2606
+ * @summary Request market data
2607
+ */
2608
+ type getMarketResponse200 = {
2609
+ data: GenericHttpResponseMarketDto;
2610
+ status: 200;
2611
+ };
2612
+ type getMarketResponse400 = {
2613
+ data: void;
2614
+ status: 400;
2615
+ };
2616
+ type getMarketResponse404 = {
2617
+ data: void;
2618
+ status: 404;
2619
+ };
2620
+ type getMarketResponse500 = {
2621
+ data: void;
2622
+ status: 500;
2623
+ };
2624
+ type getMarketResponseSuccess = (getMarketResponse200) & {
2625
+ headers: Headers;
2626
+ };
2627
+ type getMarketResponseError = (getMarketResponse400 | getMarketResponse404 | getMarketResponse500) & {
2628
+ headers: Headers;
2629
+ };
2630
+ type getMarketResponse = (getMarketResponseSuccess | getMarketResponseError);
2631
+ declare const getGetMarketUrl: (marketAddress: string) => string;
2632
+ declare const getMarket: (marketAddress: string, options?: RequestInit) => Promise<getMarketResponse>;
2633
+ /**
2634
+ * @summary Request all mints
2635
+ */
2636
+ type getMintsResponse200 = {
2637
+ data: GenericHttpResponseVecMintDto;
2638
+ status: 200;
2639
+ };
2640
+ type getMintsResponse500 = {
2641
+ data: void;
2642
+ status: 500;
2643
+ };
2644
+ type getMintsResponseSuccess = (getMintsResponse200) & {
2645
+ headers: Headers;
2646
+ };
2647
+ type getMintsResponseError = (getMintsResponse500) & {
2648
+ headers: Headers;
2649
+ };
2650
+ type getMintsResponse = (getMintsResponseSuccess | getMintsResponseError);
2651
+ declare const getGetMintsUrl: () => string;
2652
+ declare const getMints: (options?: RequestInit) => Promise<getMintsResponse>;
2653
+ /**
2654
+ * @summary Request mint data
2655
+ */
2656
+ type getMintResponse200 = {
2657
+ data: GenericHttpResponseMintDto;
2658
+ status: 200;
2659
+ };
2660
+ type getMintResponse400 = {
2661
+ data: void;
2662
+ status: 400;
2663
+ };
2664
+ type getMintResponse404 = {
2665
+ data: void;
2666
+ status: 404;
2667
+ };
2668
+ type getMintResponse500 = {
2669
+ data: void;
2670
+ status: 500;
2671
+ };
2672
+ type getMintResponseSuccess = (getMintResponse200) & {
2673
+ headers: Headers;
2674
+ };
2675
+ type getMintResponseError = (getMintResponse400 | getMintResponse404 | getMintResponse500) & {
2676
+ headers: Headers;
2677
+ };
2678
+ type getMintResponse = (getMintResponseSuccess | getMintResponseError);
2679
+ declare const getGetMintUrl: (mintAddress: string) => string;
2680
+ declare const getMint: (mintAddress: string, options?: RequestInit) => Promise<getMintResponse>;
2681
+ /**
2682
+ * @summary Request all Oracle prices
2683
+ */
2684
+ type getOraclePricesResponse200 = {
2685
+ data: GenericHttpResponseVecOraclePriceDto;
2686
+ status: 200;
2687
+ };
2688
+ type getOraclePricesResponse500 = {
2689
+ data: void;
2690
+ status: 500;
2691
+ };
2692
+ type getOraclePricesResponseSuccess = (getOraclePricesResponse200) & {
2693
+ headers: Headers;
2694
+ };
2695
+ type getOraclePricesResponseError = (getOraclePricesResponse500) & {
2696
+ headers: Headers;
2697
+ };
2698
+ type getOraclePricesResponse = (getOraclePricesResponseSuccess | getOraclePricesResponseError);
2699
+ declare const getGetOraclePricesUrl: () => string;
2700
+ declare const getOraclePrices: (options?: RequestInit) => Promise<getOraclePricesResponse>;
2701
+ /**
2702
+ * @summary Request Oracle price for mint
2703
+ */
2704
+ type getOraclePriceResponse200 = {
2705
+ data: GenericHttpResponseOraclePriceDto;
2706
+ status: 200;
2707
+ };
2708
+ type getOraclePriceResponse400 = {
2709
+ data: void;
2710
+ status: 400;
2711
+ };
2712
+ type getOraclePriceResponse404 = {
2713
+ data: void;
2714
+ status: 404;
2715
+ };
2716
+ type getOraclePriceResponse500 = {
2717
+ data: void;
2718
+ status: 500;
2719
+ };
2720
+ type getOraclePriceResponseSuccess = (getOraclePriceResponse200) & {
2721
+ headers: Headers;
2722
+ };
2723
+ type getOraclePriceResponseError = (getOraclePriceResponse400 | getOraclePriceResponse404 | getOraclePriceResponse500) & {
2724
+ headers: Headers;
2725
+ };
2726
+ type getOraclePriceResponse = (getOraclePriceResponseSuccess | getOraclePriceResponseError);
2727
+ declare const getGetOraclePriceUrl: (mintAddress: string) => string;
2728
+ declare const getOraclePrice: (mintAddress: string, options?: RequestInit) => Promise<getOraclePriceResponse>;
2729
+ /**
2730
+ * @summary Request all pools
2731
+ */
2732
+ type getPoolsResponse200 = {
2733
+ data: GenericHttpResponseVecPoolDto;
2734
+ status: 200;
2735
+ };
2736
+ type getPoolsResponse500 = {
2737
+ data: void;
2738
+ status: 500;
2739
+ };
2740
+ type getPoolsResponseSuccess = (getPoolsResponse200) & {
2741
+ headers: Headers;
2742
+ };
2743
+ type getPoolsResponseError = (getPoolsResponse500) & {
2744
+ headers: Headers;
2745
+ };
2746
+ type getPoolsResponse = (getPoolsResponseSuccess | getPoolsResponseError);
2747
+ declare const getGetPoolsUrl: (params?: GetPoolsParams) => string;
2748
+ declare const getPools: (params?: GetPoolsParams, options?: RequestInit) => Promise<getPoolsResponse>;
2749
+ /**
2750
+ * @summary Request pool data
2751
+ */
2752
+ type getPoolResponse200 = {
2753
+ data: GenericHttpResponsePoolDto;
2754
+ status: 200;
2755
+ };
2756
+ type getPoolResponse400 = {
2757
+ data: void;
2758
+ status: 400;
2759
+ };
2760
+ type getPoolResponse404 = {
2761
+ data: void;
2762
+ status: 404;
2763
+ };
2764
+ type getPoolResponse500 = {
2765
+ data: void;
2766
+ status: 500;
2767
+ };
2768
+ type getPoolResponseSuccess = (getPoolResponse200) & {
2769
+ headers: Headers;
2770
+ };
2771
+ type getPoolResponseError = (getPoolResponse400 | getPoolResponse404 | getPoolResponse500) & {
2772
+ headers: Headers;
2773
+ };
2774
+ type getPoolResponse = (getPoolResponseSuccess | getPoolResponseError);
2775
+ declare const getGetPoolUrl: (poolAddress: string) => string;
2776
+ declare const getPool: (poolAddress: string, options?: RequestInit) => Promise<getPoolResponse>;
2777
+ /**
2778
+ * @summary Request pool candles
2779
+ */
2780
+ type getPoolCandlesResponse200 = {
2781
+ data: GenericHttpResponseVecPoolPriceCandleDto;
2782
+ status: 200;
2783
+ };
2784
+ type getPoolCandlesResponse400 = {
2785
+ data: void;
2786
+ status: 400;
2787
+ };
2788
+ type getPoolCandlesResponse500 = {
2789
+ data: void;
2790
+ status: 500;
2791
+ };
2792
+ type getPoolCandlesResponseSuccess = (getPoolCandlesResponse200) & {
2793
+ headers: Headers;
2794
+ };
2795
+ type getPoolCandlesResponseError = (getPoolCandlesResponse400 | getPoolCandlesResponse500) & {
2796
+ headers: Headers;
2797
+ };
2798
+ type getPoolCandlesResponse = (getPoolCandlesResponseSuccess | getPoolCandlesResponseError);
2799
+ declare const getGetPoolCandlesUrl: (poolAddress: string, params: GetPoolCandlesParams) => string;
2800
+ declare const getPoolCandles: (poolAddress: string, params: GetPoolCandlesParams, options?: RequestInit) => Promise<getPoolCandlesResponse>;
2801
+ /**
2802
+ * @summary Request pool order book
2803
+ */
2804
+ type getPoolOrderBookResponse200 = {
2805
+ data: GenericHttpResponseOrderBookDto;
2806
+ status: 200;
2807
+ };
2808
+ type getPoolOrderBookResponse400 = {
2809
+ data: void;
2810
+ status: 400;
2811
+ };
2812
+ type getPoolOrderBookResponse404 = {
2813
+ data: void;
2814
+ status: 404;
2815
+ };
2816
+ type getPoolOrderBookResponse500 = {
2817
+ data: void;
2818
+ status: 500;
2819
+ };
2820
+ type getPoolOrderBookResponseSuccess = (getPoolOrderBookResponse200) & {
2821
+ headers: Headers;
2822
+ };
2823
+ type getPoolOrderBookResponseError = (getPoolOrderBookResponse400 | getPoolOrderBookResponse404 | getPoolOrderBookResponse500) & {
2824
+ headers: Headers;
2825
+ };
2826
+ type getPoolOrderBookResponse = (getPoolOrderBookResponseSuccess | getPoolOrderBookResponseError);
2827
+ declare const getGetPoolOrderBookUrl: (poolAddress: string, params: GetPoolOrderBookParams) => string;
2828
+ declare const getPoolOrderBook: (poolAddress: string, params: GetPoolOrderBookParams, options?: RequestInit) => Promise<getPoolOrderBookResponse>;
2829
+ /**
2830
+ * @summary Request pool swaps
2831
+ */
2832
+ type getPoolSwapsResponse200 = {
2833
+ data: GenericHttpResponseVecPoolSwapDto;
2834
+ status: 200;
2835
+ };
2836
+ type getPoolSwapsResponse400 = {
2837
+ data: void;
2838
+ status: 400;
2839
+ };
2840
+ type getPoolSwapsResponse404 = {
2841
+ data: void;
2842
+ status: 404;
2843
+ };
2844
+ type getPoolSwapsResponse500 = {
2845
+ data: void;
2846
+ status: 500;
2847
+ };
2848
+ type getPoolSwapsResponseSuccess = (getPoolSwapsResponse200) & {
2849
+ headers: Headers;
2850
+ };
2851
+ type getPoolSwapsResponseError = (getPoolSwapsResponse400 | getPoolSwapsResponse404 | getPoolSwapsResponse500) & {
2852
+ headers: Headers;
2853
+ };
2854
+ type getPoolSwapsResponse = (getPoolSwapsResponseSuccess | getPoolSwapsResponseError);
2855
+ declare const getGetPoolSwapsUrl: (poolAddress: string) => string;
2856
+ declare const getPoolSwaps: (poolAddress: string, options?: RequestInit) => Promise<getPoolSwapsResponse>;
2857
+ /**
2858
+ * @summary Request pool ticks
2859
+ */
2860
+ type getPoolTicksResponse200 = {
2861
+ data: GenericHttpResponsePoolTicksDto;
2862
+ status: 200;
2863
+ };
2864
+ type getPoolTicksResponse400 = {
2865
+ data: void;
2866
+ status: 400;
2867
+ };
2868
+ type getPoolTicksResponse404 = {
2869
+ data: void;
2870
+ status: 404;
2871
+ };
2872
+ type getPoolTicksResponse500 = {
2873
+ data: void;
2874
+ status: 500;
2875
+ };
2876
+ type getPoolTicksResponseSuccess = (getPoolTicksResponse200) & {
2877
+ headers: Headers;
2878
+ };
2879
+ type getPoolTicksResponseError = (getPoolTicksResponse400 | getPoolTicksResponse404 | getPoolTicksResponse500) & {
2880
+ headers: Headers;
2881
+ };
2882
+ type getPoolTicksResponse = (getPoolTicksResponseSuccess | getPoolTicksResponseError);
2883
+ declare const getGetPoolTicksUrl: (poolAddress: string) => string;
2884
+ declare const getPoolTicks: (poolAddress: string, options?: RequestInit) => Promise<getPoolTicksResponse>;
2885
+ /**
2886
+ * @summary Request quote to close spot position
2887
+ */
2888
+ type getCloseSpotPositionQuoteResponse200 = {
2889
+ data: GenericHttpResponseCloseSpotPositionQuoteDto;
2890
+ status: 200;
2891
+ };
2892
+ type getCloseSpotPositionQuoteResponse400 = {
2893
+ data: void;
2894
+ status: 400;
2895
+ };
2896
+ type getCloseSpotPositionQuoteResponseSuccess = (getCloseSpotPositionQuoteResponse200) & {
2897
+ headers: Headers;
2898
+ };
2899
+ type getCloseSpotPositionQuoteResponseError = (getCloseSpotPositionQuoteResponse400) & {
2900
+ headers: Headers;
2901
+ };
2902
+ type getCloseSpotPositionQuoteResponse = (getCloseSpotPositionQuoteResponseSuccess | getCloseSpotPositionQuoteResponseError);
2903
+ declare const getGetCloseSpotPositionQuoteUrl: (params: GetCloseSpotPositionQuoteParams) => string;
2904
+ declare const getCloseSpotPositionQuote: (params: GetCloseSpotPositionQuoteParams, options?: RequestInit) => Promise<getCloseSpotPositionQuoteResponse>;
2905
+ /**
2906
+ * @summary Request quote to decrease spot position
2907
+ */
2908
+ type getDecreaseSpotPositionQuoteResponse200 = {
2909
+ data: GenericHttpResponseDecreaseSpotPositionQuoteDto;
2910
+ status: 200;
2911
+ };
2912
+ type getDecreaseSpotPositionQuoteResponse400 = {
2913
+ data: void;
2914
+ status: 400;
2915
+ };
2916
+ type getDecreaseSpotPositionQuoteResponseSuccess = (getDecreaseSpotPositionQuoteResponse200) & {
2917
+ headers: Headers;
2918
+ };
2919
+ type getDecreaseSpotPositionQuoteResponseError = (getDecreaseSpotPositionQuoteResponse400) & {
2920
+ headers: Headers;
2921
+ };
2922
+ type getDecreaseSpotPositionQuoteResponse = (getDecreaseSpotPositionQuoteResponseSuccess | getDecreaseSpotPositionQuoteResponseError);
2923
+ declare const getGetDecreaseSpotPositionQuoteUrl: (params: GetDecreaseSpotPositionQuoteParams) => string;
2924
+ declare const getDecreaseSpotPositionQuote: (params: GetDecreaseSpotPositionQuoteParams, options?: RequestInit) => Promise<getDecreaseSpotPositionQuoteResponse>;
2925
+ /**
2926
+ * @summary Request quote to increase spot position
2927
+ */
2928
+ type getIncreaseSpotPositionQuoteResponse200 = {
2929
+ data: GenericHttpResponseIncreaseSpotPositionQuoteDto;
2930
+ status: 200;
2931
+ };
2932
+ type getIncreaseSpotPositionQuoteResponse400 = {
2933
+ data: void;
2934
+ status: 400;
2935
+ };
2936
+ type getIncreaseSpotPositionQuoteResponseSuccess = (getIncreaseSpotPositionQuoteResponse200) & {
2937
+ headers: Headers;
2938
+ };
2939
+ type getIncreaseSpotPositionQuoteResponseError = (getIncreaseSpotPositionQuoteResponse400) & {
2940
+ headers: Headers;
2941
+ };
2942
+ type getIncreaseSpotPositionQuoteResponse = (getIncreaseSpotPositionQuoteResponseSuccess | getIncreaseSpotPositionQuoteResponseError);
2943
+ declare const getGetIncreaseSpotPositionQuoteUrl: (params: GetIncreaseSpotPositionQuoteParams) => string;
2944
+ declare const getIncreaseSpotPositionQuote: (params: GetIncreaseSpotPositionQuoteParams, options?: RequestInit) => Promise<getIncreaseSpotPositionQuoteResponse>;
2945
+ /**
2946
+ * @summary Request limit order quote by input amount
2947
+ */
2948
+ type getLimitOrderQuoteByInputResponse200 = {
2949
+ data: GenericHttpResponseLimitOrderQuoteByInputDto;
2950
+ status: 200;
2951
+ };
2952
+ type getLimitOrderQuoteByInputResponse400 = {
2953
+ data: void;
2954
+ status: 400;
2955
+ };
2956
+ type getLimitOrderQuoteByInputResponseSuccess = (getLimitOrderQuoteByInputResponse200) & {
2957
+ headers: Headers;
2958
+ };
2959
+ type getLimitOrderQuoteByInputResponseError = (getLimitOrderQuoteByInputResponse400) & {
2960
+ headers: Headers;
2961
+ };
2962
+ type getLimitOrderQuoteByInputResponse = (getLimitOrderQuoteByInputResponseSuccess | getLimitOrderQuoteByInputResponseError);
2963
+ declare const getGetLimitOrderQuoteByInputUrl: (params: GetLimitOrderQuoteByInputParams) => string;
2964
+ declare const getLimitOrderQuoteByInput: (params: GetLimitOrderQuoteByInputParams, options?: RequestInit) => Promise<getLimitOrderQuoteByInputResponse>;
2965
+ /**
2966
+ * @summary Request limit order quote by output amount
2967
+ */
2968
+ type getLimitOrderQuoteByOutputResponse200 = {
2969
+ data: GenericHttpResponseLimitOrderQuoteByOutputDto;
2970
+ status: 200;
2971
+ };
2972
+ type getLimitOrderQuoteByOutputResponse400 = {
2973
+ data: void;
2974
+ status: 400;
2975
+ };
2976
+ type getLimitOrderQuoteByOutputResponseSuccess = (getLimitOrderQuoteByOutputResponse200) & {
2977
+ headers: Headers;
2978
+ };
2979
+ type getLimitOrderQuoteByOutputResponseError = (getLimitOrderQuoteByOutputResponse400) & {
2980
+ headers: Headers;
2981
+ };
2982
+ type getLimitOrderQuoteByOutputResponse = (getLimitOrderQuoteByOutputResponseSuccess | getLimitOrderQuoteByOutputResponseError);
2983
+ declare const getGetLimitOrderQuoteByOutputUrl: (params: GetLimitOrderQuoteByOutputParams) => string;
2984
+ declare const getLimitOrderQuoteByOutput: (params: GetLimitOrderQuoteByOutputParams, options?: RequestInit) => Promise<getLimitOrderQuoteByOutputResponse>;
2985
+ /**
2986
+ * @summary Request swap quote by input amount
2987
+ */
2988
+ type getSwapQuoteByInputResponse200 = {
2989
+ data: GenericHttpResponseSwapQuoteByInputDto;
2990
+ status: 200;
2991
+ };
2992
+ type getSwapQuoteByInputResponse400 = {
2993
+ data: void;
2994
+ status: 400;
2995
+ };
2996
+ type getSwapQuoteByInputResponseSuccess = (getSwapQuoteByInputResponse200) & {
2997
+ headers: Headers;
2998
+ };
2999
+ type getSwapQuoteByInputResponseError = (getSwapQuoteByInputResponse400) & {
3000
+ headers: Headers;
3001
+ };
3002
+ type getSwapQuoteByInputResponse = (getSwapQuoteByInputResponseSuccess | getSwapQuoteByInputResponseError);
3003
+ declare const getGetSwapQuoteByInputUrl: (params: GetSwapQuoteByInputParams) => string;
3004
+ declare const getSwapQuoteByInput: (params: GetSwapQuoteByInputParams, options?: RequestInit) => Promise<getSwapQuoteByInputResponse>;
3005
+ /**
3006
+ * @summary Request swap quote by output amount
3007
+ */
3008
+ type getSwapQuoteByOutputResponse200 = {
3009
+ data: GenericHttpResponseSwapQuoteByOutputDto;
3010
+ status: 200;
3011
+ };
3012
+ type getSwapQuoteByOutputResponse400 = {
3013
+ data: void;
3014
+ status: 400;
3015
+ };
3016
+ type getSwapQuoteByOutputResponseSuccess = (getSwapQuoteByOutputResponse200) & {
3017
+ headers: Headers;
3018
+ };
3019
+ type getSwapQuoteByOutputResponseError = (getSwapQuoteByOutputResponse400) & {
3020
+ headers: Headers;
3021
+ };
3022
+ type getSwapQuoteByOutputResponse = (getSwapQuoteByOutputResponseSuccess | getSwapQuoteByOutputResponseError);
3023
+ declare const getGetSwapQuoteByOutputUrl: (params: GetSwapQuoteByOutputParams) => string;
3024
+ declare const getSwapQuoteByOutput: (params: GetSwapQuoteByOutputParams, options?: RequestInit) => Promise<getSwapQuoteByOutputResponse>;
3025
+ /**
3026
+ * @summary Request tradeable amount
3027
+ */
3028
+ type getTradableAmountResponse200 = {
3029
+ data: GenericHttpResponseTradableAmountDto;
3030
+ status: 200;
3031
+ };
3032
+ type getTradableAmountResponse400 = {
3033
+ data: void;
3034
+ status: 400;
3035
+ };
3036
+ type getTradableAmountResponseSuccess = (getTradableAmountResponse200) & {
3037
+ headers: Headers;
3038
+ };
3039
+ type getTradableAmountResponseError = (getTradableAmountResponse400) & {
3040
+ headers: Headers;
3041
+ };
3042
+ type getTradableAmountResponse = (getTradableAmountResponseSuccess | getTradableAmountResponseError);
3043
+ declare const getGetTradableAmountUrl: (params: GetTradableAmountParams) => string;
3044
+ declare const getTradableAmount: (params: GetTradableAmountParams, options?: RequestInit) => Promise<getTradableAmountResponse>;
3045
+ /**
3046
+ * @summary Request staking leaderboard
3047
+ */
3048
+ type getStakingLeaderboardResponse200 = {
3049
+ data: GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMeta;
3050
+ status: 200;
3051
+ };
3052
+ type getStakingLeaderboardResponse400 = {
3053
+ data: void;
3054
+ status: 400;
3055
+ };
3056
+ type getStakingLeaderboardResponse500 = {
3057
+ data: void;
3058
+ status: 500;
3059
+ };
3060
+ type getStakingLeaderboardResponseSuccess = (getStakingLeaderboardResponse200) & {
3061
+ headers: Headers;
3062
+ };
3063
+ type getStakingLeaderboardResponseError = (getStakingLeaderboardResponse400 | getStakingLeaderboardResponse500) & {
3064
+ headers: Headers;
3065
+ };
3066
+ type getStakingLeaderboardResponse = (getStakingLeaderboardResponseSuccess | getStakingLeaderboardResponseError);
3067
+ declare const getGetStakingLeaderboardUrl: (params?: GetStakingLeaderboardParams) => string;
3068
+ declare const getStakingLeaderboard: (params?: GetStakingLeaderboardParams, options?: RequestInit) => Promise<getStakingLeaderboardResponse>;
3069
+ /**
3070
+ * @summary Request treasury data
3071
+ */
3072
+ type getStakingTreasuryResponse200 = {
3073
+ data: GenericHttpResponseTreasuryDto;
3074
+ status: 200;
3075
+ };
3076
+ type getStakingTreasuryResponse500 = {
3077
+ data: void;
3078
+ status: 500;
3079
+ };
3080
+ type getStakingTreasuryResponseSuccess = (getStakingTreasuryResponse200) & {
3081
+ headers: Headers;
3082
+ };
3083
+ type getStakingTreasuryResponseError = (getStakingTreasuryResponse500) & {
3084
+ headers: Headers;
3085
+ };
3086
+ type getStakingTreasuryResponse = (getStakingTreasuryResponseSuccess | getStakingTreasuryResponseError);
3087
+ declare const getGetStakingTreasuryUrl: () => string;
3088
+ declare const getStakingTreasury: (options?: RequestInit) => Promise<getStakingTreasuryResponse>;
3089
+ /**
3090
+ * @summary Request historical aggregated data about collected & paid fees
3091
+ */
3092
+ type getFeesStatsResponse200 = {
3093
+ data: GenericHttpResponseVecFeesStatsGroupDto;
3094
+ status: 200;
3095
+ };
3096
+ type getFeesStatsResponse400 = {
3097
+ data: void;
3098
+ status: 400;
3099
+ };
3100
+ type getFeesStatsResponse500 = {
3101
+ data: void;
3102
+ status: 500;
3103
+ };
3104
+ type getFeesStatsResponseSuccess = (getFeesStatsResponse200) & {
3105
+ headers: Headers;
3106
+ };
3107
+ type getFeesStatsResponseError = (getFeesStatsResponse400 | getFeesStatsResponse500) & {
3108
+ headers: Headers;
3109
+ };
3110
+ type getFeesStatsResponse = (getFeesStatsResponseSuccess | getFeesStatsResponseError);
3111
+ declare const getGetFeesStatsUrl: (params: GetFeesStatsParams) => string;
3112
+ declare const getFeesStats: (params: GetFeesStatsParams, options?: RequestInit) => Promise<getFeesStatsResponse>;
3113
+ /**
3114
+ * @summary Request historical aggregated data about Fusion collected & paid fees
3115
+ */
3116
+ type getFusionFeesStatsResponse200 = {
3117
+ data: GenericHttpResponseVecFusionFeesStatsGroupDto;
3118
+ status: 200;
3119
+ };
3120
+ type getFusionFeesStatsResponse400 = {
3121
+ data: void;
3122
+ status: 400;
3123
+ };
3124
+ type getFusionFeesStatsResponse500 = {
3125
+ data: void;
3126
+ status: 500;
3127
+ };
3128
+ type getFusionFeesStatsResponseSuccess = (getFusionFeesStatsResponse200) & {
3129
+ headers: Headers;
3130
+ };
3131
+ type getFusionFeesStatsResponseError = (getFusionFeesStatsResponse400 | getFusionFeesStatsResponse500) & {
3132
+ headers: Headers;
3133
+ };
3134
+ type getFusionFeesStatsResponse = (getFusionFeesStatsResponseSuccess | getFusionFeesStatsResponseError);
3135
+ declare const getGetFusionFeesStatsUrl: (params: GetFusionFeesStatsParams) => string;
3136
+ declare const getFusionFeesStats: (params: GetFusionFeesStatsParams, options?: RequestInit) => Promise<getFusionFeesStatsResponse>;
3137
+ /**
3138
+ * @summary Request historical aggregated data about LP positions
3139
+ */
3140
+ type getPositionsStatsResponse200 = {
3141
+ data: TunaLpPositionsStats[];
3142
+ status: 200;
3143
+ };
3144
+ type getPositionsStatsResponse500 = {
3145
+ data: void;
3146
+ status: 500;
3147
+ };
3148
+ type getPositionsStatsResponseSuccess = (getPositionsStatsResponse200) & {
3149
+ headers: Headers;
3150
+ };
3151
+ type getPositionsStatsResponseError = (getPositionsStatsResponse500) & {
3152
+ headers: Headers;
3153
+ };
3154
+ type getPositionsStatsResponse = (getPositionsStatsResponseSuccess | getPositionsStatsResponseError);
3155
+ declare const getGetPositionsStatsUrl: (params: GetPositionsStatsParams) => string;
3156
+ declare const getPositionsStats: (params: GetPositionsStatsParams, options?: RequestInit) => Promise<getPositionsStatsResponse>;
3157
+ /**
3158
+ * @summary Request total number of LP positions
3159
+ */
3160
+ type getPositionsTotalResponse200 = {
3161
+ data: GenericHttpResponseI64;
3162
+ status: 200;
3163
+ };
3164
+ type getPositionsTotalResponse500 = {
3165
+ data: void;
3166
+ status: 500;
3167
+ };
3168
+ type getPositionsTotalResponseSuccess = (getPositionsTotalResponse200) & {
3169
+ headers: Headers;
3170
+ };
3171
+ type getPositionsTotalResponseError = (getPositionsTotalResponse500) & {
3172
+ headers: Headers;
3173
+ };
3174
+ type getPositionsTotalResponse = (getPositionsTotalResponseSuccess | getPositionsTotalResponseError);
3175
+ declare const getGetPositionsTotalUrl: () => string;
3176
+ declare const getPositionsTotal: (options?: RequestInit) => Promise<getPositionsTotalResponse>;
3177
+ /**
3178
+ * @summary Request daily staking revenue stats
3179
+ */
3180
+ type getStakingRevenueStatsResponse200 = {
3181
+ data: GenericHttpResponseVecStakingDepositsStatsDto;
3182
+ status: 200;
3183
+ };
3184
+ type getStakingRevenueStatsResponse400 = {
3185
+ data: void;
3186
+ status: 400;
3187
+ };
3188
+ type getStakingRevenueStatsResponse500 = {
3189
+ data: void;
3190
+ status: 500;
3191
+ };
3192
+ type getStakingRevenueStatsResponseSuccess = (getStakingRevenueStatsResponse200) & {
3193
+ headers: Headers;
3194
+ };
3195
+ type getStakingRevenueStatsResponseError = (getStakingRevenueStatsResponse400 | getStakingRevenueStatsResponse500) & {
3196
+ headers: Headers;
3197
+ };
3198
+ type getStakingRevenueStatsResponse = (getStakingRevenueStatsResponseSuccess | getStakingRevenueStatsResponseError);
3199
+ declare const getGetStakingRevenueStatsUrl: (params: GetStakingRevenueStatsParams) => string;
3200
+ declare const getStakingRevenueStats: (params: GetStakingRevenueStatsParams, options?: RequestInit) => Promise<getStakingRevenueStatsResponse>;
3201
+ /**
3202
+ * @summary Subscribe for SSE stream
3203
+ */
3204
+ type sseResponse200 = {
3205
+ data: GenericHttpResponseSseResponse;
3206
+ status: 200;
3207
+ };
3208
+ type sseResponse500 = {
3209
+ data: void;
3210
+ status: 500;
3211
+ };
3212
+ type sseResponseSuccess = (sseResponse200) & {
3213
+ headers: Headers;
3214
+ };
3215
+ type sseResponseError = (sseResponse500) & {
3216
+ headers: Headers;
3217
+ };
3218
+ type sseResponse = (sseResponseSuccess | sseResponseError);
3219
+ declare const getSseUrl: () => string;
3220
+ declare const sse: (options?: RequestInit) => Promise<sseResponse>;
3221
+ /**
3222
+ * @summary Update SSE stream subscription
3223
+ */
3224
+ type updateStreamSubscriptionResponse200 = {
3225
+ data: GenericHttpResponseHttpStatusData;
3226
+ status: 200;
3227
+ };
3228
+ type updateStreamSubscriptionResponse400 = {
3229
+ data: void;
3230
+ status: 400;
3231
+ };
3232
+ type updateStreamSubscriptionResponse500 = {
3233
+ data: void;
3234
+ status: 500;
3235
+ };
3236
+ type updateStreamSubscriptionResponseSuccess = (updateStreamSubscriptionResponse200) & {
3237
+ headers: Headers;
3238
+ };
3239
+ type updateStreamSubscriptionResponseError = (updateStreamSubscriptionResponse400 | updateStreamSubscriptionResponse500) & {
3240
+ headers: Headers;
3241
+ };
3242
+ type updateStreamSubscriptionResponse = (updateStreamSubscriptionResponseSuccess | updateStreamSubscriptionResponseError);
3243
+ declare const getUpdateStreamSubscriptionUrl: (streamId: string) => string;
3244
+ declare const updateStreamSubscription: (streamId: string, subscriptionOptions: SubscriptionOptions, options?: RequestInit) => Promise<updateStreamSubscriptionResponse>;
3245
+ /**
3246
+ * @summary Request all user lending positions
3247
+ */
3248
+ type getLendingPositionsResponse200 = {
3249
+ data: GenericHttpResponseVecLendingPositionDto;
3250
+ status: 200;
3251
+ };
3252
+ type getLendingPositionsResponse400 = {
3253
+ data: void;
3254
+ status: 400;
3255
+ };
3256
+ type getLendingPositionsResponse500 = {
3257
+ data: void;
3258
+ status: 500;
3259
+ };
3260
+ type getLendingPositionsResponseSuccess = (getLendingPositionsResponse200) & {
3261
+ headers: Headers;
3262
+ };
3263
+ type getLendingPositionsResponseError = (getLendingPositionsResponse400 | getLendingPositionsResponse500) & {
3264
+ headers: Headers;
3265
+ };
3266
+ type getLendingPositionsResponse = (getLendingPositionsResponseSuccess | getLendingPositionsResponseError);
3267
+ declare const getGetLendingPositionsUrl: (userAddress: string) => string;
3268
+ declare const getLendingPositions: (userAddress: string, options?: RequestInit) => Promise<getLendingPositionsResponse>;
3269
+ /**
3270
+ * @summary Request lending position data by position address
3271
+ */
3272
+ type getLendingPositionResponse200 = {
3273
+ data: GenericHttpResponseOptionLendingPositionDto;
3274
+ status: 200;
3275
+ };
3276
+ type getLendingPositionResponse400 = {
3277
+ data: void;
3278
+ status: 400;
3279
+ };
3280
+ type getLendingPositionResponse500 = {
3281
+ data: void;
3282
+ status: 500;
3283
+ };
3284
+ type getLendingPositionResponseSuccess = (getLendingPositionResponse200) & {
3285
+ headers: Headers;
3286
+ };
3287
+ type getLendingPositionResponseError = (getLendingPositionResponse400 | getLendingPositionResponse500) & {
3288
+ headers: Headers;
3289
+ };
3290
+ type getLendingPositionResponse = (getLendingPositionResponseSuccess | getLendingPositionResponseError);
3291
+ declare const getGetLendingPositionUrl: (userAddress: string, lendingPositionAddress: string) => string;
3292
+ declare const getLendingPosition: (userAddress: string, lendingPositionAddress: string, options?: RequestInit) => Promise<getLendingPositionResponse>;
3293
+ /**
3294
+ * @summary Request all user limit orders
3295
+ */
3296
+ type getLimitOrdersResponse200 = {
3297
+ data: GenericHttpResponseVecLimitOrderDto;
3298
+ status: 200;
3299
+ };
3300
+ type getLimitOrdersResponse400 = {
3301
+ data: void;
3302
+ status: 400;
3303
+ };
3304
+ type getLimitOrdersResponse500 = {
3305
+ data: void;
3306
+ status: 500;
3307
+ };
3308
+ type getLimitOrdersResponseSuccess = (getLimitOrdersResponse200) & {
3309
+ headers: Headers;
3310
+ };
3311
+ type getLimitOrdersResponseError = (getLimitOrdersResponse400 | getLimitOrdersResponse500) & {
3312
+ headers: Headers;
3313
+ };
3314
+ type getLimitOrdersResponse = (getLimitOrdersResponseSuccess | getLimitOrdersResponseError);
3315
+ declare const getGetLimitOrdersUrl: (userAddress: string, params?: GetLimitOrdersParams) => string;
3316
+ declare const getLimitOrders: (userAddress: string, params?: GetLimitOrdersParams, options?: RequestInit) => Promise<getLimitOrdersResponse>;
3317
+ /**
3318
+ * @summary Request limit order data by position address
3319
+ */
3320
+ type getLimitOrderResponse200 = {
3321
+ data: GenericHttpResponseOptionLimitOrderDto;
3322
+ status: 200;
3323
+ };
3324
+ type getLimitOrderResponse400 = {
3325
+ data: void;
3326
+ status: 400;
3327
+ };
3328
+ type getLimitOrderResponse500 = {
3329
+ data: void;
3330
+ status: 500;
3331
+ };
3332
+ type getLimitOrderResponseSuccess = (getLimitOrderResponse200) & {
3333
+ headers: Headers;
3334
+ };
3335
+ type getLimitOrderResponseError = (getLimitOrderResponse400 | getLimitOrderResponse500) & {
3336
+ headers: Headers;
3337
+ };
3338
+ type getLimitOrderResponse = (getLimitOrderResponseSuccess | getLimitOrderResponseError);
3339
+ declare const getGetLimitOrderUrl: (userAddress: string, limitOrderAddress: string) => string;
3340
+ declare const getLimitOrder: (userAddress: string, limitOrderAddress: string, options?: RequestInit) => Promise<getLimitOrderResponse>;
3341
+ /**
3342
+ * @summary Request historical LP positions data
3343
+ */
3344
+ type getLpPositionsResponse200 = {
3345
+ data: GenericHttpResponseVecTunaLpPositionDto;
3346
+ status: 200;
3347
+ };
3348
+ type getLpPositionsResponse400 = {
3349
+ data: void;
3350
+ status: 400;
3351
+ };
3352
+ type getLpPositionsResponse500 = {
3353
+ data: void;
3354
+ status: 500;
3355
+ };
3356
+ type getLpPositionsResponseSuccess = (getLpPositionsResponse200) & {
3357
+ headers: Headers;
3358
+ };
3359
+ type getLpPositionsResponseError = (getLpPositionsResponse400 | getLpPositionsResponse500) & {
3360
+ headers: Headers;
3361
+ };
3362
+ type getLpPositionsResponse = (getLpPositionsResponseSuccess | getLpPositionsResponseError);
3363
+ declare const getGetLpPositionsUrl: (userAddress: string, params?: GetLpPositionsParams) => string;
3364
+ declare const getLpPositions: (userAddress: string, params?: GetLpPositionsParams, options?: RequestInit) => Promise<getLpPositionsResponse>;
3365
+ /**
3366
+ * @summary Request LP position actions history
3367
+ */
3368
+ type getLpPositionActionsResponse200 = {
3369
+ data: GenericHttpResponseVecTunaLpPositionActionDto;
3370
+ status: 200;
3371
+ };
3372
+ type getLpPositionActionsResponse400 = {
3373
+ data: void;
3374
+ status: 400;
3375
+ };
3376
+ type getLpPositionActionsResponse500 = {
3377
+ data: void;
3378
+ status: 500;
3379
+ };
3380
+ type getLpPositionActionsResponseSuccess = (getLpPositionActionsResponse200) & {
3381
+ headers: Headers;
3382
+ };
3383
+ type getLpPositionActionsResponseError = (getLpPositionActionsResponse400 | getLpPositionActionsResponse500) & {
3384
+ headers: Headers;
3385
+ };
3386
+ type getLpPositionActionsResponse = (getLpPositionActionsResponseSuccess | getLpPositionActionsResponseError);
3387
+ declare const getGetLpPositionActionsUrl: (userAddress: string, positionAddress: string) => string;
3388
+ declare const getLpPositionActions: (userAddress: string, positionAddress: string, options?: RequestInit) => Promise<getLpPositionActionsResponse>;
3389
+ /**
3390
+ * @summary Request user order history
3391
+ */
3392
+ type getOrderHistoryResponse200 = {
3393
+ data: GenericHttpResponseVecOrderHistoryEntryDto;
3394
+ status: 200;
3395
+ };
3396
+ type getOrderHistoryResponse400 = {
3397
+ data: void;
3398
+ status: 400;
3399
+ };
3400
+ type getOrderHistoryResponse500 = {
3401
+ data: void;
3402
+ status: 500;
3403
+ };
3404
+ type getOrderHistoryResponseSuccess = (getOrderHistoryResponse200) & {
3405
+ headers: Headers;
3406
+ };
3407
+ type getOrderHistoryResponseError = (getOrderHistoryResponse400 | getOrderHistoryResponse500) & {
3408
+ headers: Headers;
3409
+ };
3410
+ type getOrderHistoryResponse = (getOrderHistoryResponseSuccess | getOrderHistoryResponseError);
3411
+ declare const getGetOrderHistoryUrl: (userAddress: string, params?: GetOrderHistoryParams) => string;
3412
+ declare const getOrderHistory: (userAddress: string, params?: GetOrderHistoryParams, options?: RequestInit) => Promise<getOrderHistoryResponse>;
3413
+ /**
3414
+ * @summary Request all user spot positions
3415
+ */
3416
+ type getSpotPositionsResponse200 = {
3417
+ data: GenericHttpResponseVecTunaSpotPositionDto;
3418
+ status: 200;
3419
+ };
3420
+ type getSpotPositionsResponse400 = {
3421
+ data: void;
3422
+ status: 400;
3423
+ };
3424
+ type getSpotPositionsResponse500 = {
3425
+ data: void;
3426
+ status: 500;
3427
+ };
3428
+ type getSpotPositionsResponseSuccess = (getSpotPositionsResponse200) & {
3429
+ headers: Headers;
3430
+ };
3431
+ type getSpotPositionsResponseError = (getSpotPositionsResponse400 | getSpotPositionsResponse500) & {
3432
+ headers: Headers;
3433
+ };
3434
+ type getSpotPositionsResponse = (getSpotPositionsResponseSuccess | getSpotPositionsResponseError);
3435
+ declare const getGetSpotPositionsUrl: (userAddress: string) => string;
3436
+ declare const getSpotPositions: (userAddress: string, options?: RequestInit) => Promise<getSpotPositionsResponse>;
3437
+ /**
3438
+ * @summary Request spot position data by position address
3439
+ */
3440
+ type getSpotPositionResponse200 = {
3441
+ data: GenericHttpResponseTunaSpotPositionDto;
3442
+ status: 200;
3443
+ };
3444
+ type getSpotPositionResponse400 = {
3445
+ data: void;
3446
+ status: 400;
3447
+ };
3448
+ type getSpotPositionResponse404 = {
3449
+ data: void;
3450
+ status: 404;
3451
+ };
3452
+ type getSpotPositionResponse500 = {
3453
+ data: void;
3454
+ status: 500;
3455
+ };
3456
+ type getSpotPositionResponseSuccess = (getSpotPositionResponse200) & {
3457
+ headers: Headers;
3458
+ };
3459
+ type getSpotPositionResponseError = (getSpotPositionResponse400 | getSpotPositionResponse404 | getSpotPositionResponse500) & {
3460
+ headers: Headers;
3461
+ };
3462
+ type getSpotPositionResponse = (getSpotPositionResponseSuccess | getSpotPositionResponseError);
3463
+ declare const getGetSpotPositionUrl: (userAddress: string, spotPositionAddress: string) => string;
3464
+ declare const getSpotPosition: (userAddress: string, spotPositionAddress: string, options?: RequestInit) => Promise<getSpotPositionResponse>;
3465
+ /**
3466
+ * @summary Request user staking position
3467
+ */
3468
+ type getUserStakingPositionResponse200 = {
3469
+ data: GenericHttpResponseStakingPositionDto;
3470
+ status: 200;
3471
+ };
3472
+ type getUserStakingPositionResponse400 = {
3473
+ data: void;
3474
+ status: 400;
3475
+ };
3476
+ type getUserStakingPositionResponse500 = {
3477
+ data: void;
3478
+ status: 500;
3479
+ };
3480
+ type getUserStakingPositionResponseSuccess = (getUserStakingPositionResponse200) & {
3481
+ headers: Headers;
3482
+ };
3483
+ type getUserStakingPositionResponseError = (getUserStakingPositionResponse400 | getUserStakingPositionResponse500) & {
3484
+ headers: Headers;
3485
+ };
3486
+ type getUserStakingPositionResponse = (getUserStakingPositionResponseSuccess | getUserStakingPositionResponseError);
3487
+ declare const getGetUserStakingPositionUrl: (userAddress: string) => string;
3488
+ declare const getUserStakingPosition: (userAddress: string, options?: RequestInit) => Promise<getUserStakingPositionResponse>;
3489
+ /**
3490
+ * @summary Request user staking position history
3491
+ */
3492
+ type getUserStakingPositionHistoryResponse200 = {
3493
+ data: GenericHttpResponseVecStakingPositionActionDto;
3494
+ status: 200;
3495
+ };
3496
+ type getUserStakingPositionHistoryResponse400 = {
3497
+ data: void;
3498
+ status: 400;
3499
+ };
3500
+ type getUserStakingPositionHistoryResponse500 = {
3501
+ data: void;
3502
+ status: 500;
3503
+ };
3504
+ type getUserStakingPositionHistoryResponseSuccess = (getUserStakingPositionHistoryResponse200) & {
3505
+ headers: Headers;
3506
+ };
3507
+ type getUserStakingPositionHistoryResponseError = (getUserStakingPositionHistoryResponse400 | getUserStakingPositionHistoryResponse500) & {
3508
+ headers: Headers;
3509
+ };
3510
+ type getUserStakingPositionHistoryResponse = (getUserStakingPositionHistoryResponseSuccess | getUserStakingPositionHistoryResponseError);
3511
+ declare const getGetUserStakingPositionHistoryUrl: (userAddress: string) => string;
3512
+ declare const getUserStakingPositionHistory: (userAddress: string, options?: RequestInit) => Promise<getUserStakingPositionHistoryResponse>;
3513
+ /**
3514
+ * @summary Request user trade history
3515
+ */
3516
+ type getTradeHistoryResponse200 = {
3517
+ data: GenericHttpResponseVecTradeHistoryEntryDto;
3518
+ status: 200;
3519
+ };
3520
+ type getTradeHistoryResponse400 = {
3521
+ data: void;
3522
+ status: 400;
3523
+ };
3524
+ type getTradeHistoryResponse500 = {
3525
+ data: void;
3526
+ status: 500;
3527
+ };
3528
+ type getTradeHistoryResponseSuccess = (getTradeHistoryResponse200) & {
3529
+ headers: Headers;
3530
+ };
3531
+ type getTradeHistoryResponseError = (getTradeHistoryResponse400 | getTradeHistoryResponse500) & {
3532
+ headers: Headers;
3533
+ };
3534
+ type getTradeHistoryResponse = (getTradeHistoryResponseSuccess | getTradeHistoryResponseError);
3535
+ declare const getGetTradeHistoryUrl: (userAddress: string, params?: GetTradeHistoryParams) => string;
3536
+ declare const getTradeHistory: (userAddress: string, params?: GetTradeHistoryParams, options?: RequestInit) => Promise<getTradeHistoryResponse>;
3537
+ /**
3538
+ * @summary Request all user LP positions
3539
+ */
3540
+ type getTunaPositionsResponse200 = {
3541
+ data: GenericHttpResponseVecTunaPositionDto;
3542
+ status: 200;
3543
+ };
3544
+ type getTunaPositionsResponse400 = {
3545
+ data: void;
3546
+ status: 400;
3547
+ };
3548
+ type getTunaPositionsResponse500 = {
3549
+ data: void;
3550
+ status: 500;
3551
+ };
3552
+ type getTunaPositionsResponseSuccess = (getTunaPositionsResponse200) & {
3553
+ headers: Headers;
3554
+ };
3555
+ type getTunaPositionsResponseError = (getTunaPositionsResponse400 | getTunaPositionsResponse500) & {
3556
+ headers: Headers;
3557
+ };
3558
+ type getTunaPositionsResponse = (getTunaPositionsResponseSuccess | getTunaPositionsResponseError);
3559
+ declare const getGetTunaPositionsUrl: (userAddress: string) => string;
3560
+ declare const getTunaPositions: (userAddress: string, options?: RequestInit) => Promise<getTunaPositionsResponse>;
3561
+ /**
3562
+ * @summary Request LP position data by position address
3563
+ */
3564
+ type getTunaPositionResponse200 = {
3565
+ data: GenericHttpResponseOptionTunaPositionDto;
3566
+ status: 200;
3567
+ };
3568
+ type getTunaPositionResponse400 = {
3569
+ data: void;
3570
+ status: 400;
3571
+ };
3572
+ type getTunaPositionResponse500 = {
3573
+ data: void;
3574
+ status: 500;
3575
+ };
3576
+ type getTunaPositionResponseSuccess = (getTunaPositionResponse200) & {
3577
+ headers: Headers;
3578
+ };
3579
+ type getTunaPositionResponseError = (getTunaPositionResponse400 | getTunaPositionResponse500) & {
3580
+ headers: Headers;
3581
+ };
3582
+ type getTunaPositionResponse = (getTunaPositionResponseSuccess | getTunaPositionResponseError);
3583
+ declare const getGetTunaPositionUrl: (userAddress: string, positionAddress: string) => string;
3584
+ declare const getTunaPosition: (userAddress: string, positionAddress: string, options?: RequestInit) => Promise<getTunaPositionResponse>;
3585
+ /**
3586
+ * @summary Request all vaults data
3587
+ */
3588
+ type getVaultsResponse200 = {
3589
+ data: GenericHttpResponseVecVaultDto;
3590
+ status: 200;
3591
+ };
3592
+ type getVaultsResponse500 = {
3593
+ data: void;
3594
+ status: 500;
3595
+ };
3596
+ type getVaultsResponseSuccess = (getVaultsResponse200) & {
3597
+ headers: Headers;
3598
+ };
3599
+ type getVaultsResponseError = (getVaultsResponse500) & {
3600
+ headers: Headers;
3601
+ };
3602
+ type getVaultsResponse = (getVaultsResponseSuccess | getVaultsResponseError);
3603
+ declare const getGetVaultsUrl: () => string;
3604
+ declare const getVaults: (options?: RequestInit) => Promise<getVaultsResponse>;
3605
+ /**
3606
+ * @summary Request vault data
3607
+ */
3608
+ type getVaultResponse200 = {
3609
+ data: GenericHttpResponseVaultDto;
3610
+ status: 200;
3611
+ };
3612
+ type getVaultResponse400 = {
3613
+ data: void;
3614
+ status: 400;
3615
+ };
3616
+ type getVaultResponse404 = {
3617
+ data: void;
3618
+ status: 404;
3619
+ };
3620
+ type getVaultResponse500 = {
3621
+ data: void;
3622
+ status: 500;
3623
+ };
3624
+ type getVaultResponseSuccess = (getVaultResponse200) & {
3625
+ headers: Headers;
3626
+ };
3627
+ type getVaultResponseError = (getVaultResponse400 | getVaultResponse404 | getVaultResponse500) & {
3628
+ headers: Headers;
3629
+ };
3630
+ type getVaultResponse = (getVaultResponseSuccess | getVaultResponseError);
3631
+ declare const getGetVaultUrl: (vaultAddress: string) => string;
3632
+ declare const getVault: (vaultAddress: string, options?: RequestInit) => Promise<getVaultResponse>;
3633
+ /**
3634
+ * @summary Request vault daily stats
3635
+ */
3636
+ type getVaultHistoryResponse200 = {
3637
+ data: GenericHttpResponseVecVaultStatsDto;
3638
+ status: 200;
3639
+ };
3640
+ type getVaultHistoryResponse400 = {
3641
+ data: void;
3642
+ status: 400;
3643
+ };
3644
+ type getVaultHistoryResponse404 = {
3645
+ data: void;
3646
+ status: 404;
3647
+ };
3648
+ type getVaultHistoryResponse500 = {
3649
+ data: void;
3650
+ status: 500;
3651
+ };
3652
+ type getVaultHistoryResponseSuccess = (getVaultHistoryResponse200) & {
3653
+ headers: Headers;
3654
+ };
3655
+ type getVaultHistoryResponseError = (getVaultHistoryResponse400 | getVaultHistoryResponse404 | getVaultHistoryResponse500) & {
3656
+ headers: Headers;
3657
+ };
3658
+ type getVaultHistoryResponse = (getVaultHistoryResponseSuccess | getVaultHistoryResponseError);
3659
+ declare const getGetVaultHistoryUrl: (vaultAddress: string, params: GetVaultHistoryParams) => string;
3660
+ declare const getVaultHistory: (vaultAddress: string, params: GetVaultHistoryParams, options?: RequestInit) => Promise<getVaultHistoryResponse>;
3661
+
3662
+ declare function setTunaBaseUrl(url: string): void;
3663
+
3664
+ type ApiError = {
3665
+ status: number;
3666
+ };
3667
+ type HttpResponse<T, E = unknown> = {
3668
+ status: number;
3669
+ data: T;
3670
+ } | {
3671
+ status: number;
3672
+ data: E | void;
3673
+ };
3674
+ type HasOnlyDataKey<T> = T extends object ? (Exclude<keyof T, "data"> extends never ? true : false) : false;
3675
+ type UnwrapData<T> = T extends {
3676
+ data: infer U;
3677
+ } ? (HasOnlyDataKey<T> extends true ? U : T) : T;
3678
+ declare function unwrap<T, E = unknown>(promise: Promise<HttpResponse<T, E>>): Promise<UnwrapData<T>>;
3679
+
3680
+ declare const getSseUpdatesStream: () => Promise<EventSource>;
3681
+ declare function eventIsInitialMessage(event: SseResponse): event is StreamInitalMessage;
3682
+ declare function eventIsPoolSwap(event: SseResponse): event is NotificationDtoPoolSwapDto;
3683
+ declare function eventIsStakingPosition(event: SseResponse): event is NotificationDtoStakingPositionDto;
3684
+ declare function eventIsLendingPosition(event: SseResponse): event is NotificationDtoLendingPositionDto;
3685
+ declare function eventIsTradeHistory(event: SseResponse): event is NotificationDtoTradeHistoryEntryDto;
3686
+ declare function eventIsOrderHistory(event: SseResponse): event is NotificationDtoOrderHistoryEntryDto;
3687
+ declare function eventIsStateSnapshot(event: SseResponse): event is SnapshotContainer;
3688
+
3689
+ export { type ApiError, type CloseSpotPositionQuoteDto, type DecreaseSpotPositionQuoteDto, type FeeAmountWithUsd, type FeesStatsGroupDto, type FusionFeesStatsGroupDto, type GenericHttpResponseCloseSpotPositionQuoteDto, type GenericHttpResponseCloseSpotPositionQuoteDtoData, type GenericHttpResponseDecreaseSpotPositionQuoteDto, type GenericHttpResponseDecreaseSpotPositionQuoteDtoData, type GenericHttpResponseHttpStatusData, type GenericHttpResponseHttpStatusDataData, type GenericHttpResponseI64, type GenericHttpResponseIncreaseSpotPositionQuoteDto, type GenericHttpResponseIncreaseSpotPositionQuoteDtoData, type GenericHttpResponseLimitOrderQuoteByInputDto, type GenericHttpResponseLimitOrderQuoteByInputDtoData, type GenericHttpResponseLimitOrderQuoteByOutputDto, type GenericHttpResponseLimitOrderQuoteByOutputDtoData, type GenericHttpResponseMarketDto, type GenericHttpResponseMarketDtoData, type GenericHttpResponseMintDto, type GenericHttpResponseMintDtoData, type GenericHttpResponseOptionLendingPositionDto, type GenericHttpResponseOptionLendingPositionDtoData, type GenericHttpResponseOptionLendingPositionDtoDataOneOf, type GenericHttpResponseOptionLimitOrderDto, type GenericHttpResponseOptionLimitOrderDtoData, type GenericHttpResponseOptionLimitOrderDtoDataOneOf, type GenericHttpResponseOptionLimitOrderDtoDataOneOfCloseTxSignature, type GenericHttpResponseOptionLimitOrderDtoDataOneOfClosedAt, type GenericHttpResponseOptionTunaPositionDto, type GenericHttpResponseOptionTunaPositionDtoData, type GenericHttpResponseOptionTunaPositionDtoDataOneOf, type GenericHttpResponseOptionTunaPositionDtoDataOneOfClosedAt, type GenericHttpResponseOraclePriceDto, type GenericHttpResponseOraclePriceDtoData, type GenericHttpResponseOrderBookDto, type GenericHttpResponseOrderBookDtoData, type GenericHttpResponsePoolDto, type GenericHttpResponsePoolDtoData, type GenericHttpResponsePoolDtoDataOlpFeeRate, type GenericHttpResponsePoolDtoDataStats, type GenericHttpResponsePoolTicksDto, type GenericHttpResponsePoolTicksDtoData, type GenericHttpResponseSseResponse, type GenericHttpResponseSseResponseData, type GenericHttpResponseStakingPositionDto, type GenericHttpResponseStakingPositionDtoData, type GenericHttpResponseStakingPositionDtoDataLastUnstakedAt, type GenericHttpResponseStakingPositionDtoDataRank, type GenericHttpResponseStakingPositionDtoDataWithdrawAvailableAt, type GenericHttpResponseSwapQuoteByInputDto, type GenericHttpResponseSwapQuoteByInputDtoData, type GenericHttpResponseSwapQuoteByOutputDto, type GenericHttpResponseSwapQuoteByOutputDtoData, type GenericHttpResponseTradableAmountDto, type GenericHttpResponseTradableAmountDtoData, type GenericHttpResponseTreasuryDto, type GenericHttpResponseTreasuryDtoData, type GenericHttpResponseTunaSpotPositionDto, type GenericHttpResponseTunaSpotPositionDtoData, type GenericHttpResponseTunaSpotPositionDtoDataClosedAt, type GenericHttpResponseVaultDto, type GenericHttpResponseVaultDtoData, type GenericHttpResponseVecFeesStatsGroupDto, type GenericHttpResponseVecFeesStatsGroupDtoDataItem, type GenericHttpResponseVecFusionFeesStatsGroupDto, type GenericHttpResponseVecFusionFeesStatsGroupDtoDataItem, type GenericHttpResponseVecLendingPositionDto, type GenericHttpResponseVecLendingPositionDtoDataItem, type GenericHttpResponseVecLimitOrderDto, type GenericHttpResponseVecLimitOrderDtoDataItem, type GenericHttpResponseVecLimitOrderDtoDataItemCloseTxSignature, type GenericHttpResponseVecLimitOrderDtoDataItemClosedAt, type GenericHttpResponseVecMarketDto, type GenericHttpResponseVecMarketDtoDataItem, type GenericHttpResponseVecMintDto, type GenericHttpResponseVecMintDtoDataItem, type GenericHttpResponseVecOraclePriceDto, type GenericHttpResponseVecOraclePriceDtoDataItem, type GenericHttpResponseVecOrderHistoryEntryDto, type GenericHttpResponseVecOrderHistoryEntryDtoDataItem, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemBaseTokenConsumedAmount, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemIxIndex, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemQuoteTokenFilledAmount, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemTxSignature, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiExecutionPrice, type GenericHttpResponseVecOrderHistoryEntryDtoDataItemUiPrice, type GenericHttpResponseVecPoolDto, type GenericHttpResponseVecPoolDtoDataItem, type GenericHttpResponseVecPoolDtoDataItemOlpFeeRate, type GenericHttpResponseVecPoolDtoDataItemStats, type GenericHttpResponseVecPoolPriceCandleDto, type GenericHttpResponseVecPoolPriceCandleDtoDataItem, type GenericHttpResponseVecPoolSwapDto, type GenericHttpResponseVecPoolSwapDtoDataItem, type GenericHttpResponseVecStakingDepositsStatsDto, type GenericHttpResponseVecStakingDepositsStatsDtoDataItem, type GenericHttpResponseVecStakingPositionActionDto, type GenericHttpResponseVecStakingPositionActionDtoDataItem, type GenericHttpResponseVecTradeHistoryEntryDto, type GenericHttpResponseVecTradeHistoryEntryDtoDataItem, type GenericHttpResponseVecTradeHistoryEntryDtoDataItemIxIndex, type GenericHttpResponseVecTradeHistoryEntryDtoDataItemPnl, type GenericHttpResponseVecTradeHistoryEntryDtoDataItemTxSignature, type GenericHttpResponseVecTunaLpPositionActionDto, type GenericHttpResponseVecTunaLpPositionActionDtoDataItem, type GenericHttpResponseVecTunaLpPositionDto, type GenericHttpResponseVecTunaLpPositionDtoDataItem, type GenericHttpResponseVecTunaLpPositionDtoDataItemClosedAt, type GenericHttpResponseVecTunaLpPositionDtoDataItemExitPrice, type GenericHttpResponseVecTunaLpPositionDtoDataItemLowerLimitOrder, type GenericHttpResponseVecTunaLpPositionDtoDataItemUpperLimitOrder, type GenericHttpResponseVecTunaPositionDto, type GenericHttpResponseVecTunaPositionDtoDataItem, type GenericHttpResponseVecTunaPositionDtoDataItemClosedAt, type GenericHttpResponseVecTunaSpotPositionDto, type GenericHttpResponseVecTunaSpotPositionDtoDataItem, type GenericHttpResponseVecTunaSpotPositionDtoDataItemClosedAt, type GenericHttpResponseVecVaultDto, type GenericHttpResponseVecVaultDtoDataItem, type GenericHttpResponseVecVaultStatsDto, type GenericHttpResponseVecVaultStatsDtoDataItem, type GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMeta, type GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaDataItem, type GenericHttpResponseWithMetaVecLeaderboardItemDtoPaginationMetaMeta, type GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMeta, type GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaDataItem, type GenericHttpResponseWithMetaVecStakingLeaderboardPositionDtoPaginationMetaMeta, type GetCloseSpotPositionQuoteParams, type GetDecreaseSpotPositionQuoteParams, type GetFeesStatsParams, type GetFusionFeesStatsParams, type GetIncreaseSpotPositionQuoteParams, type GetLimitOrderQuoteByInputParams, type GetLimitOrderQuoteByOutputParams, type GetLimitOrdersParams, type GetLpPositionsParams, type GetLpSpotLeaderboardParams, type GetOrderHistoryParams, type GetPoolCandlesParams, type GetPoolOrderBookParams, type GetPoolsParams, type GetPositionsStatsParams, type GetStakingLeaderboardParams, type GetStakingRevenueStatsParams, type GetSwapQuoteByInputParams, type GetSwapQuoteByOutputParams, type GetTradableAmountParams, type GetTradeHistoryParams, type GetVaultHistoryParams, type HashMap, type HttpStatusData, type IncreaseSpotPositionQuoteDto, type LeaderboardItemDto, LeaderboardPeriod, LeaderboardSortBy, type LendingPositionDto, type LimitOrderDto, type LimitOrderDtoCloseTxSignature, type LimitOrderDtoClosedAt, type LimitOrderQuoteByInputDto, type LimitOrderQuoteByOutputDto, LimitOrderStatus, LpPositionsHistoryQueryFilter, type MarketDto, type MintDto, NotificationAction, type NotificationDtoLendingPositionDto, type NotificationDtoLendingPositionDtoData, type NotificationDtoOrderHistoryEntryDto, type NotificationDtoOrderHistoryEntryDtoData, type NotificationDtoOrderHistoryEntryDtoDataBaseTokenConsumedAmount, type NotificationDtoOrderHistoryEntryDtoDataIxIndex, type NotificationDtoOrderHistoryEntryDtoDataQuoteTokenFilledAmount, type NotificationDtoOrderHistoryEntryDtoDataTxSignature, type NotificationDtoOrderHistoryEntryDtoDataUiExecutionPrice, type NotificationDtoOrderHistoryEntryDtoDataUiPrice, type NotificationDtoPoolSwapDto, type NotificationDtoPoolSwapDtoData, type NotificationDtoStakingPositionDto, type NotificationDtoStakingPositionDtoData, type NotificationDtoStakingPositionDtoDataLastUnstakedAt, type NotificationDtoStakingPositionDtoDataRank, type NotificationDtoStakingPositionDtoDataWithdrawAvailableAt, type NotificationDtoTradeHistoryEntryDto, type NotificationDtoTradeHistoryEntryDtoData, type NotificationDtoTradeHistoryEntryDtoDataIxIndex, type NotificationDtoTradeHistoryEntryDtoDataPnl, type NotificationDtoTradeHistoryEntryDtoDataTxSignature, NotificationEntity, type OraclePriceDto, type OrderBookDto, type OrderBookEntryDto, type OrderBookWrapper, type OrderHistoryEntryDto, type OrderHistoryEntryDtoBaseTokenConsumedAmount, type OrderHistoryEntryDtoIxIndex, type OrderHistoryEntryDtoQuoteTokenFilledAmount, type OrderHistoryEntryDtoTxSignature, type OrderHistoryEntryDtoUiExecutionPrice, type OrderHistoryEntryDtoUiPrice, OrderHistoryStatus, OrderHistoryType, OrderHistoryUIDirection, type PaginationMeta, type PoolDto, type PoolDtoOlpFeeRate, type PoolDtoStats, type PoolPriceCandleDto, PoolProvider, type PoolStatsDto, type PoolSubscription, type PoolSubscriptionIsInverted, type PoolSubscriptionOrderBookPriceStep, PoolSubscriptionTopic, type PoolSwapDto, type PoolTicksDto, type Snapshot, type SnapshotContainer, type SnapshotFusionLimitOrders, type SnapshotMarkets, type SnapshotOraclePrices, type SnapshotOraclePricesAnyOf, type SnapshotOrderBooks, type SnapshotTunaLpPositions, type SnapshotTunaSpotPositions, type SseResponse, type StakingDepositsStatsDto, type StakingLeaderboardPositionDto, type StakingPositionActionDto, StakingPositionActionType, type StakingPositionDto, type StakingPositionDtoLastUnstakedAt, type StakingPositionDtoRank, type StakingPositionDtoWithdrawAvailableAt, type StreamInitalMessage, type SubscriptionOptions, type SubscriptionOptionsMarkets, type SubscriptionOptionsMints, type SubscriptionOptionsPools, type SubscriptionOptionsWallet, type SwapQuoteByInputDto, type SwapQuoteByOutputDto, type TickDto, type TokenAmountWithUsd, type TradableAmountDto, TradeHistoryAction, type TradeHistoryEntryDto, type TradeHistoryEntryDtoIxIndex, type TradeHistoryEntryDtoPnl, type TradeHistoryEntryDtoTxSignature, type TradeHistoryEntryPnlUsd, TradeHistoryUIDirection, type TreasuryDto, type TunaLpPositionActionComposite, type TunaLpPositionActionCompositeClosedPnlUsd, type TunaLpPositionActionCompositeCollectedFees, type TunaLpPositionActionCompositeFromLending, type TunaLpPositionActionCompositeFromOwner, type TunaLpPositionActionCompositeFromParameters, type TunaLpPositionActionCompositeFromPosition, type TunaLpPositionActionCompositeParameters, type TunaLpPositionActionCompositePosition, type TunaLpPositionActionCompositePrices, type TunaLpPositionActionCompositeProtocolFees, type TunaLpPositionActionCompositeToLending, type TunaLpPositionActionCompositeToOwner, type TunaLpPositionActionCompositeToParameters, type TunaLpPositionActionCompositeToPosition, type TunaLpPositionActionCompositeWithdrawPercent, type TunaLpPositionActionDto, TunaLpPositionAutoCompound, TunaLpPositionAutoCompounding, type TunaLpPositionDto, type TunaLpPositionDtoClosedAt, type TunaLpPositionDtoExitPrice, type TunaLpPositionDtoLowerLimitOrder, type TunaLpPositionDtoUpperLimitOrder, type TunaLpPositionFlags, type TunaLpPositionFlagsAutoCompounding, type TunaLpPositionFlagsLowerLimitOrderSwapToToken, type TunaLpPositionFlagsUpperLimitOrderSwapToToken, TunaLpPositionLimitOrderSwap, type TunaLpPositionParameters, type TunaLpPositionParametersLowerLimitOrder, type TunaLpPositionParametersUpperLimitOrder, TunaLpPositionRebalance, type TunaLpPositionTokenPrices, type TunaLpPositionTransfer, type TunaLpPositionValue, TunaLpPositionsActionType, type TunaLpPositionsStats, type TunaLpPositionsStatsFusionClosedByLimitOrderCount, type TunaLpPositionsStatsFusionLiquidatedCount, type TunaLpPositionsStatsFusionOpenCount, type TunaLpPositionsStatsOrcaClosedByLimitOrderCount, type TunaLpPositionsStatsOrcaLiquidatedCount, type TunaLpPositionsStatsOrcaOpenCount, type TunaPositionDto, type TunaPositionDtoClosedAt, TunaPositionDtoState, TunaPositionMarketMaker, TunaPositionPoolToken, type TunaPositionTokenDepositedCollateral, type TunaPositionTokenPnl, type TunaPositionUsdPnl, type TunaSpotPositionDto, type TunaSpotPositionDtoClosedAt, TunaSpotPositionDtoState, type VaultDto, type VaultStatsDto, type VestingDto, type VestingDtoLockedAt, type WalletSubscription, WalletSubscriptionTopic, eventIsInitialMessage, eventIsLendingPosition, eventIsOrderHistory, eventIsPoolSwap, eventIsStakingPosition, eventIsStateSnapshot, eventIsTradeHistory, getCloseSpotPositionQuote, type getCloseSpotPositionQuoteResponse, type getCloseSpotPositionQuoteResponse200, type getCloseSpotPositionQuoteResponse400, type getCloseSpotPositionQuoteResponseError, type getCloseSpotPositionQuoteResponseSuccess, getDecreaseSpotPositionQuote, type getDecreaseSpotPositionQuoteResponse, type getDecreaseSpotPositionQuoteResponse200, type getDecreaseSpotPositionQuoteResponse400, type getDecreaseSpotPositionQuoteResponseError, type getDecreaseSpotPositionQuoteResponseSuccess, getFeesStats, type getFeesStatsResponse, type getFeesStatsResponse200, type getFeesStatsResponse400, type getFeesStatsResponse500, type getFeesStatsResponseError, type getFeesStatsResponseSuccess, getFusionFeesStats, type getFusionFeesStatsResponse, type getFusionFeesStatsResponse200, type getFusionFeesStatsResponse400, type getFusionFeesStatsResponse500, type getFusionFeesStatsResponseError, type getFusionFeesStatsResponseSuccess, getGetCloseSpotPositionQuoteUrl, getGetDecreaseSpotPositionQuoteUrl, getGetFeesStatsUrl, getGetFusionFeesStatsUrl, getGetIncreaseSpotPositionQuoteUrl, getGetLendingPositionUrl, getGetLendingPositionsUrl, getGetLimitOrderQuoteByInputUrl, getGetLimitOrderQuoteByOutputUrl, getGetLimitOrderUrl, getGetLimitOrdersUrl, getGetLpPositionActionsUrl, getGetLpPositionsUrl, getGetLpSpotLeaderboardUrl, getGetMarketUrl, getGetMarketsUrl, getGetMintUrl, getGetMintsUrl, getGetOraclePriceUrl, getGetOraclePricesUrl, getGetOrderHistoryUrl, getGetPoolCandlesUrl, getGetPoolOrderBookUrl, getGetPoolSwapsUrl, getGetPoolTicksUrl, getGetPoolUrl, getGetPoolsUrl, getGetPositionsStatsUrl, getGetPositionsTotalUrl, getGetSpotPositionUrl, getGetSpotPositionsUrl, getGetStakingLeaderboardUrl, getGetStakingRevenueStatsUrl, getGetStakingTreasuryUrl, getGetSwapQuoteByInputUrl, getGetSwapQuoteByOutputUrl, getGetTradableAmountUrl, getGetTradeHistoryUrl, getGetTunaPositionUrl, getGetTunaPositionsUrl, getGetUserStakingPositionHistoryUrl, getGetUserStakingPositionUrl, getGetVaultHistoryUrl, getGetVaultUrl, getGetVaultsUrl, getIncreaseSpotPositionQuote, type getIncreaseSpotPositionQuoteResponse, type getIncreaseSpotPositionQuoteResponse200, type getIncreaseSpotPositionQuoteResponse400, type getIncreaseSpotPositionQuoteResponseError, type getIncreaseSpotPositionQuoteResponseSuccess, getLendingPosition, type getLendingPositionResponse, type getLendingPositionResponse200, type getLendingPositionResponse400, type getLendingPositionResponse500, type getLendingPositionResponseError, type getLendingPositionResponseSuccess, getLendingPositions, type getLendingPositionsResponse, type getLendingPositionsResponse200, type getLendingPositionsResponse400, type getLendingPositionsResponse500, type getLendingPositionsResponseError, type getLendingPositionsResponseSuccess, getLimitOrder, getLimitOrderQuoteByInput, type getLimitOrderQuoteByInputResponse, type getLimitOrderQuoteByInputResponse200, type getLimitOrderQuoteByInputResponse400, type getLimitOrderQuoteByInputResponseError, type getLimitOrderQuoteByInputResponseSuccess, getLimitOrderQuoteByOutput, type getLimitOrderQuoteByOutputResponse, type getLimitOrderQuoteByOutputResponse200, type getLimitOrderQuoteByOutputResponse400, type getLimitOrderQuoteByOutputResponseError, type getLimitOrderQuoteByOutputResponseSuccess, type getLimitOrderResponse, type getLimitOrderResponse200, type getLimitOrderResponse400, type getLimitOrderResponse500, type getLimitOrderResponseError, type getLimitOrderResponseSuccess, getLimitOrders, type getLimitOrdersResponse, type getLimitOrdersResponse200, type getLimitOrdersResponse400, type getLimitOrdersResponse500, type getLimitOrdersResponseError, type getLimitOrdersResponseSuccess, getLpPositionActions, type getLpPositionActionsResponse, type getLpPositionActionsResponse200, type getLpPositionActionsResponse400, type getLpPositionActionsResponse500, type getLpPositionActionsResponseError, type getLpPositionActionsResponseSuccess, getLpPositions, type getLpPositionsResponse, type getLpPositionsResponse200, type getLpPositionsResponse400, type getLpPositionsResponse500, type getLpPositionsResponseError, type getLpPositionsResponseSuccess, getLpSpotLeaderboard, type getLpSpotLeaderboardResponse, type getLpSpotLeaderboardResponse200, type getLpSpotLeaderboardResponse400, type getLpSpotLeaderboardResponse500, type getLpSpotLeaderboardResponseError, type getLpSpotLeaderboardResponseSuccess, getMarket, type getMarketResponse, type getMarketResponse200, type getMarketResponse400, type getMarketResponse404, type getMarketResponse500, type getMarketResponseError, type getMarketResponseSuccess, getMarkets, type getMarketsResponse, type getMarketsResponse200, type getMarketsResponse500, type getMarketsResponseError, type getMarketsResponseSuccess, getMint, type getMintResponse, type getMintResponse200, type getMintResponse400, type getMintResponse404, type getMintResponse500, type getMintResponseError, type getMintResponseSuccess, getMints, type getMintsResponse, type getMintsResponse200, type getMintsResponse500, type getMintsResponseError, type getMintsResponseSuccess, getOraclePrice, type getOraclePriceResponse, type getOraclePriceResponse200, type getOraclePriceResponse400, type getOraclePriceResponse404, type getOraclePriceResponse500, type getOraclePriceResponseError, type getOraclePriceResponseSuccess, getOraclePrices, type getOraclePricesResponse, type getOraclePricesResponse200, type getOraclePricesResponse500, type getOraclePricesResponseError, type getOraclePricesResponseSuccess, getOrderHistory, type getOrderHistoryResponse, type getOrderHistoryResponse200, type getOrderHistoryResponse400, type getOrderHistoryResponse500, type getOrderHistoryResponseError, type getOrderHistoryResponseSuccess, getPool, getPoolCandles, type getPoolCandlesResponse, type getPoolCandlesResponse200, type getPoolCandlesResponse400, type getPoolCandlesResponse500, type getPoolCandlesResponseError, type getPoolCandlesResponseSuccess, getPoolOrderBook, type getPoolOrderBookResponse, type getPoolOrderBookResponse200, type getPoolOrderBookResponse400, type getPoolOrderBookResponse404, type getPoolOrderBookResponse500, type getPoolOrderBookResponseError, type getPoolOrderBookResponseSuccess, type getPoolResponse, type getPoolResponse200, type getPoolResponse400, type getPoolResponse404, type getPoolResponse500, type getPoolResponseError, type getPoolResponseSuccess, getPoolSwaps, type getPoolSwapsResponse, type getPoolSwapsResponse200, type getPoolSwapsResponse400, type getPoolSwapsResponse404, type getPoolSwapsResponse500, type getPoolSwapsResponseError, type getPoolSwapsResponseSuccess, getPoolTicks, type getPoolTicksResponse, type getPoolTicksResponse200, type getPoolTicksResponse400, type getPoolTicksResponse404, type getPoolTicksResponse500, type getPoolTicksResponseError, type getPoolTicksResponseSuccess, getPools, type getPoolsResponse, type getPoolsResponse200, type getPoolsResponse500, type getPoolsResponseError, type getPoolsResponseSuccess, getPositionsStats, type getPositionsStatsResponse, type getPositionsStatsResponse200, type getPositionsStatsResponse500, type getPositionsStatsResponseError, type getPositionsStatsResponseSuccess, getPositionsTotal, type getPositionsTotalResponse, type getPositionsTotalResponse200, type getPositionsTotalResponse500, type getPositionsTotalResponseError, type getPositionsTotalResponseSuccess, getSpotPosition, type getSpotPositionResponse, type getSpotPositionResponse200, type getSpotPositionResponse400, type getSpotPositionResponse404, type getSpotPositionResponse500, type getSpotPositionResponseError, type getSpotPositionResponseSuccess, getSpotPositions, type getSpotPositionsResponse, type getSpotPositionsResponse200, type getSpotPositionsResponse400, type getSpotPositionsResponse500, type getSpotPositionsResponseError, type getSpotPositionsResponseSuccess, getSseUpdatesStream, getSseUrl, getStakingLeaderboard, type getStakingLeaderboardResponse, type getStakingLeaderboardResponse200, type getStakingLeaderboardResponse400, type getStakingLeaderboardResponse500, type getStakingLeaderboardResponseError, type getStakingLeaderboardResponseSuccess, getStakingRevenueStats, type getStakingRevenueStatsResponse, type getStakingRevenueStatsResponse200, type getStakingRevenueStatsResponse400, type getStakingRevenueStatsResponse500, type getStakingRevenueStatsResponseError, type getStakingRevenueStatsResponseSuccess, getStakingTreasury, type getStakingTreasuryResponse, type getStakingTreasuryResponse200, type getStakingTreasuryResponse500, type getStakingTreasuryResponseError, type getStakingTreasuryResponseSuccess, getSwapQuoteByInput, type getSwapQuoteByInputResponse, type getSwapQuoteByInputResponse200, type getSwapQuoteByInputResponse400, type getSwapQuoteByInputResponseError, type getSwapQuoteByInputResponseSuccess, getSwapQuoteByOutput, type getSwapQuoteByOutputResponse, type getSwapQuoteByOutputResponse200, type getSwapQuoteByOutputResponse400, type getSwapQuoteByOutputResponseError, type getSwapQuoteByOutputResponseSuccess, getTradableAmount, type getTradableAmountResponse, type getTradableAmountResponse200, type getTradableAmountResponse400, type getTradableAmountResponseError, type getTradableAmountResponseSuccess, getTradeHistory, type getTradeHistoryResponse, type getTradeHistoryResponse200, type getTradeHistoryResponse400, type getTradeHistoryResponse500, type getTradeHistoryResponseError, type getTradeHistoryResponseSuccess, getTunaPosition, type getTunaPositionResponse, type getTunaPositionResponse200, type getTunaPositionResponse400, type getTunaPositionResponse500, type getTunaPositionResponseError, type getTunaPositionResponseSuccess, getTunaPositions, type getTunaPositionsResponse, type getTunaPositionsResponse200, type getTunaPositionsResponse400, type getTunaPositionsResponse500, type getTunaPositionsResponseError, type getTunaPositionsResponseSuccess, getUpdateStreamSubscriptionUrl, getUserStakingPosition, getUserStakingPositionHistory, type getUserStakingPositionHistoryResponse, type getUserStakingPositionHistoryResponse200, type getUserStakingPositionHistoryResponse400, type getUserStakingPositionHistoryResponse500, type getUserStakingPositionHistoryResponseError, type getUserStakingPositionHistoryResponseSuccess, type getUserStakingPositionResponse, type getUserStakingPositionResponse200, type getUserStakingPositionResponse400, type getUserStakingPositionResponse500, type getUserStakingPositionResponseError, type getUserStakingPositionResponseSuccess, getVault, getVaultHistory, type getVaultHistoryResponse, type getVaultHistoryResponse200, type getVaultHistoryResponse400, type getVaultHistoryResponse404, type getVaultHistoryResponse500, type getVaultHistoryResponseError, type getVaultHistoryResponseSuccess, type getVaultResponse, type getVaultResponse200, type getVaultResponse400, type getVaultResponse404, type getVaultResponse500, type getVaultResponseError, type getVaultResponseSuccess, getVaults, type getVaultsResponse, type getVaultsResponse200, type getVaultsResponse500, type getVaultsResponseError, type getVaultsResponseSuccess, setTunaBaseUrl, sse, type sseResponse, type sseResponse200, type sseResponse500, type sseResponseError, type sseResponseSuccess, unwrap, updateStreamSubscription, type updateStreamSubscriptionResponse, type updateStreamSubscriptionResponse200, type updateStreamSubscriptionResponse400, type updateStreamSubscriptionResponse500, type updateStreamSubscriptionResponseError, type updateStreamSubscriptionResponseSuccess };