@crypticdot/defituna-api 1.3.1 → 1.3.2

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 CHANGED
@@ -1431,12 +1431,36 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1431
1431
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
1432
1432
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
1433
1433
  uiPrice: z.ZodNumber;
1434
- baseTokenAmount: z.ZodBigInt;
1435
- baseTokenAmountUsd: z.ZodNumber;
1436
- quoteTokenAmount: z.ZodBigInt;
1437
- quoteTokenAmountUsd: z.ZodNumber;
1438
- feeAmount: z.ZodBigInt;
1439
- feeAmountUsd: z.ZodNumber;
1434
+ baseToken: z.ZodObject<{
1435
+ amount: z.ZodBigInt;
1436
+ usd: z.ZodNumber;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ amount: bigint;
1439
+ usd: number;
1440
+ }, {
1441
+ amount: bigint;
1442
+ usd: number;
1443
+ }>;
1444
+ quoteToken: z.ZodObject<{
1445
+ amount: z.ZodBigInt;
1446
+ usd: z.ZodNumber;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ amount: bigint;
1449
+ usd: number;
1450
+ }, {
1451
+ amount: bigint;
1452
+ usd: number;
1453
+ }>;
1454
+ fee: z.ZodObject<{
1455
+ amount: z.ZodBigInt;
1456
+ usd: z.ZodNumber;
1457
+ }, "strip", z.ZodTypeAny, {
1458
+ amount: bigint;
1459
+ usd: number;
1460
+ }, {
1461
+ amount: bigint;
1462
+ usd: number;
1463
+ }>;
1440
1464
  pnlUsd: z.ZodNullable<z.ZodNumber>;
1441
1465
  txSignature: z.ZodNullable<z.ZodString>;
1442
1466
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -1451,12 +1475,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1451
1475
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1452
1476
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1453
1477
  uiPrice: number;
1454
- baseTokenAmount: bigint;
1455
- baseTokenAmountUsd: number;
1456
- quoteTokenAmount: bigint;
1457
- quoteTokenAmountUsd: number;
1458
- feeAmount: bigint;
1459
- feeAmountUsd: number;
1478
+ baseToken: {
1479
+ amount: bigint;
1480
+ usd: number;
1481
+ };
1482
+ quoteToken: {
1483
+ amount: bigint;
1484
+ usd: number;
1485
+ };
1486
+ fee: {
1487
+ amount: bigint;
1488
+ usd: number;
1489
+ };
1460
1490
  txSignature: string | null;
1461
1491
  positionAddress: string | null;
1462
1492
  slot: bigint;
@@ -1470,12 +1500,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1470
1500
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1471
1501
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1472
1502
  uiPrice: number;
1473
- baseTokenAmount: bigint;
1474
- baseTokenAmountUsd: number;
1475
- quoteTokenAmount: bigint;
1476
- quoteTokenAmountUsd: number;
1477
- feeAmount: bigint;
1478
- feeAmountUsd: number;
1503
+ baseToken: {
1504
+ amount: bigint;
1505
+ usd: number;
1506
+ };
1507
+ quoteToken: {
1508
+ amount: bigint;
1509
+ usd: number;
1510
+ };
1511
+ fee: {
1512
+ amount: bigint;
1513
+ usd: number;
1514
+ };
1479
1515
  txSignature: string | null;
1480
1516
  positionAddress: string | null;
1481
1517
  slot: bigint;
@@ -4602,12 +4638,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4602
4638
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
4603
4639
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4604
4640
  uiPrice: z.ZodNumber;
