@pear-protocol/core-sdk 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +254 -48
- package/dist/core/index.js +14 -75
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +2 -9
- package/dist/vaults/index.d.ts +5 -0
- package/dist/vaults/index.js +9 -1
- package/package.json +3 -3
package/dist/core/index.d.ts
CHANGED
|
@@ -2568,6 +2568,13 @@ 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;
|
|
2572
|
+
refusedLegs?: {
|
|
2573
|
+
id: string;
|
|
2574
|
+
ticker: string;
|
|
2575
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2576
|
+
error: string;
|
|
2577
|
+
}[] | undefined;
|
|
2571
2578
|
orders?: {
|
|
2572
2579
|
id: string;
|
|
2573
2580
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2615,6 +2622,13 @@ declare class Core {
|
|
|
2615
2622
|
maxImpactPrice?: string | undefined;
|
|
2616
2623
|
}[]];
|
|
2617
2624
|
error?: string | undefined;
|
|
2625
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2626
|
+
refusedLegs?: {
|
|
2627
|
+
id: string;
|
|
2628
|
+
ticker: string;
|
|
2629
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2630
|
+
error: string;
|
|
2631
|
+
}[] | undefined;
|
|
2618
2632
|
orders?: {
|
|
2619
2633
|
id: string;
|
|
2620
2634
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2646,6 +2660,13 @@ declare class Core {
|
|
|
2646
2660
|
intent: "CLOSE";
|
|
2647
2661
|
orderType: "MARKET";
|
|
2648
2662
|
error?: string | undefined;
|
|
2663
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2664
|
+
refusedLegs?: {
|
|
2665
|
+
id: string;
|
|
2666
|
+
ticker: string;
|
|
2667
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2668
|
+
error: string;
|
|
2669
|
+
}[] | undefined;
|
|
2649
2670
|
orders?: {
|
|
2650
2671
|
id: string;
|
|
2651
2672
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2677,6 +2698,13 @@ declare class Core {
|
|
|
2677
2698
|
intent: "REVERSE";
|
|
2678
2699
|
orderType: "MARKET";
|
|
2679
2700
|
error?: string | undefined;
|
|
2701
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2702
|
+
refusedLegs?: {
|
|
2703
|
+
id: string;
|
|
2704
|
+
ticker: string;
|
|
2705
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2706
|
+
error: string;
|
|
2707
|
+
}[] | undefined;
|
|
2680
2708
|
orders?: {
|
|
2681
2709
|
id: string;
|
|
2682
2710
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2729,6 +2757,13 @@ declare class Core {
|
|
|
2729
2757
|
maxImpactPrice?: string | undefined;
|
|
2730
2758
|
}[]];
|
|
2731
2759
|
error?: string | undefined;
|
|
2760
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2761
|
+
refusedLegs?: {
|
|
2762
|
+
id: string;
|
|
2763
|
+
ticker: string;
|
|
2764
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2765
|
+
error: string;
|
|
2766
|
+
}[] | undefined;
|
|
2732
2767
|
orders?: {
|
|
2733
2768
|
id: string;
|
|
2734
2769
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2776,6 +2811,13 @@ declare class Core {
|
|
|
2776
2811
|
maxImpactPrice?: string | undefined;
|
|
2777
2812
|
}[]];
|
|
2778
2813
|
error?: string | undefined;
|
|
2814
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2815
|
+
refusedLegs?: {
|
|
2816
|
+
id: string;
|
|
2817
|
+
ticker: string;
|
|
2818
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2819
|
+
error: string;
|
|
2820
|
+
}[] | undefined;
|
|
2779
2821
|
orders?: {
|
|
2780
2822
|
id: string;
|
|
2781
2823
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2807,6 +2849,13 @@ declare class Core {
|
|
|
2807
2849
|
intent: "CLOSE";
|
|
2808
2850
|
orderType: "MARKET";
|
|
2809
2851
|
error?: string | undefined;
|
|
2852
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2853
|
+
refusedLegs?: {
|
|
2854
|
+
id: string;
|
|
2855
|
+
ticker: string;
|
|
2856
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2857
|
+
error: string;
|
|
2858
|
+
}[] | undefined;
|
|
2810
2859
|
orders?: {
|
|
2811
2860
|
id: string;
|
|
2812
2861
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2838,6 +2887,13 @@ declare class Core {
|
|
|
2838
2887
|
intent: "REVERSE";
|
|
2839
2888
|
orderType: "MARKET";
|
|
2840
2889
|
error?: string | undefined;
|
|
2890
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
2891
|
+
refusedLegs?: {
|
|
2892
|
+
id: string;
|
|
2893
|
+
ticker: string;
|
|
2894
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
2895
|
+
error: string;
|
|
2896
|
+
}[] | undefined;
|
|
2841
2897
|
orders?: {
|
|
2842
2898
|
id: string;
|
|
2843
2899
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -2932,18 +2988,6 @@ declare class Core {
|
|
|
2932
2988
|
}[];
|
|
2933
2989
|
nextCursor?: string | undefined;
|
|
2934
2990
|
}>;
|
|
2935
|
-
/** Read account-owned provisional receipts awaiting fee collection. */
|
|
2936
|
-
provisionals: (headers?: ClientHeaders) => Promise<{
|
|
2937
|
-
fills: {
|
|
2938
|
-
id: string;
|
|
2939
|
-
tradeAccountId: string;
|
|
2940
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
2941
|
-
symbol: string;
|
|
2942
|
-
status: "PROVISIONAL";
|
|
2943
|
-
executionId?: string | undefined;
|
|
2944
|
-
cloid?: string | undefined;
|
|
2945
|
-
}[];
|
|
2946
|
-
}>;
|
|
2947
2991
|
};
|
|
2948
2992
|
funding: {
|
|
2949
2993
|
list: (query: HttpTypes.FundingQueryParams, headers?: ClientHeaders) => Promise<{
|
|
@@ -5625,6 +5669,7 @@ declare class Core {
|
|
|
5625
5669
|
notional?: {
|
|
5626
5670
|
min?: number | null | undefined;
|
|
5627
5671
|
max?: number | null | undefined;
|
|
5672
|
+
minBuffer?: number | undefined;
|
|
5628
5673
|
} | undefined;
|
|
5629
5674
|
};
|
|
5630
5675
|
tradeability: {
|
|
@@ -5714,7 +5759,7 @@ declare class Core {
|
|
|
5714
5759
|
list: (query?: HttpTypes.NotificationListParamsInput, headers?: ClientHeaders) => Promise<{
|
|
5715
5760
|
notifications: {
|
|
5716
5761
|
id: string;
|
|
5717
|
-
category: "TAKE_PROFIT_HIT" | "STOP_LOSS_HIT" | "TRIGGER_ORDER_HIT" | "TAKE_PROFIT_FAILED" | "STOP_LOSS_FAILED" | "TRIGGER_ORDER_FAILED" | "ATTACHED_TRIGGER_DISCARDED" | "AUTO_REBALANCE_EXECUTED" | "AUTO_REBALANCE_FAILED" | "AUTO_REBALANCE_PAUSED" | "TRIGGER_TWAP_STARTED" | "TRIGGER_TWAP_SKIPPED" | "TRIGGER_TWAP_FAILED" | "TRIGGER_TWAP_POSITION_CHANGED" | "TRIGGER_CANCELLED_MIS_SCALED" | "COPY_PLACED" | "COPY_FAILED" | "COPY_SUBSCRIPTION_STOPPED" | "COPY_LEVERAGE_NOT_APPLIED" | "POSITION_LIQUIDATION" | "TRIGGER_CANCELLED_POSITION_RESIZED";
|
|
5762
|
+
category: "TAKE_PROFIT_HIT" | "STOP_LOSS_HIT" | "TRIGGER_ORDER_HIT" | "TAKE_PROFIT_FAILED" | "STOP_LOSS_FAILED" | "TRIGGER_ORDER_FAILED" | "ATTACHED_TRIGGER_DISCARDED" | "AUTO_REBALANCE_EXECUTED" | "AUTO_REBALANCE_FAILED" | "AUTO_REBALANCE_PAUSED" | "TRIGGER_TWAP_STARTED" | "TRIGGER_TWAP_SKIPPED" | "TRIGGER_TWAP_FAILED" | "TRIGGER_TWAP_POSITION_CHANGED" | "TRIGGER_CANCELLED_MIS_SCALED" | "COPY_PLACED" | "COPY_FAILED" | "COPY_SUBSCRIPTION_STOPPED" | "COPY_LEVERAGE_NOT_APPLIED" | "COPY_MARGIN_NOT_APPLIED" | "POSITION_LIQUIDATION" | "TRIGGER_CANCELLED_POSITION_RESIZED" | "TAKE_PROFIT_PARTIAL" | "STOP_LOSS_PARTIAL" | "TRIGGER_ORDER_PARTIAL" | "TRIGGER_CANCELLED_BY_OPERATOR" | "LADDER_CANCELLED_BY_OPERATOR" | "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
|
|
5718
5763
|
parameters: {
|
|
5719
5764
|
type: "position_liquidation";
|
|
5720
5765
|
positionId: string;
|
|
@@ -5744,6 +5789,7 @@ declare class Core {
|
|
|
5744
5789
|
metric?: "ratio" | "price" | "weighted_ratio" | "funding_rate" | "prediction_market" | "btc_dominance" | "notional" | "upnl" | "upnl_bps" | "ratio_trailing" | "price_trailing" | "weighted_ratio_trailing" | "notional_trailing" | "upnl_trailing" | "upnl_bps_trailing" | undefined;
|
|
5745
5790
|
level?: number | undefined;
|
|
5746
5791
|
reason?: string | undefined;
|
|
5792
|
+
triggerActive?: boolean | undefined;
|
|
5747
5793
|
} | {
|
|
5748
5794
|
legs: {
|
|
5749
5795
|
id: string;
|
|
@@ -5758,6 +5804,7 @@ declare class Core {
|
|
|
5758
5804
|
metric?: "ratio" | "price" | "weighted_ratio" | "funding_rate" | "prediction_market" | "btc_dominance" | "notional" | "upnl" | "upnl_bps" | "ratio_trailing" | "price_trailing" | "weighted_ratio_trailing" | "notional_trailing" | "upnl_trailing" | "upnl_bps_trailing" | undefined;
|
|
5759
5805
|
level?: number | undefined;
|
|
5760
5806
|
reason?: string | undefined;
|
|
5807
|
+
triggerActive?: boolean | undefined;
|
|
5761
5808
|
} | {
|
|
5762
5809
|
legs: {
|
|
5763
5810
|
id: string;
|
|
@@ -5771,6 +5818,7 @@ declare class Core {
|
|
|
5771
5818
|
metric?: "ratio" | "price" | "weighted_ratio" | "funding_rate" | "prediction_market" | "btc_dominance" | "notional" | "upnl" | "upnl_bps" | "ratio_trailing" | "price_trailing" | "weighted_ratio_trailing" | "notional_trailing" | "upnl_trailing" | "upnl_bps_trailing" | undefined;
|
|
5772
5819
|
level?: number | undefined;
|
|
5773
5820
|
reason?: string | undefined;
|
|
5821
|
+
triggerActive?: boolean | undefined;
|
|
5774
5822
|
} | {
|
|
5775
5823
|
legs: {
|
|
5776
5824
|
id: string;
|
|
@@ -5783,6 +5831,7 @@ declare class Core {
|
|
|
5783
5831
|
metric?: "ratio" | "price" | "weighted_ratio" | "funding_rate" | "prediction_market" | "btc_dominance" | "notional" | "upnl" | "upnl_bps" | "ratio_trailing" | "price_trailing" | "weighted_ratio_trailing" | "notional_trailing" | "upnl_trailing" | "upnl_bps_trailing" | undefined;
|
|
5784
5832
|
level?: number | undefined;
|
|
5785
5833
|
reason?: string | undefined;
|
|
5834
|
+
triggerActive?: boolean | undefined;
|
|
5786
5835
|
} | {
|
|
5787
5836
|
legs: {
|
|
5788
5837
|
id: string;
|
|
@@ -5922,12 +5971,47 @@ declare class Core {
|
|
|
5922
5971
|
type: "copy_leverage_not_applied";
|
|
5923
5972
|
subscriptionId: string;
|
|
5924
5973
|
activityId: string;
|
|
5974
|
+
} | {
|
|
5975
|
+
type: "copy_margin_not_applied";
|
|
5976
|
+
subscriptionId: string;
|
|
5977
|
+
activityId: string;
|
|
5925
5978
|
} | {
|
|
5926
5979
|
type: "trigger_cancelled_position_resized";
|
|
5927
5980
|
triggerId: string;
|
|
5928
5981
|
positionId: string;
|
|
5929
5982
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
5930
5983
|
metric: "notional" | "upnl" | "notional_trailing" | "upnl_trailing";
|
|
5984
|
+
} | {
|
|
5985
|
+
legs: {
|
|
5986
|
+
id: string;
|
|
5987
|
+
symbol: string;
|
|
5988
|
+
side: "BUY" | "SELL";
|
|
5989
|
+
}[];
|
|
5990
|
+
type: "trigger_cancelled_by_operator";
|
|
5991
|
+
triggerId: string;
|
|
5992
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
5993
|
+
semanticBracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
|
|
5994
|
+
positionId?: string | undefined;
|
|
5995
|
+
} | {
|
|
5996
|
+
legs: {
|
|
5997
|
+
id: string;
|
|
5998
|
+
symbol: string;
|
|
5999
|
+
side: "BUY" | "SELL";
|
|
6000
|
+
}[];
|
|
6001
|
+
type: "ladder_cancelled_by_operator";
|
|
6002
|
+
ladderId: string;
|
|
6003
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
6004
|
+
positionId?: string | undefined;
|
|
6005
|
+
} | {
|
|
6006
|
+
legs: {
|
|
6007
|
+
id: string;
|
|
6008
|
+
symbol: string;
|
|
6009
|
+
side: "BUY" | "SELL";
|
|
6010
|
+
}[];
|
|
6011
|
+
type: "auto_rebalance_stopped_by_operator";
|
|
6012
|
+
configId: string;
|
|
6013
|
+
positionId: string;
|
|
6014
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
5931
6015
|
};
|
|
5932
6016
|
isRead: boolean;
|
|
5933
6017
|
createdAt: string;
|
|
@@ -5975,18 +6059,6 @@ declare class Core {
|
|
|
5975
6059
|
}[];
|
|
5976
6060
|
nextCursor?: string | undefined;
|
|
5977
6061
|
}>;
|
|
5978
|
-
openLite: (headers?: ClientHeaders) => Promise<{
|
|
5979
|
-
positions: {
|
|
5980
|
-
id: string;
|
|
5981
|
-
positionKey: string;
|
|
5982
|
-
createdAt: string;
|
|
5983
|
-
exposure: Record<string, `-${string}` | `+${string}`>;
|
|
5984
|
-
status: "OPEN";
|
|
5985
|
-
origin: "PARTIAL" | "PEAR" | "EXTERNAL";
|
|
5986
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
5987
|
-
copySubscriptionId?: string | undefined;
|
|
5988
|
-
}[];
|
|
5989
|
-
}>;
|
|
5990
6062
|
/**
|
|
5991
6063
|
* Closed-position history, newest close first, composed server-side.
|
|
5992
6064
|
*
|
|
@@ -7004,25 +7076,11 @@ declare class Core {
|
|
|
7004
7076
|
}>;
|
|
7005
7077
|
};
|
|
7006
7078
|
sync: {
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
firstSyncStartedAt?: number | undefined;
|
|
7013
|
-
confirmedExchangeFillIds?: string[] | undefined;
|
|
7014
|
-
hasPendingSynthetics?: boolean | undefined;
|
|
7015
|
-
}>;
|
|
7016
|
-
create: (body: HttpTypes.CreateApplicablesRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
|
|
7017
|
-
createBulk: (body: HttpTypes.CreateApplicablesRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
|
|
7018
|
-
};
|
|
7019
|
-
funding: {
|
|
7020
|
-
since: (body: HttpTypes.SyncFundingSinceRequest, headers?: ClientHeaders) => Promise<{
|
|
7021
|
-
sinceMs: number;
|
|
7022
|
-
}>;
|
|
7023
|
-
create: (body: HttpTypes.CreateFundingPaymentsRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
|
|
7024
|
-
createBulk: (body: HttpTypes.CreateFundingPaymentsRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
|
|
7025
|
-
};
|
|
7079
|
+
/** Ask the server to sync the active account now; neverSynced says whether its first import is still pending. */
|
|
7080
|
+
refresh: (headers?: ClientHeaders) => Promise<{
|
|
7081
|
+
neverSynced: boolean;
|
|
7082
|
+
credentialsRejection?: "venue-account-missing" | "credentials-invalid" | undefined;
|
|
7083
|
+
}>;
|
|
7026
7084
|
};
|
|
7027
7085
|
/** Basket commands; executed-fill history lives under the plural `trades` namespace. */
|
|
7028
7086
|
trade: {
|
|
@@ -7053,6 +7111,13 @@ declare class Core {
|
|
|
7053
7111
|
maxImpactPrice?: string | undefined;
|
|
7054
7112
|
}[]];
|
|
7055
7113
|
error?: string | undefined;
|
|
7114
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7115
|
+
refusedLegs?: {
|
|
7116
|
+
id: string;
|
|
7117
|
+
ticker: string;
|
|
7118
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7119
|
+
error: string;
|
|
7120
|
+
}[] | undefined;
|
|
7056
7121
|
orders?: {
|
|
7057
7122
|
id: string;
|
|
7058
7123
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7100,6 +7165,13 @@ declare class Core {
|
|
|
7100
7165
|
maxImpactPrice?: string | undefined;
|
|
7101
7166
|
}[]];
|
|
7102
7167
|
error?: string | undefined;
|
|
7168
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7169
|
+
refusedLegs?: {
|
|
7170
|
+
id: string;
|
|
7171
|
+
ticker: string;
|
|
7172
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7173
|
+
error: string;
|
|
7174
|
+
}[] | undefined;
|
|
7103
7175
|
orders?: {
|
|
7104
7176
|
id: string;
|
|
7105
7177
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7131,6 +7203,13 @@ declare class Core {
|
|
|
7131
7203
|
intent: "CLOSE";
|
|
7132
7204
|
orderType: "MARKET";
|
|
7133
7205
|
error?: string | undefined;
|
|
7206
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7207
|
+
refusedLegs?: {
|
|
7208
|
+
id: string;
|
|
7209
|
+
ticker: string;
|
|
7210
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7211
|
+
error: string;
|
|
7212
|
+
}[] | undefined;
|
|
7134
7213
|
orders?: {
|
|
7135
7214
|
id: string;
|
|
7136
7215
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7162,6 +7241,13 @@ declare class Core {
|
|
|
7162
7241
|
intent: "REVERSE";
|
|
7163
7242
|
orderType: "MARKET";
|
|
7164
7243
|
error?: string | undefined;
|
|
7244
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7245
|
+
refusedLegs?: {
|
|
7246
|
+
id: string;
|
|
7247
|
+
ticker: string;
|
|
7248
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7249
|
+
error: string;
|
|
7250
|
+
}[] | undefined;
|
|
7165
7251
|
orders?: {
|
|
7166
7252
|
id: string;
|
|
7167
7253
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7213,6 +7299,13 @@ declare class Core {
|
|
|
7213
7299
|
maxImpactPrice?: string | undefined;
|
|
7214
7300
|
}[]];
|
|
7215
7301
|
error?: string | undefined;
|
|
7302
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7303
|
+
refusedLegs?: {
|
|
7304
|
+
id: string;
|
|
7305
|
+
ticker: string;
|
|
7306
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7307
|
+
error: string;
|
|
7308
|
+
}[] | undefined;
|
|
7216
7309
|
orders?: {
|
|
7217
7310
|
id: string;
|
|
7218
7311
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7260,6 +7353,13 @@ declare class Core {
|
|
|
7260
7353
|
maxImpactPrice?: string | undefined;
|
|
7261
7354
|
}[]];
|
|
7262
7355
|
error?: string | undefined;
|
|
7356
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7357
|
+
refusedLegs?: {
|
|
7358
|
+
id: string;
|
|
7359
|
+
ticker: string;
|
|
7360
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7361
|
+
error: string;
|
|
7362
|
+
}[] | undefined;
|
|
7263
7363
|
orders?: {
|
|
7264
7364
|
id: string;
|
|
7265
7365
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7291,6 +7391,13 @@ declare class Core {
|
|
|
7291
7391
|
intent: "CLOSE";
|
|
7292
7392
|
orderType: "MARKET";
|
|
7293
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;
|
|
7294
7401
|
orders?: {
|
|
7295
7402
|
id: string;
|
|
7296
7403
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7322,6 +7429,13 @@ declare class Core {
|
|
|
7322
7429
|
intent: "REVERSE";
|
|
7323
7430
|
orderType: "MARKET";
|
|
7324
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;
|
|
7325
7439
|
orders?: {
|
|
7326
7440
|
id: string;
|
|
7327
7441
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7373,6 +7487,13 @@ declare class Core {
|
|
|
7373
7487
|
maxImpactPrice?: string | undefined;
|
|
7374
7488
|
}[]];
|
|
7375
7489
|
error?: string | undefined;
|
|
7490
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7491
|
+
refusedLegs?: {
|
|
7492
|
+
id: string;
|
|
7493
|
+
ticker: string;
|
|
7494
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7495
|
+
error: string;
|
|
7496
|
+
}[] | undefined;
|
|
7376
7497
|
orders?: {
|
|
7377
7498
|
id: string;
|
|
7378
7499
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7420,6 +7541,13 @@ declare class Core {
|
|
|
7420
7541
|
maxImpactPrice?: string | undefined;
|
|
7421
7542
|
}[]];
|
|
7422
7543
|
error?: string | undefined;
|
|
7544
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7545
|
+
refusedLegs?: {
|
|
7546
|
+
id: string;
|
|
7547
|
+
ticker: string;
|
|
7548
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7549
|
+
error: string;
|
|
7550
|
+
}[] | undefined;
|
|
7423
7551
|
orders?: {
|
|
7424
7552
|
id: string;
|
|
7425
7553
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7451,6 +7579,13 @@ declare class Core {
|
|
|
7451
7579
|
intent: "CLOSE";
|
|
7452
7580
|
orderType: "MARKET";
|
|
7453
7581
|
error?: string | undefined;
|
|
7582
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7583
|
+
refusedLegs?: {
|
|
7584
|
+
id: string;
|
|
7585
|
+
ticker: string;
|
|
7586
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7587
|
+
error: string;
|
|
7588
|
+
}[] | undefined;
|
|
7454
7589
|
orders?: {
|
|
7455
7590
|
id: string;
|
|
7456
7591
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7482,6 +7617,13 @@ declare class Core {
|
|
|
7482
7617
|
intent: "REVERSE";
|
|
7483
7618
|
orderType: "MARKET";
|
|
7484
7619
|
error?: string | undefined;
|
|
7620
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7621
|
+
refusedLegs?: {
|
|
7622
|
+
id: string;
|
|
7623
|
+
ticker: string;
|
|
7624
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7625
|
+
error: string;
|
|
7626
|
+
}[] | undefined;
|
|
7485
7627
|
orders?: {
|
|
7486
7628
|
id: string;
|
|
7487
7629
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7533,6 +7675,13 @@ declare class Core {
|
|
|
7533
7675
|
maxImpactPrice?: string | undefined;
|
|
7534
7676
|
}[]];
|
|
7535
7677
|
error?: string | undefined;
|
|
7678
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7679
|
+
refusedLegs?: {
|
|
7680
|
+
id: string;
|
|
7681
|
+
ticker: string;
|
|
7682
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7683
|
+
error: string;
|
|
7684
|
+
}[] | undefined;
|
|
7536
7685
|
orders?: {
|
|
7537
7686
|
id: string;
|
|
7538
7687
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7580,6 +7729,13 @@ declare class Core {
|
|
|
7580
7729
|
maxImpactPrice?: string | undefined;
|
|
7581
7730
|
}[]];
|
|
7582
7731
|
error?: string | undefined;
|
|
7732
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7733
|
+
refusedLegs?: {
|
|
7734
|
+
id: string;
|
|
7735
|
+
ticker: string;
|
|
7736
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7737
|
+
error: string;
|
|
7738
|
+
}[] | undefined;
|
|
7583
7739
|
orders?: {
|
|
7584
7740
|
id: string;
|
|
7585
7741
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7611,6 +7767,13 @@ declare class Core {
|
|
|
7611
7767
|
intent: "CLOSE";
|
|
7612
7768
|
orderType: "MARKET";
|
|
7613
7769
|
error?: string | undefined;
|
|
7770
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7771
|
+
refusedLegs?: {
|
|
7772
|
+
id: string;
|
|
7773
|
+
ticker: string;
|
|
7774
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7775
|
+
error: string;
|
|
7776
|
+
}[] | undefined;
|
|
7614
7777
|
orders?: {
|
|
7615
7778
|
id: string;
|
|
7616
7779
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7642,6 +7805,13 @@ declare class Core {
|
|
|
7642
7805
|
intent: "REVERSE";
|
|
7643
7806
|
orderType: "MARKET";
|
|
7644
7807
|
error?: string | undefined;
|
|
7808
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7809
|
+
refusedLegs?: {
|
|
7810
|
+
id: string;
|
|
7811
|
+
ticker: string;
|
|
7812
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7813
|
+
error: string;
|
|
7814
|
+
}[] | undefined;
|
|
7645
7815
|
orders?: {
|
|
7646
7816
|
id: string;
|
|
7647
7817
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7693,6 +7863,13 @@ declare class Core {
|
|
|
7693
7863
|
maxImpactPrice?: string | undefined;
|
|
7694
7864
|
}[]];
|
|
7695
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;
|
|
7696
7873
|
orders?: {
|
|
7697
7874
|
id: string;
|
|
7698
7875
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7740,6 +7917,13 @@ declare class Core {
|
|
|
7740
7917
|
maxImpactPrice?: string | undefined;
|
|
7741
7918
|
}[]];
|
|
7742
7919
|
error?: string | undefined;
|
|
7920
|
+
errorCode?: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED" | "LEGS_FAILED" | "EXECUTION_CREATION_COMPENSATED" | undefined;
|
|
7921
|
+
refusedLegs?: {
|
|
7922
|
+
id: string;
|
|
7923
|
+
ticker: string;
|
|
7924
|
+
errorCode: "INSUFFICIENT_SIZE" | "INSUFFICIENT_SIZE_SHARED";
|
|
7925
|
+
error: string;
|
|
7926
|
+
}[] | undefined;
|
|
7743
7927
|
orders?: {
|
|
7744
7928
|
id: string;
|
|
7745
7929
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7771,6 +7955,13 @@ declare class Core {
|
|
|
7771
7955
|
intent: "CLOSE";
|
|
7772
7956
|
orderType: "MARKET";
|
|
7773
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;
|
|
7774
7965
|
orders?: {
|
|
7775
7966
|
id: string;
|
|
7776
7967
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7802,6 +7993,13 @@ declare class Core {
|
|
|
7802
7993
|
intent: "REVERSE";
|
|
7803
7994
|
orderType: "MARKET";
|
|
7804
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;
|
|
7805
8003
|
orders?: {
|
|
7806
8004
|
id: string;
|
|
7807
8005
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
@@ -7826,7 +8024,7 @@ declare class Core {
|
|
|
7826
8024
|
} | undefined;
|
|
7827
8025
|
})[];
|
|
7828
8026
|
}>;
|
|
7829
|
-
setLeverage: (body: HttpTypes.
|
|
8027
|
+
setLeverage: (body: HttpTypes.SetLeverageInput, headers?: ClientHeaders) => Promise<Record<string, never>>;
|
|
7830
8028
|
/** Add or remove margin from an isolated position without changing its size. */
|
|
7831
8029
|
adjustIsolatedMargin: (body: HttpTypes.AdjustIsolatedMargin, headers?: ClientHeaders) => Promise<{
|
|
7832
8030
|
adjustmentId: string;
|
|
@@ -10294,6 +10492,7 @@ declare class Core {
|
|
|
10294
10492
|
};
|
|
10295
10493
|
preferences: {
|
|
10296
10494
|
slippageToleranceBps: number;
|
|
10495
|
+
copySlippageToleranceBps: number;
|
|
10297
10496
|
};
|
|
10298
10497
|
}>;
|
|
10299
10498
|
updateDisplayName: (body: HttpTypes.UpdateUserDisplayName, headers?: ClientHeaders) => Promise<{
|
|
@@ -10302,6 +10501,7 @@ declare class Core {
|
|
|
10302
10501
|
updatePreferences: (body: HttpTypes.UpdateUserPreferences, headers?: ClientHeaders) => Promise<{
|
|
10303
10502
|
preferences: {
|
|
10304
10503
|
slippageToleranceBps: number;
|
|
10504
|
+
copySlippageToleranceBps: number;
|
|
10305
10505
|
};
|
|
10306
10506
|
}>;
|
|
10307
10507
|
};
|
|
@@ -10447,6 +10647,12 @@ declare class Core {
|
|
|
10447
10647
|
* own client, but a failure means the copy service is down rather than core.
|
|
10448
10648
|
*/
|
|
10449
10649
|
copy: {
|
|
10650
|
+
/**
|
|
10651
|
+
* Read the copy service's consumer and outbox health.
|
|
10652
|
+
*
|
|
10653
|
+
* @deprecated The gateway no longer serves `/copy/health` to public callers, so this call fails with a 404.
|
|
10654
|
+
* Copy health is read on the private network instead. This method will be removed in a later release.
|
|
10655
|
+
*/
|
|
10450
10656
|
health: (headers?: ClientHeaders) => Promise<{
|
|
10451
10657
|
status: "ok" | "degraded";
|
|
10452
10658
|
consumerRunning: boolean;
|
|
@@ -11043,7 +11249,7 @@ declare class Core {
|
|
|
11043
11249
|
} | {
|
|
11044
11250
|
leaderPositionId: string;
|
|
11045
11251
|
outcome: "SKIPPED";
|
|
11046
|
-
reason: "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" | "FOLLOWER_TWAP_NOT_ACTIVE" | "FOLLOWER_TWAP_ALREADY_ACTIVE" | "TRUE_UP_STALE";
|
|
11252
|
+
reason: "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";
|
|
11047
11253
|
} | {
|
|
11048
11254
|
leaderPositionId: string;
|
|
11049
11255
|
outcome: "FAILED";
|
|
@@ -11187,7 +11393,7 @@ declare class Core {
|
|
|
11187
11393
|
activities: (id: string, query?: HttpTypes.CopyActivityListParamsInput, headers?: ClientHeaders) => Promise<{
|
|
11188
11394
|
activities: {
|
|
11189
11395
|
id: string;
|
|
11190
|
-
leaderAction: "TWAP" | "OPEN" | "CLOSE" | "ADJUST" | "REVERSE" | "TWAP_END";
|
|
11396
|
+
leaderAction: "TWAP" | "OPEN" | "CLOSE" | "ADJUST" | "REVERSE" | "TWAP_END" | "LEVERAGE_CHANGED" | "MARGIN_ADJUSTED";
|
|
11191
11397
|
state: "RECORDED" | "DISPATCHED" | "SETTLED";
|
|
11192
11398
|
followerLegs: {
|
|
11193
11399
|
symbol: string;
|
|
@@ -11211,7 +11417,7 @@ declare class Core {
|
|
|
11211
11417
|
configId: string;
|
|
11212
11418
|
} | undefined;
|
|
11213
11419
|
outcome?: "FAILED" | "COPIED" | "PARTIAL" | "SKIPPED" | undefined;
|
|
11214
|
-
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" | "FOLLOWER_TWAP_NOT_ACTIVE" | "FOLLOWER_TWAP_ALREADY_ACTIVE" | "TRUE_UP_STALE" | undefined;
|
|
11420
|
+
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;
|
|
11215
11421
|
failureReason?: string | undefined;
|
|
11216
11422
|
leaderEquityFraction?: string | undefined;
|
|
11217
11423
|
twap?: {
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { gzipJson } from '../utils';
|
|
2
|
-
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
3
|
class Core {
|
|
@@ -219,14 +217,7 @@ class Core {
|
|
|
219
217
|
headers,
|
|
220
218
|
query
|
|
221
219
|
});
|
|
222
|
-
}, "list")
|
|
223
|
-
/** Read account-owned provisional receipts awaiting fee collection. */
|
|
224
|
-
provisionals: /* @__PURE__ */ __name(async (headers) => {
|
|
225
|
-
return await this.client.fetch(`/fills/provisionals-lite`, {
|
|
226
|
-
method: "GET",
|
|
227
|
-
headers
|
|
228
|
-
});
|
|
229
|
-
}, "provisionals")
|
|
220
|
+
}, "list")
|
|
230
221
|
};
|
|
231
222
|
funding = {
|
|
232
223
|
list: /* @__PURE__ */ __name(async (query, headers) => {
|
|
@@ -350,12 +341,6 @@ class Core {
|
|
|
350
341
|
query
|
|
351
342
|
});
|
|
352
343
|
}, "list"),
|
|
353
|
-
openLite: /* @__PURE__ */ __name(async (headers) => {
|
|
354
|
-
return await this.client.fetch(`/positions/lite`, {
|
|
355
|
-
method: "GET",
|
|
356
|
-
headers
|
|
357
|
-
});
|
|
358
|
-
}, "openLite"),
|
|
359
344
|
/**
|
|
360
345
|
* Closed-position history, newest close first, composed server-side.
|
|
361
346
|
*
|
|
@@ -568,65 +553,13 @@ class Core {
|
|
|
568
553
|
}, "cancelAll")
|
|
569
554
|
};
|
|
570
555
|
sync = {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}, "since"),
|
|
579
|
-
create: /* @__PURE__ */ __name(async (body, headers) => {
|
|
580
|
-
return await this.client.fetch(`/sync/fills/create`, {
|
|
581
|
-
method: "POST",
|
|
582
|
-
headers,
|
|
583
|
-
body
|
|
584
|
-
});
|
|
585
|
-
}, "create"),
|
|
586
|
-
createBulk: /* @__PURE__ */ __name(async (body, headers) => {
|
|
587
|
-
const file = await gzipJson(body);
|
|
588
|
-
const formData = new FormData();
|
|
589
|
-
formData.append("file", file, "payload.json.gz");
|
|
590
|
-
formData.append("executionsUpdatedAtEpochMs", String(body.meta.executionsUpdatedAtEpochMs));
|
|
591
|
-
return await this.client.fetch(`/sync/fills/create/bulk`, {
|
|
592
|
-
method: "POST",
|
|
593
|
-
headers: {
|
|
594
|
-
...headers,
|
|
595
|
-
"content-type": null
|
|
596
|
-
},
|
|
597
|
-
body: formData
|
|
598
|
-
});
|
|
599
|
-
}, "createBulk")
|
|
600
|
-
},
|
|
601
|
-
funding: {
|
|
602
|
-
since: /* @__PURE__ */ __name(async (body, headers) => {
|
|
603
|
-
return await this.client.fetch(`/sync/funding/since`, {
|
|
604
|
-
method: "POST",
|
|
605
|
-
headers,
|
|
606
|
-
body
|
|
607
|
-
});
|
|
608
|
-
}, "since"),
|
|
609
|
-
create: /* @__PURE__ */ __name(async (body, headers) => {
|
|
610
|
-
return await this.client.fetch(`/sync/funding/create`, {
|
|
611
|
-
method: "POST",
|
|
612
|
-
headers,
|
|
613
|
-
body
|
|
614
|
-
});
|
|
615
|
-
}, "create"),
|
|
616
|
-
createBulk: /* @__PURE__ */ __name(async (body, headers) => {
|
|
617
|
-
const file = await gzipJson(body);
|
|
618
|
-
const formData = new FormData();
|
|
619
|
-
formData.append("file", file, "payload.json.gz");
|
|
620
|
-
return await this.client.fetch(`/sync/funding/create/bulk`, {
|
|
621
|
-
method: "POST",
|
|
622
|
-
headers: {
|
|
623
|
-
...headers,
|
|
624
|
-
"content-type": null
|
|
625
|
-
},
|
|
626
|
-
body: formData
|
|
627
|
-
});
|
|
628
|
-
}, "createBulk")
|
|
629
|
-
}
|
|
556
|
+
/** Ask the server to sync the active account now; neverSynced says whether its first import is still pending. */
|
|
557
|
+
refresh: /* @__PURE__ */ __name(async (headers) => {
|
|
558
|
+
return await this.client.fetch(`/sync/refresh`, {
|
|
559
|
+
method: "POST",
|
|
560
|
+
headers
|
|
561
|
+
});
|
|
562
|
+
}, "refresh")
|
|
630
563
|
};
|
|
631
564
|
/** Basket commands; executed-fill history lives under the plural `trades` namespace. */
|
|
632
565
|
trade = {
|
|
@@ -861,6 +794,12 @@ class Core {
|
|
|
861
794
|
* own client, but a failure means the copy service is down rather than core.
|
|
862
795
|
*/
|
|
863
796
|
copy = {
|
|
797
|
+
/**
|
|
798
|
+
* Read the copy service's consumer and outbox health.
|
|
799
|
+
*
|
|
800
|
+
* @deprecated The gateway no longer serves `/copy/health` to public callers, so this call fails with a 404.
|
|
801
|
+
* Copy health is read on the private network instead. This method will be removed in a later release.
|
|
802
|
+
*/
|
|
864
803
|
health: /* @__PURE__ */ __name(async (headers) => {
|
|
865
804
|
return await this.client.fetch(`/copy/health`, {
|
|
866
805
|
method: "GET",
|
package/dist/utils.d.ts
CHANGED
|
@@ -12,6 +12,5 @@ declare class FetchError extends Error {
|
|
|
12
12
|
details: unknown;
|
|
13
13
|
constructor(message: string, statusText?: string, status?: number, errorCode?: string, details?: unknown);
|
|
14
14
|
}
|
|
15
|
-
declare function gzipJson(value: unknown): Promise<Blob>;
|
|
16
15
|
|
|
17
|
-
export { FetchError, getBaseUrl,
|
|
16
|
+
export { FetchError, getBaseUrl, normalizeRequest, normalizeResponseData };
|
package/dist/utils.js
CHANGED
|
@@ -57,7 +57,7 @@ class FetchError extends Error {
|
|
|
57
57
|
}
|
|
58
58
|
status;
|
|
59
59
|
statusText;
|
|
60
|
-
// Machine-readable contract code from the server's error envelope (e.g.
|
|
60
|
+
// Machine-readable contract code from the server's error envelope (e.g. VALIDATION_ERROR).
|
|
61
61
|
errorCode;
|
|
62
62
|
// Structured context from the server's error envelope; shape varies by failure, so narrow before use.
|
|
63
63
|
details;
|
|
@@ -69,12 +69,5 @@ class FetchError extends Error {
|
|
|
69
69
|
this.details = details;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
async function gzipJson(value) {
|
|
73
|
-
const stream = new Blob([
|
|
74
|
-
JSON.stringify(value)
|
|
75
|
-
]).stream().pipeThrough(new CompressionStream("gzip"));
|
|
76
|
-
return await new Response(stream).blob();
|
|
77
|
-
}
|
|
78
|
-
__name(gzipJson, "gzipJson");
|
|
79
72
|
|
|
80
|
-
export { FetchError, getBaseUrl,
|
|
73
|
+
export { FetchError, getBaseUrl, normalizeRequest, normalizeResponseData };
|
package/dist/vaults/index.d.ts
CHANGED
|
@@ -321,6 +321,11 @@ declare class Vaults {
|
|
|
321
321
|
success: boolean;
|
|
322
322
|
agentAddress: string;
|
|
323
323
|
}>;
|
|
324
|
+
/** POST /vaults/:vaultAddress/set-account-mode — switch the vault agent between unified account and portfolio margin. */
|
|
325
|
+
setAccountMode: (vaultAddress: string, body: HttpTypes.SetAccountModeInput, headers?: ClientHeaders) => Promise<{
|
|
326
|
+
agentAddress: string;
|
|
327
|
+
mode: "unifiedAccount" | "portfolioMargin";
|
|
328
|
+
}>;
|
|
324
329
|
};
|
|
325
330
|
nav: {
|
|
326
331
|
/** GET /vaults/:vaultAddress/nav/latest — fetch the most recent NAV snapshot for a vault. */
|
package/dist/vaults/index.js
CHANGED
|
@@ -136,7 +136,15 @@ class Vaults {
|
|
|
136
136
|
headers,
|
|
137
137
|
body
|
|
138
138
|
});
|
|
139
|
-
}, "setUnifiedAccount")
|
|
139
|
+
}, "setUnifiedAccount"),
|
|
140
|
+
/** POST /vaults/:vaultAddress/set-account-mode — switch the vault agent between unified account and portfolio margin. */
|
|
141
|
+
setAccountMode: /* @__PURE__ */ __name(async (vaultAddress, body, headers) => {
|
|
142
|
+
return await this.client.fetch(`/vaults/${vaultAddress}/set-account-mode`, {
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers,
|
|
145
|
+
body
|
|
146
|
+
});
|
|
147
|
+
}, "setAccountMode")
|
|
140
148
|
};
|
|
141
149
|
nav = {
|
|
142
150
|
/** GET /vaults/:vaultAddress/nav/latest — fetch the most recent NAV snapshot for a vault. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"typecheck": "bunx --package bun@1.4.3 bun --check --threads=2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pear-protocol/types": "^2.
|
|
30
|
-
"@pear-protocol/utils": "^1.
|
|
29
|
+
"@pear-protocol/types": "^2.27.0",
|
|
30
|
+
"@pear-protocol/utils": "^1.7.0",
|
|
31
31
|
"qs": "^6.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|