@crypticdot/defituna-api 1.3.2 → 1.3.4
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 +19 -15
- package/dist/index.d.ts +19 -15
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,9 @@ declare const TradeHistoryAction: {
|
|
|
41
41
|
readonly LIMIT_ORDER_FILL: "limit_order_fill";
|
|
42
42
|
readonly POSITION_INCREASE: "position_increase";
|
|
43
43
|
readonly POSITION_DECREASE: "position_decrease";
|
|
44
|
+
readonly TAKE_PROFIT: "take_profit";
|
|
45
|
+
readonly STOP_LOSS: "stop_loss";
|
|
46
|
+
readonly LIQUIDATION: "liquidation";
|
|
44
47
|
};
|
|
45
48
|
declare const TradeHistoryUIDirection: {
|
|
46
49
|
readonly BUY: "buy";
|
|
@@ -68,6 +71,7 @@ declare const WalletSubscriptionTopic: {
|
|
|
68
71
|
readonly LENDING_POSITIONS: "lending_positions";
|
|
69
72
|
readonly FUSION_LIMIT_ORDERS: "fusion_limit_orders";
|
|
70
73
|
readonly STAKING_POSITION: "staking_position";
|
|
74
|
+
readonly TRADE_HISTORY: "trade_history";
|
|
71
75
|
};
|
|
72
76
|
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
77
|
declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "update")[]]>;
|
|
@@ -75,11 +79,11 @@ declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
|
75
79
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
76
80
|
declare const TunaSpotPositionStateSchema: z.ZodEnum<["open", ...("open" | "closed")[]]>;
|
|
77
81
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
78
|
-
declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
82
|
+
declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
79
83
|
declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
80
84
|
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
81
85
|
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")[]]>;
|
|
86
|
+
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders" | "trade_history")[]]>;
|
|
83
87
|
declare const PaginationMeta$1: z.ZodObject<{
|
|
84
88
|
total: z.ZodNumber;
|
|
85
89
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1428,7 +1432,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1428
1432
|
pool: z.ZodString;
|
|
1429
1433
|
authority: z.ZodString;
|
|
1430
1434
|
aToB: z.ZodBoolean;
|
|
1431
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
1435
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
1432
1436
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
1433
1437
|
uiPrice: z.ZodNumber;
|
|
1434
1438
|
baseToken: z.ZodObject<{
|
|
@@ -1472,7 +1476,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1472
1476
|
pnlUsd: number | null;
|
|
1473
1477
|
id: string;
|
|
1474
1478
|
aToB: boolean;
|
|
1475
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1479
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
1476
1480
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1477
1481
|
uiPrice: number;
|
|
1478
1482
|
baseToken: {
|
|
@@ -1497,7 +1501,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1497
1501
|
pnlUsd: number | null;
|
|
1498
1502
|
id: string;
|
|
1499
1503
|
aToB: boolean;
|
|
1500
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1504
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
1501
1505
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1502
1506
|
uiPrice: number;
|
|
1503
1507
|
baseToken: {
|
|
@@ -4635,7 +4639,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4635
4639
|
pool: z.ZodString;
|
|
4636
4640
|
authority: z.ZodString;
|
|
4637
4641
|
aToB: z.ZodBoolean;
|
|
4638
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4642
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
4639
4643
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4640
4644
|
uiPrice: z.ZodNumber;
|
|
4641
4645
|
baseToken: z.ZodObject<{
|
|
@@ -4679,7 +4683,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4679
4683
|
pnlUsd: number | null;
|
|
4680
4684
|
id: string;
|
|
4681
4685
|
aToB: boolean;
|
|
4682
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4686
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4683
4687
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4684
4688
|
uiPrice: number;
|
|
4685
4689
|
baseToken: {
|
|
@@ -4704,7 +4708,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4704
4708
|
pnlUsd: number | null;
|
|
4705
4709
|
id: string;
|
|
4706
4710
|
aToB: boolean;
|
|
4707
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4711
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4708
4712
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4709
4713
|
uiPrice: number;
|
|
4710
4714
|
baseToken: {
|
|
@@ -4735,7 +4739,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4735
4739
|
pool: z.ZodString;
|
|
4736
4740
|
authority: z.ZodString;
|
|
4737
4741
|
aToB: z.ZodBoolean;
|
|
4738
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4742
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
4739
4743
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4740
4744
|
uiPrice: z.ZodNumber;
|
|
4741
4745
|
baseToken: z.ZodObject<{
|
|
@@ -4779,7 +4783,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4779
4783
|
pnlUsd: number | null;
|
|
4780
4784
|
id: string;
|
|
4781
4785
|
aToB: boolean;
|
|
4782
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4786
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4783
4787
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4784
4788
|
uiPrice: number;
|
|
4785
4789
|
baseToken: {
|
|
@@ -4804,7 +4808,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4804
4808
|
pnlUsd: number | null;
|
|
4805
4809
|
id: string;
|
|
4806
4810
|
aToB: boolean;
|
|
4807
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4811
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4808
4812
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4809
4813
|
uiPrice: number;
|
|
4810
4814
|
baseToken: {
|
|
@@ -4836,7 +4840,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4836
4840
|
pnlUsd: number | null;
|
|
4837
4841
|
id: string;
|
|
4838
4842
|
aToB: boolean;
|
|
4839
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4843
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4840
4844
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4841
4845
|
uiPrice: number;
|
|
4842
4846
|
baseToken: {
|
|
@@ -4868,7 +4872,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4868
4872
|
pnlUsd: number | null;
|
|
4869
4873
|
id: string;
|
|
4870
4874
|
aToB: boolean;
|
|
4871
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4875
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4872
4876
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4873
4877
|
uiPrice: number;
|
|
4874
4878
|
baseToken: {
|
|
@@ -4900,7 +4904,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4900
4904
|
pnlUsd: number | null;
|
|
4901
4905
|
id: string;
|
|
4902
4906
|
aToB: boolean;
|
|
4903
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4907
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4904
4908
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4905
4909
|
uiPrice: number;
|
|
4906
4910
|
baseToken: {
|
|
@@ -4932,7 +4936,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4932
4936
|
pnlUsd: number | null;
|
|
4933
4937
|
id: string;
|
|
4934
4938
|
aToB: boolean;
|
|
4935
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4939
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4936
4940
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4937
4941
|
uiPrice: number;
|
|
4938
4942
|
baseToken: {
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ declare const TradeHistoryAction: {
|
|
|
41
41
|
readonly LIMIT_ORDER_FILL: "limit_order_fill";
|
|
42
42
|
readonly POSITION_INCREASE: "position_increase";
|
|
43
43
|
readonly POSITION_DECREASE: "position_decrease";
|
|
44
|
+
readonly TAKE_PROFIT: "take_profit";
|
|
45
|
+
readonly STOP_LOSS: "stop_loss";
|
|
46
|
+
readonly LIQUIDATION: "liquidation";
|
|
44
47
|
};
|
|
45
48
|
declare const TradeHistoryUIDirection: {
|
|
46
49
|
readonly BUY: "buy";
|
|
@@ -68,6 +71,7 @@ declare const WalletSubscriptionTopic: {
|
|
|
68
71
|
readonly LENDING_POSITIONS: "lending_positions";
|
|
69
72
|
readonly FUSION_LIMIT_ORDERS: "fusion_limit_orders";
|
|
70
73
|
readonly STAKING_POSITION: "staking_position";
|
|
74
|
+
readonly TRADE_HISTORY: "trade_history";
|
|
71
75
|
};
|
|
72
76
|
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
77
|
declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "update")[]]>;
|
|
@@ -75,11 +79,11 @@ declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
|
75
79
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
76
80
|
declare const TunaSpotPositionStateSchema: z.ZodEnum<["open", ...("open" | "closed")[]]>;
|
|
77
81
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
78
|
-
declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
82
|
+
declare const TradeHistoryActionSchema: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
79
83
|
declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
80
84
|
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
81
85
|
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")[]]>;
|
|
86
|
+
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "tuna_spot_positions" | "lending_positions" | "fusion_limit_orders" | "trade_history")[]]>;
|
|
83
87
|
declare const PaginationMeta$1: z.ZodObject<{
|
|
84
88
|
total: z.ZodNumber;
|
|
85
89
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1428,7 +1432,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1428
1432
|
pool: z.ZodString;
|
|
1429
1433
|
authority: z.ZodString;
|
|
1430
1434
|
aToB: z.ZodBoolean;
|
|
1431
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
1435
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
1432
1436
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
1433
1437
|
uiPrice: z.ZodNumber;
|
|
1434
1438
|
baseToken: z.ZodObject<{
|
|
@@ -1472,7 +1476,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1472
1476
|
pnlUsd: number | null;
|
|
1473
1477
|
id: string;
|
|
1474
1478
|
aToB: boolean;
|
|
1475
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1479
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
1476
1480
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1477
1481
|
uiPrice: number;
|
|
1478
1482
|
baseToken: {
|
|
@@ -1497,7 +1501,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
|
|
|
1497
1501
|
pnlUsd: number | null;
|
|
1498
1502
|
id: string;
|
|
1499
1503
|
aToB: boolean;
|
|
1500
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
1504
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
1501
1505
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
1502
1506
|
uiPrice: number;
|
|
1503
1507
|
baseToken: {
|
|
@@ -4635,7 +4639,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4635
4639
|
pool: z.ZodString;
|
|
4636
4640
|
authority: z.ZodString;
|
|
4637
4641
|
aToB: z.ZodBoolean;
|
|
4638
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4642
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
4639
4643
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4640
4644
|
uiPrice: z.ZodNumber;
|
|
4641
4645
|
baseToken: z.ZodObject<{
|
|
@@ -4679,7 +4683,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4679
4683
|
pnlUsd: number | null;
|
|
4680
4684
|
id: string;
|
|
4681
4685
|
aToB: boolean;
|
|
4682
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4686
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4683
4687
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4684
4688
|
uiPrice: number;
|
|
4685
4689
|
baseToken: {
|
|
@@ -4704,7 +4708,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4704
4708
|
pnlUsd: number | null;
|
|
4705
4709
|
id: string;
|
|
4706
4710
|
aToB: boolean;
|
|
4707
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4711
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4708
4712
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4709
4713
|
uiPrice: number;
|
|
4710
4714
|
baseToken: {
|
|
@@ -4735,7 +4739,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4735
4739
|
pool: z.ZodString;
|
|
4736
4740
|
authority: z.ZodString;
|
|
4737
4741
|
aToB: z.ZodBoolean;
|
|
4738
|
-
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease")[]]>;
|
|
4742
|
+
action: z.ZodEnum<["swap", ...("swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation")[]]>;
|
|
4739
4743
|
uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
|
|
4740
4744
|
uiPrice: z.ZodNumber;
|
|
4741
4745
|
baseToken: z.ZodObject<{
|
|
@@ -4779,7 +4783,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4779
4783
|
pnlUsd: number | null;
|
|
4780
4784
|
id: string;
|
|
4781
4785
|
aToB: boolean;
|
|
4782
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4786
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4783
4787
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4784
4788
|
uiPrice: number;
|
|
4785
4789
|
baseToken: {
|
|
@@ -4804,7 +4808,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4804
4808
|
pnlUsd: number | null;
|
|
4805
4809
|
id: string;
|
|
4806
4810
|
aToB: boolean;
|
|
4807
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4811
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4808
4812
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4809
4813
|
uiPrice: number;
|
|
4810
4814
|
baseToken: {
|
|
@@ -4836,7 +4840,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4836
4840
|
pnlUsd: number | null;
|
|
4837
4841
|
id: string;
|
|
4838
4842
|
aToB: boolean;
|
|
4839
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4843
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4840
4844
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4841
4845
|
uiPrice: number;
|
|
4842
4846
|
baseToken: {
|
|
@@ -4868,7 +4872,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4868
4872
|
pnlUsd: number | null;
|
|
4869
4873
|
id: string;
|
|
4870
4874
|
aToB: boolean;
|
|
4871
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4875
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4872
4876
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4873
4877
|
uiPrice: number;
|
|
4874
4878
|
baseToken: {
|
|
@@ -4900,7 +4904,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4900
4904
|
pnlUsd: number | null;
|
|
4901
4905
|
id: string;
|
|
4902
4906
|
aToB: boolean;
|
|
4903
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4907
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4904
4908
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4905
4909
|
uiPrice: number;
|
|
4906
4910
|
baseToken: {
|
|
@@ -4932,7 +4936,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
|
|
|
4932
4936
|
pnlUsd: number | null;
|
|
4933
4937
|
id: string;
|
|
4934
4938
|
aToB: boolean;
|
|
4935
|
-
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
|
|
4939
|
+
action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
|
|
4936
4940
|
uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
|
|
4937
4941
|
uiPrice: number;
|
|
4938
4942
|
baseToken: {
|
package/dist/index.js
CHANGED
|
@@ -162,7 +162,10 @@ var TradeHistoryAction = {
|
|
|
162
162
|
SWAP: "swap",
|
|
163
163
|
LIMIT_ORDER_FILL: "limit_order_fill",
|
|
164
164
|
POSITION_INCREASE: "position_increase",
|
|
165
|
-
POSITION_DECREASE: "position_decrease"
|
|
165
|
+
POSITION_DECREASE: "position_decrease",
|
|
166
|
+
TAKE_PROFIT: "take_profit",
|
|
167
|
+
STOP_LOSS: "stop_loss",
|
|
168
|
+
LIQUIDATION: "liquidation"
|
|
166
169
|
};
|
|
167
170
|
var TradeHistoryUIDirection = {
|
|
168
171
|
BUY: "buy",
|
|
@@ -189,7 +192,8 @@ var WalletSubscriptionTopic = {
|
|
|
189
192
|
TUNA_SPOT_POSITIONS: "tuna_spot_positions",
|
|
190
193
|
LENDING_POSITIONS: "lending_positions",
|
|
191
194
|
FUSION_LIMIT_ORDERS: "fusion_limit_orders",
|
|
192
|
-
STAKING_POSITION: "staking_position"
|
|
195
|
+
STAKING_POSITION: "staking_position",
|
|
196
|
+
TRADE_HISTORY: "trade_history"
|
|
193
197
|
};
|
|
194
198
|
var NotificationEntitySchema = import_zod.z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
195
199
|
var NotificationActionSchema = import_zod.z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
package/dist/index.mjs
CHANGED
|
@@ -127,7 +127,10 @@ var TradeHistoryAction = {
|
|
|
127
127
|
SWAP: "swap",
|
|
128
128
|
LIMIT_ORDER_FILL: "limit_order_fill",
|
|
129
129
|
POSITION_INCREASE: "position_increase",
|
|
130
|
-
POSITION_DECREASE: "position_decrease"
|
|
130
|
+
POSITION_DECREASE: "position_decrease",
|
|
131
|
+
TAKE_PROFIT: "take_profit",
|
|
132
|
+
STOP_LOSS: "stop_loss",
|
|
133
|
+
LIQUIDATION: "liquidation"
|
|
131
134
|
};
|
|
132
135
|
var TradeHistoryUIDirection = {
|
|
133
136
|
BUY: "buy",
|
|
@@ -154,7 +157,8 @@ var WalletSubscriptionTopic = {
|
|
|
154
157
|
TUNA_SPOT_POSITIONS: "tuna_spot_positions",
|
|
155
158
|
LENDING_POSITIONS: "lending_positions",
|
|
156
159
|
FUSION_LIMIT_ORDERS: "fusion_limit_orders",
|
|
157
|
-
STAKING_POSITION: "staking_position"
|
|
160
|
+
STAKING_POSITION: "staking_position",
|
|
161
|
+
TRADE_HISTORY: "trade_history"
|
|
158
162
|
};
|
|
159
163
|
var NotificationEntitySchema = z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
160
164
|
var NotificationActionSchema = z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|