4605
- baseTokenAmount: z.ZodBigInt;
4606
- baseTokenAmountUsd: z.ZodNumber;
4607
- quoteTokenAmount: z.ZodBigInt;
4608
- quoteTokenAmountUsd: z.ZodNumber;
4609
- feeAmount: z.ZodBigInt;
4610
- feeAmountUsd: z.ZodNumber;
4641
+ baseToken: z.ZodObject<{
4642
+ amount: z.ZodBigInt;
4643
+ usd: z.ZodNumber;
4644
+ }, "strip", z.ZodTypeAny, {
4645
+ amount: bigint;
4646
+ usd: number;
4647
+ }, {
4648
+ amount: bigint;
4649
+ usd: number;
4650
+ }>;
4651
+ quoteToken: z.ZodObject<{
4652
+ amount: z.ZodBigInt;
4653
+ usd: z.ZodNumber;
4654
+ }, "strip", z.ZodTypeAny, {
4655
+ amount: bigint;
4656
+ usd: number;
4657
+ }, {
4658
+ amount: bigint;
4659
+ usd: number;
4660
+ }>;
4661
+ fee: z.ZodObject<{
4662
+ amount: z.ZodBigInt;
4663
+ usd: z.ZodNumber;
4664
+ }, "strip", z.ZodTypeAny, {
4665
+ amount: bigint;
4666
+ usd: number;
4667
+ }, {
4668
+ amount: bigint;
4669
+ usd: number;
4670
+ }>;
4611
4671
  pnlUsd: z.ZodNullable<z.ZodNumber>;
4612
4672
  txSignature: z.ZodNullable<z.ZodString>;
4613
4673
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -4622,12 +4682,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4622
4682
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4623
4683
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4624
4684
  uiPrice: number;
4625
- baseTokenAmount: bigint;
4626
- baseTokenAmountUsd: number;
4627
- quoteTokenAmount: bigint;
4628
- quoteTokenAmountUsd: number;
4629
- feeAmount: bigint;
4630
- feeAmountUsd: number;
4685
+ baseToken: {
4686
+ amount: bigint;
4687
+ usd: number;
4688
+ };
4689
+ quoteToken: {
4690
+ amount: bigint;
4691
+ usd: number;
4692
+ };
4693
+ fee: {
4694
+ amount: bigint;
4695
+ usd: number;
4696
+ };
4631
4697
  txSignature: string | null;
4632
4698
  positionAddress: string | null;
4633
4699
  slot: bigint;
@@ -4641,12 +4707,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4641
4707
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4642
4708
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4643
4709
  uiPrice: number;
4644
- baseTokenAmount: bigint;
4645
- baseTokenAmountUsd: number;
4646
- quoteTokenAmount: bigint;
4647
- quoteTokenAmountUsd: number;
4648
- feeAmount: bigint;
4649
- feeAmountUsd: number;
4710
+ baseToken: {
4711
+ amount: bigint;
4712
+ usd: number;
4713
+ };
4714
+ quoteToken: {
4715
+ amount: bigint;
4716
+ usd: number;
4717
+ };
4718
+ fee: {
4719
+ amount: bigint;
4720
+ usd: number;
4721
+ };
4650
4722
  txSignature: string | null;
4651
4723
  positionAddress: string | null;
4652
4724
  slot: bigint;
@@ -4666,12 +4738,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4666
4738
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
4667
4739
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4668
4740
  uiPrice: z.ZodNumber;
4669
- baseTokenAmount: z.ZodBigInt;
4670
- baseTokenAmountUsd: z.ZodNumber;
4671
- quoteTokenAmount: z.ZodBigInt;
4672
- quoteTokenAmountUsd: z.ZodNumber;
4673
- feeAmount: z.ZodBigInt;
4674
- feeAmountUsd: z.ZodNumber;
4741
+ baseToken: z.ZodObject<{
4742
+ amount: z.ZodBigInt;
4743
+ usd: z.ZodNumber;
4744
+ }, "strip", z.ZodTypeAny, {
4745
+ amount: bigint;
4746
+ usd: number;
4747
+ }, {
4748
+ amount: bigint;
4749
+ usd: number;
4750
+ }>;
4751
+ quoteToken: z.ZodObject<{
4752
+ amount: z.ZodBigInt;
4753
+ usd: z.ZodNumber;
4754
+ }, "strip", z.ZodTypeAny, {
4755
+ amount: bigint;
4756
+ usd: number;
4757
+ }, {
4758
+ amount: bigint;
4759
+ usd: number;
4760
+ }>;
4761
+ fee: z.ZodObject<{
4762
+ amount: z.ZodBigInt;
4763
+ usd: z.ZodNumber;
4764
+ }, "strip", z.ZodTypeAny, {
4765
+ amount: bigint;
4766
+ usd: number;
4767
+ }, {
4768
+ amount: bigint;
4769
+ usd: number;
4770
+ }>;
4675
4771
  pnlUsd: z.ZodNullable<z.ZodNumber>;
