@crypticdot/defituna-api 1.3.6 → 1.3.8

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
@@ -1468,7 +1468,16 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1468
1468
  amount: bigint;
1469
1469
  usd: number;
1470
1470
  }>;
1471
- pnlUsd: z.ZodNullable<z.ZodNumber>;
1471
+ pnl: z.ZodNullable<z.ZodObject<{
1472
+ usd: z.ZodNumber;
1473
+ bps: z.ZodNumber;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ usd: number;
1476
+ bps: number;
1477
+ }, {
1478
+ usd: number;
1479
+ bps: number;
1480
+ }>>;
1472
1481
  txSignature: z.ZodNullable<z.ZodString>;
1473
1482
  positionAddress: z.ZodNullable<z.ZodString>;
1474
1483
  slot: z.ZodBigInt;
@@ -1476,7 +1485,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1476
1485
  }, "strip", z.ZodTypeAny, {
1477
1486
  authority: string;
1478
1487
  pool: string;
1479
- pnlUsd: number | null;
1480
1488
  id: string;
1481
1489
  aToB: boolean;
1482
1490
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -1494,6 +1502,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1494
1502
  amount: bigint;
1495
1503
  usd: number;
1496
1504
  };
1505
+ pnl: {
1506
+ usd: number;
1507
+ bps: number;
1508
+ } | null;
1497
1509
  txSignature: string | null;
1498
1510
  positionAddress: string | null;
1499
1511
  slot: bigint;
@@ -1501,7 +1513,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1501
1513
  }, {
1502
1514
  authority: string;
1503
1515
  pool: string;
1504
- pnlUsd: number | null;
1505
1516
  id: string;
1506
1517
  aToB: boolean;
1507
1518
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -1519,6 +1530,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1519
1530
  amount: bigint;
1520
1531
  usd: number;
1521
1532
  };
1533
+ pnl: {
1534
+ usd: number;
1535
+ bps: number;
1536
+ } | null;
1522
1537
  txSignature: string | null;
1523
1538
  positionAddress: string | null;
1524
1539
  slot: bigint;
@@ -4685,7 +4700,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4685
4700
  amount: bigint;
4686
4701
  usd: number;
4687
4702
  }>;
4688
- pnlUsd: z.ZodNullable<z.ZodNumber>;
4703
+ pnl: z.ZodNullable<z.ZodObject<{
4704
+ usd: z.ZodNumber;
4705
+ bps: z.ZodNumber;
4706
+ }, "strip", z.ZodTypeAny, {
4707
+ usd: number;
4708
+ bps: number;
4709
+ }, {
4710
+ usd: number;
4711
+ bps: number;
4712
+ }>>;
4689
4713
  txSignature: z.ZodNullable<z.ZodString>;
4690
4714
  positionAddress: z.ZodNullable<z.ZodString>;
4691
4715
  slot: z.ZodBigInt;
@@ -4693,7 +4717,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4693
4717
  }, "strip", z.ZodTypeAny, {
4694
4718
  authority: string;
4695
4719
  pool: string;
4696
- pnlUsd: number | null;
4697
4720
  id: string;
4698
4721
  aToB: boolean;
4699
4722
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4711,6 +4734,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4711
4734
  amount: bigint;
4712
4735
  usd: number;
4713
4736
  };
4737
+ pnl: {
4738
+ usd: number;
4739
+ bps: number;
4740
+ } | null;
4714
4741
  txSignature: string | null;
4715
4742
  positionAddress: string | null;
4716
4743
  slot: bigint;
@@ -4718,7 +4745,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4718
4745
  }, {
4719
4746
  authority: string;
4720
4747
  pool: string;
4721
- pnlUsd: number | null;
4722
4748
  id: string;
4723
4749
  aToB: boolean;
4724
4750
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4736,6 +4762,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4736
4762
  amount: bigint;
4737
4763
  usd: number;
4738
4764
  };
4765
+ pnl: {
4766
+ usd: number;
4767
+ bps: number;
4768
+ } | null;
4739
4769
  txSignature: string | null;
4740
4770
  positionAddress: string | null;
4741
4771
  slot: bigint;
@@ -4785,7 +4815,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4785
4815
  amount: bigint;
4786
4816
  usd: number;
4787
4817
  }>;
4788
- pnlUsd: z.ZodNullable<z.ZodNumber>;
4818
+ pnl: z.ZodNullable<z.ZodObject<{
4819
+ usd: z.ZodNumber;
4820
+ bps: z.ZodNumber;
4821
+ }, "strip", z.ZodTypeAny, {
4822
+ usd: number;
4823
+ bps: number;
4824
+ }, {
4825
+ usd: number;
4826
+ bps: number;
4827
+ }>>;
4789
4828
  txSignature: z.ZodNullable<z.ZodString>;
