@crypticdot/defituna-api 1.3.3 → 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 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";
@@ -76,7 +79,7 @@ declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
76
79
  declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
77
80
  declare const TunaSpotPositionStateSchema: z.ZodEnum<["open", ...("open" | "closed")[]]>;
78
81
  declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
79
- 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")[]]>;
80
83
  declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
81
84
  declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
82
85
  declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
@@ -1429,7 +1432,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1429
1432
  pool: z.ZodString;
1430
1433
  authority: z.ZodString;
1431
1434
  aToB: z.ZodBoolean;
1432
- 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")[]]>;
1433
1436
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
1434
1437
  uiPrice: z.ZodNumber;
1435
1438
  baseToken: z.ZodObject<{
@@ -1473,7 +1476,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1473
1476
  pnlUsd: number | null;
1474
1477
  id: string;
1475
1478
  aToB: boolean;
1476
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1479
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
1477
1480
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1478
1481
  uiPrice: number;
1479
1482
  baseToken: {
@@ -1498,7 +1501,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1498
1501
  pnlUsd: number | null;
1499
1502
  id: string;
1500
1503
  aToB: boolean;
1501
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1504
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
1502
1505
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1503
1506
  uiPrice: number;
1504
1507
  baseToken: {
@@ -4636,7 +4639,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4636
4639
  pool: z.ZodString;
4637
4640
  authority: z.ZodString;
4638
4641
  aToB: z.ZodBoolean;
4639
- 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")[]]>;
4640
4643
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4641
4644
  uiPrice: z.ZodNumber;
4642
4645
  baseToken: z.ZodObject<{
@@ -4680,7 +4683,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4680
4683
  pnlUsd: number | null;
4681
4684
  id: string;
4682
4685
  aToB: boolean;
4683
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4686
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4684
4687
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4685
4688
  uiPrice: number;
4686
4689
  baseToken: {
@@ -4705,7 +4708,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4705
4708
  pnlUsd: number | null;
4706
4709
  id: string;
4707
4710
  aToB: boolean;
4708
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4711
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4709
4712
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4710
4713
  uiPrice: number;
4711
4714
  baseToken: {
@@ -4736,7 +4739,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4736
4739
  pool: z.ZodString;
4737
4740
  authority: z.ZodString;
4738
4741
  aToB: z.ZodBoolean;
4739
- 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")[]]>;
4740
4743
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4741
4744
  uiPrice: z.ZodNumber;
4742
4745
  baseToken: z.ZodObject<{
@@ -4780,7 +4783,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4780
4783
  pnlUsd: number | null;
4781
4784
  id: string;
4782
4785
  aToB: boolean;
4783
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4786
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4784
4787
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4785
4788
  uiPrice: number;
4786
4789
  baseToken: {
@@ -4805,7 +4808,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4805
4808
  pnlUsd: number | null;
4806
4809
  id: string;
4807
4810
  aToB: boolean;
4808
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4811
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4809
4812
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4810
4813
  uiPrice: number;
4811
4814
  baseToken: {
@@ -4837,7 +4840,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4837
4840
  pnlUsd: number | null;
4838
4841
  id: string;
4839
4842
  aToB: boolean;
4840
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4843
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4841
4844
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4842
4845
  uiPrice: number;
4843
4846
  baseToken: {
@@ -4869,7 +4872,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4869
4872
  pnlUsd: number | null;
4870
4873
  id: string;
4871
4874
  aToB: boolean;
4872
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4875
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4873
4876
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4874
4877
  uiPrice: number;
4875
4878
  baseToken: {
@@ -4901,7 +4904,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4901
4904
  pnlUsd: number | null;
4902
4905
  id: string;
4903
4906
  aToB: boolean;
4904
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4907
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4905
4908
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4906
4909
  uiPrice: number;
4907
4910
  baseToken: {
@@ -4933,7 +4936,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4933
4936
  pnlUsd: number | null;
4934
4937
  id: string;
4935
4938
  aToB: boolean;
4936
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4939
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4937
4940
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4938
4941
  uiPrice: number;
4939
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";
@@ -76,7 +79,7 @@ declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
76
79
  declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
77
80
  declare const TunaSpotPositionStateSchema: z.ZodEnum<["open", ...("open" | "closed")[]]>;
78
81
  declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
79
- 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")[]]>;
80
83
  declare const TradeHistoryUIDirectionSchema: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
81
84
  declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
82
85
  declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
@@ -1429,7 +1432,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1429
1432
  pool: z.ZodString;
1430
1433
  authority: z.ZodString;
1431
1434
  aToB: z.ZodBoolean;
1432
- 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")[]]>;
1433
1436
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
1434
1437
  uiPrice: z.ZodNumber;
1435
1438
  baseToken: z.ZodObject<{
@@ -1473,7 +1476,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1473
1476
  pnlUsd: number | null;
1474
1477
  id: string;
1475
1478
  aToB: boolean;
1476
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1479
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
1477
1480
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1478
1481
  uiPrice: number;
1479
1482
  baseToken: {
@@ -1498,7 +1501,7 @@ declare const TradeHistoryEntry$1: z.ZodObject<{
1498
1501
  pnlUsd: number | null;
1499
1502
  id: string;
1500
1503
  aToB: boolean;
1501
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
1504
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
1502
1505
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
1503
1506
  uiPrice: number;
1504
1507
  baseToken: {
@@ -4636,7 +4639,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4636
4639
  pool: z.ZodString;
4637
4640
  authority: z.ZodString;
4638
4641
  aToB: z.ZodBoolean;
4639
- 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")[]]>;
4640
4643
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4641
4644
  uiPrice: z.ZodNumber;
4642
4645
  baseToken: z.ZodObject<{
@@ -4680,7 +4683,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4680
4683
  pnlUsd: number | null;
4681
4684
  id: string;
4682
4685
  aToB: boolean;
4683
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4686
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4684
4687
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4685
4688
  uiPrice: number;
4686
4689
  baseToken: {
@@ -4705,7 +4708,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4705
4708
  pnlUsd: number | null;
4706
4709
  id: string;
4707
4710
  aToB: boolean;
4708
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4711
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4709
4712
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4710
4713
  uiPrice: number;
4711
4714
  baseToken: {
@@ -4736,7 +4739,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4736
4739
  pool: z.ZodString;
4737
4740
  authority: z.ZodString;
4738
4741
  aToB: z.ZodBoolean;
4739
- 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")[]]>;
4740
4743
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short")[]]>;
4741
4744
  uiPrice: z.ZodNumber;
4742
4745
  baseToken: z.ZodObject<{
@@ -4780,7 +4783,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4780
4783
  pnlUsd: number | null;
4781
4784
  id: string;
4782
4785
  aToB: boolean;
4783
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4786
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4784
4787
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4785
4788
  uiPrice: number;
4786
4789
  baseToken: {
@@ -4805,7 +4808,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4805
4808
  pnlUsd: number | null;
4806
4809
  id: string;
4807
4810
  aToB: boolean;
4808
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4811
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4809
4812
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4810
4813
  uiPrice: number;
4811
4814
  baseToken: {
@@ -4837,7 +4840,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4837
4840
  pnlUsd: number | null;
4838
4841
  id: string;
4839
4842
  aToB: boolean;
4840
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4843
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4841
4844
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4842
4845
  uiPrice: number;
4843
4846
  baseToken: {
@@ -4869,7 +4872,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4869
4872
  pnlUsd: number | null;
4870
4873
  id: string;
4871
4874
  aToB: boolean;
4872
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4875
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4873
4876
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4874
4877
  uiPrice: number;
4875
4878
  baseToken: {
@@ -4901,7 +4904,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4901
4904
  pnlUsd: number | null;
4902
4905
  id: string;
4903
4906
  aToB: boolean;
4904
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4907
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4905
4908
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4906
4909
  uiPrice: number;
4907
4910
  baseToken: {
@@ -4933,7 +4936,7 @@ declare const TradeHistoryEntryNotification: z.ZodObject<{
4933
4936
  pnlUsd: number | null;
4934
4937
  id: string;
4935
4938
  aToB: boolean;
4936
- action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease";
4939
+ action: "swap" | "limit_order_fill" | "position_increase" | "position_decrease" | "take_profit" | "stop_loss" | "liquidation";
4937
4940
  uiDirection: "buy" | "sell" | "open_long" | "close_long" | "open_short" | "close_short";
4938
4941
  uiPrice: number;
4939
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",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",