4676
4772
  txSignature: z.ZodNullable<z.ZodString>;
4677
4773
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -4686,12 +4782,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4686
4782
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4687
4783
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4688
4784
  uiPrice: number;
4689
- baseTokenAmount: bigint;
4690
- baseTokenAmountUsd: number;
4691
- quoteTokenAmount: bigint;
4692
- quoteTokenAmountUsd: number;
4693
- feeAmount: bigint;
4694
- feeAmountUsd: number;
4785
+ baseToken: {
4786
+ amount: bigint;
4787
+ usd: number;
4788
+ };
4789
+ quoteToken: {
4790
+ amount: bigint;
4791
+ usd: number;
4792
+ };
4793
+ fee: {
4794
+ amount: bigint;
4795
+ usd: number;
4796
+ };
4695
4797
  txSignature: string | null;
4696
4798
  positionAddress: string | null;
4697
4799
  slot: bigint;
@@ -4705,12 +4807,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4705
4807
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4706
4808
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4707
4809
  uiPrice: number;
4708
- baseTokenAmount: bigint;
4709
- baseTokenAmountUsd: number;
4710
- quoteTokenAmount: bigint;
4711
- quoteTokenAmountUsd: number;
4712
- feeAmount: bigint;
4713
- feeAmountUsd: number;
4810
+ baseToken: {
4811
+ amount: bigint;
4812
+ usd: number;
4813
+ };
4814
+ quoteToken: {
4815
+ amount: bigint;
4816
+ usd: number;
4817
+ };
4818
+ fee: {
4819
+ amount: bigint;
4820
+ usd: number;
4821
+ };
4714
4822
  txSignature: string | null;
4715
4823
  positionAddress: string | null;
4716
4824
  slot: bigint;
@@ -4731,12 +4839,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4731
4839
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4732
4840
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4733
4841
  uiPrice: number;
4734
- baseTokenAmount: bigint;
4735
- baseTokenAmountUsd: number;
4736
- quoteTokenAmount: bigint;
4737
- quoteTokenAmountUsd: number;
4738
- feeAmount: bigint;
4739
- feeAmountUsd: number;
4842
+ baseToken: {
4843
+ amount: bigint;
4844
+ usd: number;
4845
+ };
4846
+ quoteToken: {
4847
+ amount: bigint;
4848
+ usd: number;
4849
+ };
4850
+ fee: {
4851
+ amount: bigint;
4852
+ usd: number;
4853
+ };
4740
4854
  txSignature: string | null;
4741
4855
  positionAddress: string | null;
4742
4856
  slot: bigint;
@@ -4757,12 +4871,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4757
4871
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4758
4872
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4759
4873
  uiPrice: number;
4760
- baseTokenAmount: bigint;
4761
- baseTokenAmountUsd: number;
4762
- quoteTokenAmount: bigint;
4763
- quoteTokenAmountUsd: number;
4764
- feeAmount: bigint;
4765
- feeAmountUsd: number;
4874
+ baseToken: {
4875
+ amount: bigint;
4876
+ usd: number;
4877
+ };
4878
+ quoteToken: {
4879
+ amount: bigint;
4880
+ usd: number;
4881
+ };
4882
+ fee: {
4883
+ amount: bigint;
4884
+ usd: number;
4885
+ };
4766
4886
  txSignature: string | null;
4767
4887
  positionAddress: string | null;
4768
4888
  slot: bigint;
@@ -4783,12 +4903,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4783
4903
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4784
4904
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4785
4905
  uiPrice: number;
4786
- baseTokenAmount: bigint;
4787
- baseTokenAmountUsd: number;
4788
- quoteTokenAmount: bigint;
4789
- quoteTokenAmountUsd: number;
4790
- feeAmount: bigint;
4791
- feeAmountUsd: number;
4906
+ baseToken: {
4907
+ amount: bigint;
4908
+ usd: number;
4909
+ };
4910
+ quoteToken: {
4911
+ amount: bigint;
4912
+ usd: number;
4913
+ };
4914
+ fee: {
4915
+ amount: bigint;
4916
+ usd: number;
4917
+ };
4792
4918
  txSignature: string | null;