4790
4829
  positionAddress: z.ZodNullable<z.ZodString>;
4791
4830
  slot: z.ZodBigInt;
@@ -4793,7 +4832,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4793
4832
  }, "strip", z.ZodTypeAny, {
4794
4833
  authority: string;
4795
4834
  pool: string;
4796
- pnlUsd: number | null;
4797
4835
  id: string;
4798
4836
  aToB: boolean;
4799
4837
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4811,6 +4849,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4811
4849
  amount: bigint;
4812
4850
  usd: number;
4813
4851
  };
4852
+ pnl: {
4853
+ usd: number;
4854
+ bps: number;
4855
+ } | null;
4814
4856
  txSignature: string | null;
4815
4857
  positionAddress: string | null;
4816
4858
  slot: bigint;
@@ -4818,7 +4860,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4818
4860
  }, {
4819
4861
  authority: string;
4820
4862
  pool: string;
4821
- pnlUsd: number | null;
4822
4863
  id: string;
4823
4864
  aToB: boolean;
4824
4865
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4836,6 +4877,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4836
4877
  amount: bigint;
4837
4878
  usd: number;
4838
4879
  };
4880
+ pnl: {
4881
+ usd: number;
4882
+ bps: number;
4883
+ } | null;
4839
4884
  txSignature: string | null;
4840
4885
  positionAddress: string | null;
4841
4886
  slot: bigint;
@@ -4850,7 +4895,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4850
4895
  data: {
4851
4896
  authority: string;
4852
4897
  pool: string;
4853
- pnlUsd: number | null;
4854
4898
  id: string;
4855
4899
  aToB: boolean;
4856
4900
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4868,6 +4912,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4868
4912
  amount: bigint;
4869
4913
  usd: number;
4870
4914
  };
4915
+ pnl: {
4916
+ usd: number;
4917
+ bps: number;
4918
+ } | null;
4871
4919
  txSignature: string | null;
4872
4920
  positionAddress: string | null;
4873
4921
  slot: bigint;
@@ -4882,7 +4930,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4882
4930
  data: {
4883
4931
  authority: string;
4884
4932
  pool: string;
4885
- pnlUsd: number | null;
4886
4933
  id: string;
4887
4934
  aToB: boolean;
4888
4935
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4900,6 +4947,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4900
4947
  amount: bigint;
4901
4948
  usd: number;
4902
4949
  };
4950
+ pnl: {
4951
+ usd: number;
4952
+ bps: number;
4953
+ } | null;
4903
4954
  txSignature: string | null;
4904
4955
  positionAddress: string | null;
4905
4956
  slot: bigint;
@@ -4914,7 +4965,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4914
4965
  data: {
4915
4966
  authority: string;
4916
4967
  pool: string;
4917
- pnlUsd: number | null;
4918
4968
  id: string;
4919
4969
  aToB: boolean;
4920
4970
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4932,6 +4982,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4932
4982
  amount: bigint;
4933
4983
  usd: number;
4934
4984
  };
4985
+ pnl: {
4986
+ usd: number;
4987
+ bps: number;
4988
+ } | null;
4935
4989
  txSignature: string | null;
4936
4990
  positionAddress: string | null;
4937
4991
  slot: bigint;
@@ -4946,7 +5000,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4946
5000
  data: {
4947
5001
  authority: string;
4948
5002
  pool: string;
4949
- pnlUsd: number | null;
4950
5003
  id: string;
4951
5004
  aToB: boolean;
4952
5005
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4964,6 +5017,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4964
5017
  amount: bigint;
4965
5018
  usd: number;
4966
5019
  };
5020
+ pnl: {
5021
+ usd: number;
5022
+ bps: number;
5023
+ } | null;
4967
5024
  txSignature: string | null;
4968
5025
  positionAddress: string | null;
4969
5026
  slot: bigint;
package/dist/index.d.ts CHANGED
@@ -1468,7 +1468,16 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1468
1468
  amount: bigint;
1469
1469
  usd: number;
1470
1470
  }>;
1471
- pnlUsd: z.ZodNullable<z.ZodNumber>;
1471
+ pnl: z.ZodNullable<z.ZodObject<{
1472
+ usd: z.ZodNumber;
1473
+ bps: z.ZodNumber;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ usd: number;
1476
+ bps: number;
1477
+ }, {
1478
+ usd: number;
1479
+ bps: number;
1480
+ }>>;
1472
1481
  txSignature: z.ZodNullable<z.ZodString>;
1473
1482
  positionAddress: z.ZodNullable<z.ZodString>;
