@pear-protocol/core-sdk 1.11.1 → 1.12.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.
@@ -13,7 +13,7 @@ declare class Auth {
13
13
  refreshToken: string;
14
14
  user: {
15
15
  id: string;
16
- role: "basic" | "pro" | "admin";
16
+ role: "basic" | "pro";
17
17
  providerId: string | null;
18
18
  loginMethod: "email" | "evm_wallet" | "oauth";
19
19
  };
@@ -27,13 +27,13 @@ declare class Auth {
27
27
  logout(headers?: ClientHeaders): Promise<void>;
28
28
  me(headers?: ClientHeaders): Promise<{
29
29
  id: string;
30
- role: "basic" | "pro" | "admin";
30
+ role: "basic" | "pro";
31
31
  providerId: string | null;
32
32
  loginMethod: "email" | "evm_wallet" | "oauth";
33
33
  }>;
34
34
  apiKeyMe(headers?: ClientHeaders): Promise<{
35
35
  id: string;
36
- role: "basic" | "pro" | "admin";
36
+ role: "basic" | "pro";
37
37
  scope: "read" | "read_write";
38
38
  authMethod: "api_key";
39
39
  }>;
@@ -183,6 +183,22 @@ declare class Core {
183
183
  }>;
184
184
  restore: (id: string, headers?: ClientHeaders) => Promise<void>;
185
185
  };
186
+ fee: {
187
+ get: (query?: HttpTypes.QuoteFeeParamsInput, headers?: ClientHeaders) => Promise<{
188
+ baseBps: string;
189
+ discounts: {
190
+ scope: "user" | "connector" | "all" | "client_id";
191
+ rate: string;
192
+ }[];
193
+ finalBps: string;
194
+ feeRecipient?: string | undefined;
195
+ overrideBps?: string | undefined;
196
+ overrideScope?: "user" | "client_id" | undefined;
197
+ }>;
198
+ recipient: (query: HttpTypes.GetFeeRecipientParamsInput, headers?: ClientHeaders) => Promise<{
199
+ recipient?: string | undefined;
200
+ }>;
201
+ };
186
202
  apiKeys: {
187
203
  list: (headers?: ClientHeaders) => Promise<{
188
204
  id: string;
@@ -237,7 +253,6 @@ declare class Core {
237
253
  symbol: string;
238
254
  side: "BUY" | "SELL";
239
255
  reduceOnly: boolean;
240
- leverage: number;
241
256
  quantity: string;
242
257
  price: string;
243
258
  filledQuantity: string;
@@ -280,7 +295,6 @@ declare class Core {
280
295
  symbol: string;
281
296
  side: "BUY" | "SELL";
282
297
  reduceOnly: boolean;
283
- leverage: number;
284
298
  quantity: string;
285
299
  price: string;
286
300
  filledQuantity: string;
@@ -310,7 +324,6 @@ declare class Core {
310
324
  symbol: string;
311
325
  side: "BUY" | "SELL";
312
326
  reduceOnly: boolean;
313
- leverage: number;
314
327
  quantity: string;
315
328
  price: string;
316
329
  filledQuantity: string;
@@ -340,7 +353,6 @@ declare class Core {
340
353
  symbol: string;
341
354
  side: "BUY" | "SELL";
342
355
  reduceOnly: boolean;
343
- leverage: number;
344
356
  quantity: string;
345
357
  price: string;
346
358
  filledQuantity: string;
@@ -383,7 +395,6 @@ declare class Core {
383
395
  symbol: string;
384
396
  side: "BUY" | "SELL";
385
397
  reduceOnly: boolean;
386
- leverage: number;
387
398
  quantity: string;
388
399
  price: string;
389
400
  filledQuantity: string;
@@ -426,7 +437,6 @@ declare class Core {
426
437
  symbol: string;
427
438
  side: "BUY" | "SELL";
428
439
  reduceOnly: boolean;
429
- leverage: number;
430
440
  quantity: string;
431
441
  price: string;
432
442
  filledQuantity: string;
@@ -456,7 +466,6 @@ declare class Core {
456
466
  symbol: string;
457
467
  side: "BUY" | "SELL";
458
468
  reduceOnly: boolean;
459
- leverage: number;
460
469
  quantity: string;
461
470
  price: string;
462
471
  filledQuantity: string;
@@ -486,7 +495,6 @@ declare class Core {
486
495
  symbol: string;
487
496
  side: "BUY" | "SELL";
488
497
  reduceOnly: boolean;
489
- leverage: number;
490
498
  quantity: string;
491
499
  price: string;
492
500
  filledQuantity: string;
@@ -666,6 +674,7 @@ declare class Core {
666
674
  };
667
675
  ladderId?: string | undefined;
668
676
  ladderIndex?: number | undefined;
677
+ parentTriggerId?: string | undefined;
669
678
  triggeredAt?: string | undefined;
670
679
  cancelledAt?: string | undefined;
671
680
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -799,6 +808,7 @@ declare class Core {
799
808
  };
800
809
  ladderId?: string | undefined;
801
810
  ladderIndex?: number | undefined;
811
+ parentTriggerId?: string | undefined;
802
812
  triggeredAt?: string | undefined;
803
813
  cancelledAt?: string | undefined;
804
814
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -965,6 +975,7 @@ declare class Core {
965
975
  };
966
976
  ladderId?: string | undefined;
967
977
  ladderIndex?: number | undefined;
978
+ parentTriggerId?: string | undefined;
968
979
  triggeredAt?: string | undefined;
969
980
  cancelledAt?: string | undefined;
970
981
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1101,6 +1112,7 @@ declare class Core {
1101
1112
  };
1102
1113
  ladderId?: string | undefined;
1103
1114
  ladderIndex?: number | undefined;
1115
+ parentTriggerId?: string | undefined;
1104
1116
  triggeredAt?: string | undefined;
1105
1117
  cancelledAt?: string | undefined;
1106
1118
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1234,6 +1246,7 @@ declare class Core {
1234
1246
  };
1235
1247
  ladderId?: string | undefined;
1236
1248
  ladderIndex?: number | undefined;
1249
+ parentTriggerId?: string | undefined;
1237
1250
  triggeredAt?: string | undefined;
1238
1251
  cancelledAt?: string | undefined;
1239
1252
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1400,6 +1413,7 @@ declare class Core {
1400
1413
  };
1401
1414
  ladderId?: string | undefined;
1402
1415
  ladderIndex?: number | undefined;
1416
+ parentTriggerId?: string | undefined;
1403
1417
  triggeredAt?: string | undefined;
1404
1418
  cancelledAt?: string | undefined;
1405
1419
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1535,6 +1549,7 @@ declare class Core {
1535
1549
  };
1536
1550
  ladderId?: string | undefined;
1537
1551
  ladderIndex?: number | undefined;
1552
+ parentTriggerId?: string | undefined;
1538
1553
  triggeredAt?: string | undefined;
1539
1554
  cancelledAt?: string | undefined;
1540
1555
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1668,6 +1683,7 @@ declare class Core {
1668
1683
  };
1669
1684
  ladderId?: string | undefined;
1670
1685
  ladderIndex?: number | undefined;
1686
+ parentTriggerId?: string | undefined;
1671
1687
  triggeredAt?: string | undefined;
1672
1688
  cancelledAt?: string | undefined;
1673
1689
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1834,6 +1850,7 @@ declare class Core {
1834
1850
  };
1835
1851
  ladderId?: string | undefined;
1836
1852
  ladderIndex?: number | undefined;
1853
+ parentTriggerId?: string | undefined;
1837
1854
  triggeredAt?: string | undefined;
1838
1855
  cancelledAt?: string | undefined;
1839
1856
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -1909,6 +1926,17 @@ declare class Core {
1909
1926
  };
1910
1927
  }[];
1911
1928
  }>;
1929
+ lite: (query: HttpTypes.InstrumentListParamsInput, headers?: ClientHeaders) => Promise<{
1930
+ instruments: {
1931
+ id: string;
1932
+ base: string;
1933
+ precision: {
1934
+ quantity: {
1935
+ contractSize: number;
1936
+ };
1937
+ };
1938
+ }[];
1939
+ }>;
1912
1940
  symbolToIdMap: (query: HttpTypes.InstrumentListParamsInput, headers?: ClientHeaders) => Promise<{
1913
1941
  data: Record<string, string>;
1914
1942
  }>;
@@ -2141,6 +2169,7 @@ declare class Core {
2141
2169
  rollingWindowDays: number;
2142
2170
  startDate: string;
2143
2171
  endDate: string;
2172
+ fundingSynced: boolean;
2144
2173
  };
2145
2174
  portfolio: {
2146
2175
  realizedOnly: {
@@ -2226,6 +2255,9 @@ declare class Core {
2226
2255
  wins: number;
2227
2256
  losses: number;
2228
2257
  dayPnl: number;
2258
+ dayVolume: number;
2259
+ dayFunding: number;
2260
+ dayNetPnl: number;
2229
2261
  hitRate: number | null;
2230
2262
  winLossRatio: number | null;
2231
2263
  rollingHitRate: number | null;
@@ -2405,11 +2437,15 @@ declare class Core {
2405
2437
  strategy: "TWAP";
2406
2438
  intent: "OPEN";
2407
2439
  sliceIntervalSec: number;
2408
- sliceLegs: {
2440
+ sliceCount: number;
2441
+ randomization: {
2442
+ timingJitterBps: number;
2443
+ sizeJitterBps: number;
2444
+ };
2445
+ legs: {
2409
2446
  symbol: string;
2410
2447
  side: "BUY" | "SELL";
2411
- mode: "QUANTITY" | "USD";
2412
- stepAmount: string;
2448
+ weight: number;
2413
2449
  }[];
2414
2450
  targetNotional: string;
2415
2451
  remainingNotional: string;
@@ -2453,11 +2489,12 @@ declare class Core {
2453
2489
  strategy: "TWAP";
2454
2490
  intent: "CLOSE";
2455
2491
  sliceIntervalSec: number;
2492
+ sliceCount: number;
2493
+ randomization: {
2494
+ timingJitterBps: number;
2495
+ sizeJitterBps: number;
2496
+ };
2456
2497
  positionId: string;
2457
- sliceLegs: {
2458
- symbol: string;
2459
- stepAmount: string;
2460
- }[];
2461
2498
  initialExposure: Record<string, `-${string}` | `+${string}`>;
2462
2499
  lastSliceAt?: string | undefined;
2463
2500
  cancelledAt?: string | undefined;
@@ -2503,11 +2540,15 @@ declare class Core {
2503
2540
  strategy: "TWAP";
2504
2541
  intent: "OPEN";
2505
2542
  sliceIntervalSec: number;
2506
- sliceLegs: {
2543
+ sliceCount: number;
2544
+ randomization: {
2545
+ timingJitterBps: number;
2546
+ sizeJitterBps: number;
2547
+ };
2548
+ legs: {
2507
2549
  symbol: string;
2508
2550
  side: "BUY" | "SELL";
2509
- mode: "QUANTITY" | "USD";
2510
- stepAmount: string;
2551
+ weight: number;
2511
2552
  }[];
2512
2553
  targetNotional: string;
2513
2554
  remainingNotional: string;
@@ -2551,11 +2592,12 @@ declare class Core {
2551
2592
  strategy: "TWAP";
2552
2593
  intent: "CLOSE";
2553
2594
  sliceIntervalSec: number;
2595
+ sliceCount: number;
2596
+ randomization: {
2597
+ timingJitterBps: number;
2598
+ sizeJitterBps: number;
2599
+ };
2554
2600
  positionId: string;
2555
- sliceLegs: {
2556
- symbol: string;
2557
- stepAmount: string;
2558
- }[];
2559
2601
  initialExposure: Record<string, `-${string}` | `+${string}`>;
2560
2602
  lastSliceAt?: string | undefined;
2561
2603
  cancelledAt?: string | undefined;
@@ -2647,7 +2689,6 @@ declare class Core {
2647
2689
  symbol: string;
2648
2690
  side: "BUY" | "SELL";
2649
2691
  reduceOnly: boolean;
2650
- leverage: number;
2651
2692
  quantity: string;
2652
2693
  price: string;
2653
2694
  filledQuantity: string;
@@ -2690,7 +2731,6 @@ declare class Core {
2690
2731
  symbol: string;
2691
2732
  side: "BUY" | "SELL";
2692
2733
  reduceOnly: boolean;
2693
- leverage: number;
2694
2734
  quantity: string;
2695
2735
  price: string;
2696
2736
  filledQuantity: string;
@@ -2720,7 +2760,6 @@ declare class Core {
2720
2760
  symbol: string;
2721
2761
  side: "BUY" | "SELL";
2722
2762
  reduceOnly: boolean;
2723
- leverage: number;
2724
2763
  quantity: string;
2725
2764
  price: string;
2726
2765
  filledQuantity: string;
@@ -2750,7 +2789,6 @@ declare class Core {
2750
2789
  symbol: string;
2751
2790
  side: "BUY" | "SELL";
2752
2791
  reduceOnly: boolean;
2753
- leverage: number;
2754
2792
  quantity: string;
2755
2793
  price: string;
2756
2794
  filledQuantity: string;
@@ -2792,7 +2830,6 @@ declare class Core {
2792
2830
  symbol: string;
2793
2831
  side: "BUY" | "SELL";
2794
2832
  reduceOnly: boolean;
2795
- leverage: number;
2796
2833
  quantity: string;
2797
2834
  price: string;
2798
2835
  filledQuantity: string;
@@ -2835,7 +2872,6 @@ declare class Core {
2835
2872
  symbol: string;
2836
2873
  side: "BUY" | "SELL";
2837
2874
  reduceOnly: boolean;
2838
- leverage: number;
2839
2875
  quantity: string;
2840
2876
  price: string;
2841
2877
  filledQuantity: string;
@@ -2865,7 +2901,6 @@ declare class Core {
2865
2901
  symbol: string;
2866
2902
  side: "BUY" | "SELL";
2867
2903
  reduceOnly: boolean;
2868
- leverage: number;
2869
2904
  quantity: string;
2870
2905
  price: string;
2871
2906
  filledQuantity: string;
@@ -2895,7 +2930,6 @@ declare class Core {
2895
2930
  symbol: string;
2896
2931
  side: "BUY" | "SELL";
2897
2932
  reduceOnly: boolean;
2898
- leverage: number;
2899
2933
  quantity: string;
2900
2934
  price: string;
2901
2935
  filledQuantity: string;
@@ -2937,7 +2971,6 @@ declare class Core {
2937
2971
  symbol: string;
2938
2972
  side: "BUY" | "SELL";
2939
2973
  reduceOnly: boolean;
2940
- leverage: number;
2941
2974
  quantity: string;
2942
2975
  price: string;
2943
2976
  filledQuantity: string;
@@ -2980,7 +3013,6 @@ declare class Core {
2980
3013
  symbol: string;
2981
3014
  side: "BUY" | "SELL";
2982
3015
  reduceOnly: boolean;
2983
- leverage: number;
2984
3016
  quantity: string;
2985
3017
  price: string;
2986
3018
  filledQuantity: string;
@@ -3010,7 +3042,6 @@ declare class Core {
3010
3042
  symbol: string;
3011
3043
  side: "BUY" | "SELL";
3012
3044
  reduceOnly: boolean;
3013
- leverage: number;
3014
3045
  quantity: string;
3015
3046
  price: string;
3016
3047
  filledQuantity: string;
@@ -3040,7 +3071,6 @@ declare class Core {
3040
3071
  symbol: string;
3041
3072
  side: "BUY" | "SELL";
3042
3073
  reduceOnly: boolean;
3043
- leverage: number;
3044
3074
  quantity: string;
3045
3075
  price: string;
3046
3076
  filledQuantity: string;
@@ -3082,7 +3112,6 @@ declare class Core {
3082
3112
  symbol: string;
3083
3113
  side: "BUY" | "SELL";
3084
3114
  reduceOnly: boolean;
3085
- leverage: number;
3086
3115
  quantity: string;
3087
3116
  price: string;
3088
3117
  filledQuantity: string;
@@ -3125,7 +3154,6 @@ declare class Core {
3125
3154
  symbol: string;
3126
3155
  side: "BUY" | "SELL";
3127
3156
  reduceOnly: boolean;
3128
- leverage: number;
3129
3157
  quantity: string;
3130
3158
  price: string;
3131
3159
  filledQuantity: string;
@@ -3155,7 +3183,6 @@ declare class Core {
3155
3183
  symbol: string;
3156
3184
  side: "BUY" | "SELL";
3157
3185
  reduceOnly: boolean;
3158
- leverage: number;
3159
3186
  quantity: string;
3160
3187
  price: string;
3161
3188
  filledQuantity: string;
@@ -3185,7 +3212,6 @@ declare class Core {
3185
3212
  symbol: string;
3186
3213
  side: "BUY" | "SELL";
3187
3214
  reduceOnly: boolean;
3188
- leverage: number;
3189
3215
  quantity: string;
3190
3216
  price: string;
3191
3217
  filledQuantity: string;
@@ -3227,7 +3253,6 @@ declare class Core {
3227
3253
  symbol: string;
3228
3254
  side: "BUY" | "SELL";
3229
3255
  reduceOnly: boolean;
3230
- leverage: number;
3231
3256
  quantity: string;
3232
3257
  price: string;
3233
3258
  filledQuantity: string;
@@ -3270,7 +3295,6 @@ declare class Core {
3270
3295
  symbol: string;
3271
3296
  side: "BUY" | "SELL";
3272
3297
  reduceOnly: boolean;
3273
- leverage: number;
3274
3298
  quantity: string;
3275
3299
  price: string;
3276
3300
  filledQuantity: string;
@@ -3300,7 +3324,6 @@ declare class Core {
3300
3324
  symbol: string;
3301
3325
  side: "BUY" | "SELL";
3302
3326
  reduceOnly: boolean;
3303
- leverage: number;
3304
3327
  quantity: string;
3305
3328
  price: string;
3306
3329
  filledQuantity: string;
@@ -3330,7 +3353,6 @@ declare class Core {
3330
3353
  symbol: string;
3331
3354
  side: "BUY" | "SELL";
3332
3355
  reduceOnly: boolean;
3333
- leverage: number;
3334
3356
  quantity: string;
3335
3357
  price: string;
3336
3358
  filledQuantity: string;
@@ -3427,6 +3449,7 @@ declare class Core {
3427
3449
  };
3428
3450
  ladderId?: string | undefined;
3429
3451
  ladderIndex?: number | undefined;
3452
+ parentTriggerId?: string | undefined;
3430
3453
  triggeredAt?: string | undefined;
3431
3454
  cancelledAt?: string | undefined;
3432
3455
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -3560,6 +3583,7 @@ declare class Core {
3560
3583
  };
3561
3584
  ladderId?: string | undefined;
3562
3585
  ladderIndex?: number | undefined;
3586
+ parentTriggerId?: string | undefined;
3563
3587
  triggeredAt?: string | undefined;
3564
3588
  cancelledAt?: string | undefined;
3565
3589
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -3726,6 +3750,7 @@ declare class Core {
3726
3750
  };
3727
3751
  ladderId?: string | undefined;
3728
3752
  ladderIndex?: number | undefined;
3753
+ parentTriggerId?: string | undefined;
3729
3754
  triggeredAt?: string | undefined;
3730
3755
  cancelledAt?: string | undefined;
3731
3756
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -3848,6 +3873,7 @@ declare class Core {
3848
3873
  };
3849
3874
  ladderId?: string | undefined;
3850
3875
  ladderIndex?: number | undefined;
3876
+ parentTriggerId?: string | undefined;
3851
3877
  triggeredAt?: string | undefined;
3852
3878
  cancelledAt?: string | undefined;
3853
3879
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -3981,6 +4007,7 @@ declare class Core {
3981
4007
  };
3982
4008
  ladderId?: string | undefined;
3983
4009
  ladderIndex?: number | undefined;
4010
+ parentTriggerId?: string | undefined;
3984
4011
  triggeredAt?: string | undefined;
3985
4012
  cancelledAt?: string | undefined;
3986
4013
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -4147,6 +4174,7 @@ declare class Core {
4147
4174
  };
4148
4175
  ladderId?: string | undefined;
4149
4176
  ladderIndex?: number | undefined;
4177
+ parentTriggerId?: string | undefined;
4150
4178
  triggeredAt?: string | undefined;
4151
4179
  cancelledAt?: string | undefined;
4152
4180
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -4268,6 +4296,7 @@ declare class Core {
4268
4296
  };
4269
4297
  ladderId?: string | undefined;
4270
4298
  ladderIndex?: number | undefined;
4299
+ parentTriggerId?: string | undefined;
4271
4300
  triggeredAt?: string | undefined;
4272
4301
  cancelledAt?: string | undefined;
4273
4302
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -4401,6 +4430,7 @@ declare class Core {
4401
4430
  };
4402
4431
  ladderId?: string | undefined;
4403
4432
  ladderIndex?: number | undefined;
4433
+ parentTriggerId?: string | undefined;
4404
4434
  triggeredAt?: string | undefined;
4405
4435
  cancelledAt?: string | undefined;
4406
4436
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -4567,6 +4597,7 @@ declare class Core {
4567
4597
  };
4568
4598
  ladderId?: string | undefined;
4569
4599
  ladderIndex?: number | undefined;
4600
+ parentTriggerId?: string | undefined;
4570
4601
  triggeredAt?: string | undefined;
4571
4602
  cancelledAt?: string | undefined;
4572
4603
  cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | "POSITION_REVERSED" | undefined;
@@ -4616,7 +4647,7 @@ declare class Core {
4616
4647
  profile: {
4617
4648
  id: string;
4618
4649
  displayName: string;
4619
- role: "basic" | "pro" | "admin";
4650
+ role: "basic" | "pro";
4620
4651
  address: string | null;
4621
4652
  email: string | null;
4622
4653
  emailVerified: boolean;
@@ -4684,6 +4715,21 @@ declare class Core {
4684
4715
  totalUsers: number;
4685
4716
  };
4686
4717
  }>;
4718
+ leaderboard: (query?: HttpTypes.LeaderboardQueryParamsInput, headers?: ClientHeaders) => Promise<{
4719
+ data: {
4720
+ tradeAccountId: string;
4721
+ exchangeIdentifier: string;
4722
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
4723
+ volume: string;
4724
+ grossRealizedPnl: string;
4725
+ grossUpnl: string;
4726
+ fundingPayment: string;
4727
+ totalNetPnl: string;
4728
+ pearFee: string;
4729
+ tradeFee: string;
4730
+ totalTrades: number;
4731
+ }[];
4732
+ }>;
4687
4733
  };
4688
4734
  tca: {
4689
4735
  execution: (executionId: string, headers?: ClientHeaders) => Promise<{
@@ -55,6 +55,27 @@ class Core {
55
55
  });
56
56
  }
57
57
  };
58
+ fee = {
59
+ // Resolves the trading fee and connector fee recipient for the caller's selected trade account.
60
+ // The connector is taken from the trade account, identified by the trade-account header.
61
+ get: async (query, headers) => {
62
+ return await this.client.fetch(`/fee`, {
63
+ method: "GET",
64
+ headers,
65
+ query
66
+ });
67
+ },
68
+ // Resolves the connector-native approval target for the caller's role — the same fee_recipients
69
+ // row the order path names. Takes an explicit connector rather than a trade account, so the
70
+ // approval flows can ask while the account is still being created.
71
+ recipient: async (query, headers) => {
72
+ return await this.client.fetch(`/fee/recipient`, {
73
+ method: "GET",
74
+ headers,
75
+ query
76
+ });
77
+ }
78
+ };
58
79
  apiKeys = {
59
80
  list: async (headers) => {
60
81
  return await this.client.fetch(`/api-keys`, {
@@ -157,6 +178,13 @@ class Core {
157
178
  query
158
179
  });
159
180
  },
181
+ lite: async (query, headers) => {
182
+ return await this.client.fetch(`/instruments/lite`, {
183
+ method: "GET",
184
+ headers,
185
+ query
186
+ });
187
+ },
160
188
  symbolToIdMap: async (query, headers) => {
161
189
  return await this.client.fetch(`/instruments/symbol-to-id-map`, {
162
190
  method: "GET",
@@ -595,6 +623,13 @@ class Core {
595
623
  headers,
596
624
  query
597
625
  });
626
+ },
627
+ leaderboard: async (query, headers) => {
628
+ return await this.client.fetch(`/statistics/leaderboard`, {
629
+ method: "GET",
630
+ headers,
631
+ query
632
+ });
598
633
  }
599
634
  };
600
635
  tca = {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { Admin } from './admin/index.js';
2
1
  import { Auth } from './auth/index.js';
3
2
  import { Core } from './core/index.js';
4
3
  import { External } from './external/index.js';
@@ -9,7 +8,6 @@ export { FetchError } from './utils.js';
9
8
  import './http.js';
10
9
 
11
10
  declare class PearSDK {
12
- admin: Admin;
13
11
  auth: Auth;
14
12
  core: Core;
15
13
  external: External;
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { configureProxy } from '@pear-protocol/utils';
2
2
  export * from '@pear-protocol/utils';
3
- import { Admin } from './admin';
4
3
  import { Auth } from './auth';
5
4
  import { Core } from './core';
6
5
  import { External } from './external';
@@ -10,7 +9,6 @@ import { FetchError } from './utils';
10
9
  export { FetchError } from './utils';
11
10
 
12
11
  class PearSDK {
13
- admin;
14
12
  auth;
15
13
  core;
16
14
  external;
@@ -25,7 +23,6 @@ class PearSDK {
25
23
  }
26
24
  };
27
25
  const client = new HttpClient(config.url, authMode, config.logger, config.debug);
28
- this.admin = new Admin(client);
29
26
  this.auth = new Auth(client);
30
27
  this.core = new Core(client);
31
28
  this.external = new External();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@pear-protocol/types": "^1.14.1",
29
- "@pear-protocol/utils": "^0.3.0",
28
+ "@pear-protocol/types": "^1.15.0",
29
+ "@pear-protocol/utils": "^0.4.0",
30
30
  "qs": "^6.14.0"
31
31
  },
32
32
  "devDependencies": {
@@ -1,58 +0,0 @@
1
- import { HttpTypes } from '@pear-protocol/types';
2
- import { HttpClient } from '../http.js';
3
- import { ClientHeaders } from '../types.js';
4
- import '@pear-protocol/utils';
5
-
6
- declare class Admin {
7
- private client;
8
- constructor(client: HttpClient);
9
- clientIds: {
10
- list: (query?: HttpTypes.ListClientIdsParamsInput, headers?: ClientHeaders) => Promise<{
11
- id: string;
12
- code: string;
13
- label: string;
14
- isActive: boolean;
15
- createdAt: string;
16
- updatedAt: string;
17
- description?: string | undefined;
18
- }[]>;
19
- create: (body: HttpTypes.CreateClientIdPayloadInput, headers?: ClientHeaders) => Promise<{
20
- id: string;
21
- code: string;
22
- label: string;
23
- isActive: boolean;
24
- createdAt: string;
25
- updatedAt: string;
26
- description?: string | undefined;
27
- }>;
28
- update: (id: string, body: HttpTypes.UpdateClientIdPayloadInput, headers?: ClientHeaders) => Promise<{
29
- id: string;
30
- code: string;
31
- label: string;
32
- isActive: boolean;
33
- createdAt: string;
34
- updatedAt: string;
35
- description?: string | undefined;
36
- }>;
37
- activate: (id: string, headers?: ClientHeaders) => Promise<{
38
- id: string;
39
- code: string;
40
- label: string;
41
- isActive: boolean;
42
- createdAt: string;
43
- updatedAt: string;
44
- description?: string | undefined;
45
- }>;
46
- deactivate: (id: string, headers?: ClientHeaders) => Promise<{
47
- id: string;
48
- code: string;
49
- label: string;
50
- isActive: boolean;
51
- createdAt: string;
52
- updatedAt: string;
53
- description?: string | undefined;
54
- }>;
55
- };
56
- }
57
-
58
- export { Admin };
@@ -1,43 +0,0 @@
1
- class Admin {
2
- client;
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- clientIds = {
7
- list: async (query, headers) => {
8
- return await this.client.fetch(`/admin/client-ids`, {
9
- method: "GET",
10
- headers,
11
- query
12
- });
13
- },
14
- create: async (body, headers) => {
15
- return await this.client.fetch(`/admin/client-ids`, {
16
- method: "POST",
17
- headers,
18
- body
19
- });
20
- },
21
- update: async (id, body, headers) => {
22
- return await this.client.fetch(`/admin/client-ids/${id}`, {
23
- method: "PATCH",
24
- headers,
25
- body
26
- });
27
- },
28
- activate: async (id, headers) => {
29
- return await this.client.fetch(`/admin/client-ids/${id}/activate`, {
30
- method: "POST",
31
- headers
32
- });
33
- },
34
- deactivate: async (id, headers) => {
35
- return await this.client.fetch(`/admin/client-ids/${id}/deactivate`, {
36
- method: "POST",
37
- headers
38
- });
39
- }
40
- };
41
- }
42
-
43
- export { Admin };