4793
4919
  positionAddress: string | null;
4794
4920
  slot: bigint;
@@ -4809,12 +4935,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4809
4935
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4810
4936
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4811
4937
  uiPrice: number;
4812
- baseTokenAmount: bigint;
4813
- baseTokenAmountUsd: number;
4814
- quoteTokenAmount: bigint;
4815
- quoteTokenAmountUsd: number;
4816
- feeAmount: bigint;
4817
- feeAmountUsd: number;
4938
+ baseToken: {
4939
+ amount: bigint;
4940
+ usd: number;
4941
+ };
4942
+ quoteToken: {
4943
+ amount: bigint;
4944
+ usd: number;
4945
+ };
4946
+ fee: {
4947
+ amount: bigint;
4948
+ usd: number;
4949
+ };
4818
4950
  txSignature: string | null;
4819
4951
  positionAddress: string | null;
4820
4952
  slot: bigint;
package/dist/index.d.ts CHANGED
@@ -1431,12 +1431,36 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1431
1431
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
1432
1432
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
1433
1433
  uiPrice: z.ZodNumber;
1434
- baseTokenAmount: z.ZodBigInt;
1435
- baseTokenAmountUsd: z.ZodNumber;
1436
- quoteTokenAmount: z.ZodBigInt;
1437
- quoteTokenAmountUsd: z.ZodNumber;
1438
- feeAmount: z.ZodBigInt;
1439
- feeAmountUsd: z.ZodNumber;
1434
+ baseToken: z.ZodObject<{
1435
+ amount: z.ZodBigInt;
1436
+ usd: z.ZodNumber;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ amount: bigint;
1439
+ usd: number;
1440
+ }, {
1441
+ amount: bigint;
1442
+ usd: number;
1443
+ }>;
1444
+ quoteToken: z.ZodObject<{
1445
+ amount: z.ZodBigInt;
1446
+ usd: z.ZodNumber;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ amount: bigint;
1449
+ usd: number;
1450
+ }, {
1451
+ amount: bigint;
1452
+ usd: number;
1453
+ }>;
1454
+ fee: z.ZodObject<{
1455
+ amount: z.ZodBigInt;
1456
+ usd: z.ZodNumber;
1457
+ }, "strip", z.ZodTypeAny, {
1458
+ amount: bigint;
1459
+ usd: number;
1460
+ }, {
1461
+ amount: bigint;
1462
+ usd: number;
1463
+ }>;
1440
1464
  pnlUsd: z.ZodNullable<z.ZodNumber>;
1441
1465
  txSignature: z.ZodNullable<z.ZodString>;
1442
1466
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -1451,12 +1475,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1451
1475
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1452
1476
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1453
1477
  uiPrice: number;
1454
- baseTokenAmount: bigint;
1455
- baseTokenAmountUsd: number;
1456
- quoteTokenAmount: bigint;
1457
- quoteTokenAmountUsd: number;
1458
- feeAmount: bigint;
1459
- feeAmountUsd: number;
1478
+ baseToken: {
1479
+ amount: bigint;
1480
+ usd: number;
1481
+ };
1482
+ quoteToken: {
1483
+ amount: bigint;
1484
+ usd: number;
1485
+ };
1486
+ fee: {
1487
+ amount: bigint;
1488
+ usd: number;
1489
+ };
1460
1490
  txSignature: string | null;
1461
1491
  positionAddress: string | null;
1462
1492
  slot: bigint;
@@ -1470,12 +1500,18 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1470
1500
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1471
1501
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1472
1502
  uiPrice: number;
1473
- baseTokenAmount: bigint;
1474
- baseTokenAmountUsd: number;
1475
- quoteTokenAmount: bigint;
1476
- quoteTokenAmountUsd: number;
1477
- feeAmount: bigint;
1478
- feeAmountUsd: number;
1503
+ baseToken: {
1504
+ amount: bigint;
1505
+ usd: number;
1506
+ };
1507
+ quoteToken: {
1508
+ amount: bigint;
1509
+ usd: number;
1510
+ };
1511
+ fee: {
1512
+ amount: bigint;
1513
+ usd: number;
1514
+ };
1479
1515
  txSignature: string | null;
