@crypticdot/defituna-api 1.3.5 → 1.3.7
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 +83 -13
- package/dist/index.d.ts +83 -13
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1133,6 +1133,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1133
1133
|
amount: number;
|
|
1134
1134
|
bps: number;
|
|
1135
1135
|
}>;
|
|
1136
|
+
leverage: z.ZodNumber;
|
|
1136
1137
|
openedAt: z.ZodDate;
|
|
1137
1138
|
openedAtSlot: z.ZodBigInt;
|
|
1138
1139
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -1174,6 +1175,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1174
1175
|
amount: bigint;
|
|
1175
1176
|
usd: number;
|
|
1176
1177
|
};
|
|
1178
|
+
leverage: number;
|
|
1177
1179
|
openedAtSlot: bigint;
|
|
1178
1180
|
}, {
|
|
1179
1181
|
total: {
|
|
@@ -1212,6 +1214,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1212
1214
|
amount: bigint;
|
|
1213
1215
|
usd: number;
|
|
1214
1216
|
};
|
|
1217
|
+
leverage: number;
|
|
1215
1218
|
openedAtSlot: bigint;
|
|
1216
1219
|
}>;
|
|
1217
1220
|
declare const PoolSwap$1: z.ZodObject<{
|
|
@@ -1465,7 +1468,16 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1465
1468
|
amount: bigint;
|
|
1466
1469
|
usd: number;
|
|
1467
1470
|
}>;
|
|
1468
|
-
|
|
1471
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
1472
|
+
amount: z.ZodNumber;
|
|
1473
|
+
bps: z.ZodNumber;
|
|
1474
|
+
}, "strip", z.ZodTypeAny, {
|
|
1475
|
+
amount: number;
|
|
1476
|
+
bps: number;
|
|
1477
|
+
}, {
|
|
1478
|
+
amount: number;
|
|
1479
|
+
bps: number;
|
|
1480
|
+
}>>;
|
|
1469
1481
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
1470
1482
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
1471
1483
|
slot: z.ZodBigInt;
|
|
@@ -1473,7 +1485,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1473
1485
|
}, "strip", z.ZodTypeAny, {
|
|
1474
1486
|
authority: string;
|
|
1475
1487
|
pool: string;
|
|
1476
|
-
pnlUsd: number | null;
|
|
1477
1488
|
id: string;
|
|
1478
1489
|
aToB: boolean;
|
|
1479
1490
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -1491,6 +1502,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1491
1502
|
amount: bigint;
|
|
1492
1503
|
usd: number;
|
|
1493
1504
|
};
|
|
1505
|
+
pnl: {
|
|
1506
|
+
amount: number;
|
|
1507
|
+
bps: number;
|
|
1508
|
+
} | null;
|
|
1494
1509
|
txSignature: string | null;
|
|
1495
1510
|
positionAddress: string | null;
|
|
1496
1511
|
slot: bigint;
|
|
@@ -1498,7 +1513,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1498
1513
|
}, {
|
|
1499
1514
|
authority: string;
|
|
1500
1515
|
pool: string;
|
|
1501
|
-
pnlUsd: number | null;
|
|
1502
1516
|
id: string;
|
|
1503
1517
|
aToB: boolean;
|
|
1504
1518
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -1516,6 +1530,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1516
1530
|
amount: bigint;
|
|
1517
1531
|
usd: number;
|
|
1518
1532
|
};
|
|
1533
|
+
pnl: {
|
|
1534
|
+
amount: number;
|
|
1535
|
+
bps: number;
|
|
1536
|
+
} | null;
|
|
1519
1537
|
txSignature: string | null;
|
|
1520
1538
|
positionAddress: string | null;
|
|
1521
1539
|
slot: bigint;
|
|
@@ -3741,6 +3759,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3741
3759
|
amount: number;
|
|
3742
3760
|
bps: number;
|
|
3743
3761
|
}>;
|
|
3762
|
+
leverage: z.ZodNumber;
|
|
3744
3763
|
openedAt: z.ZodDate;
|
|
3745
3764
|
openedAtSlot: z.ZodBigInt;
|
|
3746
3765
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -3782,6 +3801,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3782
3801
|
amount: bigint;
|
|
3783
3802
|
usd: number;
|
|
3784
3803
|
};
|
|
3804
|
+
leverage: number;
|
|
3785
3805
|
openedAtSlot: bigint;
|
|
3786
3806
|
}, {
|
|
3787
3807
|
total: {
|
|
@@ -3820,6 +3840,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3820
3840
|
amount: bigint;
|
|
3821
3841
|
usd: number;
|
|
3822
3842
|
};
|
|
3843
|
+
leverage: number;
|
|
3823
3844
|
openedAtSlot: bigint;
|
|
3824
3845
|
}>;
|
|
3825
3846
|
id: z.ZodString;
|
|
@@ -3892,6 +3913,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3892
3913
|
amount: number;
|
|
3893
3914
|
bps: number;
|
|
3894
3915
|
}>;
|
|
3916
|
+
leverage: z.ZodNumber;
|
|
3895
3917
|
openedAt: z.ZodDate;
|
|
3896
3918
|
openedAtSlot: z.ZodBigInt;
|
|
3897
3919
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -3933,6 +3955,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3933
3955
|
amount: bigint;
|
|
3934
3956
|
usd: number;
|
|
3935
3957
|
};
|
|
3958
|
+
leverage: number;
|
|
3936
3959
|
openedAtSlot: bigint;
|
|
3937
3960
|
}, {
|
|
3938
3961
|
total: {
|
|
@@ -3971,6 +3994,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3971
3994
|
amount: bigint;
|
|
3972
3995
|
usd: number;
|
|
3973
3996
|
};
|
|
3997
|
+
leverage: number;
|
|
3974
3998
|
openedAtSlot: bigint;
|
|
3975
3999
|
}>;
|
|
3976
4000
|
id: z.ZodString;
|
|
@@ -4016,6 +4040,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4016
4040
|
amount: bigint;
|
|
4017
4041
|
usd: number;
|
|
4018
4042
|
};
|
|
4043
|
+
leverage: number;
|
|
4019
4044
|
openedAtSlot: bigint;
|
|
4020
4045
|
};
|
|
4021
4046
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4061,6 +4086,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4061
4086
|
amount: bigint;
|
|
4062
4087
|
usd: number;
|
|
4063
4088
|
};
|
|
4089
|
+
leverage: number;
|
|
4064
4090
|
openedAtSlot: bigint;
|
|
4065
4091
|
};
|
|
4066
4092
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4106,6 +4132,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4106
4132
|
amount: bigint;
|
|
4107
4133
|
usd: number;
|
|
4108
4134
|
};
|
|
4135
|
+
leverage: number;
|
|
4109
4136
|
openedAtSlot: bigint;
|
|
4110
4137
|
};
|
|
4111
4138
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4151,6 +4178,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4151
4178
|
amount: bigint;
|
|
4152
4179
|
usd: number;
|
|
4153
4180
|
};
|
|
4181
|
+
leverage: number;
|
|
4154
4182
|
openedAtSlot: bigint;
|
|
4155
4183
|
};
|
|
4156
4184
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4672,7 +4700,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4672
4700
|
amount: bigint;
|
|
4673
4701
|
usd: number;
|
|
4674
4702
|
}>;
|
|
4675
|
-
|
|
4703
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
4704
|
+
amount: z.ZodNumber;
|
|
4705
|
+
bps: z.ZodNumber;
|
|
4706
|
+
}, "strip", z.ZodTypeAny, {
|
|
4707
|
+
amount: number;
|
|
4708
|
+
bps: number;
|
|
4709
|
+
}, {
|
|
4710
|
+
amount: number;
|
|
4711
|
+
bps: number;
|
|
4712
|
+
}>>;
|
|
4676
4713
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4677
4714
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
4678
4715
|
slot: z.ZodBigInt;
|
|
@@ -4680,7 +4717,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4680
4717
|
}, "strip", z.ZodTypeAny, {
|
|
4681
4718
|
authority: string;
|
|
4682
4719
|
pool: string;
|
|
4683
|
-
pnlUsd: number | null;
|
|
4684
4720
|
id: string;
|
|
4685
4721
|
aToB: boolean;
|
|
4686
4722
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4698,6 +4734,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4698
4734
|
amount: bigint;
|
|
4699
4735
|
usd: number;
|
|
4700
4736
|
};
|
|
4737
|
+
pnl: {
|
|
4738
|
+
amount: number;
|
|
4739
|
+
bps: number;
|
|
4740
|
+
} | null;
|
|
4701
4741
|
txSignature: string | null;
|
|
4702
4742
|
positionAddress: string | null;
|
|
4703
4743
|
slot: bigint;
|
|
@@ -4705,7 +4745,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4705
4745
|
}, {
|
|
4706
4746
|
authority: string;
|
|
4707
4747
|
pool: string;
|
|
4708
|
-
pnlUsd: number | null;
|
|
4709
4748
|
id: string;
|
|
4710
4749
|
aToB: boolean;
|
|
4711
4750
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4723,6 +4762,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4723
4762
|
amount: bigint;
|
|
4724
4763
|
usd: number;
|
|
4725
4764
|
};
|
|
4765
|
+
pnl: {
|
|
4766
|
+
amount: number;
|
|
4767
|
+
bps: number;
|
|
4768
|
+
} | null;
|
|
4726
4769
|
txSignature: string | null;
|
|
4727
4770
|
positionAddress: string | null;
|
|
4728
4771
|
slot: bigint;
|
|
@@ -4772,7 +4815,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4772
4815
|
amount: bigint;
|
|
4773
4816
|
usd: number;
|
|
4774
4817
|
}>;
|
|
4775
|
-
|
|
4818
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
4819
|
+
amount: z.ZodNumber;
|
|
4820
|
+
bps: z.ZodNumber;
|
|
4821
|
+
}, "strip", z.ZodTypeAny, {
|
|
4822
|
+
amount: number;
|
|
4823
|
+
bps: number;
|
|
4824
|
+
}, {
|
|
4825
|
+
amount: number;
|
|
4826
|
+
bps: number;
|
|
4827
|
+
}>>;
|
|
4776
4828
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4777
4829
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
4778
4830
|
slot: z.ZodBigInt;
|
|
@@ -4780,7 +4832,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4780
4832
|
}, "strip", z.ZodTypeAny, {
|
|
4781
4833
|
authority: string;
|
|
4782
4834
|
pool: string;
|
|
4783
|
-
pnlUsd: number | null;
|
|
4784
4835
|
id: string;
|
|
4785
4836
|
aToB: boolean;
|
|
4786
4837
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4798,6 +4849,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4798
4849
|
amount: bigint;
|
|
4799
4850
|
usd: number;
|
|
4800
4851
|
};
|
|
4852
|
+
pnl: {
|
|
4853
|
+
amount: number;
|
|
4854
|
+
bps: number;
|
|
4855
|
+
} | null;
|
|
4801
4856
|
txSignature: string | null;
|
|
4802
4857
|
positionAddress: string | null;
|
|
4803
4858
|
slot: bigint;
|
|
@@ -4805,7 +4860,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4805
4860
|
}, {
|
|
4806
4861
|
authority: string;
|
|
4807
4862
|
pool: string;
|
|
4808
|
-
pnlUsd: number | null;
|
|
4809
4863
|
id: string;
|
|
4810
4864
|
aToB: boolean;
|
|
4811
4865
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4823,6 +4877,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4823
4877
|
amount: bigint;
|
|
4824
4878
|
usd: number;
|
|
4825
4879
|
};
|
|
4880
|
+
pnl: {
|
|
4881
|
+
amount: number;
|
|
4882
|
+
bps: number;
|
|
4883
|
+
} | null;
|
|
4826
4884
|
txSignature: string | null;
|
|
4827
4885
|
positionAddress: string | null;
|
|
4828
4886
|
slot: bigint;
|
|
@@ -4837,7 +4895,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4837
4895
|
data: {
|
|
4838
4896
|
authority: string;
|
|
4839
4897
|
pool: string;
|
|
4840
|
-
pnlUsd: number | null;
|
|
4841
4898
|
id: string;
|
|
4842
4899
|
aToB: boolean;
|
|
4843
4900
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4855,6 +4912,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4855
4912
|
amount: bigint;
|
|
4856
4913
|
usd: number;
|
|
4857
4914
|
};
|
|
4915
|
+
pnl: {
|
|
4916
|
+
amount: number;
|
|
4917
|
+
bps: number;
|
|
4918
|
+
} | null;
|
|
4858
4919
|
txSignature: string | null;
|
|
4859
4920
|
positionAddress: string | null;
|
|
4860
4921
|
slot: bigint;
|
|
@@ -4869,7 +4930,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4869
4930
|
data: {
|
|
4870
4931
|
authority: string;
|
|
4871
4932
|
pool: string;
|
|
4872
|
-
pnlUsd: number | null;
|
|
4873
4933
|
id: string;
|
|
4874
4934
|
aToB: boolean;
|
|
4875
4935
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4887,6 +4947,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4887
4947
|
amount: bigint;
|
|
4888
4948
|
usd: number;
|
|
4889
4949
|
};
|
|
4950
|
+
pnl: {
|
|
4951
|
+
amount: number;
|
|
4952
|
+
bps: number;
|
|
4953
|
+
} | null;
|
|
4890
4954
|
txSignature: string | null;
|
|
4891
4955
|
positionAddress: string | null;
|
|
4892
4956
|
slot: bigint;
|
|
@@ -4901,7 +4965,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4901
4965
|
data: {
|
|
4902
4966
|
authority: string;
|
|
4903
4967
|
pool: string;
|
|
4904
|
-
pnlUsd: number | null;
|
|
4905
4968
|
id: string;
|
|
4906
4969
|
aToB: boolean;
|
|
4907
4970
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4919,6 +4982,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4919
4982
|
amount: bigint;
|
|
4920
4983
|
usd: number;
|
|
4921
4984
|
};
|
|
4985
|
+
pnl: {
|
|
4986
|
+
amount: number;
|
|
4987
|
+
bps: number;
|
|
4988
|
+
} | null;
|
|
4922
4989
|
txSignature: string | null;
|
|
4923
4990
|
positionAddress: string | null;
|
|
4924
4991
|
slot: bigint;
|
|
@@ -4933,7 +5000,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4933
5000
|
data: {
|
|
4934
5001
|
authority: string;
|
|
4935
5002
|
pool: string;
|
|
4936
|
-
pnlUsd: number | null;
|
|
4937
5003
|
id: string;
|
|
4938
5004
|
aToB: boolean;
|
|
4939
5005
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4951,6 +5017,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4951
5017
|
amount: bigint;
|
|
4952
5018
|
usd: number;
|
|
4953
5019
|
};
|
|
5020
|
+
pnl: {
|
|
5021
|
+
amount: number;
|
|
5022
|
+
bps: number;
|
|
5023
|
+
} | null;
|
|
4954
5024
|
txSignature: string | null;
|
|
4955
5025
|
positionAddress: string | null;
|
|
4956
5026
|
slot: bigint;
|
package/dist/index.d.ts
CHANGED
|
@@ -1133,6 +1133,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1133
1133
|
amount: number;
|
|
1134
1134
|
bps: number;
|
|
1135
1135
|
}>;
|
|
1136
|
+
leverage: z.ZodNumber;
|
|
1136
1137
|
openedAt: z.ZodDate;
|
|
1137
1138
|
openedAtSlot: z.ZodBigInt;
|
|
1138
1139
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -1174,6 +1175,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1174
1175
|
amount: bigint;
|
|
1175
1176
|
usd: number;
|
|
1176
1177
|
};
|
|
1178
|
+
leverage: number;
|
|
1177
1179
|
openedAtSlot: bigint;
|
|
1178
1180
|
}, {
|
|
1179
1181
|
total: {
|
|
@@ -1212,6 +1214,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1212
1214
|
amount: bigint;
|
|
1213
1215
|
usd: number;
|
|
1214
1216
|
};
|
|
1217
|
+
leverage: number;
|
|
1215
1218
|
openedAtSlot: bigint;
|
|
1216
1219
|
}>;
|
|
1217
1220
|
declare const PoolSwap$1: z.ZodObject<{
|
|
@@ -1465,7 +1468,16 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1465
1468
|
amount: bigint;
|
|
1466
1469
|
usd: number;
|
|
1467
1470
|
}>;
|
|
1468
|
-
|
|
1471
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
1472
|
+
amount: z.ZodNumber;
|
|
1473
|
+
bps: z.ZodNumber;
|
|
1474
|
+
}, "strip", z.ZodTypeAny, {
|
|
1475
|
+
amount: number;
|
|
1476
|
+
bps: number;
|
|
1477
|
+
}, {
|
|
1478
|
+
amount: number;
|
|
1479
|
+
bps: number;
|
|
1480
|
+
}>>;
|
|
1469
1481
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
1470
1482
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
1471
1483
|
slot: z.ZodBigInt;
|
|
@@ -1473,7 +1485,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1473
1485
|
}, "strip", z.ZodTypeAny, {
|
|
1474
1486
|
authority: string;
|
|
1475
1487
|
pool: string;
|
|
1476
|
-
pnlUsd: number | null;
|
|
1477
1488
|
id: string;
|
|
1478
1489
|
aToB: boolean;
|
|
1479
1490
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -1491,6 +1502,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1491
1502
|
amount: bigint;
|
|
1492
1503
|
usd: number;
|
|
1493
1504
|
};
|
|
1505
|
+
pnl: {
|
|
1506
|
+
amount: number;
|
|
1507
|
+
bps: number;
|
|
1508
|
+
} | null;
|
|
1494
1509
|
txSignature: string | null;
|
|
1495
1510
|
positionAddress: string | null;
|
|
1496
1511
|
slot: bigint;
|
|
@@ -1498,7 +1513,6 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1498
1513
|
}, {
|
|
1499
1514
|
authority: string;
|
|
1500
1515
|
pool: string;
|
|
1501
|
-
pnlUsd: number | null;
|
|
1502
1516
|
id: string;
|
|
1503
1517
|
aToB: boolean;
|
|
1504
1518
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -1516,6 +1530,10 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1516
1530
|
amount: bigint;
|
|
1517
1531
|
usd: number;
|
|
1518
1532
|
};
|
|
1533
|
+
pnl: {
|
|
1534
|
+
amount: number;
|
|
1535
|
+
bps: number;
|
|
1536
|
+
} | null;
|
|
1519
1537
|
txSignature: string | null;
|
|
1520
1538
|
positionAddress: string | null;
|
|
1521
1539
|
slot: bigint;
|
|
@@ -3741,6 +3759,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3741
3759
|
amount: number;
|
|
3742
3760
|
bps: number;
|
|
3743
3761
|
}>;
|
|
3762
|
+
leverage: z.ZodNumber;
|
|
3744
3763
|
openedAt: z.ZodDate;
|
|
3745
3764
|
openedAtSlot: z.ZodBigInt;
|
|
3746
3765
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -3782,6 +3801,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3782
3801
|
amount: bigint;
|
|
3783
3802
|
usd: number;
|
|
3784
3803
|
};
|
|
3804
|
+
leverage: number;
|
|
3785
3805
|
openedAtSlot: bigint;
|
|
3786
3806
|
}, {
|
|
3787
3807
|
total: {
|
|
@@ -3820,6 +3840,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3820
3840
|
amount: bigint;
|
|
3821
3841
|
usd: number;
|
|
3822
3842
|
};
|
|
3843
|
+
leverage: number;
|
|
3823
3844
|
openedAtSlot: bigint;
|
|
3824
3845
|
}>;
|
|
3825
3846
|
id: z.ZodString;
|
|
@@ -3892,6 +3913,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3892
3913
|
amount: number;
|
|
3893
3914
|
bps: number;
|
|
3894
3915
|
}>;
|
|
3916
|
+
leverage: z.ZodNumber;
|
|
3895
3917
|
openedAt: z.ZodDate;
|
|
3896
3918
|
openedAtSlot: z.ZodBigInt;
|
|
3897
3919
|
updatedAtSlot: z.ZodBigInt;
|
|
@@ -3933,6 +3955,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3933
3955
|
amount: bigint;
|
|
3934
3956
|
usd: number;
|
|
3935
3957
|
};
|
|
3958
|
+
leverage: number;
|
|
3936
3959
|
openedAtSlot: bigint;
|
|
3937
3960
|
}, {
|
|
3938
3961
|
total: {
|
|
@@ -3971,6 +3994,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3971
3994
|
amount: bigint;
|
|
3972
3995
|
usd: number;
|
|
3973
3996
|
};
|
|
3997
|
+
leverage: number;
|
|
3974
3998
|
openedAtSlot: bigint;
|
|
3975
3999
|
}>;
|
|
3976
4000
|
id: z.ZodString;
|
|
@@ -4016,6 +4040,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4016
4040
|
amount: bigint;
|
|
4017
4041
|
usd: number;
|
|
4018
4042
|
};
|
|
4043
|
+
leverage: number;
|
|
4019
4044
|
openedAtSlot: bigint;
|
|
4020
4045
|
};
|
|
4021
4046
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4061,6 +4086,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4061
4086
|
amount: bigint;
|
|
4062
4087
|
usd: number;
|
|
4063
4088
|
};
|
|
4089
|
+
leverage: number;
|
|
4064
4090
|
openedAtSlot: bigint;
|
|
4065
4091
|
};
|
|
4066
4092
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4106,6 +4132,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4106
4132
|
amount: bigint;
|
|
4107
4133
|
usd: number;
|
|
4108
4134
|
};
|
|
4135
|
+
leverage: number;
|
|
4109
4136
|
openedAtSlot: bigint;
|
|
4110
4137
|
};
|
|
4111
4138
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4151,6 +4178,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4151
4178
|
amount: bigint;
|
|
4152
4179
|
usd: number;
|
|
4153
4180
|
};
|
|
4181
|
+
leverage: number;
|
|
4154
4182
|
openedAtSlot: bigint;
|
|
4155
4183
|
};
|
|
4156
4184
|
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "tuna_spot_position" | "lending_position" | "staking_position" | "fusion_limit_order" | "trade_history_entry";
|
|
@@ -4672,7 +4700,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4672
4700
|
amount: bigint;
|
|
4673
4701
|
usd: number;
|
|
4674
4702
|
}>;
|
|
4675
|
-
|
|
4703
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
4704
|
+
amount: z.ZodNumber;
|
|
4705
|
+
bps: z.ZodNumber;
|
|
4706
|
+
}, "strip", z.ZodTypeAny, {
|
|
4707
|
+
amount: number;
|
|
4708
|
+
bps: number;
|
|
4709
|
+
}, {
|
|
4710
|
+
amount: number;
|
|
4711
|
+
bps: number;
|
|
4712
|
+
}>>;
|
|
4676
4713
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4677
4714
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
4678
4715
|
slot: z.ZodBigInt;
|
|
@@ -4680,7 +4717,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4680
4717
|
}, "strip", z.ZodTypeAny, {
|
|
4681
4718
|
authority: string;
|
|
4682
4719
|
pool: string;
|
|
4683
|
-
pnlUsd: number | null;
|
|
4684
4720
|
id: string;
|
|
4685
4721
|
aToB: boolean;
|
|
4686
4722
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4698,6 +4734,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4698
4734
|
amount: bigint;
|
|
4699
4735
|
usd: number;
|
|
4700
4736
|
};
|
|
4737
|
+
pnl: {
|
|
4738
|
+
amount: number;
|
|
4739
|
+
bps: number;
|
|
4740
|
+
} | null;
|
|
4701
4741
|
txSignature: string | null;
|
|
4702
4742
|
positionAddress: string | null;
|
|
4703
4743
|
slot: bigint;
|
|
@@ -4705,7 +4745,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4705
4745
|
}, {
|
|
4706
4746
|
authority: string;
|
|
4707
4747
|
pool: string;
|
|
4708
|
-
pnlUsd: number | null;
|
|
4709
4748
|
id: string;
|
|
4710
4749
|
aToB: boolean;
|
|
4711
4750
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4723,6 +4762,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4723
4762
|
amount: bigint;
|
|
4724
4763
|
usd: number;
|
|
4725
4764
|
};
|
|
4765
|
+
pnl: {
|
|
4766
|
+
amount: number;
|
|
4767
|
+
bps: number;
|
|
4768
|
+
} | null;
|
|
4726
4769
|
txSignature: string | null;
|
|
4727
4770
|
positionAddress: string | null;
|
|
4728
4771
|
slot: bigint;
|
|
@@ -4772,7 +4815,16 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4772
4815
|
amount: bigint;
|
|
4773
4816
|
usd: number;
|
|
4774
4817
|
}>;
|
|
4775
|
-
|
|
4818
|
+
pnl: z.ZodNullable<z.ZodObject<{
|
|
4819
|
+
amount: z.ZodNumber;
|
|
4820
|
+
bps: z.ZodNumber;
|
|
4821
|
+
}, "strip", z.ZodTypeAny, {
|
|
4822
|
+
amount: number;
|
|
4823
|
+
bps: number;
|
|
4824
|
+
}, {
|
|
4825
|
+
amount: number;
|
|
4826
|
+
bps: number;
|
|
4827
|
+
}>>;
|
|
4776
4828
|
txSignature: z.ZodNullable<z.ZodString>;
|
|
4777
4829
|
positionAddress: z.ZodNullable<z.ZodString>;
|
|
4778
4830
|
slot: z.ZodBigInt;
|
|
@@ -4780,7 +4832,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4780
4832
|
}, "strip", z.ZodTypeAny, {
|
|
4781
4833
|
authority: string;
|
|
4782
4834
|
pool: string;
|
|
4783
|
-
pnlUsd: number | null;
|
|
4784
4835
|
id: string;
|
|
4785
4836
|
aToB: boolean;
|
|
4786
4837
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4798,6 +4849,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4798
4849
|
amount: bigint;
|
|
4799
4850
|
usd: number;
|
|
4800
4851
|
};
|
|
4852
|
+
pnl: {
|
|
4853
|
+
amount: number;
|
|
4854
|
+
bps: number;
|
|
4855
|
+
} | null;
|
|
4801
4856
|
txSignature: string | null;
|
|
4802
4857
|
positionAddress: string | null;
|
|
4803
4858
|
slot: bigint;
|
|
@@ -4805,7 +4860,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4805
4860
|
}, {
|
|
4806
4861
|
authority: string;
|
|
4807
4862
|
pool: string;
|
|
4808
|
-
pnlUsd: number | null;
|
|
4809
4863
|
id: string;
|
|
4810
4864
|
aToB: boolean;
|
|
4811
4865
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4823,6 +4877,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4823
4877
|
amount: bigint;
|
|
4824
4878
|
usd: number;
|
|
4825
4879
|
};
|
|
4880
|
+
pnl: {
|
|
4881
|
+
amount: number;
|
|
4882
|
+
bps: number;
|
|
4883
|
+
} | null;
|
|
4826
4884
|
txSignature: string | null;
|
|
4827
4885
|
positionAddress: string | null;
|
|
4828
4886
|
slot: bigint;
|
|
@@ -4837,7 +4895,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4837
4895
|
data: {
|
|
4838
4896
|
authority: string;
|
|
4839
4897
|
pool: string;
|
|
4840
|
-
pnlUsd: number | null;
|
|
4841
4898
|
id: string;
|
|
4842
4899
|
aToB: boolean;
|
|
4843
4900
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4855,6 +4912,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4855
4912
|
amount: bigint;
|
|
4856
4913
|
usd: number;
|
|
4857
4914
|
};
|
|
4915
|
+
pnl: {
|
|
4916
|
+
amount: number;
|
|
4917
|
+
bps: number;
|
|
4918
|
+
} | null;
|
|
4858
4919
|
txSignature: string | null;
|
|
4859
4920
|
positionAddress: string | null;
|
|
4860
4921
|
slot: bigint;
|
|
@@ -4869,7 +4930,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4869
4930
|
data: {
|
|
4870
4931
|
authority: string;
|
|
4871
4932
|
pool: string;
|
|
4872
|
-
pnlUsd: number | null;
|
|
4873
4933
|
id: string;
|
|
4874
4934
|
aToB: boolean;
|
|
4875
4935
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4887,6 +4947,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4887
4947
|
amount: bigint;
|
|
4888
4948
|
usd: number;
|
|
4889
4949
|
};
|
|
4950
|
+
pnl: {
|
|
4951
|
+
amount: number;
|
|
4952
|
+
bps: number;
|
|
4953
|
+
} | null;
|
|
4890
4954
|
txSignature: string | null;
|
|
4891
4955
|
positionAddress: string | null;
|
|
4892
4956
|
slot: bigint;
|
|
@@ -4901,7 +4965,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4901
4965
|
data: {
|
|
4902
4966
|
authority: string;
|
|
4903
4967
|
pool: string;
|
|
4904
|
-
pnlUsd: number | null;
|
|
4905
4968
|
id: string;
|
|
4906
4969
|
aToB: boolean;
|
|
4907
4970
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4919,6 +4982,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4919
4982
|
amount: bigint;
|
|
4920
4983
|
usd: number;
|
|
4921
4984
|
};
|
|
4985
|
+
pnl: {
|
|
4986
|
+
amount: number;
|
|
4987
|
+
bps: number;
|
|
4988
|
+
} | null;
|
|
4922
4989
|
txSignature: string | null;
|
|
4923
4990
|
positionAddress: string | null;
|
|
4924
4991
|
slot: bigint;
|
|
@@ -4933,7 +5000,6 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4933
5000
|
data: {
|
|
4934
5001
|
authority: string;
|
|
4935
5002
|
pool: string;
|
|
4936
|
-
pnlUsd: number | null;
|
|
4937
5003
|
id: string;
|
|
4938
5004
|
aToB: boolean;
|
|
4939
5005
|
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
@@ -4951,6 +5017,10 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4951
5017
|
amount: bigint;
|
|
4952
5018
|
usd: number;
|
|
4953
5019
|
};
|
|
5020
|
+
pnl: {
|
|
5021
|
+
amount: number;
|
|
5022
|
+
bps: number;
|
|
5023
|
+
} | null;
|
|
4954
5024
|
txSignature: string | null;
|
|
4955
5025
|
positionAddress: string | null;
|
|
4956
5026
|
slot: bigint;
|
package/dist/index.js
CHANGED
|
@@ -416,6 +416,7 @@ var TunaSpotPosition = import_zod.z.object({
|
|
|
416
416
|
currentLoan: amountWithUsd,
|
|
417
417
|
total: amountWithUsd,
|
|
418
418
|
pnlUsd: usdPnl,
|
|
419
|
+
leverage: import_zod.z.number(),
|
|
419
420
|
openedAt: import_zod.z.coerce.date(),
|
|
420
421
|
openedAtSlot: import_zod.z.coerce.bigint(),
|
|
421
422
|
updatedAtSlot: import_zod.z.coerce.bigint(),
|
|
@@ -482,7 +483,7 @@ var TradeHistoryEntry = import_zod.z.object({
|
|
|
482
483
|
baseToken: amountWithUsd,
|
|
483
484
|
quoteToken: amountWithUsd,
|
|
484
485
|
fee: amountWithUsd,
|
|
485
|
-
|
|
486
|
+
pnl: import_zod.z.nullable(usdPnl),
|
|
486
487
|
txSignature: import_zod.z.nullable(import_zod.z.string()),
|
|
487
488
|
positionAddress: import_zod.z.nullable(import_zod.z.string()),
|
|
488
489
|
slot: import_zod.z.coerce.bigint(),
|
package/dist/index.mjs
CHANGED
|
@@ -381,6 +381,7 @@ var TunaSpotPosition = z.object({
|
|
|
381
381
|
currentLoan: amountWithUsd,
|
|
382
382
|
total: amountWithUsd,
|
|
383
383
|
pnlUsd: usdPnl,
|
|
384
|
+
leverage: z.number(),
|
|
384
385
|
openedAt: z.coerce.date(),
|
|
385
386
|
openedAtSlot: z.coerce.bigint(),
|
|
386
387
|
updatedAtSlot: z.coerce.bigint(),
|
|
@@ -447,7 +448,7 @@ var TradeHistoryEntry = z.object({
|
|
|
447
448
|
baseToken: amountWithUsd,
|
|
448
449
|
quoteToken: amountWithUsd,
|
|
449
450
|
fee: amountWithUsd,
|
|
450
|
-
|
|
451
|
+
pnl: z.nullable(usdPnl),
|
|
451
452
|
txSignature: z.nullable(z.string()),
|
|
452
453
|
positionAddress: z.nullable(z.string()),
|
|
453
454
|
slot: z.coerce.bigint(),
|