@pear-protocol/core-sdk 2.18.0 → 2.19.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.
@@ -2568,14 +2568,14 @@ declare class Core {
2568
2568
  maxImpactPrice?: string | undefined;
2569
2569
  }[]];
2570
2570
  error?: string | undefined;
2571
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
2571
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2572
2572
  refusedLegs?: {
2573
2573
  id: string;
2574
2574
  ticker: string;
2575
2575
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2576
2576
  error: string;
2577
2577
  }[] | undefined;
2578
- orders?: {
2578
+ orders?: ({
2579
2579
  id: string;
2580
2580
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2581
2581
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2591,7 +2591,22 @@ declare class Core {
2591
2591
  error?: string | undefined;
2592
2592
  errorCode?: string | undefined;
2593
2593
  filledPrice?: string | undefined;
2594
- }[] | undefined;
2594
+ } | {
2595
+ id: string;
2596
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2597
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2598
+ createdAt: string;
2599
+ updatedAt: string;
2600
+ type: "RESTING";
2601
+ symbol: string;
2602
+ side: "BUY" | "SELL";
2603
+ reduceOnly: boolean;
2604
+ quantity: string;
2605
+ price: string;
2606
+ filledQuantity: string;
2607
+ error?: string | undefined;
2608
+ errorCode?: string | undefined;
2609
+ })[] | undefined;
2595
2610
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2596
2611
  position?: {
2597
2612
  id: string;
@@ -2622,14 +2637,14 @@ declare class Core {
2622
2637
  maxImpactPrice?: string | undefined;
2623
2638
  }[]];
2624
2639
  error?: string | undefined;
2625
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
2640
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2626
2641
  refusedLegs?: {
2627
2642
  id: string;
2628
2643
  ticker: string;
2629
2644
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2630
2645
  error: string;
2631
2646
  }[] | undefined;
2632
- orders?: {
2647
+ orders?: ({
2633
2648
  id: string;
2634
2649
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2635
2650
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2645,7 +2660,22 @@ declare class Core {
2645
2660
  error?: string | undefined;
2646
2661
  errorCode?: string | undefined;
2647
2662
  filledPrice?: string | undefined;
2648
- }[] | undefined;
2663
+ } | {
2664
+ id: string;
2665
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2666
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2667
+ createdAt: string;
2668
+ updatedAt: string;
2669
+ type: "RESTING";
2670
+ symbol: string;
2671
+ side: "BUY" | "SELL";
2672
+ reduceOnly: boolean;
2673
+ quantity: string;
2674
+ price: string;
2675
+ filledQuantity: string;
2676
+ error?: string | undefined;
2677
+ errorCode?: string | undefined;
2678
+ })[] | undefined;
2649
2679
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2650
2680
  position?: {
2651
2681
  id: string;
@@ -2660,14 +2690,14 @@ declare class Core {
2660
2690
  intent: "CLOSE";
2661
2691
  orderType: "MARKET";
2662
2692
  error?: string | undefined;
2663
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
2693
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2664
2694
  refusedLegs?: {
2665
2695
  id: string;
2666
2696
  ticker: string;
2667
2697
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2668
2698
  error: string;
2669
2699
  }[] | undefined;
2670
- orders?: {
2700
+ orders?: ({
2671
2701
  id: string;
2672
2702
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2673
2703
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2683,7 +2713,22 @@ declare class Core {
2683
2713
  error?: string | undefined;
2684
2714
  errorCode?: string | undefined;
2685
2715
  filledPrice?: string | undefined;
2686
- }[] | undefined;
2716
+ } | {
2717
+ id: string;
2718
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2719
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2720
+ createdAt: string;
2721
+ updatedAt: string;
2722
+ type: "RESTING";
2723
+ symbol: string;
2724
+ side: "BUY" | "SELL";
2725
+ reduceOnly: boolean;
2726
+ quantity: string;
2727
+ price: string;
2728
+ filledQuantity: string;
2729
+ error?: string | undefined;
2730
+ errorCode?: string | undefined;
2731
+ })[] | undefined;
2687
2732
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2688
2733
  position?: {
2689
2734
  id: string;
@@ -2698,14 +2743,14 @@ declare class Core {
2698
2743
  intent: "REVERSE";
2699
2744
  orderType: "MARKET";
2700
2745
  error?: string | undefined;
2701
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
2746
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2702
2747
  refusedLegs?: {
2703
2748
  id: string;
2704
2749
  ticker: string;
2705
2750
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2706
2751
  error: string;
2707
2752
  }[] | undefined;
2708
- orders?: {
2753
+ orders?: ({
2709
2754
  id: string;
2710
2755
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2711
2756
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2721,12 +2766,141 @@ declare class Core {
2721
2766
  error?: string | undefined;
2722
2767
  errorCode?: string | undefined;
2723
2768
  filledPrice?: string | undefined;
2724
- }[] | undefined;
2769
+ } | {
2770
+ id: string;
2771
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2772
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2773
+ createdAt: string;
2774
+ updatedAt: string;
2775
+ type: "RESTING";
2776
+ symbol: string;
2777
+ side: "BUY" | "SELL";
2778
+ reduceOnly: boolean;
2779
+ quantity: string;
2780
+ price: string;
2781
+ filledQuantity: string;
2782
+ error?: string | undefined;
2783
+ errorCode?: string | undefined;
2784
+ })[] | undefined;
2725
2785
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2726
2786
  position?: {
2727
2787
  id: string;
2728
2788
  exposure: Record<string, `-${string}` | `+${string}`>;
2729
2789
  } | undefined;
2790
+ } | {
2791
+ id: string;
2792
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2793
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
2794
+ createdAt: string;
2795
+ updatedAt: string;
2796
+ intent: "OPEN";
2797
+ orderType: "CHASE_LIMIT";
2798
+ legs: [{
2799
+ symbol: string;
2800
+ side: "BUY" | "SELL";
2801
+ mode: "QUANTITY" | "USD";
2802
+ amount: string;
2803
+ reduceOnly: boolean;
2804
+ id?: string | undefined;
2805
+ maxImpactPrice?: string | undefined;
2806
+ }, ...{
2807
+ symbol: string;
2808
+ side: "BUY" | "SELL";
2809
+ mode: "QUANTITY" | "USD";
2810
+ amount: string;
2811
+ reduceOnly: boolean;
2812
+ id?: string | undefined;
2813
+ maxImpactPrice?: string | undefined;
2814
+ }[]];
2815
+ error?: string | undefined;
2816
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2817
+ refusedLegs?: {
2818
+ id: string;
2819
+ ticker: string;
2820
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2821
+ error: string;
2822
+ }[] | undefined;
2823
+ orders?: ({
2824
+ id: string;
2825
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2826
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2827
+ createdAt: string;
2828
+ updatedAt: string;
2829
+ type: "MARKET";
2830
+ symbol: string;
2831
+ side: "BUY" | "SELL";
2832
+ reduceOnly: boolean;
2833
+ quantity: string;
2834
+ price: string;
2835
+ filledQuantity: string;
2836
+ error?: string | undefined;
2837
+ errorCode?: string | undefined;
2838
+ filledPrice?: string | undefined;
2839
+ } | {
2840
+ id: string;
2841
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2842
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2843
+ createdAt: string;
2844
+ updatedAt: string;
2845
+ type: "RESTING";
2846
+ symbol: string;
2847
+ side: "BUY" | "SELL";
2848
+ reduceOnly: boolean;
2849
+ quantity: string;
2850
+ price: string;
2851
+ filledQuantity: string;
2852
+ error?: string | undefined;
2853
+ errorCode?: string | undefined;
2854
+ })[] | undefined;
2855
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2856
+ position?: {
2857
+ id: string;
2858
+ } | undefined;
2859
+ deadlineAt?: string | undefined;
2860
+ chaseOrders?: {
2861
+ id: string;
2862
+ executionId: string;
2863
+ instrumentId: string;
2864
+ side: "BUY" | "SELL";
2865
+ quantity: string;
2866
+ filledQuantity: string;
2867
+ makerFilledQuantity: string;
2868
+ takerFilledQuantity: string;
2869
+ attempts: ({
2870
+ id: string;
2871
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2872
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2873
+ createdAt: string;
2874
+ updatedAt: string;
2875
+ type: "MARKET";
2876
+ symbol: string;
2877
+ side: "BUY" | "SELL";
2878
+ reduceOnly: boolean;
2879
+ quantity: string;
2880
+ price: string;
2881
+ filledQuantity: string;
2882
+ error?: string | undefined;
2883
+ errorCode?: string | undefined;
2884
+ filledPrice?: string | undefined;
2885
+ } | {
2886
+ id: string;
2887
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2888
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2889
+ createdAt: string;
2890
+ updatedAt: string;
2891
+ type: "RESTING";
2892
+ symbol: string;
2893
+ side: "BUY" | "SELL";
2894
+ reduceOnly: boolean;
2895
+ quantity: string;
2896
+ price: string;
2897
+ filledQuantity: string;
2898
+ error?: string | undefined;
2899
+ errorCode?: string | undefined;
2900
+ })[];
2901
+ averageFillPrice?: string | undefined;
2902
+ }[] | undefined;
2903
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
2730
2904
  })[];
2731
2905
  nextCursor?: string | undefined;
2732
2906
  }>;
@@ -2757,14 +2931,14 @@ declare class Core {
2757
2931
  maxImpactPrice?: string | undefined;
2758
2932
  }[]];
2759
2933
  error?: string | undefined;
2760
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
2934
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2761
2935
  refusedLegs?: {
2762
2936
  id: string;
2763
2937
  ticker: string;
2764
2938
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2765
2939
  error: string;
2766
2940
  }[] | undefined;
2767
- orders?: {
2941
+ orders?: ({
2768
2942
  id: string;
2769
2943
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2770
2944
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2780,7 +2954,22 @@ declare class Core {
2780
2954
  error?: string | undefined;
2781
2955
  errorCode?: string | undefined;
2782
2956
  filledPrice?: string | undefined;
2783
- }[] | undefined;
2957
+ } | {
2958
+ id: string;
2959
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2960
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
2961
+ createdAt: string;
2962
+ updatedAt: string;
2963
+ type: "RESTING";
2964
+ symbol: string;
2965
+ side: "BUY" | "SELL";
2966
+ reduceOnly: boolean;
2967
+ quantity: string;
2968
+ price: string;
2969
+ filledQuantity: string;
2970
+ error?: string | undefined;
2971
+ errorCode?: string | undefined;
2972
+ })[] | undefined;
2784
2973
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2785
2974
  position?: {
2786
2975
  id: string;
@@ -2811,14 +3000,14 @@ declare class Core {
2811
3000
  maxImpactPrice?: string | undefined;
2812
3001
  }[]];
2813
3002
  error?: string | undefined;
2814
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
3003
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2815
3004
  refusedLegs?: {
2816
3005
  id: string;
2817
3006
  ticker: string;
2818
3007
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2819
3008
  error: string;
2820
3009
  }[] | undefined;
2821
- orders?: {
3010
+ orders?: ({
2822
3011
  id: string;
2823
3012
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2824
3013
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2834,7 +3023,22 @@ declare class Core {
2834
3023
  error?: string | undefined;
2835
3024
  errorCode?: string | undefined;
2836
3025
  filledPrice?: string | undefined;
2837
- }[] | undefined;
3026
+ } | {
3027
+ id: string;
3028
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3029
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3030
+ createdAt: string;
3031
+ updatedAt: string;
3032
+ type: "RESTING";
3033
+ symbol: string;
3034
+ side: "BUY" | "SELL";
3035
+ reduceOnly: boolean;
3036
+ quantity: string;
3037
+ price: string;
3038
+ filledQuantity: string;
3039
+ error?: string | undefined;
3040
+ errorCode?: string | undefined;
3041
+ })[] | undefined;
2838
3042
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2839
3043
  position?: {
2840
3044
  id: string;
@@ -2849,14 +3053,14 @@ declare class Core {
2849
3053
  intent: "CLOSE";
2850
3054
  orderType: "MARKET";
2851
3055
  error?: string | undefined;
2852
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
3056
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2853
3057
  refusedLegs?: {
2854
3058
  id: string;
2855
3059
  ticker: string;
2856
3060
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2857
3061
  error: string;
2858
3062
  }[] | undefined;
2859
- orders?: {
3063
+ orders?: ({
2860
3064
  id: string;
2861
3065
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2862
3066
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2872,7 +3076,22 @@ declare class Core {
2872
3076
  error?: string | undefined;
2873
3077
  errorCode?: string | undefined;
2874
3078
  filledPrice?: string | undefined;
2875
- }[] | undefined;
3079
+ } | {
3080
+ id: string;
3081
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3082
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3083
+ createdAt: string;
3084
+ updatedAt: string;
3085
+ type: "RESTING";
3086
+ symbol: string;
3087
+ side: "BUY" | "SELL";
3088
+ reduceOnly: boolean;
3089
+ quantity: string;
3090
+ price: string;
3091
+ filledQuantity: string;
3092
+ error?: string | undefined;
3093
+ errorCode?: string | undefined;
3094
+ })[] | undefined;
2876
3095
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2877
3096
  position?: {
2878
3097
  id: string;
@@ -2887,14 +3106,14 @@ declare class Core {
2887
3106
  intent: "REVERSE";
2888
3107
  orderType: "MARKET";
2889
3108
  error?: string | undefined;
2890
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
3109
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
2891
3110
  refusedLegs?: {
2892
3111
  id: string;
2893
3112
  ticker: string;
2894
3113
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
2895
3114
  error: string;
2896
3115
  }[] | undefined;
2897
- orders?: {
3116
+ orders?: ({
2898
3117
  id: string;
2899
3118
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2900
3119
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -2910,58 +3129,195 @@ declare class Core {
2910
3129
  error?: string | undefined;
2911
3130
  errorCode?: string | undefined;
2912
3131
  filledPrice?: string | undefined;
2913
- }[] | undefined;
3132
+ } | {
3133
+ id: string;
3134
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3135
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3136
+ createdAt: string;
3137
+ updatedAt: string;
3138
+ type: "RESTING";
3139
+ symbol: string;
3140
+ side: "BUY" | "SELL";
3141
+ reduceOnly: boolean;
3142
+ quantity: string;
3143
+ price: string;
3144
+ filledQuantity: string;
3145
+ error?: string | undefined;
3146
+ errorCode?: string | undefined;
3147
+ })[] | undefined;
2914
3148
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
2915
3149
  position?: {
2916
3150
  id: string;
2917
3151
  exposure: Record<string, `-${string}` | `+${string}`>;
2918
3152
  } | undefined;
2919
- };
2920
- }>;
2921
- };
2922
- fills: {
2923
- /** Read one position's assigned quantities and fees at the original receipt price. */
2924
- details: (positionId: string, headers?: ClientHeaders) => Promise<{
2925
- fills: {
3153
+ } | {
2926
3154
  id: string;
2927
- status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
2928
- tradeAccountId: string;
2929
- symbol: string;
2930
3155
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2931
- side: "BUY" | "SELL";
2932
- reduceOnly: boolean;
2933
- isExternal: boolean;
2934
- synthetic: boolean;
2935
- quantity: string;
2936
- price: string;
2937
- usd: string;
2938
- timestamp: string;
2939
- positionId: string;
2940
- cloid?: string | undefined;
2941
- exchangeFillId?: string | undefined;
2942
- executionId?: string | undefined;
2943
- scheduleId?: string | undefined;
2944
- triggerId?: string | undefined;
2945
- tradeFee?: string | undefined;
2946
- pearFee?: string | undefined;
2947
- original?: {
2948
- exchangeFillId: string;
2949
- quantity: string;
2950
- } | undefined;
2951
- }[];
2952
- }>;
2953
- /** Page raw receipts with all position assignments, leaving query defaults to the server. */
2954
- list: (query: HttpTypes.FillListParamsInput, headers?: ClientHeaders) => Promise<{
2955
- limit: number;
2956
- fills: {
2957
- id: string;
2958
- status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
2959
- tradeAccountId: string;
3156
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
3157
+ createdAt: string;
3158
+ updatedAt: string;
3159
+ intent: "OPEN";
3160
+ orderType: "CHASE_LIMIT";
3161
+ legs: [{
3162
+ symbol: string;
3163
+ side: "BUY" | "SELL";
3164
+ mode: "QUANTITY" | "USD";
3165
+ amount: string;
3166
+ reduceOnly: boolean;
3167
+ id?: string | undefined;
3168
+ maxImpactPrice?: string | undefined;
3169
+ }, ...{
3170
+ symbol: string;
3171
+ side: "BUY" | "SELL";
3172
+ mode: "QUANTITY" | "USD";
3173
+ amount: string;
3174
+ reduceOnly: boolean;
3175
+ id?: string | undefined;
3176
+ maxImpactPrice?: string | undefined;
3177
+ }[]];
3178
+ error?: string | undefined;
3179
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
3180
+ refusedLegs?: {
3181
+ id: string;
3182
+ ticker: string;
3183
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
3184
+ error: string;
3185
+ }[] | undefined;
3186
+ orders?: ({
3187
+ id: string;
3188
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3189
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3190
+ createdAt: string;
3191
+ updatedAt: string;
3192
+ type: "MARKET";
3193
+ symbol: string;
3194
+ side: "BUY" | "SELL";
3195
+ reduceOnly: boolean;
3196
+ quantity: string;
3197
+ price: string;
3198
+ filledQuantity: string;
3199
+ error?: string | undefined;
3200
+ errorCode?: string | undefined;
3201
+ filledPrice?: string | undefined;
3202
+ } | {
3203
+ id: string;
3204
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3205
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3206
+ createdAt: string;
3207
+ updatedAt: string;
3208
+ type: "RESTING";
3209
+ symbol: string;
3210
+ side: "BUY" | "SELL";
3211
+ reduceOnly: boolean;
3212
+ quantity: string;
3213
+ price: string;
3214
+ filledQuantity: string;
3215
+ error?: string | undefined;
3216
+ errorCode?: string | undefined;
3217
+ })[] | undefined;
3218
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
3219
+ position?: {
3220
+ id: string;
3221
+ } | undefined;
3222
+ deadlineAt?: string | undefined;
3223
+ chaseOrders?: {
3224
+ id: string;
3225
+ executionId: string;
3226
+ instrumentId: string;
3227
+ side: "BUY" | "SELL";
3228
+ quantity: string;
3229
+ filledQuantity: string;
3230
+ makerFilledQuantity: string;
3231
+ takerFilledQuantity: string;
3232
+ attempts: ({
3233
+ id: string;
3234
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3235
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3236
+ createdAt: string;
3237
+ updatedAt: string;
3238
+ type: "MARKET";
3239
+ symbol: string;
3240
+ side: "BUY" | "SELL";
3241
+ reduceOnly: boolean;
3242
+ quantity: string;
3243
+ price: string;
3244
+ filledQuantity: string;
3245
+ error?: string | undefined;
3246
+ errorCode?: string | undefined;
3247
+ filledPrice?: string | undefined;
3248
+ } | {
3249
+ id: string;
3250
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3251
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
3252
+ createdAt: string;
3253
+ updatedAt: string;
3254
+ type: "RESTING";
3255
+ symbol: string;
3256
+ side: "BUY" | "SELL";
3257
+ reduceOnly: boolean;
3258
+ quantity: string;
3259
+ price: string;
3260
+ filledQuantity: string;
3261
+ error?: string | undefined;
3262
+ errorCode?: string | undefined;
3263
+ })[];
3264
+ averageFillPrice?: string | undefined;
3265
+ }[] | undefined;
3266
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
3267
+ };
3268
+ }>;
3269
+ cancel: (id: string, headers?: ClientHeaders) => Promise<{
3270
+ outcome: "SKIPPED" | "CROSSING" | "CANCELLING";
3271
+ }>;
3272
+ complete: (id: string, headers?: ClientHeaders) => Promise<{
3273
+ outcome: "SKIPPED" | "CROSSING" | "CANCELLING";
3274
+ }>;
3275
+ };
3276
+ fills: {
3277
+ /** Read one position's assigned quantities and fees at the original receipt price. */
3278
+ details: (positionId: string, headers?: ClientHeaders) => Promise<{
3279
+ fills: {
3280
+ id: string;
3281
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
3282
+ tradeAccountId: string;
3283
+ symbol: string;
3284
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
3285
+ side: "BUY" | "SELL";
3286
+ reduceOnly: boolean;
3287
+ isExternal: boolean;
3288
+ isMaker: boolean;
3289
+ synthetic: boolean;
3290
+ quantity: string;
3291
+ price: string;
3292
+ usd: string;
3293
+ timestamp: string;
3294
+ positionId: string;
3295
+ cloid?: string | undefined;
3296
+ exchangeFillId?: string | undefined;
3297
+ executionId?: string | undefined;
3298
+ scheduleId?: string | undefined;
3299
+ triggerId?: string | undefined;
3300
+ tradeFee?: string | undefined;
3301
+ pearFee?: string | undefined;
3302
+ original?: {
3303
+ exchangeFillId: string;
3304
+ quantity: string;
3305
+ } | undefined;
3306
+ }[];
3307
+ }>;
3308
+ /** Page raw receipts with all position assignments, leaving query defaults to the server. */
3309
+ list: (query: HttpTypes.FillListParamsInput, headers?: ClientHeaders) => Promise<{
3310
+ limit: number;
3311
+ fills: {
3312
+ id: string;
3313
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
3314
+ tradeAccountId: string;
2960
3315
  symbol: string;
2961
3316
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
2962
3317
  side: "BUY" | "SELL";
2963
3318
  reduceOnly: boolean;
2964
3319
  isExternal: boolean;
3320
+ isMaker: boolean;
2965
3321
  synthetic: boolean;
2966
3322
  quantity: string;
2967
3323
  price: string;
@@ -3110,6 +3466,7 @@ declare class Core {
3110
3466
  side: "BUY" | "SELL";
3111
3467
  reduceOnly: boolean;
3112
3468
  isExternal: boolean;
3469
+ isMaker: boolean;
3113
3470
  synthetic: boolean;
3114
3471
  quantity: string;
3115
3472
  price: string;
@@ -3258,6 +3615,7 @@ declare class Core {
3258
3615
  side: "BUY" | "SELL";
3259
3616
  reduceOnly: boolean;
3260
3617
  isExternal: boolean;
3618
+ isMaker: boolean;
3261
3619
  synthetic: boolean;
3262
3620
  quantity: string;
3263
3621
  price: string;
@@ -3439,6 +3797,7 @@ declare class Core {
3439
3797
  side: "BUY" | "SELL";
3440
3798
  reduceOnly: boolean;
3441
3799
  isExternal: boolean;
3800
+ isMaker: boolean;
3442
3801
  synthetic: boolean;
3443
3802
  quantity: string;
3444
3803
  price: string;
@@ -3599,6 +3958,7 @@ declare class Core {
3599
3958
  side: "BUY" | "SELL";
3600
3959
  reduceOnly: boolean;
3601
3960
  isExternal: boolean;
3961
+ isMaker: boolean;
3602
3962
  synthetic: boolean;
3603
3963
  quantity: string;
3604
3964
  price: string;
@@ -3787,6 +4147,7 @@ declare class Core {
3787
4147
  side: "BUY" | "SELL";
3788
4148
  reduceOnly: boolean;
3789
4149
  isExternal: boolean;
4150
+ isMaker: boolean;
3790
4151
  synthetic: boolean;
3791
4152
  quantity: string;
3792
4153
  price: string;
@@ -3991,6 +4352,7 @@ declare class Core {
3991
4352
  side: "BUY" | "SELL";
3992
4353
  reduceOnly: boolean;
3993
4354
  isExternal: boolean;
4355
+ isMaker: boolean;
3994
4356
  synthetic: boolean;
3995
4357
  quantity: string;
3996
4358
  price: string;
@@ -4139,6 +4501,7 @@ declare class Core {
4139
4501
  side: "BUY" | "SELL";
4140
4502
  reduceOnly: boolean;
4141
4503
  isExternal: boolean;
4504
+ isMaker: boolean;
4142
4505
  synthetic: boolean;
4143
4506
  quantity: string;
4144
4507
  price: string;
@@ -4320,6 +4683,7 @@ declare class Core {
4320
4683
  side: "BUY" | "SELL";
4321
4684
  reduceOnly: boolean;
4322
4685
  isExternal: boolean;
4686
+ isMaker: boolean;
4323
4687
  synthetic: boolean;
4324
4688
  quantity: string;
4325
4689
  price: string;
@@ -4480,6 +4844,7 @@ declare class Core {
4480
4844
  side: "BUY" | "SELL";
4481
4845
  reduceOnly: boolean;
4482
4846
  isExternal: boolean;
4847
+ isMaker: boolean;
4483
4848
  synthetic: boolean;
4484
4849
  quantity: string;
4485
4850
  price: string;
@@ -4668,6 +5033,7 @@ declare class Core {
4668
5033
  side: "BUY" | "SELL";
4669
5034
  reduceOnly: boolean;
4670
5035
  isExternal: boolean;
5036
+ isMaker: boolean;
4671
5037
  synthetic: boolean;
4672
5038
  quantity: string;
4673
5039
  price: string;
@@ -4871,6 +5237,7 @@ declare class Core {
4871
5237
  side: "BUY" | "SELL";
4872
5238
  reduceOnly: boolean;
4873
5239
  isExternal: boolean;
5240
+ isMaker: boolean;
4874
5241
  synthetic: boolean;
4875
5242
  quantity: string;
4876
5243
  price: string;
@@ -5019,6 +5386,7 @@ declare class Core {
5019
5386
  side: "BUY" | "SELL";
5020
5387
  reduceOnly: boolean;
5021
5388
  isExternal: boolean;
5389
+ isMaker: boolean;
5022
5390
  synthetic: boolean;
5023
5391
  quantity: string;
5024
5392
  price: string;
@@ -5200,6 +5568,7 @@ declare class Core {
5200
5568
  side: "BUY" | "SELL";
5201
5569
  reduceOnly: boolean;
5202
5570
  isExternal: boolean;
5571
+ isMaker: boolean;
5203
5572
  synthetic: boolean;
5204
5573
  quantity: string;
5205
5574
  price: string;
@@ -5360,6 +5729,7 @@ declare class Core {
5360
5729
  side: "BUY" | "SELL";
5361
5730
  reduceOnly: boolean;
5362
5731
  isExternal: boolean;
5732
+ isMaker: boolean;
5363
5733
  synthetic: boolean;
5364
5734
  quantity: string;
5365
5735
  price: string;
@@ -5548,6 +5918,7 @@ declare class Core {
5548
5918
  side: "BUY" | "SELL";
5549
5919
  reduceOnly: boolean;
5550
5920
  isExternal: boolean;
5921
+ isMaker: boolean;
5551
5922
  synthetic: boolean;
5552
5923
  quantity: string;
5553
5924
  price: string;
@@ -6043,7 +6414,7 @@ declare class Core {
6043
6414
  id: string;
6044
6415
  tradeAccountId: string;
6045
6416
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
6046
- status: "OPEN" | "CLOSED";
6417
+ status: "OPEN" | "OPENING" | "CLOSED";
6047
6418
  origin: "PARTIAL" | "PEAR" | "EXTERNAL";
6048
6419
  exposure: Record<string, `-${string}` | `+${string}`>;
6049
6420
  unstableHistoricalData: boolean;
@@ -7033,6 +7404,7 @@ declare class Core {
7033
7404
  side: "BUY" | "SELL";
7034
7405
  reduceOnly: boolean;
7035
7406
  isExternal: boolean;
7407
+ isMaker: boolean;
7036
7408
  synthetic: boolean;
7037
7409
  quantity: string;
7038
7410
  price: string;
@@ -7081,10 +7453,734 @@ declare class Core {
7081
7453
  neverSynced: boolean;
7082
7454
  credentialsRejection?: "venue-account-missing" | "credentials-invalid" | undefined;
7083
7455
  }>;
7084
- };
7085
- /** Basket commands; executed-fill history lives under the plural `trades` namespace. */
7086
- trade: {
7087
- open: (body: HttpTypes.CreateTradeOpen, headers?: ClientHeaders) => Promise<{
7456
+ };
7457
+ /** Basket commands; executed-fill history lives under the plural `trades` namespace. */
7458
+ trade: {
7459
+ open: (body: HttpTypes.CreateTradeOpenInput, headers?: ClientHeaders) => Promise<{
7460
+ execution: {
7461
+ id: string;
7462
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7463
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7464
+ createdAt: string;
7465
+ updatedAt: string;
7466
+ intent: "OPEN";
7467
+ orderType: "MARKET";
7468
+ legs: [{
7469
+ symbol: string;
7470
+ side: "BUY" | "SELL";
7471
+ mode: "QUANTITY" | "USD";
7472
+ amount: string;
7473
+ reduceOnly: boolean;
7474
+ id?: string | undefined;
7475
+ maxImpactPrice?: string | undefined;
7476
+ }, ...{
7477
+ symbol: string;
7478
+ side: "BUY" | "SELL";
7479
+ mode: "QUANTITY" | "USD";
7480
+ amount: string;
7481
+ reduceOnly: boolean;
7482
+ id?: string | undefined;
7483
+ maxImpactPrice?: string | undefined;
7484
+ }[]];
7485
+ error?: string | undefined;
7486
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7487
+ refusedLegs?: {
7488
+ id: string;
7489
+ ticker: string;
7490
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7491
+ error: string;
7492
+ }[] | undefined;
7493
+ orders?: ({
7494
+ id: string;
7495
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7496
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7497
+ createdAt: string;
7498
+ updatedAt: string;
7499
+ type: "MARKET";
7500
+ symbol: string;
7501
+ side: "BUY" | "SELL";
7502
+ reduceOnly: boolean;
7503
+ quantity: string;
7504
+ price: string;
7505
+ filledQuantity: string;
7506
+ error?: string | undefined;
7507
+ errorCode?: string | undefined;
7508
+ filledPrice?: string | undefined;
7509
+ } | {
7510
+ id: string;
7511
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7512
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7513
+ createdAt: string;
7514
+ updatedAt: string;
7515
+ type: "RESTING";
7516
+ symbol: string;
7517
+ side: "BUY" | "SELL";
7518
+ reduceOnly: boolean;
7519
+ quantity: string;
7520
+ price: string;
7521
+ filledQuantity: string;
7522
+ error?: string | undefined;
7523
+ errorCode?: string | undefined;
7524
+ })[] | undefined;
7525
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7526
+ position?: {
7527
+ id: string;
7528
+ } | undefined;
7529
+ } | {
7530
+ id: string;
7531
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7532
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7533
+ createdAt: string;
7534
+ updatedAt: string;
7535
+ intent: "ADJUST";
7536
+ orderType: "MARKET";
7537
+ legs: [{
7538
+ symbol: string;
7539
+ side: "BUY" | "SELL";
7540
+ mode: "QUANTITY" | "USD";
7541
+ amount: string;
7542
+ reduceOnly: boolean;
7543
+ id?: string | undefined;
7544
+ maxImpactPrice?: string | undefined;
7545
+ }, ...{
7546
+ symbol: string;
7547
+ side: "BUY" | "SELL";
7548
+ mode: "QUANTITY" | "USD";
7549
+ amount: string;
7550
+ reduceOnly: boolean;
7551
+ id?: string | undefined;
7552
+ maxImpactPrice?: string | undefined;
7553
+ }[]];
7554
+ error?: string | undefined;
7555
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7556
+ refusedLegs?: {
7557
+ id: string;
7558
+ ticker: string;
7559
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7560
+ error: string;
7561
+ }[] | undefined;
7562
+ orders?: ({
7563
+ id: string;
7564
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7565
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7566
+ createdAt: string;
7567
+ updatedAt: string;
7568
+ type: "MARKET";
7569
+ symbol: string;
7570
+ side: "BUY" | "SELL";
7571
+ reduceOnly: boolean;
7572
+ quantity: string;
7573
+ price: string;
7574
+ filledQuantity: string;
7575
+ error?: string | undefined;
7576
+ errorCode?: string | undefined;
7577
+ filledPrice?: string | undefined;
7578
+ } | {
7579
+ id: string;
7580
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7581
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7582
+ createdAt: string;
7583
+ updatedAt: string;
7584
+ type: "RESTING";
7585
+ symbol: string;
7586
+ side: "BUY" | "SELL";
7587
+ reduceOnly: boolean;
7588
+ quantity: string;
7589
+ price: string;
7590
+ filledQuantity: string;
7591
+ error?: string | undefined;
7592
+ errorCode?: string | undefined;
7593
+ })[] | undefined;
7594
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7595
+ position?: {
7596
+ id: string;
7597
+ exposure: Record<string, `-${string}` | `+${string}`>;
7598
+ } | undefined;
7599
+ } | {
7600
+ id: string;
7601
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7602
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7603
+ createdAt: string;
7604
+ updatedAt: string;
7605
+ intent: "CLOSE";
7606
+ orderType: "MARKET";
7607
+ error?: string | undefined;
7608
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7609
+ refusedLegs?: {
7610
+ id: string;
7611
+ ticker: string;
7612
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7613
+ error: string;
7614
+ }[] | undefined;
7615
+ orders?: ({
7616
+ id: string;
7617
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7618
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7619
+ createdAt: string;
7620
+ updatedAt: string;
7621
+ type: "MARKET";
7622
+ symbol: string;
7623
+ side: "BUY" | "SELL";
7624
+ reduceOnly: boolean;
7625
+ quantity: string;
7626
+ price: string;
7627
+ filledQuantity: string;
7628
+ error?: string | undefined;
7629
+ errorCode?: string | undefined;
7630
+ filledPrice?: string | undefined;
7631
+ } | {
7632
+ id: string;
7633
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7634
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7635
+ createdAt: string;
7636
+ updatedAt: string;
7637
+ type: "RESTING";
7638
+ symbol: string;
7639
+ side: "BUY" | "SELL";
7640
+ reduceOnly: boolean;
7641
+ quantity: string;
7642
+ price: string;
7643
+ filledQuantity: string;
7644
+ error?: string | undefined;
7645
+ errorCode?: string | undefined;
7646
+ })[] | undefined;
7647
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7648
+ position?: {
7649
+ id: string;
7650
+ exposure: Record<string, `-${string}` | `+${string}`>;
7651
+ } | undefined;
7652
+ } | {
7653
+ id: string;
7654
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7655
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7656
+ createdAt: string;
7657
+ updatedAt: string;
7658
+ intent: "REVERSE";
7659
+ orderType: "MARKET";
7660
+ error?: string | undefined;
7661
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7662
+ refusedLegs?: {
7663
+ id: string;
7664
+ ticker: string;
7665
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7666
+ error: string;
7667
+ }[] | undefined;
7668
+ orders?: ({
7669
+ id: string;
7670
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7671
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7672
+ createdAt: string;
7673
+ updatedAt: string;
7674
+ type: "MARKET";
7675
+ symbol: string;
7676
+ side: "BUY" | "SELL";
7677
+ reduceOnly: boolean;
7678
+ quantity: string;
7679
+ price: string;
7680
+ filledQuantity: string;
7681
+ error?: string | undefined;
7682
+ errorCode?: string | undefined;
7683
+ filledPrice?: string | undefined;
7684
+ } | {
7685
+ id: string;
7686
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7687
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7688
+ createdAt: string;
7689
+ updatedAt: string;
7690
+ type: "RESTING";
7691
+ symbol: string;
7692
+ side: "BUY" | "SELL";
7693
+ reduceOnly: boolean;
7694
+ quantity: string;
7695
+ price: string;
7696
+ filledQuantity: string;
7697
+ error?: string | undefined;
7698
+ errorCode?: string | undefined;
7699
+ })[] | undefined;
7700
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7701
+ position?: {
7702
+ id: string;
7703
+ exposure: Record<string, `-${string}` | `+${string}`>;
7704
+ } | undefined;
7705
+ } | {
7706
+ id: string;
7707
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7708
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7709
+ createdAt: string;
7710
+ updatedAt: string;
7711
+ intent: "OPEN";
7712
+ orderType: "CHASE_LIMIT";
7713
+ legs: [{
7714
+ symbol: string;
7715
+ side: "BUY" | "SELL";
7716
+ mode: "QUANTITY" | "USD";
7717
+ amount: string;
7718
+ reduceOnly: boolean;
7719
+ id?: string | undefined;
7720
+ maxImpactPrice?: string | undefined;
7721
+ }, ...{
7722
+ symbol: string;
7723
+ side: "BUY" | "SELL";
7724
+ mode: "QUANTITY" | "USD";
7725
+ amount: string;
7726
+ reduceOnly: boolean;
7727
+ id?: string | undefined;
7728
+ maxImpactPrice?: string | undefined;
7729
+ }[]];
7730
+ error?: string | undefined;
7731
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7732
+ refusedLegs?: {
7733
+ id: string;
7734
+ ticker: string;
7735
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7736
+ error: string;
7737
+ }[] | undefined;
7738
+ orders?: ({
7739
+ id: string;
7740
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7741
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7742
+ createdAt: string;
7743
+ updatedAt: string;
7744
+ type: "MARKET";
7745
+ symbol: string;
7746
+ side: "BUY" | "SELL";
7747
+ reduceOnly: boolean;
7748
+ quantity: string;
7749
+ price: string;
7750
+ filledQuantity: string;
7751
+ error?: string | undefined;
7752
+ errorCode?: string | undefined;
7753
+ filledPrice?: string | undefined;
7754
+ } | {
7755
+ id: string;
7756
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7757
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7758
+ createdAt: string;
7759
+ updatedAt: string;
7760
+ type: "RESTING";
7761
+ symbol: string;
7762
+ side: "BUY" | "SELL";
7763
+ reduceOnly: boolean;
7764
+ quantity: string;
7765
+ price: string;
7766
+ filledQuantity: string;
7767
+ error?: string | undefined;
7768
+ errorCode?: string | undefined;
7769
+ })[] | undefined;
7770
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7771
+ position?: {
7772
+ id: string;
7773
+ } | undefined;
7774
+ deadlineAt?: string | undefined;
7775
+ chaseOrders?: {
7776
+ id: string;
7777
+ executionId: string;
7778
+ instrumentId: string;
7779
+ side: "BUY" | "SELL";
7780
+ quantity: string;
7781
+ filledQuantity: string;
7782
+ makerFilledQuantity: string;
7783
+ takerFilledQuantity: string;
7784
+ attempts: ({
7785
+ id: string;
7786
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7787
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7788
+ createdAt: string;
7789
+ updatedAt: string;
7790
+ type: "MARKET";
7791
+ symbol: string;
7792
+ side: "BUY" | "SELL";
7793
+ reduceOnly: boolean;
7794
+ quantity: string;
7795
+ price: string;
7796
+ filledQuantity: string;
7797
+ error?: string | undefined;
7798
+ errorCode?: string | undefined;
7799
+ filledPrice?: string | undefined;
7800
+ } | {
7801
+ id: string;
7802
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7803
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7804
+ createdAt: string;
7805
+ updatedAt: string;
7806
+ type: "RESTING";
7807
+ symbol: string;
7808
+ side: "BUY" | "SELL";
7809
+ reduceOnly: boolean;
7810
+ quantity: string;
7811
+ price: string;
7812
+ filledQuantity: string;
7813
+ error?: string | undefined;
7814
+ errorCode?: string | undefined;
7815
+ })[];
7816
+ averageFillPrice?: string | undefined;
7817
+ }[] | undefined;
7818
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
7819
+ };
7820
+ }>;
7821
+ adjust: (positionId: string, body: HttpTypes.CreateTradeAdjust, headers?: ClientHeaders) => Promise<{
7822
+ execution: {
7823
+ id: string;
7824
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7825
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7826
+ createdAt: string;
7827
+ updatedAt: string;
7828
+ intent: "OPEN";
7829
+ orderType: "MARKET";
7830
+ legs: [{
7831
+ symbol: string;
7832
+ side: "BUY" | "SELL";
7833
+ mode: "QUANTITY" | "USD";
7834
+ amount: string;
7835
+ reduceOnly: boolean;
7836
+ id?: string | undefined;
7837
+ maxImpactPrice?: string | undefined;
7838
+ }, ...{
7839
+ symbol: string;
7840
+ side: "BUY" | "SELL";
7841
+ mode: "QUANTITY" | "USD";
7842
+ amount: string;
7843
+ reduceOnly: boolean;
7844
+ id?: string | undefined;
7845
+ maxImpactPrice?: string | undefined;
7846
+ }[]];
7847
+ error?: string | undefined;
7848
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7849
+ refusedLegs?: {
7850
+ id: string;
7851
+ ticker: string;
7852
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7853
+ error: string;
7854
+ }[] | undefined;
7855
+ orders?: ({
7856
+ id: string;
7857
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7858
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7859
+ createdAt: string;
7860
+ updatedAt: string;
7861
+ type: "MARKET";
7862
+ symbol: string;
7863
+ side: "BUY" | "SELL";
7864
+ reduceOnly: boolean;
7865
+ quantity: string;
7866
+ price: string;
7867
+ filledQuantity: string;
7868
+ error?: string | undefined;
7869
+ errorCode?: string | undefined;
7870
+ filledPrice?: string | undefined;
7871
+ } | {
7872
+ id: string;
7873
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7874
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7875
+ createdAt: string;
7876
+ updatedAt: string;
7877
+ type: "RESTING";
7878
+ symbol: string;
7879
+ side: "BUY" | "SELL";
7880
+ reduceOnly: boolean;
7881
+ quantity: string;
7882
+ price: string;
7883
+ filledQuantity: string;
7884
+ error?: string | undefined;
7885
+ errorCode?: string | undefined;
7886
+ })[] | undefined;
7887
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7888
+ position?: {
7889
+ id: string;
7890
+ } | undefined;
7891
+ } | {
7892
+ id: string;
7893
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7894
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7895
+ createdAt: string;
7896
+ updatedAt: string;
7897
+ intent: "ADJUST";
7898
+ orderType: "MARKET";
7899
+ legs: [{
7900
+ symbol: string;
7901
+ side: "BUY" | "SELL";
7902
+ mode: "QUANTITY" | "USD";
7903
+ amount: string;
7904
+ reduceOnly: boolean;
7905
+ id?: string | undefined;
7906
+ maxImpactPrice?: string | undefined;
7907
+ }, ...{
7908
+ symbol: string;
7909
+ side: "BUY" | "SELL";
7910
+ mode: "QUANTITY" | "USD";
7911
+ amount: string;
7912
+ reduceOnly: boolean;
7913
+ id?: string | undefined;
7914
+ maxImpactPrice?: string | undefined;
7915
+ }[]];
7916
+ error?: string | undefined;
7917
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7918
+ refusedLegs?: {
7919
+ id: string;
7920
+ ticker: string;
7921
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7922
+ error: string;
7923
+ }[] | undefined;
7924
+ orders?: ({
7925
+ id: string;
7926
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7927
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7928
+ createdAt: string;
7929
+ updatedAt: string;
7930
+ type: "MARKET";
7931
+ symbol: string;
7932
+ side: "BUY" | "SELL";
7933
+ reduceOnly: boolean;
7934
+ quantity: string;
7935
+ price: string;
7936
+ filledQuantity: string;
7937
+ error?: string | undefined;
7938
+ errorCode?: string | undefined;
7939
+ filledPrice?: string | undefined;
7940
+ } | {
7941
+ id: string;
7942
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7943
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7944
+ createdAt: string;
7945
+ updatedAt: string;
7946
+ type: "RESTING";
7947
+ symbol: string;
7948
+ side: "BUY" | "SELL";
7949
+ reduceOnly: boolean;
7950
+ quantity: string;
7951
+ price: string;
7952
+ filledQuantity: string;
7953
+ error?: string | undefined;
7954
+ errorCode?: string | undefined;
7955
+ })[] | undefined;
7956
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7957
+ position?: {
7958
+ id: string;
7959
+ exposure: Record<string, `-${string}` | `+${string}`>;
7960
+ } | undefined;
7961
+ } | {
7962
+ id: string;
7963
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7964
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7965
+ createdAt: string;
7966
+ updatedAt: string;
7967
+ intent: "CLOSE";
7968
+ orderType: "MARKET";
7969
+ error?: string | undefined;
7970
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7971
+ refusedLegs?: {
7972
+ id: string;
7973
+ ticker: string;
7974
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7975
+ error: string;
7976
+ }[] | undefined;
7977
+ orders?: ({
7978
+ id: string;
7979
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7980
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7981
+ createdAt: string;
7982
+ updatedAt: string;
7983
+ type: "MARKET";
7984
+ symbol: string;
7985
+ side: "BUY" | "SELL";
7986
+ reduceOnly: boolean;
7987
+ quantity: string;
7988
+ price: string;
7989
+ filledQuantity: string;
7990
+ error?: string | undefined;
7991
+ errorCode?: string | undefined;
7992
+ filledPrice?: string | undefined;
7993
+ } | {
7994
+ id: string;
7995
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7996
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7997
+ createdAt: string;
7998
+ updatedAt: string;
7999
+ type: "RESTING";
8000
+ symbol: string;
8001
+ side: "BUY" | "SELL";
8002
+ reduceOnly: boolean;
8003
+ quantity: string;
8004
+ price: string;
8005
+ filledQuantity: string;
8006
+ error?: string | undefined;
8007
+ errorCode?: string | undefined;
8008
+ })[] | undefined;
8009
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
8010
+ position?: {
8011
+ id: string;
8012
+ exposure: Record<string, `-${string}` | `+${string}`>;
8013
+ } | undefined;
8014
+ } | {
8015
+ id: string;
8016
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8017
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
8018
+ createdAt: string;
8019
+ updatedAt: string;
8020
+ intent: "REVERSE";
8021
+ orderType: "MARKET";
8022
+ error?: string | undefined;
8023
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
8024
+ refusedLegs?: {
8025
+ id: string;
8026
+ ticker: string;
8027
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
8028
+ error: string;
8029
+ }[] | undefined;
8030
+ orders?: ({
8031
+ id: string;
8032
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8033
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8034
+ createdAt: string;
8035
+ updatedAt: string;
8036
+ type: "MARKET";
8037
+ symbol: string;
8038
+ side: "BUY" | "SELL";
8039
+ reduceOnly: boolean;
8040
+ quantity: string;
8041
+ price: string;
8042
+ filledQuantity: string;
8043
+ error?: string | undefined;
8044
+ errorCode?: string | undefined;
8045
+ filledPrice?: string | undefined;
8046
+ } | {
8047
+ id: string;
8048
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8049
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8050
+ createdAt: string;
8051
+ updatedAt: string;
8052
+ type: "RESTING";
8053
+ symbol: string;
8054
+ side: "BUY" | "SELL";
8055
+ reduceOnly: boolean;
8056
+ quantity: string;
8057
+ price: string;
8058
+ filledQuantity: string;
8059
+ error?: string | undefined;
8060
+ errorCode?: string | undefined;
8061
+ })[] | undefined;
8062
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
8063
+ position?: {
8064
+ id: string;
8065
+ exposure: Record<string, `-${string}` | `+${string}`>;
8066
+ } | undefined;
8067
+ } | {
8068
+ id: string;
8069
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8070
+ status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
8071
+ createdAt: string;
8072
+ updatedAt: string;
8073
+ intent: "OPEN";
8074
+ orderType: "CHASE_LIMIT";
8075
+ legs: [{
8076
+ symbol: string;
8077
+ side: "BUY" | "SELL";
8078
+ mode: "QUANTITY" | "USD";
8079
+ amount: string;
8080
+ reduceOnly: boolean;
8081
+ id?: string | undefined;
8082
+ maxImpactPrice?: string | undefined;
8083
+ }, ...{
8084
+ symbol: string;
8085
+ side: "BUY" | "SELL";
8086
+ mode: "QUANTITY" | "USD";
8087
+ amount: string;
8088
+ reduceOnly: boolean;
8089
+ id?: string | undefined;
8090
+ maxImpactPrice?: string | undefined;
8091
+ }[]];
8092
+ error?: string | undefined;
8093
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
8094
+ refusedLegs?: {
8095
+ id: string;
8096
+ ticker: string;
8097
+ errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
8098
+ error: string;
8099
+ }[] | undefined;
8100
+ orders?: ({
8101
+ id: string;
8102
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8103
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8104
+ createdAt: string;
8105
+ updatedAt: string;
8106
+ type: "MARKET";
8107
+ symbol: string;
8108
+ side: "BUY" | "SELL";
8109
+ reduceOnly: boolean;
8110
+ quantity: string;
8111
+ price: string;
8112
+ filledQuantity: string;
8113
+ error?: string | undefined;
8114
+ errorCode?: string | undefined;
8115
+ filledPrice?: string | undefined;
8116
+ } | {
8117
+ id: string;
8118
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8119
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8120
+ createdAt: string;
8121
+ updatedAt: string;
8122
+ type: "RESTING";
8123
+ symbol: string;
8124
+ side: "BUY" | "SELL";
8125
+ reduceOnly: boolean;
8126
+ quantity: string;
8127
+ price: string;
8128
+ filledQuantity: string;
8129
+ error?: string | undefined;
8130
+ errorCode?: string | undefined;
8131
+ })[] | undefined;
8132
+ fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
8133
+ position?: {
8134
+ id: string;
8135
+ } | undefined;
8136
+ deadlineAt?: string | undefined;
8137
+ chaseOrders?: {
8138
+ id: string;
8139
+ executionId: string;
8140
+ instrumentId: string;
8141
+ side: "BUY" | "SELL";
8142
+ quantity: string;
8143
+ filledQuantity: string;
8144
+ makerFilledQuantity: string;
8145
+ takerFilledQuantity: string;
8146
+ attempts: ({
8147
+ id: string;
8148
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8149
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8150
+ createdAt: string;
8151
+ updatedAt: string;
8152
+ type: "MARKET";
8153
+ symbol: string;
8154
+ side: "BUY" | "SELL";
8155
+ reduceOnly: boolean;
8156
+ quantity: string;
8157
+ price: string;
8158
+ filledQuantity: string;
8159
+ error?: string | undefined;
8160
+ errorCode?: string | undefined;
8161
+ filledPrice?: string | undefined;
8162
+ } | {
8163
+ id: string;
8164
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8165
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8166
+ createdAt: string;
8167
+ updatedAt: string;
8168
+ type: "RESTING";
8169
+ symbol: string;
8170
+ side: "BUY" | "SELL";
8171
+ reduceOnly: boolean;
8172
+ quantity: string;
8173
+ price: string;
8174
+ filledQuantity: string;
8175
+ error?: string | undefined;
8176
+ errorCode?: string | undefined;
8177
+ })[];
8178
+ averageFillPrice?: string | undefined;
8179
+ }[] | undefined;
8180
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
8181
+ };
8182
+ }>;
8183
+ close: (positionId: string, body: HttpTypes.CreateTradeClose, headers?: ClientHeaders) => Promise<{
7088
8184
  execution: {
7089
8185
  id: string;
7090
8186
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
@@ -7111,14 +8207,14 @@ declare class Core {
7111
8207
  maxImpactPrice?: string | undefined;
7112
8208
  }[]];
7113
8209
  error?: string | undefined;
7114
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8210
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7115
8211
  refusedLegs?: {
7116
8212
  id: string;
7117
8213
  ticker: string;
7118
8214
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7119
8215
  error: string;
7120
8216
  }[] | undefined;
7121
- orders?: {
8217
+ orders?: ({
7122
8218
  id: string;
7123
8219
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7124
8220
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7134,7 +8230,22 @@ declare class Core {
7134
8230
  error?: string | undefined;
7135
8231
  errorCode?: string | undefined;
7136
8232
  filledPrice?: string | undefined;
7137
- }[] | undefined;
8233
+ } | {
8234
+ id: string;
8235
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8236
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8237
+ createdAt: string;
8238
+ updatedAt: string;
8239
+ type: "RESTING";
8240
+ symbol: string;
8241
+ side: "BUY" | "SELL";
8242
+ reduceOnly: boolean;
8243
+ quantity: string;
8244
+ price: string;
8245
+ filledQuantity: string;
8246
+ error?: string | undefined;
8247
+ errorCode?: string | undefined;
8248
+ })[] | undefined;
7138
8249
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7139
8250
  position?: {
7140
8251
  id: string;
@@ -7165,14 +8276,14 @@ declare class Core {
7165
8276
  maxImpactPrice?: string | undefined;
7166
8277
  }[]];
7167
8278
  error?: string | undefined;
7168
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8279
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7169
8280
  refusedLegs?: {
7170
8281
  id: string;
7171
8282
  ticker: string;
7172
8283
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7173
8284
  error: string;
7174
8285
  }[] | undefined;
7175
- orders?: {
8286
+ orders?: ({
7176
8287
  id: string;
7177
8288
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7178
8289
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7188,7 +8299,22 @@ declare class Core {
7188
8299
  error?: string | undefined;
7189
8300
  errorCode?: string | undefined;
7190
8301
  filledPrice?: string | undefined;
7191
- }[] | undefined;
8302
+ } | {
8303
+ id: string;
8304
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8305
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8306
+ createdAt: string;
8307
+ updatedAt: string;
8308
+ type: "RESTING";
8309
+ symbol: string;
8310
+ side: "BUY" | "SELL";
8311
+ reduceOnly: boolean;
8312
+ quantity: string;
8313
+ price: string;
8314
+ filledQuantity: string;
8315
+ error?: string | undefined;
8316
+ errorCode?: string | undefined;
8317
+ })[] | undefined;
7192
8318
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7193
8319
  position?: {
7194
8320
  id: string;
@@ -7203,14 +8329,14 @@ declare class Core {
7203
8329
  intent: "CLOSE";
7204
8330
  orderType: "MARKET";
7205
8331
  error?: string | undefined;
7206
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8332
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7207
8333
  refusedLegs?: {
7208
8334
  id: string;
7209
8335
  ticker: string;
7210
8336
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7211
8337
  error: string;
7212
8338
  }[] | undefined;
7213
- orders?: {
8339
+ orders?: ({
7214
8340
  id: string;
7215
8341
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7216
8342
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7226,7 +8352,22 @@ declare class Core {
7226
8352
  error?: string | undefined;
7227
8353
  errorCode?: string | undefined;
7228
8354
  filledPrice?: string | undefined;
7229
- }[] | undefined;
8355
+ } | {
8356
+ id: string;
8357
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8358
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8359
+ createdAt: string;
8360
+ updatedAt: string;
8361
+ type: "RESTING";
8362
+ symbol: string;
8363
+ side: "BUY" | "SELL";
8364
+ reduceOnly: boolean;
8365
+ quantity: string;
8366
+ price: string;
8367
+ filledQuantity: string;
8368
+ error?: string | undefined;
8369
+ errorCode?: string | undefined;
8370
+ })[] | undefined;
7230
8371
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7231
8372
  position?: {
7232
8373
  id: string;
@@ -7241,14 +8382,14 @@ declare class Core {
7241
8382
  intent: "REVERSE";
7242
8383
  orderType: "MARKET";
7243
8384
  error?: string | undefined;
7244
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8385
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7245
8386
  refusedLegs?: {
7246
8387
  id: string;
7247
8388
  ticker: string;
7248
8389
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7249
8390
  error: string;
7250
8391
  }[] | undefined;
7251
- orders?: {
8392
+ orders?: ({
7252
8393
  id: string;
7253
8394
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7254
8395
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7264,23 +8405,35 @@ declare class Core {
7264
8405
  error?: string | undefined;
7265
8406
  errorCode?: string | undefined;
7266
8407
  filledPrice?: string | undefined;
7267
- }[] | undefined;
8408
+ } | {
8409
+ id: string;
8410
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8411
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8412
+ createdAt: string;
8413
+ updatedAt: string;
8414
+ type: "RESTING";
8415
+ symbol: string;
8416
+ side: "BUY" | "SELL";
8417
+ reduceOnly: boolean;
8418
+ quantity: string;
8419
+ price: string;
8420
+ filledQuantity: string;
8421
+ error?: string | undefined;
8422
+ errorCode?: string | undefined;
8423
+ })[] | undefined;
7268
8424
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7269
8425
  position?: {
7270
8426
  id: string;
7271
8427
  exposure: Record<string, `-${string}` | `+${string}`>;
7272
8428
  } | undefined;
7273
- };
7274
- }>;
7275
- adjust: (positionId: string, body: HttpTypes.CreateTradeAdjust, headers?: ClientHeaders) => Promise<{
7276
- execution: {
8429
+ } | {
7277
8430
  id: string;
7278
8431
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7279
8432
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7280
8433
  createdAt: string;
7281
8434
  updatedAt: string;
7282
8435
  intent: "OPEN";
7283
- orderType: "MARKET";
8436
+ orderType: "CHASE_LIMIT";
7284
8437
  legs: [{
7285
8438
  symbol: string;
7286
8439
  side: "BUY" | "SELL";
@@ -7299,14 +8452,14 @@ declare class Core {
7299
8452
  maxImpactPrice?: string | undefined;
7300
8453
  }[]];
7301
8454
  error?: string | undefined;
7302
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8455
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7303
8456
  refusedLegs?: {
7304
8457
  id: string;
7305
8458
  ticker: string;
7306
8459
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7307
8460
  error: string;
7308
8461
  }[] | undefined;
7309
- orders?: {
8462
+ orders?: ({
7310
8463
  id: string;
7311
8464
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7312
8465
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7322,18 +8475,81 @@ declare class Core {
7322
8475
  error?: string | undefined;
7323
8476
  errorCode?: string | undefined;
7324
8477
  filledPrice?: string | undefined;
7325
- }[] | undefined;
8478
+ } | {
8479
+ id: string;
8480
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8481
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8482
+ createdAt: string;
8483
+ updatedAt: string;
8484
+ type: "RESTING";
8485
+ symbol: string;
8486
+ side: "BUY" | "SELL";
8487
+ reduceOnly: boolean;
8488
+ quantity: string;
8489
+ price: string;
8490
+ filledQuantity: string;
8491
+ error?: string | undefined;
8492
+ errorCode?: string | undefined;
8493
+ })[] | undefined;
7326
8494
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7327
8495
  position?: {
7328
8496
  id: string;
7329
8497
  } | undefined;
7330
- } | {
8498
+ deadlineAt?: string | undefined;
8499
+ chaseOrders?: {
8500
+ id: string;
8501
+ executionId: string;
8502
+ instrumentId: string;
8503
+ side: "BUY" | "SELL";
8504
+ quantity: string;
8505
+ filledQuantity: string;
8506
+ makerFilledQuantity: string;
8507
+ takerFilledQuantity: string;
8508
+ attempts: ({
8509
+ id: string;
8510
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8511
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8512
+ createdAt: string;
8513
+ updatedAt: string;
8514
+ type: "MARKET";
8515
+ symbol: string;
8516
+ side: "BUY" | "SELL";
8517
+ reduceOnly: boolean;
8518
+ quantity: string;
8519
+ price: string;
8520
+ filledQuantity: string;
8521
+ error?: string | undefined;
8522
+ errorCode?: string | undefined;
8523
+ filledPrice?: string | undefined;
8524
+ } | {
8525
+ id: string;
8526
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8527
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8528
+ createdAt: string;
8529
+ updatedAt: string;
8530
+ type: "RESTING";
8531
+ symbol: string;
8532
+ side: "BUY" | "SELL";
8533
+ reduceOnly: boolean;
8534
+ quantity: string;
8535
+ price: string;
8536
+ filledQuantity: string;
8537
+ error?: string | undefined;
8538
+ errorCode?: string | undefined;
8539
+ })[];
8540
+ averageFillPrice?: string | undefined;
8541
+ }[] | undefined;
8542
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
8543
+ };
8544
+ }>;
8545
+ reverse: (positionId: string, body: HttpTypes.CreateTradeReverse, headers?: ClientHeaders) => Promise<{
8546
+ execution: {
7331
8547
  id: string;
7332
8548
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7333
8549
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7334
8550
  createdAt: string;
7335
8551
  updatedAt: string;
7336
- intent: "ADJUST";
8552
+ intent: "OPEN";
7337
8553
  orderType: "MARKET";
7338
8554
  legs: [{
7339
8555
  symbol: string;
@@ -7353,14 +8569,14 @@ declare class Core {
7353
8569
  maxImpactPrice?: string | undefined;
7354
8570
  }[]];
7355
8571
  error?: string | undefined;
7356
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8572
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7357
8573
  refusedLegs?: {
7358
8574
  id: string;
7359
8575
  ticker: string;
7360
8576
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7361
8577
  error: string;
7362
8578
  }[] | undefined;
7363
- orders?: {
8579
+ orders?: ({
7364
8580
  id: string;
7365
8581
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7366
8582
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7376,35 +8592,13 @@ declare class Core {
7376
8592
  error?: string | undefined;
7377
8593
  errorCode?: string | undefined;
7378
8594
  filledPrice?: string | undefined;
7379
- }[] | undefined;
7380
- fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7381
- position?: {
7382
- id: string;
7383
- exposure: Record<string, `-${string}` | `+${string}`>;
7384
- } | undefined;
7385
- } | {
7386
- id: string;
7387
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7388
- status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7389
- createdAt: string;
7390
- updatedAt: string;
7391
- intent: "CLOSE";
7392
- orderType: "MARKET";
7393
- error?: string | undefined;
7394
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
7395
- refusedLegs?: {
7396
- id: string;
7397
- ticker: string;
7398
- errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7399
- error: string;
7400
- }[] | undefined;
7401
- orders?: {
8595
+ } | {
7402
8596
  id: string;
7403
8597
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7404
8598
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7405
8599
  createdAt: string;
7406
8600
  updatedAt: string;
7407
- type: "MARKET";
8601
+ type: "RESTING";
7408
8602
  symbol: string;
7409
8603
  side: "BUY" | "SELL";
7410
8604
  reduceOnly: boolean;
@@ -7413,12 +8607,10 @@ declare class Core {
7413
8607
  filledQuantity: string;
7414
8608
  error?: string | undefined;
7415
8609
  errorCode?: string | undefined;
7416
- filledPrice?: string | undefined;
7417
- }[] | undefined;
8610
+ })[] | undefined;
7418
8611
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7419
8612
  position?: {
7420
8613
  id: string;
7421
- exposure: Record<string, `-${string}` | `+${string}`>;
7422
8614
  } | undefined;
7423
8615
  } | {
7424
8616
  id: string;
@@ -7426,48 +8618,7 @@ declare class Core {
7426
8618
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7427
8619
  createdAt: string;
7428
8620
  updatedAt: string;
7429
- intent: "REVERSE";
7430
- orderType: "MARKET";
7431
- error?: string | undefined;
7432
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
7433
- refusedLegs?: {
7434
- id: string;
7435
- ticker: string;
7436
- errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7437
- error: string;
7438
- }[] | undefined;
7439
- orders?: {
7440
- id: string;
7441
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7442
- status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7443
- createdAt: string;
7444
- updatedAt: string;
7445
- type: "MARKET";
7446
- symbol: string;
7447
- side: "BUY" | "SELL";
7448
- reduceOnly: boolean;
7449
- quantity: string;
7450
- price: string;
7451
- filledQuantity: string;
7452
- error?: string | undefined;
7453
- errorCode?: string | undefined;
7454
- filledPrice?: string | undefined;
7455
- }[] | undefined;
7456
- fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7457
- position?: {
7458
- id: string;
7459
- exposure: Record<string, `-${string}` | `+${string}`>;
7460
- } | undefined;
7461
- };
7462
- }>;
7463
- close: (positionId: string, body: HttpTypes.CreateTradeClose, headers?: ClientHeaders) => Promise<{
7464
- execution: {
7465
- id: string;
7466
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7467
- status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7468
- createdAt: string;
7469
- updatedAt: string;
7470
- intent: "OPEN";
8621
+ intent: "ADJUST";
7471
8622
  orderType: "MARKET";
7472
8623
  legs: [{
7473
8624
  symbol: string;
@@ -7487,14 +8638,14 @@ declare class Core {
7487
8638
  maxImpactPrice?: string | undefined;
7488
8639
  }[]];
7489
8640
  error?: string | undefined;
7490
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8641
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7491
8642
  refusedLegs?: {
7492
8643
  id: string;
7493
8644
  ticker: string;
7494
8645
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7495
8646
  error: string;
7496
8647
  }[] | undefined;
7497
- orders?: {
8648
+ orders?: ({
7498
8649
  id: string;
7499
8650
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7500
8651
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7510,10 +8661,26 @@ declare class Core {
7510
8661
  error?: string | undefined;
7511
8662
  errorCode?: string | undefined;
7512
8663
  filledPrice?: string | undefined;
7513
- }[] | undefined;
8664
+ } | {
8665
+ id: string;
8666
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8667
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8668
+ createdAt: string;
8669
+ updatedAt: string;
8670
+ type: "RESTING";
8671
+ symbol: string;
8672
+ side: "BUY" | "SELL";
8673
+ reduceOnly: boolean;
8674
+ quantity: string;
8675
+ price: string;
8676
+ filledQuantity: string;
8677
+ error?: string | undefined;
8678
+ errorCode?: string | undefined;
8679
+ })[] | undefined;
7514
8680
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7515
8681
  position?: {
7516
8682
  id: string;
8683
+ exposure: Record<string, `-${string}` | `+${string}`>;
7517
8684
  } | undefined;
7518
8685
  } | {
7519
8686
  id: string;
@@ -7521,34 +8688,17 @@ declare class Core {
7521
8688
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7522
8689
  createdAt: string;
7523
8690
  updatedAt: string;
7524
- intent: "ADJUST";
8691
+ intent: "CLOSE";
7525
8692
  orderType: "MARKET";
7526
- legs: [{
7527
- symbol: string;
7528
- side: "BUY" | "SELL";
7529
- mode: "QUANTITY" | "USD";
7530
- amount: string;
7531
- reduceOnly: boolean;
7532
- id?: string | undefined;
7533
- maxImpactPrice?: string | undefined;
7534
- }, ...{
7535
- symbol: string;
7536
- side: "BUY" | "SELL";
7537
- mode: "QUANTITY" | "USD";
7538
- amount: string;
7539
- reduceOnly: boolean;
7540
- id?: string | undefined;
7541
- maxImpactPrice?: string | undefined;
7542
- }[]];
7543
8693
  error?: string | undefined;
7544
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8694
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7545
8695
  refusedLegs?: {
7546
8696
  id: string;
7547
8697
  ticker: string;
7548
8698
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7549
8699
  error: string;
7550
8700
  }[] | undefined;
7551
- orders?: {
8701
+ orders?: ({
7552
8702
  id: string;
7553
8703
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7554
8704
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7564,7 +8714,22 @@ declare class Core {
7564
8714
  error?: string | undefined;
7565
8715
  errorCode?: string | undefined;
7566
8716
  filledPrice?: string | undefined;
7567
- }[] | undefined;
8717
+ } | {
8718
+ id: string;
8719
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8720
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8721
+ createdAt: string;
8722
+ updatedAt: string;
8723
+ type: "RESTING";
8724
+ symbol: string;
8725
+ side: "BUY" | "SELL";
8726
+ reduceOnly: boolean;
8727
+ quantity: string;
8728
+ price: string;
8729
+ filledQuantity: string;
8730
+ error?: string | undefined;
8731
+ errorCode?: string | undefined;
8732
+ })[] | undefined;
7568
8733
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7569
8734
  position?: {
7570
8735
  id: string;
@@ -7576,17 +8741,17 @@ declare class Core {
7576
8741
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7577
8742
  createdAt: string;
7578
8743
  updatedAt: string;
7579
- intent: "CLOSE";
8744
+ intent: "REVERSE";
7580
8745
  orderType: "MARKET";
7581
8746
  error?: string | undefined;
7582
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8747
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7583
8748
  refusedLegs?: {
7584
8749
  id: string;
7585
8750
  ticker: string;
7586
8751
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7587
8752
  error: string;
7588
8753
  }[] | undefined;
7589
- orders?: {
8754
+ orders?: ({
7590
8755
  id: string;
7591
8756
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7592
8757
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7602,7 +8767,22 @@ declare class Core {
7602
8767
  error?: string | undefined;
7603
8768
  errorCode?: string | undefined;
7604
8769
  filledPrice?: string | undefined;
7605
- }[] | undefined;
8770
+ } | {
8771
+ id: string;
8772
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8773
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8774
+ createdAt: string;
8775
+ updatedAt: string;
8776
+ type: "RESTING";
8777
+ symbol: string;
8778
+ side: "BUY" | "SELL";
8779
+ reduceOnly: boolean;
8780
+ quantity: string;
8781
+ price: string;
8782
+ filledQuantity: string;
8783
+ error?: string | undefined;
8784
+ errorCode?: string | undefined;
8785
+ })[] | undefined;
7606
8786
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7607
8787
  position?: {
7608
8788
  id: string;
@@ -7614,17 +8794,34 @@ declare class Core {
7614
8794
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7615
8795
  createdAt: string;
7616
8796
  updatedAt: string;
7617
- intent: "REVERSE";
7618
- orderType: "MARKET";
8797
+ intent: "OPEN";
8798
+ orderType: "CHASE_LIMIT";
8799
+ legs: [{
8800
+ symbol: string;
8801
+ side: "BUY" | "SELL";
8802
+ mode: "QUANTITY" | "USD";
8803
+ amount: string;
8804
+ reduceOnly: boolean;
8805
+ id?: string | undefined;
8806
+ maxImpactPrice?: string | undefined;
8807
+ }, ...{
8808
+ symbol: string;
8809
+ side: "BUY" | "SELL";
8810
+ mode: "QUANTITY" | "USD";
8811
+ amount: string;
8812
+ reduceOnly: boolean;
8813
+ id?: string | undefined;
8814
+ maxImpactPrice?: string | undefined;
8815
+ }[]];
7619
8816
  error?: string | undefined;
7620
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8817
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7621
8818
  refusedLegs?: {
7622
8819
  id: string;
7623
8820
  ticker: string;
7624
8821
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7625
8822
  error: string;
7626
8823
  }[] | undefined;
7627
- orders?: {
8824
+ orders?: ({
7628
8825
  id: string;
7629
8826
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7630
8827
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7640,16 +8837,75 @@ declare class Core {
7640
8837
  error?: string | undefined;
7641
8838
  errorCode?: string | undefined;
7642
8839
  filledPrice?: string | undefined;
7643
- }[] | undefined;
8840
+ } | {
8841
+ id: string;
8842
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8843
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8844
+ createdAt: string;
8845
+ updatedAt: string;
8846
+ type: "RESTING";
8847
+ symbol: string;
8848
+ side: "BUY" | "SELL";
8849
+ reduceOnly: boolean;
8850
+ quantity: string;
8851
+ price: string;
8852
+ filledQuantity: string;
8853
+ error?: string | undefined;
8854
+ errorCode?: string | undefined;
8855
+ })[] | undefined;
7644
8856
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7645
8857
  position?: {
7646
8858
  id: string;
7647
- exposure: Record<string, `-${string}` | `+${string}`>;
7648
8859
  } | undefined;
8860
+ deadlineAt?: string | undefined;
8861
+ chaseOrders?: {
8862
+ id: string;
8863
+ executionId: string;
8864
+ instrumentId: string;
8865
+ side: "BUY" | "SELL";
8866
+ quantity: string;
8867
+ filledQuantity: string;
8868
+ makerFilledQuantity: string;
8869
+ takerFilledQuantity: string;
8870
+ attempts: ({
8871
+ id: string;
8872
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8873
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8874
+ createdAt: string;
8875
+ updatedAt: string;
8876
+ type: "MARKET";
8877
+ symbol: string;
8878
+ side: "BUY" | "SELL";
8879
+ reduceOnly: boolean;
8880
+ quantity: string;
8881
+ price: string;
8882
+ filledQuantity: string;
8883
+ error?: string | undefined;
8884
+ errorCode?: string | undefined;
8885
+ filledPrice?: string | undefined;
8886
+ } | {
8887
+ id: string;
8888
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8889
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8890
+ createdAt: string;
8891
+ updatedAt: string;
8892
+ type: "RESTING";
8893
+ symbol: string;
8894
+ side: "BUY" | "SELL";
8895
+ reduceOnly: boolean;
8896
+ quantity: string;
8897
+ price: string;
8898
+ filledQuantity: string;
8899
+ error?: string | undefined;
8900
+ errorCode?: string | undefined;
8901
+ })[];
8902
+ averageFillPrice?: string | undefined;
8903
+ }[] | undefined;
8904
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
7649
8905
  };
7650
8906
  }>;
7651
- reverse: (positionId: string, body: HttpTypes.CreateTradeReverse, headers?: ClientHeaders) => Promise<{
7652
- execution: {
8907
+ closeAll: (body: HttpTypes.CreateTradeCloseAll, headers?: ClientHeaders) => Promise<{
8908
+ executions: ({
7653
8909
  id: string;
7654
8910
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7655
8911
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
@@ -7675,14 +8931,14 @@ declare class Core {
7675
8931
  maxImpactPrice?: string | undefined;
7676
8932
  }[]];
7677
8933
  error?: string | undefined;
7678
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
8934
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7679
8935
  refusedLegs?: {
7680
8936
  id: string;
7681
8937
  ticker: string;
7682
8938
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7683
8939
  error: string;
7684
8940
  }[] | undefined;
7685
- orders?: {
8941
+ orders?: ({
7686
8942
  id: string;
7687
8943
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7688
8944
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7698,7 +8954,22 @@ declare class Core {
7698
8954
  error?: string | undefined;
7699
8955
  errorCode?: string | undefined;
7700
8956
  filledPrice?: string | undefined;
7701
- }[] | undefined;
8957
+ } | {
8958
+ id: string;
8959
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8960
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8961
+ createdAt: string;
8962
+ updatedAt: string;
8963
+ type: "RESTING";
8964
+ symbol: string;
8965
+ side: "BUY" | "SELL";
8966
+ reduceOnly: boolean;
8967
+ quantity: string;
8968
+ price: string;
8969
+ filledQuantity: string;
8970
+ error?: string | undefined;
8971
+ errorCode?: string | undefined;
8972
+ })[] | undefined;
7702
8973
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7703
8974
  position?: {
7704
8975
  id: string;
@@ -7729,14 +9000,14 @@ declare class Core {
7729
9000
  maxImpactPrice?: string | undefined;
7730
9001
  }[]];
7731
9002
  error?: string | undefined;
7732
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
9003
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7733
9004
  refusedLegs?: {
7734
9005
  id: string;
7735
9006
  ticker: string;
7736
9007
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7737
9008
  error: string;
7738
9009
  }[] | undefined;
7739
- orders?: {
9010
+ orders?: ({
7740
9011
  id: string;
7741
9012
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7742
9013
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7752,7 +9023,22 @@ declare class Core {
7752
9023
  error?: string | undefined;
7753
9024
  errorCode?: string | undefined;
7754
9025
  filledPrice?: string | undefined;
7755
- }[] | undefined;
9026
+ } | {
9027
+ id: string;
9028
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
9029
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
9030
+ createdAt: string;
9031
+ updatedAt: string;
9032
+ type: "RESTING";
9033
+ symbol: string;
9034
+ side: "BUY" | "SELL";
9035
+ reduceOnly: boolean;
9036
+ quantity: string;
9037
+ price: string;
9038
+ filledQuantity: string;
9039
+ error?: string | undefined;
9040
+ errorCode?: string | undefined;
9041
+ })[] | undefined;
7756
9042
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7757
9043
  position?: {
7758
9044
  id: string;
@@ -7767,14 +9053,14 @@ declare class Core {
7767
9053
  intent: "CLOSE";
7768
9054
  orderType: "MARKET";
7769
9055
  error?: string | undefined;
7770
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
9056
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7771
9057
  refusedLegs?: {
7772
9058
  id: string;
7773
9059
  ticker: string;
7774
9060
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7775
9061
  error: string;
7776
9062
  }[] | undefined;
7777
- orders?: {
9063
+ orders?: ({
7778
9064
  id: string;
7779
9065
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7780
9066
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7790,7 +9076,22 @@ declare class Core {
7790
9076
  error?: string | undefined;
7791
9077
  errorCode?: string | undefined;
7792
9078
  filledPrice?: string | undefined;
7793
- }[] | undefined;
9079
+ } | {
9080
+ id: string;
9081
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
9082
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
9083
+ createdAt: string;
9084
+ updatedAt: string;
9085
+ type: "RESTING";
9086
+ symbol: string;
9087
+ side: "BUY" | "SELL";
9088
+ reduceOnly: boolean;
9089
+ quantity: string;
9090
+ price: string;
9091
+ filledQuantity: string;
9092
+ error?: string | undefined;
9093
+ errorCode?: string | undefined;
9094
+ })[] | undefined;
7794
9095
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7795
9096
  position?: {
7796
9097
  id: string;
@@ -7805,14 +9106,14 @@ declare class Core {
7805
9106
  intent: "REVERSE";
7806
9107
  orderType: "MARKET";
7807
9108
  error?: string | undefined;
7808
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
9109
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7809
9110
  refusedLegs?: {
7810
9111
  id: string;
7811
9112
  ticker: string;
7812
9113
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7813
9114
  error: string;
7814
9115
  }[] | undefined;
7815
- orders?: {
9116
+ orders?: ({
7816
9117
  id: string;
7817
9118
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7818
9119
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7828,55 +9129,13 @@ declare class Core {
7828
9129
  error?: string | undefined;
7829
9130
  errorCode?: string | undefined;
7830
9131
  filledPrice?: string | undefined;
7831
- }[] | undefined;
7832
- fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7833
- position?: {
7834
- id: string;
7835
- exposure: Record<string, `-${string}` | `+${string}`>;
7836
- } | undefined;
7837
- };
7838
- }>;
7839
- closeAll: (body: HttpTypes.CreateTradeCloseAll, headers?: ClientHeaders) => Promise<{
7840
- executions: ({
7841
- id: string;
7842
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7843
- status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7844
- createdAt: string;
7845
- updatedAt: string;
7846
- intent: "OPEN";
7847
- orderType: "MARKET";
7848
- legs: [{
7849
- symbol: string;
7850
- side: "BUY" | "SELL";
7851
- mode: "QUANTITY" | "USD";
7852
- amount: string;
7853
- reduceOnly: boolean;
7854
- id?: string | undefined;
7855
- maxImpactPrice?: string | undefined;
7856
- }, ...{
7857
- symbol: string;
7858
- side: "BUY" | "SELL";
7859
- mode: "QUANTITY" | "USD";
7860
- amount: string;
7861
- reduceOnly: boolean;
7862
- id?: string | undefined;
7863
- maxImpactPrice?: string | undefined;
7864
- }[]];
7865
- error?: string | undefined;
7866
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
7867
- refusedLegs?: {
7868
- id: string;
7869
- ticker: string;
7870
- errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7871
- error: string;
7872
- }[] | undefined;
7873
- orders?: {
9132
+ } | {
7874
9133
  id: string;
7875
9134
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7876
9135
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7877
9136
  createdAt: string;
7878
9137
  updatedAt: string;
7879
- type: "MARKET";
9138
+ type: "RESTING";
7880
9139
  symbol: string;
7881
9140
  side: "BUY" | "SELL";
7882
9141
  reduceOnly: boolean;
@@ -7885,11 +9144,11 @@ declare class Core {
7885
9144
  filledQuantity: string;
7886
9145
  error?: string | undefined;
7887
9146
  errorCode?: string | undefined;
7888
- filledPrice?: string | undefined;
7889
- }[] | undefined;
9147
+ })[] | undefined;
7890
9148
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7891
9149
  position?: {
7892
9150
  id: string;
9151
+ exposure: Record<string, `-${string}` | `+${string}`>;
7893
9152
  } | undefined;
7894
9153
  } | {
7895
9154
  id: string;
@@ -7897,8 +9156,8 @@ declare class Core {
7897
9156
  status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7898
9157
  createdAt: string;
7899
9158
  updatedAt: string;
7900
- intent: "ADJUST";
7901
- orderType: "MARKET";
9159
+ intent: "OPEN";
9160
+ orderType: "CHASE_LIMIT";
7902
9161
  legs: [{
7903
9162
  symbol: string;
7904
9163
  side: "BUY" | "SELL";
@@ -7917,14 +9176,14 @@ declare class Core {
7917
9176
  maxImpactPrice?: string | undefined;
7918
9177
  }[]];
7919
9178
  error?: string | undefined;
7920
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
9179
+ errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | "RESTING_FINAL_UNKNOWN" | undefined;
7921
9180
  refusedLegs?: {
7922
9181
  id: string;
7923
9182
  ticker: string;
7924
9183
  errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7925
9184
  error: string;
7926
9185
  }[] | undefined;
7927
- orders?: {
9186
+ orders?: ({
7928
9187
  id: string;
7929
9188
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7930
9189
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
@@ -7940,35 +9199,13 @@ declare class Core {
7940
9199
  error?: string | undefined;
7941
9200
  errorCode?: string | undefined;
7942
9201
  filledPrice?: string | undefined;
7943
- }[] | undefined;
7944
- fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7945
- position?: {
7946
- id: string;
7947
- exposure: Record<string, `-${string}` | `+${string}`>;
7948
- } | undefined;
7949
- } | {
7950
- id: string;
7951
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7952
- status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7953
- createdAt: string;
7954
- updatedAt: string;
7955
- intent: "CLOSE";
7956
- orderType: "MARKET";
7957
- error?: string | undefined;
7958
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
7959
- refusedLegs?: {
7960
- id: string;
7961
- ticker: string;
7962
- errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
7963
- error: string;
7964
- }[] | undefined;
7965
- orders?: {
9202
+ } | {
7966
9203
  id: string;
7967
9204
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7968
9205
  status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
7969
9206
  createdAt: string;
7970
9207
  updatedAt: string;
7971
- type: "MARKET";
9208
+ type: "RESTING";
7972
9209
  symbol: string;
7973
9210
  side: "BUY" | "SELL";
7974
9211
  reduceOnly: boolean;
@@ -7977,51 +9214,56 @@ declare class Core {
7977
9214
  filledQuantity: string;
7978
9215
  error?: string | undefined;
7979
9216
  errorCode?: string | undefined;
7980
- filledPrice?: string | undefined;
7981
- }[] | undefined;
9217
+ })[] | undefined;
7982
9218
  fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
7983
9219
  position?: {
7984
9220
  id: string;
7985
- exposure: Record<string, `-${string}` | `+${string}`>;
7986
9221
  } | undefined;
7987
- } | {
7988
- id: string;
7989
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
7990
- status: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
7991
- createdAt: string;
7992
- updatedAt: string;
7993
- intent: "REVERSE";
7994
- orderType: "MARKET";
7995
- error?: string | undefined;
7996
- errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
7997
- refusedLegs?: {
7998
- id: string;
7999
- ticker: string;
8000
- errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
8001
- error: string;
8002
- }[] | undefined;
8003
- orders?: {
9222
+ deadlineAt?: string | undefined;
9223
+ chaseOrders?: {
8004
9224
  id: string;
8005
- connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
8006
- status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
8007
- createdAt: string;
8008
- updatedAt: string;
8009
- type: "MARKET";
8010
- symbol: string;
9225
+ executionId: string;
9226
+ instrumentId: string;
8011
9227
  side: "BUY" | "SELL";
8012
- reduceOnly: boolean;
8013
9228
  quantity: string;
8014
- price: string;
8015
9229
  filledQuantity: string;
8016
- error?: string | undefined;
8017
- errorCode?: string | undefined;
8018
- filledPrice?: string | undefined;
9230
+ makerFilledQuantity: string;
9231
+ takerFilledQuantity: string;
9232
+ attempts: ({
9233
+ id: string;
9234
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
9235
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
9236
+ createdAt: string;
9237
+ updatedAt: string;
9238
+ type: "MARKET";
9239
+ symbol: string;
9240
+ side: "BUY" | "SELL";
9241
+ reduceOnly: boolean;
9242
+ quantity: string;
9243
+ price: string;
9244
+ filledQuantity: string;
9245
+ error?: string | undefined;
9246
+ errorCode?: string | undefined;
9247
+ filledPrice?: string | undefined;
9248
+ } | {
9249
+ id: string;
9250
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
9251
+ status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
9252
+ createdAt: string;
9253
+ updatedAt: string;
9254
+ type: "RESTING";
9255
+ symbol: string;
9256
+ side: "BUY" | "SELL";
9257
+ reduceOnly: boolean;
9258
+ quantity: string;
9259
+ price: string;
9260
+ filledQuantity: string;
9261
+ error?: string | undefined;
9262
+ errorCode?: string | undefined;
9263
+ })[];
9264
+ averageFillPrice?: string | undefined;
8019
9265
  }[] | undefined;
8020
- fulfillment?: "NONE" | "PENDING" | "PARTIAL" | "COMPLETE" | undefined;
8021
- position?: {
8022
- id: string;
8023
- exposure: Record<string, `-${string}` | `+${string}`>;
8024
- } | undefined;
9266
+ completionReason?: "ALL_LEGS_COMPLETE" | "DEADLINE_CROSS" | "DEADLINE_CANCEL" | "USER_CROSS" | "USER_CANCEL" | "VENUE_CANCEL" | "VENUE_REFUSAL" | "UNAUTHORIZED" | undefined;
8025
9267
  })[];
8026
9268
  }>;
8027
9269
  setLeverage: (body: HttpTypes.SetLeverageInput, headers?: ClientHeaders) => Promise<Record<string, never>>;
@@ -8132,6 +9374,7 @@ declare class Core {
8132
9374
  side: "BUY" | "SELL";
8133
9375
  reduceOnly: boolean;
8134
9376
  isExternal: boolean;
9377
+ isMaker: boolean;
8135
9378
  synthetic: boolean;
8136
9379
  quantity: string;
8137
9380
  price: string;
@@ -8280,6 +9523,7 @@ declare class Core {
8280
9523
  side: "BUY" | "SELL";
8281
9524
  reduceOnly: boolean;
8282
9525
  isExternal: boolean;
9526
+ isMaker: boolean;
8283
9527
  synthetic: boolean;
8284
9528
  quantity: string;
8285
9529
  price: string;
@@ -8461,6 +9705,7 @@ declare class Core {
8461
9705
  side: "BUY" | "SELL";
8462
9706
  reduceOnly: boolean;
8463
9707
  isExternal: boolean;
9708
+ isMaker: boolean;
8464
9709
  synthetic: boolean;
8465
9710
  quantity: string;
8466
9711
  price: string;
@@ -8621,6 +9866,7 @@ declare class Core {
8621
9866
  side: "BUY" | "SELL";
8622
9867
  reduceOnly: boolean;
8623
9868
  isExternal: boolean;
9869
+ isMaker: boolean;
8624
9870
  synthetic: boolean;
8625
9871
  quantity: string;
8626
9872
  price: string;
@@ -8809,6 +10055,7 @@ declare class Core {
8809
10055
  side: "BUY" | "SELL";
8810
10056
  reduceOnly: boolean;
8811
10057
  isExternal: boolean;
10058
+ isMaker: boolean;
8812
10059
  synthetic: boolean;
8813
10060
  quantity: string;
8814
10061
  price: string;
@@ -8945,6 +10192,7 @@ declare class Core {
8945
10192
  side: "BUY" | "SELL";
8946
10193
  reduceOnly: boolean;
8947
10194
  isExternal: boolean;
10195
+ isMaker: boolean;
8948
10196
  synthetic: boolean;
8949
10197
  quantity: string;
8950
10198
  price: string;
@@ -9093,6 +10341,7 @@ declare class Core {
9093
10341
  side: "BUY" | "SELL";
9094
10342
  reduceOnly: boolean;
9095
10343
  isExternal: boolean;
10344
+ isMaker: boolean;
9096
10345
  synthetic: boolean;
9097
10346
  quantity: string;
9098
10347
  price: string;
@@ -9274,6 +10523,7 @@ declare class Core {
9274
10523
  side: "BUY" | "SELL";
9275
10524
  reduceOnly: boolean;
9276
10525
  isExternal: boolean;
10526
+ isMaker: boolean;
9277
10527
  synthetic: boolean;
9278
10528
  quantity: string;
9279
10529
  price: string;
@@ -9434,6 +10684,7 @@ declare class Core {
9434
10684
  side: "BUY" | "SELL";
9435
10685
  reduceOnly: boolean;
9436
10686
  isExternal: boolean;
10687
+ isMaker: boolean;
9437
10688
  synthetic: boolean;
9438
10689
  quantity: string;
9439
10690
  price: string;
@@ -9622,6 +10873,7 @@ declare class Core {
9622
10873
  side: "BUY" | "SELL";
9623
10874
  reduceOnly: boolean;
9624
10875
  isExternal: boolean;
10876
+ isMaker: boolean;
9625
10877
  synthetic: boolean;
9626
10878
  quantity: string;
9627
10879
  price: string;
@@ -9757,6 +11009,7 @@ declare class Core {
9757
11009
  side: "BUY" | "SELL";
9758
11010
  reduceOnly: boolean;
9759
11011
  isExternal: boolean;
11012
+ isMaker: boolean;
9760
11013
  synthetic: boolean;
9761
11014
  quantity: string;
9762
11015
  price: string;
@@ -9905,6 +11158,7 @@ declare class Core {
9905
11158
  side: "BUY" | "SELL";
9906
11159
  reduceOnly: boolean;
9907
11160
  isExternal: boolean;
11161
+ isMaker: boolean;
9908
11162
  synthetic: boolean;
9909
11163
  quantity: string;
9910
11164
  price: string;
@@ -10086,6 +11340,7 @@ declare class Core {
10086
11340
  side: "BUY" | "SELL";
10087
11341
  reduceOnly: boolean;
10088
11342
  isExternal: boolean;
11343
+ isMaker: boolean;
10089
11344
  synthetic: boolean;
10090
11345
  quantity: string;
10091
11346
  price: string;
@@ -10246,6 +11501,7 @@ declare class Core {
10246
11501
  side: "BUY" | "SELL";
10247
11502
  reduceOnly: boolean;
10248
11503
  isExternal: boolean;
11504
+ isMaker: boolean;
10249
11505
  synthetic: boolean;
10250
11506
  quantity: string;
10251
11507
  price: string;
@@ -10434,6 +11690,7 @@ declare class Core {
10434
11690
  side: "BUY" | "SELL";
10435
11691
  reduceOnly: boolean;
10436
11692
  isExternal: boolean;
11693
+ isMaker: boolean;
10437
11694
  synthetic: boolean;
10438
11695
  quantity: string;
10439
11696
  price: string;
@@ -11416,7 +12673,7 @@ declare class Core {
11416
12673
  origin: "AUTO_REBALANCE";
11417
12674
  configId: string;
11418
12675
  } | undefined;
11419
- outcome?: "FAILED" | "COPIED" | "PARTIAL" | "SKIPPED" | undefined;
12676
+ outcome?: "FAILED" | "SKIPPED" | "COPIED" | "PARTIAL" | undefined;
11420
12677
  skipReason?: "ASSET_CONFLICT" | "SUBSCRIPTION_NOT_ACTIVE" | "POSITION_EXCLUDED" | "INCLUDED_IN_JOIN" | "VENUE_MISMATCH" | "BELOW_VENUE_MINIMUM" | "PAIR_ALREADY_ENTERED" | "ENTRY_EXPIRED" | "FOLLOWER_LEG_ABSENT" | "LEADER_LEG_REOPENED" | "NO_FOLLOWER_DELTA" | "LEADER_EQUITY_UNREADABLE" | "FOLLOWER_EQUITY_UNREADABLE" | "PRICE_UNAVAILABLE" | "LEVERAGE_NOT_APPLIED" | "MARGIN_NOT_APPLIED" | "FOLLOWER_TWAP_NOT_ACTIVE" | "FOLLOWER_TWAP_ALREADY_ACTIVE" | "TRUE_UP_STALE" | undefined;
11421
12678
  failureReason?: string | undefined;
11422
12679
  leaderEquityFraction?: string | undefined;
@@ -11658,7 +12915,7 @@ declare class Core {
11658
12915
  updatedAt: string;
11659
12916
  executionContext?: {
11660
12917
  intent: "OPEN" | "CLOSE" | "ADJUST" | "REVERSE";
11661
- orderType: "MARKET";
12918
+ orderType: "MARKET" | "CHASE_LIMIT";
11662
12919
  executionStatus: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
11663
12920
  legs: {
11664
12921
  symbol: string;
@@ -11749,7 +13006,7 @@ declare class Core {
11749
13006
  updatedAt: string;
11750
13007
  executionContext?: {
11751
13008
  intent: "OPEN" | "CLOSE" | "ADJUST" | "REVERSE";
11752
- orderType: "MARKET";
13009
+ orderType: "MARKET" | "CHASE_LIMIT";
11753
13010
  executionStatus: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED" | "IDLE";
11754
13011
  legs: {
11755
13012
  symbol: string;