1480
1516
  positionAddress: string | null;
1481
1517
  slot: bigint;
@@ -4602,12 +4638,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4602
4638
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
4603
4639
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4604
4640
  uiPrice: z.ZodNumber;
4605
- baseTokenAmount: z.ZodBigInt;
4606
- baseTokenAmountUsd: z.ZodNumber;
4607
- quoteTokenAmount: z.ZodBigInt;
4608
- quoteTokenAmountUsd: z.ZodNumber;
4609
- feeAmount: z.ZodBigInt;
4610
- feeAmountUsd: z.ZodNumber;
4641
+ baseToken: z.ZodObject<{
4642
+ amount: z.ZodBigInt;
4643
+ usd: z.ZodNumber;
4644
+ }, "strip", z.ZodTypeAny, {
4645
+ amount: bigint;
4646
+ usd: number;
4647
+ }, {
4648
+ amount: bigint;
4649
+ usd: number;
4650
+ }>;
4651
+ quoteToken: z.ZodObject<{
4652
+ amount: z.ZodBigInt;
4653
+ usd: z.ZodNumber;
4654
+ }, "strip", z.ZodTypeAny, {
4655
+ amount: bigint;
4656
+ usd: number;
4657
+ }, {
4658
+ amount: bigint;
4659
+ usd: number;
4660
+ }>;
4661
+ fee: z.ZodObject<{
4662
+ amount: z.ZodBigInt;
4663
+ usd: z.ZodNumber;
4664
+ }, "strip", z.ZodTypeAny, {
4665
+ amount: bigint;
4666
+ usd: number;
4667
+ }, {
4668
+ amount: bigint;
4669
+ usd: number;
4670
+ }>;
4611
4671
  pnlUsd: z.ZodNullable<z.ZodNumber>;
4612
4672
  txSignature: z.ZodNullable<z.ZodString>;
4613
4673
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -4622,12 +4682,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4622
4682
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4623
4683
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4624
4684
  uiPrice: number;
4625
- baseTokenAmount: bigint;
4626
- baseTokenAmountUsd: number;
4627
- quoteTokenAmount: bigint;
4628
- quoteTokenAmountUsd: number;
4629
- feeAmount: bigint;
4630
- feeAmountUsd: number;
4685
+ baseToken: {
4686
+ amount: bigint;
4687
+ usd: number;
4688
+ };
4689
+ quoteToken: {
4690
+ amount: bigint;
4691
+ usd: number;
4692
+ };
4693
+ fee: {
4694
+ amount: bigint;
4695
+ usd: number;
4696
+ };
4631
4697
  txSignature: string | null;
4632
4698
  positionAddress: string | null;
4633
4699
  slot: bigint;
@@ -4641,12 +4707,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4641
4707
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4642
4708
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4643
4709
  uiPrice: number;
4644
- baseTokenAmount: bigint;
4645
- baseTokenAmountUsd: number;
4646
- quoteTokenAmount: bigint;
4647
- quoteTokenAmountUsd: number;
4648
- feeAmount: bigint;
4649
- feeAmountUsd: number;
4710
+ baseToken: {
4711
+ amount: bigint;
4712
+ usd: number;
4713
+ };
4714
+ quoteToken: {
4715
+ amount: bigint;
4716
+ usd: number;
4717
+ };
4718
+ fee: {
4719
+ amount: bigint;
4720
+ usd: number;
4721
+ };
4650
4722
  txSignature: string | null;
4651
4723
  positionAddress: string | null;
4652
4724
  slot: bigint;
@@ -4666,12 +4738,36 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4666
4738
  action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
4667
4739
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4668
4740
  uiPrice: z.ZodNumber;