1474
1483
  slot: z.ZodBigInt;
@@ -1476,7 +1485,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1476
1485
  }, "strip", z.ZodTypeAny, {
1477
1486
  authority: string;
1478
1487
  pool: string;
1479
- pnlUsd: number | null;
1480
1488
  id: string;
1481
1489
  aToB: boolean;
1482
1490
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -1494,6 +1502,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1494
1502
  amount: bigint;
1495
1503
  usd: number;
1496
1504
  };
1505
+ pnl: {
1506
+ usd: number;
1507
+ bps: number;
1508
+ } | null;
1497
1509
  txSignature: string | null;
1498
1510
  positionAddress: string | null;
1499
1511
  slot: bigint;
@@ -1501,7 +1513,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1501
1513
  }, {
1502
1514
  authority: string;
1503
1515
  pool: string;
1504
- pnlUsd: number | null;
1505
1516
  id: string;
1506
1517
  aToB: boolean;
1507
1518
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -1519,6 +1530,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1519
1530
  amount: bigint;
1520
1531
  usd: number;
1521
1532
  };
1533
+ pnl: {
1534
+ usd: number;
1535
+ bps: number;
1536
+ } | null;
1522
1537
  txSignature: string | null;
1523
1538
  positionAddress: string | null;
1524
1539
  slot: bigint;
@@ -4685,7 +4700,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4685
4700
  amount: bigint;
4686
4701
  usd: number;
4687
4702
  }>;
4688
- pnlUsd: z.ZodNullable<z.ZodNumber>;
4703
+ pnl: z.ZodNullable<z.ZodObject<{
4704
+ usd: z.ZodNumber;
4705
+ bps: z.ZodNumber;
4706
+ }, "strip", z.ZodTypeAny, {
4707
+ usd: number;
4708
+ bps: number;
4709
+ }, {
4710
+ usd: number;
4711
+ bps: number;
4712
+ }>>;
4689
4713
  txSignature: z.ZodNullable<z.ZodString>;
4690
4714
  positionAddress: z.ZodNullable<z.ZodString>;
4691
4715
  slot: z.ZodBigInt;
@@ -4693,7 +4717,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4693
4717
  }, "strip", z.ZodTypeAny, {
4694
4718
  authority: string;
4695
4719
  pool: string;
4696
- pnlUsd: number | null;
4697
4720
  id: string;
4698
4721
  aToB: boolean;
4699
4722
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4711,6 +4734,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4711
4734
  amount: bigint;
4712
4735
  usd: number;
4713
4736
  };
4737
+ pnl: {
4738
+ usd: number;
4739
+ bps: number;
4740
+ } | null;
4714
4741
  txSignature: string | null;
4715
4742
  positionAddress: string | null;
4716
4743
  slot: bigint;
@@ -4718,7 +4745,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4718
4745
  }, {
4719
4746
  authority: string;
4720
4747
  pool: string;
4721
- pnlUsd: number | null;
4722
4748
  id: string;
4723
4749
  aToB: boolean;
4724
4750
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4736,6 +4762,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4736
4762
  amount: bigint;
4737
4763
  usd: number;
4738
4764
  };
4765
+ pnl: {
4766
+ usd: number;
4767
+ bps: number;
4768
+ } | null;
4739
4769
  txSignature: string | null;
4740
4770
  positionAddress: string | null;
4741
4771
  slot: bigint;
@@ -4785,7 +4815,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4785
4815
  amount: bigint;
4786
4816
  usd: number;
4787
4817
  }>;
4788
- pnlUsd: z.ZodNullable<z.ZodNumber>;
4818
+ pnl: z.ZodNullable<z.ZodObject<{
4819
+ usd: z.ZodNumber;
4820
+ bps: z.ZodNumber;
4821
+ }, "strip", z.ZodTypeAny, {
4822
+ usd: number;
4823
+ bps: number;
4824
+ }, {
4825
+ usd: number;
4826
+ bps: number;
4827
+ }>>;
4789
4828
  txSignature: z.ZodNullable<z.ZodString>;
4790
4829
  positionAddress: z.ZodNullable<z.ZodString>;
4791
4830
  slot: z.ZodBigInt;
@@ -4793,7 +4832,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4793
4832
  }, "strip", z.ZodTypeAny, {
4794
4833
  authority: string;
4795
4834
  pool: string;
4796
- pnlUsd: number | null;
4797
4835
  id: string;
4798
4836
  aToB: boolean;
4799
4837
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4811,6 +4849,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4811
4849
  amount: bigint;
4812
4850
  usd: number;
4813
4851
  };
