@crypticdot/defituna-api 1.9.0 → 1.10.0

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
@@ -97,6 +97,36 @@ declare const WalletSubscriptionTopic: {
97
97
  readonly TRADE_HISTORY: "trade_history";
98
98
  readonly ORDER_HISTORY: "order_history";
99
99
  };
100
+ declare const LpPositionLimitOrderSwap: {
101
+ readonly NO_SWAP: "no_swap";
102
+ readonly SWAP_TO_TOKEN_A: "swap_to_token_a";
103
+ readonly SWAP_TO_TOKEN_B: "swap_to_token_b";
104
+ };
105
+ declare const LpPositionAutoCompound: {
106
+ readonly NO_AUTO_COMPOUND: "no_auto_compound";
107
+ readonly AUTO_COMPOUND: "auto_compound";
108
+ readonly AUTO_COMPOUND_WITH_LEVERAGE: "auto_compound_with_leverage";
109
+ };
110
+ declare const LpPositionRebalance: {
111
+ readonly NO_REBALANCE: "no_rebalance";
112
+ readonly AUTO_REBALANCE: "auto_rebalance";
113
+ };
114
+ declare const LpPositionsActionType: {
115
+ readonly OPEN_POSITION: "open_position";
116
+ readonly CLOSE_POSITION: "close_position";
117
+ readonly INCREASE_LIQUIDITY: "increase_liquidity";
118
+ readonly DECREASE_LIQUIDITY: "decrease_liquidity";
119
+ readonly REPAY_DEBT: "repay_debt";
120
+ readonly LIQUIDATE: "liquidate";
121
+ readonly EXECUTE_LIMIT_ORDER: "execute_limit_order";
122
+ readonly COLLECT_FEES: "collect_fees";
123
+ readonly COLLECT_REWARDS: "collect_rewards";
124
+ readonly COLLECT_AND_COMPOUND_FEES: "collect_and_compound_fees";
125
+ readonly REBALANCE_POSITION: "rebalance_position";
126
+ readonly SET_LIMIT_ORDERS: "set_limit_orders";
127
+ readonly SET_FLAGS: "set_flags";
128
+ readonly SET_REBALANCE_THRESHOLD: "set_rebalance_threshold";
129
+ };
100
130
  declare const NotificationEntitySchema: z.ZodEnum<{
101
131
  pool_swap: "pool_swap";
102
132
  pool_price: "pool_price";
@@ -194,6 +224,18 @@ declare const WalletSubscriptionTopicSchema: z.ZodEnum<{
194
224
  trade_history: "trade_history";
195
225
  order_history: "order_history";
196
226
  }>;
227
+ declare const LpPositionLimitOrderSwapSchema: z.ZodEnum<{
228
+ [x: string]: string;
229
+ }>;
230
+ declare const LpPositionAutoCompoundSchema: z.ZodEnum<{
231
+ [x: string]: string;
232
+ }>;
233
+ declare const LpPositionRebalanceSchema: z.ZodEnum<{
234
+ [x: string]: string;
235
+ }>;
236
+ declare const LpPositionsActionTypeSchema: z.ZodEnum<{
237
+ [x: string]: string;
238
+ }>;
197
239
  declare const PaginationMeta$1: z.ZodObject<{
198
240
  total: z.ZodNumber;
199
241
  }, z.core.$strip>;
@@ -458,6 +500,479 @@ declare const TunaPosition$1: z.ZodObject<{
458
500
  updatedAtSlot: z.ZodCoercedBigInt<unknown>;
459
501
  closedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
460
502
  }, z.core.$strip>;
503
+ declare const TunaLpPosition$1: z.ZodObject<{
504
+ positionAddress: z.ZodString;
505
+ authority: z.ZodString;
506
+ pool: z.ZodString;
507
+ state: z.ZodEnum<{
508
+ open: "open";
509
+ liquidated: "liquidated";
510
+ closed_by_limit_order: "closed_by_limit_order";
511
+ closed: "closed";
512
+ }>;
513
+ lowerPrice: z.ZodNumber;
514
+ upperPrice: z.ZodNumber;
515
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
516
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
517
+ marketMaker: z.ZodEnum<{
518
+ orca: "orca";
519
+ fusion: "fusion";
520
+ }>;
521
+ openedAt: z.ZodCoercedDate<unknown>;
522
+ closedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
523
+ totalValueUsd: z.ZodNumber;
524
+ leverage: z.ZodNumber;
525
+ initialLeverage: z.ZodNumber;
526
+ totalDepositUsd: z.ZodNumber;
527
+ totalWithdrawnUsd: z.ZodNumber;
528
+ feesSumUsd: z.ZodNumber;
529
+ closedPnlSumUsd: z.ZodNumber;
530
+ entryPrice: z.ZodNumber;
531
+ exitPrice: z.ZodNullable<z.ZodNumber>;
532
+ }, z.core.$strip>;
533
+ declare const TunaLpPositionParameters: z.ZodObject<{
534
+ lowerPrice: z.ZodNumber;
535
+ upperPrice: z.ZodNumber;
536
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
537
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
538
+ lowerLimitOrderSwap: z.ZodEnum<{
539
+ [x: string]: string;
540
+ }>;
541
+ upperLimitOrderSwap: z.ZodEnum<{
542
+ [x: string]: string;
543
+ }>;
544
+ autoCompound: z.ZodEnum<{
545
+ [x: string]: string;
546
+ }>;
547
+ rebalance: z.ZodEnum<{
548
+ [x: string]: string;
549
+ }>;
550
+ rebalanceThresholdTicks: z.ZodNumber;
551
+ }, z.core.$strip>;
552
+ declare const TunaLpPositionValue: z.ZodObject<{
553
+ totalValueA: z.ZodNumber;
554
+ totalValueB: z.ZodNumber;
555
+ totalValueUsd: z.ZodNumber;
556
+ loanFundsA: z.ZodNumber;
557
+ loanFundsB: z.ZodNumber;
558
+ loanFundsUsd: z.ZodNumber;
559
+ leverage: z.ZodNumber;
560
+ }, z.core.$strip>;
561
+ declare const TunaLpPositionTransfer: z.ZodObject<{
562
+ amountA: z.ZodNumber;
563
+ amountB: z.ZodNumber;
564
+ amountUsd: z.ZodNumber;
565
+ }, z.core.$strip>;
566
+ declare const TunaLpPositionTokenPrices: z.ZodObject<{
567
+ tokenPriceA: z.ZodNumber;
568
+ tokenPriceB: z.ZodNumber;
569
+ }, z.core.$strip>;
570
+ declare const TunaLpPositionActionOpen: z.ZodObject<{
571
+ parameters: z.ZodObject<{
572
+ lowerPrice: z.ZodNumber;
573
+ upperPrice: z.ZodNumber;
574
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
575
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
576
+ lowerLimitOrderSwap: z.ZodEnum<{
577
+ [x: string]: string;
578
+ }>;
579
+ upperLimitOrderSwap: z.ZodEnum<{
580
+ [x: string]: string;
581
+ }>;
582
+ autoCompound: z.ZodEnum<{
583
+ [x: string]: string;
584
+ }>;
585
+ rebalance: z.ZodEnum<{
586
+ [x: string]: string;
587
+ }>;
588
+ rebalanceThresholdTicks: z.ZodNumber;
589
+ }, z.core.$strip>;
590
+ }, z.core.$strip>;
591
+ declare const TunaLpPositionActionClose: z.ZodObject<{
592
+ toOwner: z.ZodNullable<z.ZodObject<{
593
+ amountA: z.ZodNumber;
594
+ amountB: z.ZodNumber;
595
+ amountUsd: z.ZodNumber;
596
+ }, z.core.$strip>>;
597
+ prices: z.ZodNullable<z.ZodObject<{
598
+ tokenPriceA: z.ZodNumber;
599
+ tokenPriceB: z.ZodNumber;
600
+ }, z.core.$strip>>;
601
+ }, z.core.$strip>;
602
+ declare const TunaLpPositionActionIncreaseLiquidity: z.ZodObject<{
603
+ fromPosition: z.ZodNullable<z.ZodObject<{
604
+ totalValueA: z.ZodNumber;
605
+ totalValueB: z.ZodNumber;
606
+ totalValueUsd: z.ZodNumber;
607
+ loanFundsA: z.ZodNumber;
608
+ loanFundsB: z.ZodNumber;
609
+ loanFundsUsd: z.ZodNumber;
610
+ leverage: z.ZodNumber;
611
+ }, z.core.$strip>>;
612
+ toPosition: z.ZodObject<{
613
+ totalValueA: z.ZodNumber;
614
+ totalValueB: z.ZodNumber;
615
+ totalValueUsd: z.ZodNumber;
616
+ loanFundsA: z.ZodNumber;
617
+ loanFundsB: z.ZodNumber;
618
+ loanFundsUsd: z.ZodNumber;
619
+ leverage: z.ZodNumber;
620
+ }, z.core.$strip>;
621
+ fromOwner: z.ZodObject<{
622
+ amountA: z.ZodNumber;
623
+ amountB: z.ZodNumber;
624
+ amountUsd: z.ZodNumber;
625
+ }, z.core.$strip>;
626
+ fromLending: z.ZodObject<{
627
+ amountA: z.ZodNumber;
628
+ amountB: z.ZodNumber;
629
+ amountUsd: z.ZodNumber;
630
+ }, z.core.$strip>;
631
+ protocolFees: z.ZodObject<{
632
+ amountA: z.ZodNumber;
633
+ amountB: z.ZodNumber;
634
+ amountUsd: z.ZodNumber;
635
+ }, z.core.$strip>;
636
+ prices: z.ZodObject<{
637
+ tokenPriceA: z.ZodNumber;
638
+ tokenPriceB: z.ZodNumber;
639
+ }, z.core.$strip>;
640
+ }, z.core.$strip>;
641
+ declare const TunaLpPositionActionDecreaseLiquidity: z.ZodObject<{
642
+ withdrawPercent: z.ZodNumber;
643
+ closedPnlUsd: z.ZodNumber;
644
+ fromPosition: z.ZodObject<{
645
+ totalValueA: z.ZodNumber;
646
+ totalValueB: z.ZodNumber;
647
+ totalValueUsd: z.ZodNumber;
648
+ loanFundsA: z.ZodNumber;
649
+ loanFundsB: z.ZodNumber;
650
+ loanFundsUsd: z.ZodNumber;
651
+ leverage: z.ZodNumber;
652
+ }, z.core.$strip>;
653
+ toPosition: z.ZodNullable<z.ZodObject<{
654
+ totalValueA: z.ZodNumber;
655
+ totalValueB: z.ZodNumber;
656
+ totalValueUsd: z.ZodNumber;
657
+ loanFundsA: z.ZodNumber;
658
+ loanFundsB: z.ZodNumber;
659
+ loanFundsUsd: z.ZodNumber;
660
+ leverage: z.ZodNumber;
661
+ }, z.core.$strip>>;
662
+ toOwner: z.ZodObject<{
663
+ amountA: z.ZodNumber;
664
+ amountB: z.ZodNumber;
665
+ amountUsd: z.ZodNumber;
666
+ }, z.core.$strip>;
667
+ toLending: z.ZodObject<{
668
+ amountA: z.ZodNumber;
669
+ amountB: z.ZodNumber;
670
+ amountUsd: z.ZodNumber;
671
+ }, z.core.$strip>;
672
+ collectedFees: z.ZodObject<{
673
+ amountA: z.ZodNumber;
674
+ amountB: z.ZodNumber;
675
+ amountUsd: z.ZodNumber;
676
+ }, z.core.$strip>;
677
+ prices: z.ZodObject<{
678
+ tokenPriceA: z.ZodNumber;
679
+ tokenPriceB: z.ZodNumber;
680
+ }, z.core.$strip>;
681
+ }, z.core.$strip>;
682
+ declare const TunaLpPositionActionLiquidate: z.ZodObject<{
683
+ withdrawPercent: z.ZodNumber;
684
+ fromPosition: z.ZodObject<{
685
+ totalValueA: z.ZodNumber;
686
+ totalValueB: z.ZodNumber;
687
+ totalValueUsd: z.ZodNumber;
688
+ loanFundsA: z.ZodNumber;
689
+ loanFundsB: z.ZodNumber;
690
+ loanFundsUsd: z.ZodNumber;
691
+ leverage: z.ZodNumber;
692
+ }, z.core.$strip>;
693
+ toLending: z.ZodObject<{
694
+ amountA: z.ZodNumber;
695
+ amountB: z.ZodNumber;
696
+ amountUsd: z.ZodNumber;
697
+ }, z.core.$strip>;
698
+ protocolFees: z.ZodObject<{
699
+ amountA: z.ZodNumber;
700
+ amountB: z.ZodNumber;
701
+ amountUsd: z.ZodNumber;
702
+ }, z.core.$strip>;
703
+ prices: z.ZodObject<{
704
+ tokenPriceA: z.ZodNumber;
705
+ tokenPriceB: z.ZodNumber;
706
+ }, z.core.$strip>;
707
+ }, z.core.$strip>;
708
+ declare const TunaLpPositionActionRepayDebt: z.ZodObject<{
709
+ fromPosition: z.ZodObject<{
710
+ totalValueA: z.ZodNumber;
711
+ totalValueB: z.ZodNumber;
712
+ totalValueUsd: z.ZodNumber;
713
+ loanFundsA: z.ZodNumber;
714
+ loanFundsB: z.ZodNumber;
715
+ loanFundsUsd: z.ZodNumber;
716
+ leverage: z.ZodNumber;
717
+ }, z.core.$strip>;
718
+ toPosition: z.ZodObject<{
719
+ totalValueA: z.ZodNumber;
720
+ totalValueB: z.ZodNumber;
721
+ totalValueUsd: z.ZodNumber;
722
+ loanFundsA: z.ZodNumber;
723
+ loanFundsB: z.ZodNumber;
724
+ loanFundsUsd: z.ZodNumber;
725
+ leverage: z.ZodNumber;
726
+ }, z.core.$strip>;
727
+ fromOwner: z.ZodObject<{
728
+ amountA: z.ZodNumber;
729
+ amountB: z.ZodNumber;
730
+ amountUsd: z.ZodNumber;
731
+ }, z.core.$strip>;
732
+ toLending: z.ZodObject<{
733
+ amountA: z.ZodNumber;
734
+ amountB: z.ZodNumber;
735
+ amountUsd: z.ZodNumber;
736
+ }, z.core.$strip>;
737
+ prices: z.ZodObject<{
738
+ tokenPriceA: z.ZodNumber;
739
+ tokenPriceB: z.ZodNumber;
740
+ }, z.core.$strip>;
741
+ }, z.core.$strip>;
742
+ declare const TunaLpPositionActionCollectFees: z.ZodObject<{
743
+ closedPnlUsd: z.ZodNumber;
744
+ position: z.ZodObject<{
745
+ totalValueA: z.ZodNumber;
746
+ totalValueB: z.ZodNumber;
747
+ totalValueUsd: z.ZodNumber;
748
+ loanFundsA: z.ZodNumber;
749
+ loanFundsB: z.ZodNumber;
750
+ loanFundsUsd: z.ZodNumber;
751
+ leverage: z.ZodNumber;
752
+ }, z.core.$strip>;
753
+ collectedFees: z.ZodObject<{
754
+ amountA: z.ZodNumber;
755
+ amountB: z.ZodNumber;
756
+ amountUsd: z.ZodNumber;
757
+ }, z.core.$strip>;
758
+ toOwner: z.ZodObject<{
759
+ amountA: z.ZodNumber;
760
+ amountB: z.ZodNumber;
761
+ amountUsd: z.ZodNumber;
762
+ }, z.core.$strip>;
763
+ prices: z.ZodObject<{
764
+ tokenPriceA: z.ZodNumber;
765
+ tokenPriceB: z.ZodNumber;
766
+ }, z.core.$strip>;
767
+ }, z.core.$strip>;
768
+ declare const TunaLpPositionActionCollectAndCompoundFees: z.ZodObject<{
769
+ fromPosition: z.ZodObject<{
770
+ totalValueA: z.ZodNumber;
771
+ totalValueB: z.ZodNumber;
772
+ totalValueUsd: z.ZodNumber;
773
+ loanFundsA: z.ZodNumber;
774
+ loanFundsB: z.ZodNumber;
775
+ loanFundsUsd: z.ZodNumber;
776
+ leverage: z.ZodNumber;
777
+ }, z.core.$strip>;
778
+ toPosition: z.ZodObject<{
779
+ totalValueA: z.ZodNumber;
780
+ totalValueB: z.ZodNumber;
781
+ totalValueUsd: z.ZodNumber;
782
+ loanFundsA: z.ZodNumber;
783
+ loanFundsB: z.ZodNumber;
784
+ loanFundsUsd: z.ZodNumber;
785
+ leverage: z.ZodNumber;
786
+ }, z.core.$strip>;
787
+ collectedFees: z.ZodObject<{
788
+ amountA: z.ZodNumber;
789
+ amountB: z.ZodNumber;
790
+ amountUsd: z.ZodNumber;
791
+ }, z.core.$strip>;
792
+ fromLending: z.ZodObject<{
793
+ amountA: z.ZodNumber;
794
+ amountB: z.ZodNumber;
795
+ amountUsd: z.ZodNumber;
796
+ }, z.core.$strip>;
797
+ protocolFees: z.ZodObject<{
798
+ amountA: z.ZodNumber;
799
+ amountB: z.ZodNumber;
800
+ amountUsd: z.ZodNumber;
801
+ }, z.core.$strip>;
802
+ prices: z.ZodObject<{
803
+ tokenPriceA: z.ZodNumber;
804
+ tokenPriceB: z.ZodNumber;
805
+ }, z.core.$strip>;
806
+ }, z.core.$strip>;
807
+ declare const TunaLpPositionActionParametersUpdate: z.ZodObject<{
808
+ fromParameters: z.ZodObject<{
809
+ lowerPrice: z.ZodNumber;
810
+ upperPrice: z.ZodNumber;
811
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
812
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
813
+ lowerLimitOrderSwap: z.ZodEnum<{
814
+ [x: string]: string;
815
+ }>;
816
+ upperLimitOrderSwap: z.ZodEnum<{
817
+ [x: string]: string;
818
+ }>;
819
+ autoCompound: z.ZodEnum<{
820
+ [x: string]: string;
821
+ }>;
822
+ rebalance: z.ZodEnum<{
823
+ [x: string]: string;
824
+ }>;
825
+ rebalanceThresholdTicks: z.ZodNumber;
826
+ }, z.core.$strip>;
827
+ toParameters: z.ZodObject<{
828
+ lowerPrice: z.ZodNumber;
829
+ upperPrice: z.ZodNumber;
830
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
831
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
832
+ lowerLimitOrderSwap: z.ZodEnum<{
833
+ [x: string]: string;
834
+ }>;
835
+ upperLimitOrderSwap: z.ZodEnum<{
836
+ [x: string]: string;
837
+ }>;
838
+ autoCompound: z.ZodEnum<{
839
+ [x: string]: string;
840
+ }>;
841
+ rebalance: z.ZodEnum<{
842
+ [x: string]: string;
843
+ }>;
844
+ rebalanceThresholdTicks: z.ZodNumber;
845
+ }, z.core.$strip>;
846
+ }, z.core.$strip>;
847
+ declare const TunaLpPositionAction$1: z.ZodObject<{
848
+ action: z.ZodEnum<{
849
+ [x: string]: string;
850
+ }>;
851
+ txSignature: z.ZodString;
852
+ txTimestamp: z.ZodCoercedDate<unknown>;
853
+ data: z.ZodObject<{
854
+ fromPosition: z.ZodNullable<z.ZodOptional<z.ZodObject<{
855
+ totalValueA: z.ZodNumber;
856
+ totalValueB: z.ZodNumber;
857
+ totalValueUsd: z.ZodNumber;
858
+ loanFundsA: z.ZodNumber;
859
+ loanFundsB: z.ZodNumber;
860
+ loanFundsUsd: z.ZodNumber;
861
+ leverage: z.ZodNumber;
862
+ }, z.core.$strip>>>;
863
+ toPosition: z.ZodNullable<z.ZodOptional<z.ZodObject<{
864
+ totalValueA: z.ZodNumber;
865
+ totalValueB: z.ZodNumber;
866
+ totalValueUsd: z.ZodNumber;
867
+ loanFundsA: z.ZodNumber;
868
+ loanFundsB: z.ZodNumber;
869
+ loanFundsUsd: z.ZodNumber;
870
+ leverage: z.ZodNumber;
871
+ }, z.core.$strip>>>;
872
+ position: z.ZodNullable<z.ZodOptional<z.ZodObject<{
873
+ totalValueA: z.ZodNumber;
874
+ totalValueB: z.ZodNumber;
875
+ totalValueUsd: z.ZodNumber;
876
+ loanFundsA: z.ZodNumber;
877
+ loanFundsB: z.ZodNumber;
878
+ loanFundsUsd: z.ZodNumber;
879
+ leverage: z.ZodNumber;
880
+ }, z.core.$strip>>>;
881
+ fromOwner: z.ZodOptional<z.ZodObject<{
882
+ amountA: z.ZodNumber;
883
+ amountB: z.ZodNumber;
884
+ amountUsd: z.ZodNumber;
885
+ }, z.core.$strip>>;
886
+ toOwner: z.ZodNullable<z.ZodOptional<z.ZodObject<{
887
+ amountA: z.ZodNumber;
888
+ amountB: z.ZodNumber;
889
+ amountUsd: z.ZodNumber;
890
+ }, z.core.$strip>>>;
891
+ fromLending: z.ZodOptional<z.ZodObject<{
892
+ amountA: z.ZodNumber;
893
+ amountB: z.ZodNumber;
894
+ amountUsd: z.ZodNumber;
895
+ }, z.core.$strip>>;
896
+ toLending: z.ZodOptional<z.ZodObject<{
897
+ amountA: z.ZodNumber;
898
+ amountB: z.ZodNumber;
899
+ amountUsd: z.ZodNumber;
900
+ }, z.core.$strip>>;
901
+ collectedFees: z.ZodOptional<z.ZodObject<{
902
+ amountA: z.ZodNumber;
903
+ amountB: z.ZodNumber;
904
+ amountUsd: z.ZodNumber;
905
+ }, z.core.$strip>>;
906
+ protocolFees: z.ZodOptional<z.ZodObject<{
907
+ amountA: z.ZodNumber;
908
+ amountB: z.ZodNumber;
909
+ amountUsd: z.ZodNumber;
910
+ }, z.core.$strip>>;
911
+ prices: z.ZodNullable<z.ZodOptional<z.ZodObject<{
912
+ tokenPriceA: z.ZodNumber;
913
+ tokenPriceB: z.ZodNumber;
914
+ }, z.core.$strip>>>;
915
+ parameters: z.ZodOptional<z.ZodObject<{
916
+ lowerPrice: z.ZodNumber;
917
+ upperPrice: z.ZodNumber;
918
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
919
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
920
+ lowerLimitOrderSwap: z.ZodEnum<{
921
+ [x: string]: string;
922
+ }>;
923
+ upperLimitOrderSwap: z.ZodEnum<{
924
+ [x: string]: string;
925
+ }>;
926
+ autoCompound: z.ZodEnum<{
927
+ [x: string]: string;
928
+ }>;
929
+ rebalance: z.ZodEnum<{
930
+ [x: string]: string;
931
+ }>;
932
+ rebalanceThresholdTicks: z.ZodNumber;
933
+ }, z.core.$strip>>;
934
+ fromParameters: z.ZodOptional<z.ZodObject<{
935
+ lowerPrice: z.ZodNumber;
936
+ upperPrice: z.ZodNumber;
937
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
938
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
939
+ lowerLimitOrderSwap: z.ZodEnum<{
940
+ [x: string]: string;
941
+ }>;
942
+ upperLimitOrderSwap: z.ZodEnum<{
943
+ [x: string]: string;
944
+ }>;
945
+ autoCompound: z.ZodEnum<{
946
+ [x: string]: string;
947
+ }>;
948
+ rebalance: z.ZodEnum<{
949
+ [x: string]: string;
950
+ }>;
951
+ rebalanceThresholdTicks: z.ZodNumber;
952
+ }, z.core.$strip>>;
953
+ toParameters: z.ZodOptional<z.ZodObject<{
954
+ lowerPrice: z.ZodNumber;
955
+ upperPrice: z.ZodNumber;
956
+ lowerLimitOrder: z.ZodNullable<z.ZodNumber>;
957
+ upperLimitOrder: z.ZodNullable<z.ZodNumber>;
958
+ lowerLimitOrderSwap: z.ZodEnum<{
959
+ [x: string]: string;
960
+ }>;
961
+ upperLimitOrderSwap: z.ZodEnum<{
962
+ [x: string]: string;
963
+ }>;
964
+ autoCompound: z.ZodEnum<{
965
+ [x: string]: string;
966
+ }>;
967
+ rebalance: z.ZodEnum<{
968
+ [x: string]: string;
969
+ }>;
970
+ rebalanceThresholdTicks: z.ZodNumber;
971
+ }, z.core.$strip>>;
972
+ withdrawPercent: z.ZodOptional<z.ZodNumber>;
973
+ closedPnlUsd: z.ZodOptional<z.ZodNumber>;
974
+ }, z.core.$strip>;
975
+ }, z.core.$strip>;
461
976
  declare const TunaSpotPosition$1: z.ZodObject<{
462
977
  address: z.ZodString;
463
978
  authority: z.ZodString;
@@ -2544,6 +3059,14 @@ declare const schemas_LendingPositionNotification: typeof LendingPositionNotific
2544
3059
  declare const schemas_LimitOrderNotification: typeof LimitOrderNotification;
2545
3060
  declare const schemas_LimitOrderState: typeof LimitOrderState;
2546
3061
  declare const schemas_LimitOrderStateSchema: typeof LimitOrderStateSchema;
3062
+ declare const schemas_LpPositionAutoCompound: typeof LpPositionAutoCompound;
3063
+ declare const schemas_LpPositionAutoCompoundSchema: typeof LpPositionAutoCompoundSchema;
3064
+ declare const schemas_LpPositionLimitOrderSwap: typeof LpPositionLimitOrderSwap;
3065
+ declare const schemas_LpPositionLimitOrderSwapSchema: typeof LpPositionLimitOrderSwapSchema;
3066
+ declare const schemas_LpPositionRebalance: typeof LpPositionRebalance;
3067
+ declare const schemas_LpPositionRebalanceSchema: typeof LpPositionRebalanceSchema;
3068
+ declare const schemas_LpPositionsActionType: typeof LpPositionsActionType;
3069
+ declare const schemas_LpPositionsActionTypeSchema: typeof LpPositionsActionTypeSchema;
2547
3070
  declare const schemas_NotificationAction: typeof NotificationAction;
2548
3071
  declare const schemas_NotificationActionSchema: typeof NotificationActionSchema;
2549
3072
  declare const schemas_NotificationEntity: typeof NotificationEntity;
@@ -2570,6 +3093,19 @@ declare const schemas_TradeHistoryActionSchema: typeof TradeHistoryActionSchema;
2570
3093
  declare const schemas_TradeHistoryEntryNotification: typeof TradeHistoryEntryNotification;
2571
3094
  declare const schemas_TradeHistoryUIDirection: typeof TradeHistoryUIDirection;
2572
3095
  declare const schemas_TradeHistoryUIDirectionSchema: typeof TradeHistoryUIDirectionSchema;
3096
+ declare const schemas_TunaLpPositionActionClose: typeof TunaLpPositionActionClose;
3097
+ declare const schemas_TunaLpPositionActionCollectAndCompoundFees: typeof TunaLpPositionActionCollectAndCompoundFees;
3098
+ declare const schemas_TunaLpPositionActionCollectFees: typeof TunaLpPositionActionCollectFees;
3099
+ declare const schemas_TunaLpPositionActionDecreaseLiquidity: typeof TunaLpPositionActionDecreaseLiquidity;
3100
+ declare const schemas_TunaLpPositionActionIncreaseLiquidity: typeof TunaLpPositionActionIncreaseLiquidity;
3101
+ declare const schemas_TunaLpPositionActionLiquidate: typeof TunaLpPositionActionLiquidate;
3102
+ declare const schemas_TunaLpPositionActionOpen: typeof TunaLpPositionActionOpen;
3103
+ declare const schemas_TunaLpPositionActionParametersUpdate: typeof TunaLpPositionActionParametersUpdate;
3104
+ declare const schemas_TunaLpPositionActionRepayDebt: typeof TunaLpPositionActionRepayDebt;
3105
+ declare const schemas_TunaLpPositionParameters: typeof TunaLpPositionParameters;
3106
+ declare const schemas_TunaLpPositionTokenPrices: typeof TunaLpPositionTokenPrices;
3107
+ declare const schemas_TunaLpPositionTransfer: typeof TunaLpPositionTransfer;
3108
+ declare const schemas_TunaLpPositionValue: typeof TunaLpPositionValue;
2573
3109
  declare const schemas_TunaPositionNotification: typeof TunaPositionNotification;
2574
3110
  declare const schemas_TunaPositionState: typeof TunaPositionState;
2575
3111
  declare const schemas_TunaPositionStateSchema: typeof TunaPositionStateSchema;
@@ -2580,7 +3116,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
2580
3116
  declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
2581
3117
  declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
2582
3118
  declare namespace schemas {
2583
- export { CloseSpotPositionQuote$1 as CloseSpotPositionQuote, DecreaseSpotPositionQuote$1 as DecreaseSpotPositionQuote, FeesStatsGroup$1 as FeesStatsGroup, IncreaseSpotPositionQuote$1 as IncreaseSpotPositionQuote, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, LimitOrderQuoteByInput$1 as LimitOrderQuoteByInput, LimitOrderQuoteByOutput$1 as LimitOrderQuoteByOutput, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, OrderBookNotificationMeta$1 as OrderBookNotificationMeta, OrderHistoryEntry$1 as OrderHistoryEntry, schemas_OrderHistoryEntryNotification as OrderHistoryEntryNotification, schemas_OrderHistoryOrderType as OrderHistoryOrderType, schemas_OrderHistoryOrderTypeSchema as OrderHistoryOrderTypeSchema, schemas_OrderHistoryStatus as OrderHistoryStatus, schemas_OrderHistoryStatusSchema as OrderHistoryStatusSchema, schemas_OrderHistoryUIDirection as OrderHistoryUIDirection, schemas_OrderHistoryUIDirectionSchema as OrderHistoryUIDirectionSchema, PaginationMeta$1 as PaginationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingLeaderboardPage$1 as StakingLeaderboardPage, StakingLeaderboardPosition$1 as StakingLeaderboardPosition, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, StateSnapshot$1 as StateSnapshot, schemas_StateSnapshotNotification as StateSnapshotNotification, SwapQuoteByInput$1 as SwapQuoteByInput, SwapQuoteByOutput$1 as SwapQuoteByOutput, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TradableAmount$1 as TradableAmount, schemas_TradeHistoryAction as TradeHistoryAction, schemas_TradeHistoryActionSchema as TradeHistoryActionSchema, TradeHistoryEntry$1 as TradeHistoryEntry, schemas_TradeHistoryEntryNotification as TradeHistoryEntryNotification, schemas_TradeHistoryUIDirection as TradeHistoryUIDirection, schemas_TradeHistoryUIDirectionSchema as TradeHistoryUIDirectionSchema, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, TunaSpotPosition$1 as TunaSpotPosition, schemas_TunaSpotPositionNotification as TunaSpotPositionNotification, schemas_TunaSpotPositionState as TunaSpotPositionState, schemas_TunaSpotPositionStateSchema as TunaSpotPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
3119
+ export { CloseSpotPositionQuote$1 as CloseSpotPositionQuote, DecreaseSpotPositionQuote$1 as DecreaseSpotPositionQuote, FeesStatsGroup$1 as FeesStatsGroup, IncreaseSpotPositionQuote$1 as IncreaseSpotPositionQuote, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, LimitOrderQuoteByInput$1 as LimitOrderQuoteByInput, LimitOrderQuoteByOutput$1 as LimitOrderQuoteByOutput, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, schemas_LpPositionAutoCompound as LpPositionAutoCompound, schemas_LpPositionAutoCompoundSchema as LpPositionAutoCompoundSchema, schemas_LpPositionLimitOrderSwap as LpPositionLimitOrderSwap, schemas_LpPositionLimitOrderSwapSchema as LpPositionLimitOrderSwapSchema, schemas_LpPositionRebalance as LpPositionRebalance, schemas_LpPositionRebalanceSchema as LpPositionRebalanceSchema, schemas_LpPositionsActionType as LpPositionsActionType, schemas_LpPositionsActionTypeSchema as LpPositionsActionTypeSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, OrderBookNotificationMeta$1 as OrderBookNotificationMeta, OrderHistoryEntry$1 as OrderHistoryEntry, schemas_OrderHistoryEntryNotification as OrderHistoryEntryNotification, schemas_OrderHistoryOrderType as OrderHistoryOrderType, schemas_OrderHistoryOrderTypeSchema as OrderHistoryOrderTypeSchema, schemas_OrderHistoryStatus as OrderHistoryStatus, schemas_OrderHistoryStatusSchema as OrderHistoryStatusSchema, schemas_OrderHistoryUIDirection as OrderHistoryUIDirection, schemas_OrderHistoryUIDirectionSchema as OrderHistoryUIDirectionSchema, PaginationMeta$1 as PaginationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingLeaderboardPage$1 as StakingLeaderboardPage, StakingLeaderboardPosition$1 as StakingLeaderboardPosition, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, StateSnapshot$1 as StateSnapshot, schemas_StateSnapshotNotification as StateSnapshotNotification, SwapQuoteByInput$1 as SwapQuoteByInput, SwapQuoteByOutput$1 as SwapQuoteByOutput, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TradableAmount$1 as TradableAmount, schemas_TradeHistoryAction as TradeHistoryAction, schemas_TradeHistoryActionSchema as TradeHistoryActionSchema, TradeHistoryEntry$1 as TradeHistoryEntry, schemas_TradeHistoryEntryNotification as TradeHistoryEntryNotification, schemas_TradeHistoryUIDirection as TradeHistoryUIDirection, schemas_TradeHistoryUIDirectionSchema as TradeHistoryUIDirectionSchema, TunaLpPosition$1 as TunaLpPosition, TunaLpPositionAction$1 as TunaLpPositionAction, schemas_TunaLpPositionActionClose as TunaLpPositionActionClose, schemas_TunaLpPositionActionCollectAndCompoundFees as TunaLpPositionActionCollectAndCompoundFees, schemas_TunaLpPositionActionCollectFees as TunaLpPositionActionCollectFees, schemas_TunaLpPositionActionDecreaseLiquidity as TunaLpPositionActionDecreaseLiquidity, schemas_TunaLpPositionActionIncreaseLiquidity as TunaLpPositionActionIncreaseLiquidity, schemas_TunaLpPositionActionLiquidate as TunaLpPositionActionLiquidate, schemas_TunaLpPositionActionOpen as TunaLpPositionActionOpen, schemas_TunaLpPositionActionParametersUpdate as TunaLpPositionActionParametersUpdate, schemas_TunaLpPositionActionRepayDebt as TunaLpPositionActionRepayDebt, schemas_TunaLpPositionParameters as TunaLpPositionParameters, schemas_TunaLpPositionTokenPrices as TunaLpPositionTokenPrices, schemas_TunaLpPositionTransfer as TunaLpPositionTransfer, schemas_TunaLpPositionValue as TunaLpPositionValue, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, TunaSpotPosition$1 as TunaSpotPosition, schemas_TunaSpotPositionNotification as TunaSpotPositionNotification, schemas_TunaSpotPositionState as TunaSpotPositionState, schemas_TunaSpotPositionStateSchema as TunaSpotPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
2584
3120
  }
2585
3121
 
2586
3122
  type NotificationEntityType = z.infer<typeof NotificationEntitySchema>;
@@ -2611,6 +3147,8 @@ type OrderBook = z.infer<typeof OrderBook$1>;
2611
3147
  type OrderBookNotificationMeta = z.infer<typeof OrderBookNotificationMeta$1>;
2612
3148
  type LendingPosition = z.infer<typeof LendingPosition$1>;
2613
3149
  type TunaPosition = z.infer<typeof TunaPosition$1>;
3150
+ type TunaLpPosition = z.infer<typeof TunaLpPosition$1>;
3151
+ type TunaLpPositionAction = z.infer<typeof TunaLpPositionAction$1>;
2614
3152
  type TunaSpotPosition = z.infer<typeof TunaSpotPosition$1>;
2615
3153
  type LimitOrder = z.infer<typeof LimitOrder$1>;
2616
3154
  type TradeHistoryEntry = z.infer<typeof TradeHistoryEntry$1>;
@@ -2734,6 +3272,18 @@ type GetUserOrderHistoryOptions = {
2734
3272
  limit?: number;
2735
3273
  desc?: boolean;
2736
3274
  };
3275
+ type GetLpPositionsOptions = {
3276
+ filter?: "all" | "opened" | "closed";
3277
+ afterPosition?: string;
3278
+ openedAt?: {
3279
+ from?: Date;
3280
+ to?: Date;
3281
+ };
3282
+ closedAt?: {
3283
+ from?: Date;
3284
+ to?: Date;
3285
+ };
3286
+ };
2737
3287
  type DurationInMs = number;
2738
3288
  declare enum ProviderFilter {
2739
3289
  ORCA = "orca",
@@ -2801,6 +3351,8 @@ declare class TunaApiClient {
2801
3351
  getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
2802
3352
  getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
2803
3353
  getUserTunaPositionByAddress(userAddress: string, tunaPositionAddress: string): Promise<TunaPosition>;
3354
+ getUserLpPositions(userAddress: string, options?: GetLpPositionsOptions): Promise<TunaLpPosition[]>;
3355
+ getUserLpPositionActions(userAddress: string, positionAddress: string): Promise<TunaLpPositionAction[]>;
2804
3356
  getUserTunaSpotPositions(userAddress: string): Promise<TunaSpotPosition[]>;
2805
3357
  getUserTunaSpotPositionByAddress(userAddress: string, tunaSpotPositionAddress: string): Promise<TunaSpotPosition>;
2806
3358
  getUserLimitOrders(userAddress: string, options?: GetUserLimitOrdersOptions): Promise<LimitOrder[]>;
@@ -2841,4 +3393,4 @@ declare class TunaApiClient {
2841
3393
  private appendUrlSearchParams;
2842
3394
  }
2843
3395
 
2844
- export { type CloseSpotPositionQuote, type DecreaseSpotPositionQuote, type DurationInMs, type FeesStatsGroup, type GetCloseSpotPositionQuoteArgs, type GetDecreaseSpotPositionQuoteArgs, type GetIncreaseSpotPositionQuoteArgs, type GetLimitOrderQuoteByInputArgs, type GetLimitOrderQuoteByOutputArgs, type GetPoolPriceCandlesOptions, type GetSwapQuoteByInputArgs, type GetSwapQuoteByOutputArgs, type GetTradableAmountArgs, type GetUserLimitOrdersOptions, type GetUserOrderHistoryOptions, type GetUserTradeHistoryOptions, type IncreaseSpotPositionQuote, type LendingPosition, type LimitOrder, type LimitOrderQuoteByInput, type LimitOrderQuoteByOutput, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type NotificationEntityType, type OrderBook, type OrderBookEntry, type OrderBookNotificationMeta, type OrderHistoryEntry, type OrderHistoryOrderTypeType, type OrderHistoryStatusType, type OrderHistoryUIDirectionType, type PaginationMeta, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, PoolSubscriptionTopic, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingLeaderboardPage, type StakingLeaderboardPosition, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type StateSnapshot, type SubscriptionPayload, type SwapQuoteByInput, type SwapQuoteByOutput, type Tick, type TokenOraclePrice, type TradableAmount, type TradeHistoryActionType, type TradeHistoryEntry, type TradeHistoryUIDirectionType, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type TunaSpotPosition, type TunaSpotPositionStateType, type Vault, type VaultHistoricalStats, WalletSubscriptionTopic, type WalletSubscriptionTopicType, schemas };
3396
+ export { type CloseSpotPositionQuote, type DecreaseSpotPositionQuote, type DurationInMs, type FeesStatsGroup, type GetCloseSpotPositionQuoteArgs, type GetDecreaseSpotPositionQuoteArgs, type GetIncreaseSpotPositionQuoteArgs, type GetLimitOrderQuoteByInputArgs, type GetLimitOrderQuoteByOutputArgs, type GetLpPositionsOptions, type GetPoolPriceCandlesOptions, type GetSwapQuoteByInputArgs, type GetSwapQuoteByOutputArgs, type GetTradableAmountArgs, type GetUserLimitOrdersOptions, type GetUserOrderHistoryOptions, type GetUserTradeHistoryOptions, type IncreaseSpotPositionQuote, type LendingPosition, type LimitOrder, type LimitOrderQuoteByInput, type LimitOrderQuoteByOutput, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type NotificationEntityType, type OrderBook, type OrderBookEntry, type OrderBookNotificationMeta, type OrderHistoryEntry, type OrderHistoryOrderTypeType, type OrderHistoryStatusType, type OrderHistoryUIDirectionType, type PaginationMeta, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, PoolSubscriptionTopic, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingLeaderboardPage, type StakingLeaderboardPosition, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type StateSnapshot, type SubscriptionPayload, type SwapQuoteByInput, type SwapQuoteByOutput, type Tick, type TokenOraclePrice, type TradableAmount, type TradeHistoryActionType, type TradeHistoryEntry, type TradeHistoryUIDirectionType, TunaApiClient, type TunaApiClientConfig, type TunaLpPosition, type TunaLpPositionAction, type TunaPosition, TunaPositionState, type TunaPositionStateType, type TunaSpotPosition, type TunaSpotPositionStateType, type Vault, type VaultHistoricalStats, WalletSubscriptionTopic, type WalletSubscriptionTopicType, schemas };