4669
- baseTokenAmount: z.ZodBigInt;
4670
- baseTokenAmountUsd: z.ZodNumber;
4671
- quoteTokenAmount: z.ZodBigInt;
4672
- quoteTokenAmountUsd: z.ZodNumber;
4673
- feeAmount: z.ZodBigInt;
4674
- feeAmountUsd: z.ZodNumber;
4741
+ baseToken: z.ZodObject<{
4742
+ amount: z.ZodBigInt;
4743
+ usd: z.ZodNumber;
4744
+ }, "strip", z.ZodTypeAny, {
4745
+ amount: bigint;
4746
+ usd: number;
4747
+ }, {
4748
+ amount: bigint;
4749
+ usd: number;
4750
+ }>;
4751
+ quoteToken: z.ZodObject<{
4752
+ amount: z.ZodBigInt;
4753
+ usd: z.ZodNumber;
4754
+ }, "strip", z.ZodTypeAny, {
4755
+ amount: bigint;
4756
+ usd: number;
4757
+ }, {
4758
+ amount: bigint;
4759
+ usd: number;
4760
+ }>;
4761
+ fee: z.ZodObject<{
4762
+ amount: z.ZodBigInt;
4763
+ usd: z.ZodNumber;
4764
+ }, "strip", z.ZodTypeAny, {
4765
+ amount: bigint;
4766
+ usd: number;
4767
+ }, {
4768
+ amount: bigint;
4769
+ usd: number;
4770
+ }>;
4675
4771
  pnlUsd: z.ZodNullable<z.ZodNumber>;
4676
4772
  txSignature: z.ZodNullable<z.ZodString>;
4677
4773
  positionAddress: z.ZodNullable<z.ZodString>;
@@ -4686,12 +4782,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4686
4782
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4687
4783
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4688
4784
  uiPrice: number;
4689
- baseTokenAmount: bigint;
4690
- baseTokenAmountUsd: number;
4691
- quoteTokenAmount: bigint;
4692
- quoteTokenAmountUsd: number;
4693
- feeAmount: bigint;
4694
- feeAmountUsd: number;
4785
+ baseToken: {
4786
+ amount: bigint;
4787
+ usd: number;
4788
+ };
4789
+ quoteToken: {
4790
+ amount: bigint;
4791
+ usd: number;
4792
+ };
4793
+ fee: {
4794
+ amount: bigint;
4795
+ usd: number;
4796
+ };
4695
4797
  txSignature: string | null;
4696
4798
  positionAddress: string | null;
4697
4799
  slot: bigint;
@@ -4705,12 +4807,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4705
4807
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4706
4808
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4707
4809
  uiPrice: number;
4708
- baseTokenAmount: bigint;
4709
- baseTokenAmountUsd: number;
4710
- quoteTokenAmount: bigint;
4711
- quoteTokenAmountUsd: number;
4712
- feeAmount: bigint;
4713
- feeAmountUsd: number;
4810
+ baseToken: {
4811
+ amount: bigint;
4812
+ usd: number;
4813
+ };
4814
+ quoteToken: {
4815
+ amount: bigint;
4816
+ usd: number;
4817
+ };
4818
+ fee: {
4819
+ amount: bigint;
4820
+ usd: number;
4821
+ };
4714
4822
  txSignature: string | null;
4715
4823
  positionAddress: string | null;
4716
4824
  slot: bigint;
@@ -4731,12 +4839,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4731
4839
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4732
4840
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4733
4841
  uiPrice: number;
4734
- baseTokenAmount: bigint;
4735
- baseTokenAmountUsd: number;
4736
- quoteTokenAmount: bigint;
4737
- quoteTokenAmountUsd: number;
4738
- feeAmount: bigint;
4739
- feeAmountUsd: number;
4842
+ baseToken: {
4843
+ amount: bigint;
4844
+ usd: number;
4845
+ };
4846
+ quoteToken: {
4847
+ amount: bigint;
4848
+ usd: number;
4849
+ };
4850
+ fee: {
4851
+ amount: bigint;
4852
+ usd: number;
4853
+ };
4740
4854
  txSignature: string | null;
4741
4855
  positionAddress: string | null;
4742
4856
  slot: bigint;
@@ -4757,12 +4871,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4757
4871
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4758
4872
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4759
4873
  uiPrice: number;
