@crypticdot/defituna-api 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +212 -79
- package/dist/index.d.ts +212 -79
- package/dist/index.js +5 -7
- package/dist/index.mjs +5 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -68,6 +68,7 @@ declare const WalletSubscriptionTopic: {
|
|
|
68
68
|
readonly LENDING_POSITIONS: "lending_positions";
|
|
69
69
|
readonly FUSION_LIMIT_ORDERS: "fusion_limit_orders";
|
|
70
70
|
readonly STAKING_POSITION: "staking_position";
|
|
71
|
+
readonly TRADE_HISTORY: "trade_history";
|
|
71
72
|
};
|
|
72
73
|
declare const NotificationEntitySchema: z.ZodEnum<["pool_swap", ...("pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry")[]]>;
|
|
73
74
|
declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "update")[]]>;
|
|
@@ -79,7 +80,7 @@ declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_o
|
|
|
79
80
|
declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
80
81
|
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
81
82
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
82
|
-
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
83
|
+
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders" | "trade_history")[]]>;
|
|
83
84
|
declare const PaginationMeta$1: z.ZodObject<{
|
|
84
85
|
total: z.ZodNumber;
|
|
85
86
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1431,12 +1432,36 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1431
1432
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
1432
1433
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
1433
1434
|
uiPrice: z.ZodNumber;
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1435
|
+
baseToken: z.ZodObject<{
|
|
1436
|
+
amount: z.ZodBigInt;
|
|
1437
|
+
usd: z.ZodNumber;
|
|
1438
|
+
}, "strip", z.ZodTypeAny, {
|
|
1439
|
+
amount: bigint;
|
|
1440
|
+
usd: number;
|
|
1441
|
+
}, {
|
|
1442
|
+
amount: bigint;
|
|
1443
|
+
usd: number;
|
|
1444
|
+
}>;
|
|
1445
|
+
quoteToken: z.ZodObject<{
|
|
1446
|
+
amount: z.ZodBigInt;
|
|
1447
|
+
usd: z.ZodNumber;
|
|
1448
|
+
}, "strip", z.ZodTypeAny, {
|
|
1449
|
+
amount: bigint;
|
|
1450
|
+
usd: number;
|
|
1451
|
+
}, {
|
|
1452
|
+
amount: bigint;
|
|
1453
|
+
usd: number;
|
|
1454
|
+
}>;
|
|
1455
|
+
fee: z.ZodObject<{
|
|
1456
|
+
amount: z.ZodBigInt;
|
|
1457
|
+
usd: z.ZodNumber;
|
|
1458
|
+
}, "strip", z.ZodTypeAny, {
|
|
1459
|
+
amount: bigint;
|
|
1460
|
+
usd: number;
|
|
1461
|
+
}, {
|
|
1462
|
+
amount: bigint;
|
|
1463
|
+
usd: number;
|
|
1464
|
+
}>;
|
|
1440
1465
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
1441
1466
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
1442
1467
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -1451,12 +1476,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1451
1476
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1452
1477
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1453
1478
|
uiPrice: number;
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1479
|
+
baseToken: {
|
|
1480
|
+
amount: bigint;
|
|
1481
|
+
usd: number;
|
|
1482
|
+
};
|
|
1483
|
+
quoteToken: {
|
|
1484
|
+
amount: bigint;
|
|
1485
|
+
usd: number;
|
|
1486
|
+
};
|
|
1487
|
+
fee: {
|
|
1488
|
+
amount: bigint;
|
|
1489
|
+
usd: number;
|
|
1490
|
+
};
|
|
1460
1491
|
txSignature: string | null;
|
|
1461
1492
|
positionAddress: string | null;
|
|
1462
1493
|
slot: bigint;
|
|
@@ -1470,12 +1501,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1470
1501
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1471
1502
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1472
1503
|
uiPrice: number;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1504
|
+
baseToken: {
|
|
1505
|
+
amount: bigint;
|
|
1506
|
+
usd: number;
|
|
1507
|
+
};
|
|
1508
|
+
quoteToken: {
|
|
1509
|
+
amount: bigint;
|
|
1510
|
+
usd: number;
|
|
1511
|
+
};
|
|
1512
|
+
fee: {
|
|
1513
|
+
amount: bigint;
|
|
1514
|
+
usd: number;
|
|
1515
|
+
};
|
|
1479
1516
|
txSignature: string | null;
|
|
1480
1517
|
positionAddress: string | null;
|
|
1481
1518
|
slot: bigint;
|
|
@@ -4602,12 +4639,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4602
4639
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4603
4640
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4604
4641
|
uiPrice: z.ZodNumber;
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4642
|
+
baseToken: z.ZodObject<{
|
|
4643
|
+
amount: z.ZodBigInt;
|
|
4644
|
+
usd: z.ZodNumber;
|
|
4645
|
+
}, "strip", z.ZodTypeAny, {
|
|
4646
|
+
amount: bigint;
|
|
4647
|
+
usd: number;
|
|
4648
|
+
}, {
|
|
4649
|
+
amount: bigint;
|
|
4650
|
+
usd: number;
|
|
4651
|
+
}>;
|
|
4652
|
+
quoteToken: z.ZodObject<{
|
|
4653
|
+
amount: z.ZodBigInt;
|
|
4654
|
+
usd: z.ZodNumber;
|
|
4655
|
+
}, "strip", z.ZodTypeAny, {
|
|
4656
|
+
amount: bigint;
|
|
4657
|
+
usd: number;
|
|
4658
|
+
}, {
|
|
4659
|
+
amount: bigint;
|
|
4660
|
+
usd: number;
|
|
4661
|
+
}>;
|
|
4662
|
+
fee: z.ZodObject<{
|
|
4663
|
+
amount: z.ZodBigInt;
|
|
4664
|
+
usd: z.ZodNumber;
|
|
4665
|
+
}, "strip", z.ZodTypeAny, {
|
|
4666
|
+
amount: bigint;
|
|
4667
|
+
usd: number;
|
|
4668
|
+
}, {
|
|
4669
|
+
amount: bigint;
|
|
4670
|
+
usd: number;
|
|
4671
|
+
}>;
|
|
4611
4672
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
4612
4673
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4613
4674
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -4622,12 +4683,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4622
4683
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4623
4684
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4624
4685
|
uiPrice: number;
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4686
|
+
baseToken: {
|
|
4687
|
+
amount: bigint;
|
|
4688
|
+
usd: number;
|
|
4689
|
+
};
|
|
4690
|
+
quoteToken: {
|
|
4691
|
+
amount: bigint;
|
|
4692
|
+
usd: number;
|
|
4693
|
+
};
|
|
4694
|
+
fee: {
|
|
4695
|
+
amount: bigint;
|
|
4696
|
+
usd: number;
|
|
4697
|
+
};
|
|
4631
4698
|
txSignature: string | null;
|
|
4632
4699
|
positionAddress: string | null;
|
|
4633
4700
|
slot: bigint;
|
|
@@ -4641,12 +4708,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4641
4708
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4642
4709
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4643
4710
|
uiPrice: number;
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4711
|
+
baseToken: {
|
|
4712
|
+
amount: bigint;
|
|
4713
|
+
usd: number;
|
|
4714
|
+
};
|
|
4715
|
+
quoteToken: {
|
|
4716
|
+
amount: bigint;
|
|
4717
|
+
usd: number;
|
|
4718
|
+
};
|
|
4719
|
+
fee: {
|
|
4720
|
+
amount: bigint;
|
|
4721
|
+
usd: number;
|
|
4722
|
+
};
|
|
4650
4723
|
txSignature: string | null;
|
|
4651
4724
|
positionAddress: string | null;
|
|
4652
4725
|
slot: bigint;
|
|
@@ -4666,12 +4739,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4666
4739
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4667
4740
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4668
4741
|
uiPrice: z.ZodNumber;
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4742
|
+
baseToken: z.ZodObject<{
|
|
4743
|
+
amount: z.ZodBigInt;
|
|
4744
|
+
usd: z.ZodNumber;
|
|
4745
|
+
}, "strip", z.ZodTypeAny, {
|
|
4746
|
+
amount: bigint;
|
|
4747
|
+
usd: number;
|
|
4748
|
+
}, {
|
|
4749
|
+
amount: bigint;
|
|
4750
|
+
usd: number;
|
|
4751
|
+
}>;
|
|
4752
|
+
quoteToken: z.ZodObject<{
|
|
4753
|
+
amount: z.ZodBigInt;
|
|
4754
|
+
usd: z.ZodNumber;
|
|
4755
|
+
}, "strip", z.ZodTypeAny, {
|
|
4756
|
+
amount: bigint;
|
|
4757
|
+
usd: number;
|
|
4758
|
+
}, {
|
|
4759
|
+
amount: bigint;
|
|
4760
|
+
usd: number;
|
|
4761
|
+
}>;
|
|
4762
|
+
fee: z.ZodObject<{
|
|
4763
|
+
amount: z.ZodBigInt;
|
|
4764
|
+
usd: z.ZodNumber;
|
|
4765
|
+
}, "strip", z.ZodTypeAny, {
|
|
4766
|
+
amount: bigint;
|
|
4767
|
+
usd: number;
|
|
4768
|
+
}, {
|
|
4769
|
+
amount: bigint;
|
|
4770
|
+
usd: number;
|
|
4771
|
+
}>;
|
|
4675
4772
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
4676
4773
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4677
4774
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -4686,12 +4783,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4686
4783
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4687
4784
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4688
4785
|
uiPrice: number;
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4786
|
+
baseToken: {
|
|
4787
|
+
amount: bigint;
|
|
4788
|
+
usd: number;
|
|
4789
|
+
};
|
|
4790
|
+
quoteToken: {
|
|
4791
|
+
amount: bigint;
|
|
4792
|
+
usd: number;
|
|
4793
|
+
};
|
|
4794
|
+
fee: {
|
|
4795
|
+
amount: bigint;
|
|
4796
|
+
usd: number;
|
|
4797
|
+
};
|
|
4695
4798
|
txSignature: string | null;
|
|
4696
4799
|
positionAddress: string | null;
|
|
4697
4800
|
slot: bigint;
|
|
@@ -4705,12 +4808,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4705
4808
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4706
4809
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4707
4810
|
uiPrice: number;
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4811
|
+
baseToken: {
|
|
4812
|
+
amount: bigint;
|
|
4813
|
+
usd: number;
|
|
4814
|
+
};
|
|
4815
|
+
quoteToken: {
|
|
4816
|
+
amount: bigint;
|
|
4817
|
+
usd: number;
|
|
4818
|
+
};
|
|
4819
|
+
fee: {
|
|
4820
|
+
amount: bigint;
|
|
4821
|
+
usd: number;
|
|
4822
|
+
};
|
|
4714
4823
|
txSignature: string | null;
|
|
4715
4824
|
positionAddress: string | null;
|
|
4716
4825
|
slot: bigint;
|
|
@@ -4731,12 +4840,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4731
4840
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4732
4841
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4733
4842
|
uiPrice: number;
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4843
|
+
baseToken: {
|
|
4844
|
+
amount: bigint;
|
|
4845
|
+
usd: number;
|
|
4846
|
+
};
|
|
4847
|
+
quoteToken: {
|
|
4848
|
+
amount: bigint;
|
|
4849
|
+
usd: number;
|
|
4850
|
+
};
|
|
4851
|
+
fee: {
|
|
4852
|
+
amount: bigint;
|
|
4853
|
+
usd: number;
|
|
4854
|
+
};
|
|
4740
4855
|
txSignature: string | null;
|
|
4741
4856
|
positionAddress: string | null;
|
|
4742
4857
|
slot: bigint;
|
|
@@ -4757,12 +4872,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4757
4872
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4758
4873
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4759
4874
|
uiPrice: number;
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4875
|
+
baseToken: {
|
|
4876
|
+
amount: bigint;
|
|
4877
|
+
usd: number;
|
|
4878
|
+
};
|
|
4879
|
+
quoteToken: {
|
|
4880
|
+
amount: bigint;
|
|
4881
|
+
usd: number;
|
|
4882
|
+
};
|
|
4883
|
+
fee: {
|
|
4884
|
+
amount: bigint;
|
|
4885
|
+
usd: number;
|
|
4886
|
+
};
|
|
4766
4887
|
txSignature: string | null;
|
|
4767
4888
|
positionAddress: string | null;
|
|
4768
4889
|
slot: bigint;
|
|
@@ -4783,12 +4904,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4783
4904
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4784
4905
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4785
4906
|
uiPrice: number;
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4907
|
+
baseToken: {
|
|
4908
|
+
amount: bigint;
|
|
4909
|
+
usd: number;
|
|
4910
|
+
};
|
|
4911
|
+
quoteToken: {
|
|
4912
|
+
amount: bigint;
|
|
4913
|
+
usd: number;
|
|
4914
|
+
};
|
|
4915
|
+
fee: {
|
|
4916
|
+
amount: bigint;
|
|
4917
|
+
usd: number;
|
|
4918
|
+
};
|
|
4792
4919
|
txSignature: string | null;
|
|
4793
4920
|
positionAddress: string | null;
|
|
4794
4921
|
slot: bigint;
|
|
@@ -4809,12 +4936,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4809
4936
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4810
4937
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4811
4938
|
uiPrice: number;
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4939
|
+
baseToken: {
|
|
4940
|
+
amount: bigint;
|
|
4941
|
+
usd: number;
|
|
4942
|
+
};
|
|
4943
|
+
quoteToken: {
|
|
4944
|
+
amount: bigint;
|
|
4945
|
+
usd: number;
|
|
4946
|
+
};
|
|
4947
|
+
fee: {
|
|
4948
|
+
amount: bigint;
|
|
4949
|
+
usd: number;
|
|
4950
|
+
};
|
|
4818
4951
|
txSignature: string | null;
|
|
4819
4952
|
positionAddress: string | null;
|
|
4820
4953
|
slot: bigint;
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ declare const WalletSubscriptionTopic: {
|
|
|
68
68
|
readonly LENDING_POSITIONS: "lending_positions";
|
|
69
69
|
readonly FUSION_LIMIT_ORDERS: "fusion_limit_orders";
|
|
70
70
|
readonly STAKING_POSITION: "staking_position";
|
|
71
|
+
readonly TRADE_HISTORY: "trade_history";
|
|
71
72
|
};
|
|
72
73
|
declare const NotificationEntitySchema: z.ZodEnum<["pool_swap", ...("pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry")[]]>;
|
|
73
74
|
declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "update")[]]>;
|
|
@@ -79,7 +80,7 @@ declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_o
|
|
|
79
80
|
declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
80
81
|
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
81
82
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
82
|
-
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
83
|
+
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders" | "trade_history")[]]>;
|
|
83
84
|
declare const PaginationMeta$1: z.ZodObject<{
|
|
84
85
|
total: z.ZodNumber;
|
|
85
86
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1431,12 +1432,36 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1431
1432
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
1432
1433
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
1433
1434
|
uiPrice: z.ZodNumber;
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1435
|
+
baseToken: z.ZodObject<{
|
|
1436
|
+
amount: z.ZodBigInt;
|
|
1437
|
+
usd: z.ZodNumber;
|
|
1438
|
+
}, "strip", z.ZodTypeAny, {
|
|
1439
|
+
amount: bigint;
|
|
1440
|
+
usd: number;
|
|
1441
|
+
}, {
|
|
1442
|
+
amount: bigint;
|
|
1443
|
+
usd: number;
|
|
1444
|
+
}>;
|
|
1445
|
+
quoteToken: z.ZodObject<{
|
|
1446
|
+
amount: z.ZodBigInt;
|
|
1447
|
+
usd: z.ZodNumber;
|
|
1448
|
+
}, "strip", z.ZodTypeAny, {
|
|
1449
|
+
amount: bigint;
|
|
1450
|
+
usd: number;
|
|
1451
|
+
}, {
|
|
1452
|
+
amount: bigint;
|
|
1453
|
+
usd: number;
|
|
1454
|
+
}>;
|
|
1455
|
+
fee: z.ZodObject<{
|
|
1456
|
+
amount: z.ZodBigInt;
|
|
1457
|
+
usd: z.ZodNumber;
|
|
1458
|
+
}, "strip", z.ZodTypeAny, {
|
|
1459
|
+
amount: bigint;
|
|
1460
|
+
usd: number;
|
|
1461
|
+
}, {
|
|
1462
|
+
amount: bigint;
|
|
1463
|
+
usd: number;
|
|
1464
|
+
}>;
|
|
1440
1465
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
1441
1466
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
1442
1467
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -1451,12 +1476,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1451
1476
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1452
1477
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1453
1478
|
uiPrice: number;
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1479
|
+
baseToken: {
|
|
1480
|
+
amount: bigint;
|
|
1481
|
+
usd: number;
|
|
1482
|
+
};
|
|
1483
|
+
quoteToken: {
|
|
1484
|
+
amount: bigint;
|
|
1485
|
+
usd: number;
|
|
1486
|
+
};
|
|
1487
|
+
fee: {
|
|
1488
|
+
amount: bigint;
|
|
1489
|
+
usd: number;
|
|
1490
|
+
};
|
|
1460
1491
|
txSignature: string | null;
|
|
1461
1492
|
positionAddress: string | null;
|
|
1462
1493
|
slot: bigint;
|
|
@@ -1470,12 +1501,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1470
1501
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1471
1502
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1472
1503
|
uiPrice: number;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1504
|
+
baseToken: {
|
|
1505
|
+
amount: bigint;
|
|
1506
|
+
usd: number;
|
|
1507
|
+
};
|
|
1508
|
+
quoteToken: {
|
|
1509
|
+
amount: bigint;
|
|
1510
|
+
usd: number;
|
|
1511
|
+
};
|
|
1512
|
+
fee: {
|
|
1513
|
+
amount: bigint;
|
|
1514
|
+
usd: number;
|
|
1515
|
+
};
|
|
1479
1516
|
txSignature: string | null;
|
|
1480
1517
|
positionAddress: string | null;
|
|
1481
1518
|
slot: bigint;
|
|
@@ -4602,12 +4639,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4602
4639
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4603
4640
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4604
4641
|
uiPrice: z.ZodNumber;
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4642
|
+
baseToken: z.ZodObject<{
|
|
4643
|
+
amount: z.ZodBigInt;
|
|
4644
|
+
usd: z.ZodNumber;
|
|
4645
|
+
}, "strip", z.ZodTypeAny, {
|
|
4646
|
+
amount: bigint;
|
|
4647
|
+
usd: number;
|
|
4648
|
+
}, {
|
|
4649
|
+
amount: bigint;
|
|
4650
|
+
usd: number;
|
|
4651
|
+
}>;
|
|
4652
|
+
quoteToken: z.ZodObject<{
|
|
4653
|
+
amount: z.ZodBigInt;
|
|
4654
|
+
usd: z.ZodNumber;
|
|
4655
|
+
}, "strip", z.ZodTypeAny, {
|
|
4656
|
+
amount: bigint;
|
|
4657
|
+
usd: number;
|
|
4658
|
+
}, {
|
|
4659
|
+
amount: bigint;
|
|
4660
|
+
usd: number;
|
|
4661
|
+
}>;
|
|
4662
|
+
fee: z.ZodObject<{
|
|
4663
|
+
amount: z.ZodBigInt;
|
|
4664
|
+
usd: z.ZodNumber;
|
|
4665
|
+
}, "strip", z.ZodTypeAny, {
|
|
4666
|
+
amount: bigint;
|
|
4667
|
+
usd: number;
|
|
4668
|
+
}, {
|
|
4669
|
+
amount: bigint;
|
|
4670
|
+
usd: number;
|
|
4671
|
+
}>;
|
|
4611
4672
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
4612
4673
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4613
4674
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -4622,12 +4683,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4622
4683
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4623
4684
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4624
4685
|
uiPrice: number;
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4686
|
+
baseToken: {
|
|
4687
|
+
amount: bigint;
|
|
4688
|
+
usd: number;
|
|
4689
|
+
};
|
|
4690
|
+
quoteToken: {
|
|
4691
|
+
amount: bigint;
|
|
4692
|
+
usd: number;
|
|
4693
|
+
};
|
|
4694
|
+
fee: {
|
|
4695
|
+
amount: bigint;
|
|
4696
|
+
usd: number;
|
|
4697
|
+
};
|
|
4631
4698
|
txSignature: string | null;
|
|
4632
4699
|
positionAddress: string | null;
|
|
4633
4700
|
slot: bigint;
|
|
@@ -4641,12 +4708,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4641
4708
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4642
4709
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4643
4710
|
uiPrice: number;
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4711
|
+
baseToken: {
|
|
4712
|
+
amount: bigint;
|
|
4713
|
+
usd: number;
|
|
4714
|
+
};
|
|
4715
|
+
quoteToken: {
|
|
4716
|
+
amount: bigint;
|
|
4717
|
+
usd: number;
|
|
4718
|
+
};
|
|
4719
|
+
fee: {
|
|
4720
|
+
amount: bigint;
|
|
4721
|
+
usd: number;
|
|
4722
|
+
};
|
|
4650
4723
|
txSignature: string | null;
|
|
4651
4724
|
positionAddress: string | null;
|
|
4652
4725
|
slot: bigint;
|
|
@@ -4666,12 +4739,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4666
4739
|
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4667
4740
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4668
4741
|
uiPrice: z.ZodNumber;
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4742
|
+
baseToken: z.ZodObject<{
|
|
4743
|
+
amount: z.ZodBigInt;
|
|
4744
|
+
usd: z.ZodNumber;
|
|
4745
|
+
}, "strip", z.ZodTypeAny, {
|
|
4746
|
+
amount: bigint;
|
|
4747
|
+
usd: number;
|
|
4748
|
+
}, {
|
|
4749
|
+
amount: bigint;
|
|
4750
|
+
usd: number;
|
|
4751
|
+
}>;
|
|
4752
|
+
quoteToken: z.ZodObject<{
|
|
4753
|
+
amount: z.ZodBigInt;
|
|
4754
|
+
usd: z.ZodNumber;
|
|
4755
|
+
}, "strip", z.ZodTypeAny, {
|
|
4756
|
+
amount: bigint;
|
|
4757
|
+
usd: number;
|
|
4758
|
+
}, {
|
|
4759
|
+
amount: bigint;
|
|
4760
|
+
usd: number;
|
|
4761
|
+
}>;
|
|
4762
|
+
fee: z.ZodObject<{
|
|
4763
|
+
amount: z.ZodBigInt;
|
|
4764
|
+
usd: z.ZodNumber;
|
|
4765
|
+
}, "strip", z.ZodTypeAny, {
|
|
4766
|
+
amount: bigint;
|
|
4767
|
+
usd: number;
|
|
4768
|
+
}, {
|
|
4769
|
+
amount: bigint;
|
|
4770
|
+
usd: number;
|
|
4771
|
+
}>;
|
|
4675
4772
|
pnlUsd: z.ZodNullable<z.ZodNumber>;
|
|
4676
4773
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4677
4774
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
@@ -4686,12 +4783,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4686
4783
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4687
4784
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4688
4785
|
uiPrice: number;
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4786
|
+
baseToken: {
|
|
4787
|
+
amount: bigint;
|
|
4788
|
+
usd: number;
|
|
4789
|
+
};
|
|
4790
|
+
quoteToken: {
|
|
4791
|
+
amount: bigint;
|
|
4792
|
+
usd: number;
|
|
4793
|
+
};
|
|
4794
|
+
fee: {
|
|
4795
|
+
amount: bigint;
|
|
4796
|
+
usd: number;
|
|
4797
|
+
};
|
|
4695
4798
|
txSignature: string | null;
|
|
4696
4799
|
positionAddress: string | null;
|
|
4697
4800
|
slot: bigint;
|
|
@@ -4705,12 +4808,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4705
4808
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4706
4809
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4707
4810
|
uiPrice: number;
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4811
|
+
baseToken: {
|
|
4812
|
+
amount: bigint;
|
|
4813
|
+
usd: number;
|
|
4814
|
+
};
|
|
4815
|
+
quoteToken: {
|
|
4816
|
+
amount: bigint;
|
|
4817
|
+
usd: number;
|
|
4818
|
+
};
|
|
4819
|
+
fee: {
|
|
4820
|
+
amount: bigint;
|
|
4821
|
+
usd: number;
|
|
4822
|
+
};
|
|
4714
4823
|
txSignature: string | null;
|
|
4715
4824
|
positionAddress: string | null;
|
|
4716
4825
|
slot: bigint;
|
|
@@ -4731,12 +4840,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4731
4840
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4732
4841
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4733
4842
|
uiPrice: number;
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4843
|
+
baseToken: {
|
|
4844
|
+
amount: bigint;
|
|
4845
|
+
usd: number;
|
|
4846
|
+
};
|
|
4847
|
+
quoteToken: {
|
|
4848
|
+
amount: bigint;
|
|
4849
|
+
usd: number;
|
|
4850
|
+
};
|
|
4851
|
+
fee: {
|
|
4852
|
+
amount: bigint;
|
|
4853
|
+
usd: number;
|
|
4854
|
+
};
|
|
4740
4855
|
txSignature: string | null;
|
|
4741
4856
|
positionAddress: string | null;
|
|
4742
4857
|
slot: bigint;
|
|
@@ -4757,12 +4872,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4757
4872
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4758
4873
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4759
4874
|
uiPrice: number;
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4875
|
+
baseToken: {
|
|
4876
|
+
amount: bigint;
|
|
4877
|
+
usd: number;
|
|
4878
|
+
};
|
|
4879
|
+
quoteToken: {
|
|
4880
|
+
amount: bigint;
|
|
4881
|
+
usd: number;
|
|
4882
|
+
};
|
|
4883
|
+
fee: {
|
|
4884
|
+
amount: bigint;
|
|
4885
|
+
usd: number;
|
|
4886
|
+
};
|
|
4766
4887
|
txSignature: string | null;
|
|
4767
4888
|
positionAddress: string | null;
|
|
4768
4889
|
slot: bigint;
|
|
@@ -4783,12 +4904,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4783
4904
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4784
4905
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4785
4906
|
uiPrice: number;
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4907
|
+
baseToken: {
|
|
4908
|
+
amount: bigint;
|
|
4909
|
+
usd: number;
|
|
4910
|
+
};
|
|
4911
|
+
quoteToken: {
|
|
4912
|
+
amount: bigint;
|
|
4913
|
+
usd: number;
|
|
4914
|
+
};
|
|
4915
|
+
fee: {
|
|
4916
|
+
amount: bigint;
|
|
4917
|
+
usd: number;
|
|
4918
|
+
};
|
|
4792
4919
|
txSignature: string | null;
|
|
4793
4920
|
positionAddress: string | null;
|
|
4794
4921
|
slot: bigint;
|
|
@@ -4809,12 +4936,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4809
4936
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4810
4937
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4811
4938
|
uiPrice: number;
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4939
|
+
baseToken: {
|
|
4940
|
+
amount: bigint;
|
|
4941
|
+
usd: number;
|
|
4942
|
+
};
|
|
4943
|
+
quoteToken: {
|
|
4944
|
+
amount: bigint;
|
|
4945
|
+
usd: number;
|
|
4946
|
+
};
|
|
4947
|
+
fee: {
|
|
4948
|
+
amount: bigint;
|
|
4949
|
+
usd: number;
|
|
4950
|
+
};
|
|
4818
4951
|
txSignature: string | null;
|
|
4819
4952
|
positionAddress: string | null;
|
|
4820
4953
|
slot: bigint;
|
package/dist/index.js
CHANGED
|
@@ -189,7 +189,8 @@ var WalletSubscriptionTopic = {
|
|
|
189
189
|
TUNA_SPOT_POSITIONS: "tuna_spot_positions",
|
|
190
190
|
LENDING_POSITIONS: "lending_positions",
|
|
191
191
|
FUSION_LIMIT_ORDERS: "fusion_limit_orders",
|
|
192
|
-
STAKING_POSITION: "staking_position"
|
|
192
|
+
STAKING_POSITION: "staking_position",
|
|
193
|
+
TRADE_HISTORY: "trade_history"
|
|
193
194
|
};
|
|
194
195
|
var NotificationEntitySchema = import_zod.z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
195
196
|
var NotificationActionSchema = import_zod.z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
|
@@ -475,12 +476,9 @@ var TradeHistoryEntry = import_zod.z.object({
|
|
|
475
476
|
uiDirection: TradeHistoryUIDirectionSchema,
|
|
476
477
|
// Trade price formatted for ui display
|
|
477
478
|
uiPrice: import_zod.z.number(),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
quoteTokenAmountUsd: import_zod.z.number(),
|
|
482
|
-
feeAmount: import_zod.z.coerce.bigint(),
|
|
483
|
-
feeAmountUsd: import_zod.z.number(),
|
|
479
|
+
baseToken: amountWithUsd,
|
|
480
|
+
quoteToken: amountWithUsd,
|
|
481
|
+
fee: amountWithUsd,
|
|
484
482
|
pnlUsd: import_zod.z.nullable(import_zod.z.number()),
|
|
485
483
|
txSignature: import_zod.z.nullable(import_zod.z.string()),
|
|
486
484
|
positionAddress: import_zod.z.nullable(import_zod.z.string()),
|
package/dist/index.mjs
CHANGED
|
@@ -154,7 +154,8 @@ var WalletSubscriptionTopic = {
|
|
|
154
154
|
TUNA_SPOT_POSITIONS: "tuna_spot_positions",
|
|
155
155
|
LENDING_POSITIONS: "lending_positions",
|
|
156
156
|
FUSION_LIMIT_ORDERS: "fusion_limit_orders",
|
|
157
|
-
STAKING_POSITION: "staking_position"
|
|
157
|
+
STAKING_POSITION: "staking_position",
|
|
158
|
+
TRADE_HISTORY: "trade_history"
|
|
158
159
|
};
|
|
159
160
|
var NotificationEntitySchema = z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
160
161
|
var NotificationActionSchema = z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
|
@@ -440,12 +441,9 @@ var TradeHistoryEntry = z.object({
|
|
|
440
441
|
uiDirection: TradeHistoryUIDirectionSchema,
|
|
441
442
|
// Trade price formatted for ui display
|
|
442
443
|
uiPrice: z.number(),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
quoteTokenAmountUsd: z.number(),
|
|
447
|
-
feeAmount: z.coerce.bigint(),
|
|
448
|
-
feeAmountUsd: z.number(),
|
|
444
|
+
baseToken: amountWithUsd,
|
|
445
|
+
quoteToken: amountWithUsd,
|
|
446
|
+
fee: amountWithUsd,
|
|
449
447
|
pnlUsd: z.nullable(z.number()),
|
|
450
448
|
txSignature: z.nullable(z.string()),
|
|
451
449
|
positionAddress: z.nullable(z.string()),
|