4852
+ pnl: {
4853
+ usd: number;
4854
+ bps: number;
4855
+ } | null;
4814
4856
  txSignature: string | null;
4815
4857
  positionAddress: string | null;
4816
4858
  slot: bigint;
@@ -4818,7 +4860,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4818
4860
  }, {
4819
4861
  authority: string;
4820
4862
  pool: string;
4821
- pnlUsd: number | null;
4822
4863
  id: string;
4823
4864
  aToB: boolean;
4824
4865
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4836,6 +4877,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4836
4877
  amount: bigint;
4837
4878
  usd: number;
4838
4879
  };
4880
+ pnl: {
4881
+ usd: number;
4882
+ bps: number;
4883
+ } | null;
4839
4884
  txSignature: string | null;
4840
4885
  positionAddress: string | null;
4841
4886
  slot: bigint;
@@ -4850,7 +4895,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4850
4895
  data: {
4851
4896
  authority: string;
4852
4897
  pool: string;
4853
- pnlUsd: number | null;
4854
4898
  id: string;
4855
4899
  aToB: boolean;
4856
4900
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4868,6 +4912,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4868
4912
  amount: bigint;
4869
4913
  usd: number;
4870
4914
  };
4915
+ pnl: {
4916
+ usd: number;
4917
+ bps: number;
4918
+ } | null;
4871
4919
  txSignature: string | null;
4872
4920
  positionAddress: string | null;
4873
4921
  slot: bigint;
@@ -4882,7 +4930,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4882
4930
  data: {
4883
4931
  authority: string;
4884
4932
  pool: string;
4885
- pnlUsd: number | null;
4886
4933
  id: string;
4887
4934
  aToB: boolean;
4888
4935
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4900,6 +4947,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4900
4947
  amount: bigint;
4901
4948
  usd: number;
4902
4949
  };
4950
+ pnl: {
4951
+ usd: number;
4952
+ bps: number;
4953
+ } | null;
4903
4954
  txSignature: string | null;
4904
4955
  positionAddress: string | null;
4905
4956
  slot: bigint;
@@ -4914,7 +4965,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4914
4965
  data: {
4915
4966
  authority: string;
4916
4967
  pool: string;
4917
- pnlUsd: number | null;
4918
4968
  id: string;
4919
4969
  aToB: boolean;
4920
4970
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4932,6 +4982,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4932
4982
  amount: bigint;
4933
4983
  usd: number;
4934
4984
  };
4985
+ pnl: {
4986
+ usd: number;
4987
+ bps: number;
4988
+ } | null;
4935
4989
  txSignature: string | null;
4936
4990
  positionAddress: string | null;
4937
4991
  slot: bigint;
@@ -4946,7 +5000,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4946
5000
  data: {
4947
5001
  authority: string;
4948
5002
  pool: string;
4949
- pnlUsd: number | null;
4950
5003
  id: string;
4951
5004
  aToB: boolean;
4952
5005
  action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
@@ -4964,6 +5017,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4964
5017
  amount: bigint;
4965
5018
  usd: number;
4966
5019
  };
5020
+ pnl: {
5021
+ usd: number;
5022
+ bps: number;
5023
+ } | null;
4967
5024
  txSignature: string | null;
4968
5025
  positionAddress: string | null;
4969
5026
  slot: bigint;
package/dist/index.js CHANGED
@@ -483,7 +483,12 @@ var TradeHistoryEntry = import_zod.z.object({
483
483
  baseToken: amountWithUsd,
484
484
  quoteToken: amountWithUsd,
485
485
  fee: amountWithUsd,
486
- pnlUsd: import_zod.z.nullable(import_zod.z.number()),
486
+ pnl: import_zod.z.nullable(
487
+ import_zod.z.object({
488
+ usd: import_zod.z.number(),
489
+ bps: import_zod.z.number()
490
+ })
491
+ ),
487
492
  txSignature: import_zod.z.nullable(import_zod.z.string()),
488
493
  positionAddress: import_zod.z.nullable(import_zod.z.string()),
489
494
  slot: import_zod.z.coerce.bigint(),
package/dist/index.mjs CHANGED
@@ -448,7 +448,12 @@ var TradeHistoryEntry = z.object({
448
448
  baseToken: amountWithUsd,
449
449
  quoteToken: amountWithUsd,
450
450
  fee: amountWithUsd,
451
- pnlUsd: z.nullable(z.number()),
451
+ pnl: z.nullable(
452
+ z.object({
453
+ usd: z.number(),
454
+ bps: z.number()
455
+ })
456
+ ),
452
457
  txSignature: z.nullable(z.string()),
453
458
  positionAddress: z.nullable(z.string()),
454
459
  slot: z.coerce.bigint(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",