4760
- baseTokenAmount: bigint;
4761
- baseTokenAmountUsd: number;
4762
- quoteTokenAmount: bigint;
4763
- quoteTokenAmountUsd: number;
4764
- feeAmount: bigint;
4765
- feeAmountUsd: number;
4874
+ baseToken: {
4875
+ amount: bigint;
4876
+ usd: number;
4877
+ };
4878
+ quoteToken: {
4879
+ amount: bigint;
4880
+ usd: number;
4881
+ };
4882
+ fee: {
4883
+ amount: bigint;
4884
+ usd: number;
4885
+ };
4766
4886
  txSignature: string | null;
4767
4887
  positionAddress: string | null;
4768
4888
  slot: bigint;
@@ -4783,12 +4903,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4783
4903
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4784
4904
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4785
4905
  uiPrice: number;
4786
- baseTokenAmount: bigint;
4787
- baseTokenAmountUsd: number;
4788
- quoteTokenAmount: bigint;
4789
- quoteTokenAmountUsd: number;
4790
- feeAmount: bigint;
4791
- feeAmountUsd: number;
4906
+ baseToken: {
4907
+ amount: bigint;
4908
+ usd: number;
4909
+ };
4910
+ quoteToken: {
4911
+ amount: bigint;
4912
+ usd: number;
4913
+ };
4914
+ fee: {
4915
+ amount: bigint;
4916
+ usd: number;
4917
+ };
4792
4918
  txSignature: string | null;
4793
4919
  positionAddress: string | null;
4794
4920
  slot: bigint;
@@ -4809,12 +4935,18 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4809
4935
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4810
4936
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4811
4937
  uiPrice: number;
4812
- baseTokenAmount: bigint;
4813
- baseTokenAmountUsd: number;
4814
- quoteTokenAmount: bigint;
4815
- quoteTokenAmountUsd: number;
4816
- feeAmount: bigint;
4817
- feeAmountUsd: number;
4938
+ baseToken: {
4939
+ amount: bigint;
4940
+ usd: number;
4941
+ };
4942
+ quoteToken: {
4943
+ amount: bigint;
4944
+ usd: number;
4945
+ };
4946
+ fee: {
4947
+ amount: bigint;
4948
+ usd: number;
4949
+ };
4818
4950
  txSignature: string | null;
4819
4951
  positionAddress: string | null;
4820
4952
  slot: bigint;
package/dist/index.js CHANGED
@@ -475,12 +475,9 @@ var TradeHistoryEntry = import_zod.z.object({
475
475
  uiDirection: TradeHistoryUIDirectionSchema,
476
476
  // Trade price formatted for ui display
477
477
  uiPrice: import_zod.z.number(),
478
- baseTokenAmount: import_zod.z.coerce.bigint(),
479
- baseTokenAmountUsd: import_zod.z.number(),
480
- quoteTokenAmount: import_zod.z.coerce.bigint(),
481
- quoteTokenAmountUsd: import_zod.z.number(),
482
- feeAmount: import_zod.z.coerce.bigint(),
483
- feeAmountUsd: import_zod.z.number(),
478
+ baseToken: amountWithUsd,
479
+ quoteToken: amountWithUsd,
480
+ fee: amountWithUsd,
484
481
  pnlUsd: import_zod.z.nullable(import_zod.z.number()),
485
482
  txSignature: import_zod.z.nullable(import_zod.z.string()),
486
483
  positionAddress: import_zod.z.nullable(import_zod.z.string()),
package/dist/index.mjs CHANGED
@@ -440,12 +440,9 @@ var TradeHistoryEntry = z.object({
440
440
  uiDirection: TradeHistoryUIDirectionSchema,
441
441
  // Trade price formatted for ui display
442
442
  uiPrice: z.number(),
443
- baseTokenAmount: z.coerce.bigint(),
444
- baseTokenAmountUsd: z.number(),
445
- quoteTokenAmount: z.coerce.bigint(),
446
- quoteTokenAmountUsd: z.number(),
447
- feeAmount: z.coerce.bigint(),
448
- feeAmountUsd: z.number(),
443
+ baseToken: amountWithUsd,
444
+ quoteToken: amountWithUsd,
445
+ fee: amountWithUsd,
449
446
  pnlUsd: z.nullable(z.number()),
450
447
  txSignature: z.nullable(z.string()),
451
448
  positionAddress: z.nullable(z.string()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",