@pear-protocol/core-sdk 0.0.17 → 0.0.20

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.
@@ -18,6 +18,8 @@ declare class Core {
18
18
  agentWalletAddress: string;
19
19
  isSubaccount: boolean;
20
20
  mainAccountAddress: string;
21
+ } | {
22
+ l1_address: string;
21
23
  } | undefined;
22
24
  deletedAt?: string | undefined;
23
25
  }[];
@@ -34,6 +36,8 @@ declare class Core {
34
36
  agentWalletAddress: string;
35
37
  isSubaccount: boolean;
36
38
  mainAccountAddress: string;
39
+ } | {
40
+ l1_address: string;
37
41
  } | undefined;
38
42
  deletedAt?: string | undefined;
39
43
  };
@@ -50,6 +54,8 @@ declare class Core {
50
54
  agentWalletAddress: string;
51
55
  isSubaccount: boolean;
52
56
  mainAccountAddress: string;
57
+ } | {
58
+ l1_address: string;
53
59
  } | undefined;
54
60
  deletedAt?: string | undefined;
55
61
  };
@@ -85,6 +91,12 @@ declare class Core {
85
91
  api_secret: string;
86
92
  api_pass: string;
87
93
  };
94
+ } | {
95
+ connector: "lighter";
96
+ credentials: {
97
+ api_private_key: string;
98
+ api_key_index: number;
99
+ };
88
100
  }>;
89
101
  restore: (id: string, headers?: ClientHeaders) => Promise<void>;
90
102
  };
@@ -141,7 +153,7 @@ declare class Core {
141
153
  orderType: "MARKET";
142
154
  position: {
143
155
  id: string;
144
- exposure: Record<string, string>;
156
+ exposure: Record<string, `-${string}` | `+${string}`>;
145
157
  };
146
158
  legs: [{
147
159
  symbol: string;
@@ -184,7 +196,7 @@ declare class Core {
184
196
  orderType: "MARKET";
185
197
  position: {
186
198
  id: string;
187
- exposure: Record<string, string>;
199
+ exposure: Record<string, `-${string}` | `+${string}`>;
188
200
  };
189
201
  error?: string | undefined;
190
202
  orders?: {
@@ -211,18 +223,26 @@ declare class Core {
211
223
  details: (positionId: string, headers?: ClientHeaders) => Promise<{
212
224
  fills: {
213
225
  id: string;
226
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
214
227
  tradeAccountId: string;
215
228
  symbol: string;
216
229
  positionId: string;
217
230
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
218
231
  side: "BUY" | "SELL";
219
232
  reduceOnly: boolean;
233
+ isExternal: boolean;
220
234
  quantity: string;
221
235
  price: string;
222
236
  usd: string;
223
237
  timestamp: string;
224
238
  cloid?: string | undefined;
225
- fee?: string | undefined;
239
+ exchangeFillId?: string | undefined;
240
+ tradeFee?: string | undefined;
241
+ pearFee?: string | undefined;
242
+ original?: {
243
+ exchangeFillId: string;
244
+ quantity: string;
245
+ } | undefined;
226
246
  }[];
227
247
  }>;
228
248
  list: (query: HttpTypes.FillListParams, headers?: ClientHeaders) => Promise<{
@@ -230,18 +250,34 @@ declare class Core {
230
250
  nextCursor: string | undefined;
231
251
  fills: {
232
252
  id: string;
253
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
233
254
  tradeAccountId: string;
234
255
  symbol: string;
235
256
  positionId: string;
236
257
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
237
258
  side: "BUY" | "SELL";
238
259
  reduceOnly: boolean;
260
+ isExternal: boolean;
239
261
  quantity: string;
240
262
  price: string;
241
263
  usd: string;
242
264
  timestamp: string;
243
265
  cloid?: string | undefined;
244
- fee?: string | undefined;
266
+ exchangeFillId?: string | undefined;
267
+ tradeFee?: string | undefined;
268
+ pearFee?: string | undefined;
269
+ original?: {
270
+ exchangeFillId: string;
271
+ quantity: string;
272
+ } | undefined;
273
+ }[];
274
+ }>;
275
+ provisionals: (headers?: ClientHeaders) => Promise<{
276
+ fills: {
277
+ id: string;
278
+ positionId: string;
279
+ status: "PROVISIONAL";
280
+ cloid?: string | undefined;
245
281
  }[];
246
282
  }>;
247
283
  };
@@ -280,6 +316,9 @@ declare class Core {
280
316
  };
281
317
  }[];
282
318
  }>;
319
+ symbolToIdMap: (query: HttpTypes.InstrumentListParams, headers?: ClientHeaders) => Promise<{
320
+ data: Record<string, string>;
321
+ }>;
283
322
  };
284
323
  positions: {
285
324
  list: (query: HttpTypes.PositionListParamsInput, headers?: ClientHeaders) => Promise<{
@@ -288,14 +327,23 @@ declare class Core {
288
327
  tradeAccountId: string;
289
328
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
290
329
  status: "OPEN" | "CLOSED";
291
- exposure: Record<string, string>;
292
- initialExposureUSD: Record<string, string>;
330
+ exposure: Record<string, `-${string}` | `+${string}`>;
331
+ initialExposureUSD: Record<string, `-${string}` | `+${string}`>;
293
332
  createdAt: string;
294
333
  updatedAt: string;
295
334
  closedReason?: "NETTED" | "USER" | "LIQUIDATED" | null | undefined;
296
335
  closedAt?: string | null | undefined;
297
336
  }[];
298
337
  }>;
338
+ openLite: (headers?: ClientHeaders) => Promise<{
339
+ positions: {
340
+ id: string;
341
+ createdAt: string;
342
+ exposure: Record<string, string>;
343
+ status: "OPEN";
344
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
345
+ }[];
346
+ }>;
299
347
  };
300
348
  prices: {
301
349
  list: (query: HttpTypes.PricesQueryParams, headers?: ClientHeaders) => Promise<{
@@ -319,7 +367,7 @@ declare class Core {
319
367
  updatedAt: string;
320
368
  strategy: "TWAP";
321
369
  intent: "OPEN";
322
- sliceIntervalMs: number;
370
+ sliceIntervalSec: number;
323
371
  sliceLegs: {
324
372
  symbol: string;
325
373
  side: "BUY" | "SELL";
@@ -330,21 +378,29 @@ declare class Core {
330
378
  remainingNotional: string;
331
379
  lastSliceAt?: string | undefined;
332
380
  cancelledAt?: string | undefined;
333
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
381
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
334
382
  fills?: {
335
383
  id: string;
384
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
336
385
  tradeAccountId: string;
337
386
  symbol: string;
338
387
  positionId: string;
339
388
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
340
389
  side: "BUY" | "SELL";
341
390
  reduceOnly: boolean;
391
+ isExternal: boolean;
342
392
  quantity: string;
343
393
  price: string;
344
394
  usd: string;
345
395
  timestamp: string;
346
396
  cloid?: string | undefined;
347
- fee?: string | undefined;
397
+ exchangeFillId?: string | undefined;
398
+ tradeFee?: string | undefined;
399
+ pearFee?: string | undefined;
400
+ original?: {
401
+ exchangeFillId: string;
402
+ quantity: string;
403
+ } | undefined;
348
404
  }[] | undefined;
349
405
  } | {
350
406
  id: string;
@@ -358,30 +414,38 @@ declare class Core {
358
414
  updatedAt: string;
359
415
  strategy: "TWAP";
360
416
  intent: "CLOSE";
361
- sliceIntervalMs: number;
417
+ sliceIntervalSec: number;
362
418
  positionId: string;
363
419
  sliceLegs: {
364
420
  symbol: string;
365
421
  stepAmount: string;
366
422
  }[];
367
- initialExposure: Record<string, string>;
423
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
368
424
  lastSliceAt?: string | undefined;
369
425
  cancelledAt?: string | undefined;
370
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
426
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
371
427
  fills?: {
372
428
  id: string;
429
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
373
430
  tradeAccountId: string;
374
431
  symbol: string;
375
432
  positionId: string;
376
433
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
377
434
  side: "BUY" | "SELL";
378
435
  reduceOnly: boolean;
436
+ isExternal: boolean;
379
437
  quantity: string;
380
438
  price: string;
381
439
  usd: string;
382
440
  timestamp: string;
383
441
  cloid?: string | undefined;
384
- fee?: string | undefined;
442
+ exchangeFillId?: string | undefined;
443
+ tradeFee?: string | undefined;
444
+ pearFee?: string | undefined;
445
+ original?: {
446
+ exchangeFillId: string;
447
+ quantity: string;
448
+ } | undefined;
385
449
  }[] | undefined;
386
450
  })[];
387
451
  }>;
@@ -398,7 +462,7 @@ declare class Core {
398
462
  updatedAt: string;
399
463
  strategy: "TWAP";
400
464
  intent: "OPEN";
401
- sliceIntervalMs: number;
465
+ sliceIntervalSec: number;
402
466
  sliceLegs: {
403
467
  symbol: string;
404
468
  side: "BUY" | "SELL";
@@ -409,21 +473,29 @@ declare class Core {
409
473
  remainingNotional: string;
410
474
  lastSliceAt?: string | undefined;
411
475
  cancelledAt?: string | undefined;
412
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
476
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
413
477
  fills?: {
414
478
  id: string;
479
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
415
480
  tradeAccountId: string;
416
481
  symbol: string;
417
482
  positionId: string;
418
483
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
419
484
  side: "BUY" | "SELL";
420
485
  reduceOnly: boolean;
486
+ isExternal: boolean;
421
487
  quantity: string;
422
488
  price: string;
423
489
  usd: string;
424
490
  timestamp: string;
425
491
  cloid?: string | undefined;
426
- fee?: string | undefined;
492
+ exchangeFillId?: string | undefined;
493
+ tradeFee?: string | undefined;
494
+ pearFee?: string | undefined;
495
+ original?: {
496
+ exchangeFillId: string;
497
+ quantity: string;
498
+ } | undefined;
427
499
  }[] | undefined;
428
500
  } | {
429
501
  id: string;
@@ -437,30 +509,38 @@ declare class Core {
437
509
  updatedAt: string;
438
510
  strategy: "TWAP";
439
511
  intent: "CLOSE";
440
- sliceIntervalMs: number;
512
+ sliceIntervalSec: number;
441
513
  positionId: string;
442
514
  sliceLegs: {
443
515
  symbol: string;
444
516
  stepAmount: string;
445
517
  }[];
446
- initialExposure: Record<string, string>;
518
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
447
519
  lastSliceAt?: string | undefined;
448
520
  cancelledAt?: string | undefined;
449
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
521
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
450
522
  fills?: {
451
523
  id: string;
524
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
452
525
  tradeAccountId: string;
453
526
  symbol: string;
454
527
  positionId: string;
455
528
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
456
529
  side: "BUY" | "SELL";
457
530
  reduceOnly: boolean;
531
+ isExternal: boolean;
458
532
  quantity: string;
459
533
  price: string;
460
534
  usd: string;
461
535
  timestamp: string;
462
536
  cloid?: string | undefined;
463
- fee?: string | undefined;
537
+ exchangeFillId?: string | undefined;
538
+ tradeFee?: string | undefined;
539
+ pearFee?: string | undefined;
540
+ original?: {
541
+ exchangeFillId: string;
542
+ quantity: string;
543
+ } | undefined;
464
544
  }[] | undefined;
465
545
  };
466
546
  }>;
@@ -471,6 +551,17 @@ declare class Core {
471
551
  ids: string[];
472
552
  }>;
473
553
  };
554
+ sync: {
555
+ since: (body: HttpTypes.SyncSinceRequest, headers?: ClientHeaders) => Promise<{
556
+ since: string;
557
+ sinceMs: number;
558
+ safeTs?: number | undefined;
559
+ confirmedExchangeFillIds?: string[] | undefined;
560
+ }>;
561
+ confirm: (body: HttpTypes.ConfirmFillsRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
562
+ reconcile: (body: HttpTypes.ReconcileFillsRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
563
+ create: (body: HttpTypes.CreateFillsRequest, headers?: ClientHeaders) => Promise<Record<string, never>>;
564
+ };
474
565
  trade: {
475
566
  open: (body: HttpTypes.CreateTradeOpen, headers?: ClientHeaders) => Promise<{
476
567
  execution: {
@@ -522,7 +613,7 @@ declare class Core {
522
613
  orderType: "MARKET";
523
614
  position: {
524
615
  id: string;
525
- exposure: Record<string, string>;
616
+ exposure: Record<string, `-${string}` | `+${string}`>;
526
617
  };
527
618
  legs: [{
528
619
  symbol: string;
@@ -565,7 +656,7 @@ declare class Core {
565
656
  orderType: "MARKET";
566
657
  position: {
567
658
  id: string;
568
- exposure: Record<string, string>;
659
+ exposure: Record<string, `-${string}` | `+${string}`>;
569
660
  };
570
661
  error?: string | undefined;
571
662
  orders?: {
@@ -637,7 +728,7 @@ declare class Core {
637
728
  orderType: "MARKET";
638
729
  position: {
639
730
  id: string;
640
- exposure: Record<string, string>;
731
+ exposure: Record<string, `-${string}` | `+${string}`>;
641
732
  };
642
733
  legs: [{
643
734
  symbol: string;
@@ -680,7 +771,7 @@ declare class Core {
680
771
  orderType: "MARKET";
681
772
  position: {
682
773
  id: string;
683
- exposure: Record<string, string>;
774
+ exposure: Record<string, `-${string}` | `+${string}`>;
684
775
  };
685
776
  error?: string | undefined;
686
777
  orders?: {
@@ -752,7 +843,7 @@ declare class Core {
752
843
  orderType: "MARKET";
753
844
  position: {
754
845
  id: string;
755
- exposure: Record<string, string>;
846
+ exposure: Record<string, `-${string}` | `+${string}`>;
756
847
  };
757
848
  legs: [{
758
849
  symbol: string;
@@ -795,7 +886,7 @@ declare class Core {
795
886
  orderType: "MARKET";
796
887
  position: {
797
888
  id: string;
798
- exposure: Record<string, string>;
889
+ exposure: Record<string, `-${string}` | `+${string}`>;
799
890
  };
800
891
  error?: string | undefined;
801
892
  orders?: {
@@ -867,7 +958,7 @@ declare class Core {
867
958
  orderType: "MARKET";
868
959
  position: {
869
960
  id: string;
870
- exposure: Record<string, string>;
961
+ exposure: Record<string, `-${string}` | `+${string}`>;
871
962
  };
872
963
  legs: [{
873
964
  symbol: string;
@@ -910,7 +1001,7 @@ declare class Core {
910
1001
  orderType: "MARKET";
911
1002
  position: {
912
1003
  id: string;
913
- exposure: Record<string, string>;
1004
+ exposure: Record<string, `-${string}` | `+${string}`>;
914
1005
  };
915
1006
  error?: string | undefined;
916
1007
  orders?: {
@@ -943,6 +1034,7 @@ declare class Core {
943
1034
  tradeAccountId: string;
944
1035
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
945
1036
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1037
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
946
1038
  createdAt: string;
947
1039
  updatedAt: string;
948
1040
  intent: "OPEN";
@@ -950,7 +1042,7 @@ declare class Core {
950
1042
  condition: {
951
1043
  type: "ratio_v1";
952
1044
  data: {
953
- priceSource: "mid" | "mark";
1045
+ priceSource: "mark" | "mid";
954
1046
  symbol_a: string;
955
1047
  symbol_b: string;
956
1048
  direction: "ABOVE" | "BELOW";
@@ -959,7 +1051,7 @@ declare class Core {
959
1051
  } | {
960
1052
  type: "price_v1";
961
1053
  data: {
962
- priceSource: "mid" | "mark";
1054
+ priceSource: "mark" | "mid";
963
1055
  symbol: string;
964
1056
  direction: "ABOVE" | "BELOW";
965
1057
  threshold: number;
@@ -967,7 +1059,7 @@ declare class Core {
967
1059
  } | {
968
1060
  type: "index_v1";
969
1061
  data: {
970
- priceSource: "mid" | "mark";
1062
+ priceSource: "mark" | "mid";
971
1063
  basket: {
972
1064
  symbol: string;
973
1065
  weight: number;
@@ -978,7 +1070,7 @@ declare class Core {
978
1070
  } | {
979
1071
  type: "weighted_ratio_v1";
980
1072
  data: {
981
- priceSource: "mid" | "mark";
1073
+ priceSource: "mark" | "mid";
982
1074
  basket: {
983
1075
  symbol: string;
984
1076
  side: "BUY" | "SELL";
@@ -1004,28 +1096,36 @@ declare class Core {
1004
1096
  };
1005
1097
  triggeredAt?: string | undefined;
1006
1098
  cancelledAt?: string | undefined;
1007
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1099
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1008
1100
  fills?: {
1009
1101
  id: string;
1102
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1010
1103
  tradeAccountId: string;
1011
1104
  symbol: string;
1012
1105
  positionId: string;
1013
1106
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1014
1107
  side: "BUY" | "SELL";
1015
1108
  reduceOnly: boolean;
1109
+ isExternal: boolean;
1016
1110
  quantity: string;
1017
1111
  price: string;
1018
1112
  usd: string;
1019
1113
  timestamp: string;
1020
1114
  cloid?: string | undefined;
1021
- fee?: string | undefined;
1115
+ exchangeFillId?: string | undefined;
1116
+ tradeFee?: string | undefined;
1117
+ pearFee?: string | undefined;
1118
+ original?: {
1119
+ exchangeFillId: string;
1120
+ quantity: string;
1121
+ } | undefined;
1022
1122
  }[] | undefined;
1023
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1024
1123
  } | {
1025
1124
  id: string;
1026
1125
  tradeAccountId: string;
1027
1126
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1028
1127
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1128
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1029
1129
  createdAt: string;
1030
1130
  updatedAt: string;
1031
1131
  intent: "ADJUST";
@@ -1033,7 +1133,7 @@ declare class Core {
1033
1133
  condition: {
1034
1134
  type: "ratio_v1";
1035
1135
  data: {
1036
- priceSource: "mid" | "mark";
1136
+ priceSource: "mark" | "mid";
1037
1137
  symbol_a: string;
1038
1138
  symbol_b: string;
1039
1139
  direction: "ABOVE" | "BELOW";
@@ -1042,7 +1142,7 @@ declare class Core {
1042
1142
  } | {
1043
1143
  type: "price_v1";
1044
1144
  data: {
1045
- priceSource: "mid" | "mark";
1145
+ priceSource: "mark" | "mid";
1046
1146
  symbol: string;
1047
1147
  direction: "ABOVE" | "BELOW";
1048
1148
  threshold: number;
@@ -1050,7 +1150,7 @@ declare class Core {
1050
1150
  } | {
1051
1151
  type: "index_v1";
1052
1152
  data: {
1053
- priceSource: "mid" | "mark";
1153
+ priceSource: "mark" | "mid";
1054
1154
  basket: {
1055
1155
  symbol: string;
1056
1156
  weight: number;
@@ -1061,7 +1161,7 @@ declare class Core {
1061
1161
  } | {
1062
1162
  type: "weighted_ratio_v1";
1063
1163
  data: {
1064
- priceSource: "mid" | "mark";
1164
+ priceSource: "mark" | "mid";
1065
1165
  basket: {
1066
1166
  symbol: string;
1067
1167
  side: "BUY" | "SELL";
@@ -1073,21 +1173,21 @@ declare class Core {
1073
1173
  } | {
1074
1174
  type: "position_value_v1";
1075
1175
  data: {
1076
- priceSource: "mid" | "mark";
1176
+ priceSource: "mark" | "mid";
1077
1177
  direction: "ABOVE" | "BELOW";
1078
1178
  threshold: number;
1079
1179
  };
1080
1180
  } | {
1081
1181
  type: "position_upnl_value_v1";
1082
1182
  data: {
1083
- priceSource: "mid" | "mark";
1183
+ priceSource: "mark" | "mid";
1084
1184
  direction: "ABOVE" | "BELOW";
1085
1185
  threshold: number;
1086
1186
  };
1087
1187
  } | {
1088
1188
  type: "position_upnl_percentage_v1";
1089
1189
  data: {
1090
- priceSource: "mid" | "mark";
1190
+ priceSource: "mark" | "mid";
1091
1191
  direction: "ABOVE" | "BELOW";
1092
1192
  threshold_bps: number;
1093
1193
  };
@@ -1096,7 +1196,7 @@ declare class Core {
1096
1196
  type: "MARKET";
1097
1197
  position: {
1098
1198
  id: string;
1099
- initialExposure: Record<string, string>;
1199
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1100
1200
  };
1101
1201
  legs: [{
1102
1202
  symbol: string;
@@ -1114,28 +1214,40 @@ declare class Core {
1114
1214
  };
1115
1215
  triggeredAt?: string | undefined;
1116
1216
  cancelledAt?: string | undefined;
1117
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1217
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1118
1218
  fills?: {
1119
1219
  id: string;
1220
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1120
1221
  tradeAccountId: string;
1121
1222
  symbol: string;
1122
1223
  positionId: string;
1123
1224
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1124
1225
  side: "BUY" | "SELL";
1125
1226
  reduceOnly: boolean;
1227
+ isExternal: boolean;
1126
1228
  quantity: string;
1127
1229
  price: string;
1128
1230
  usd: string;
1129
1231
  timestamp: string;
1130
1232
  cloid?: string | undefined;
1131
- fee?: string | undefined;
1233
+ exchangeFillId?: string | undefined;
1234
+ tradeFee?: string | undefined;
1235
+ pearFee?: string | undefined;
1236
+ original?: {
1237
+ exchangeFillId: string;
1238
+ quantity: string;
1239
+ } | undefined;
1132
1240
  }[] | undefined;
1133
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1241
+ trailing?: {
1242
+ deltaValue: number;
1243
+ activationValue: number;
1244
+ } | undefined;
1134
1245
  } | {
1135
1246
  id: string;
1136
1247
  tradeAccountId: string;
1137
1248
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1138
1249
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1250
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1139
1251
  createdAt: string;
1140
1252
  updatedAt: string;
1141
1253
  intent: "CLOSE";
@@ -1143,7 +1255,7 @@ declare class Core {
1143
1255
  condition: {
1144
1256
  type: "ratio_v1";
1145
1257
  data: {
1146
- priceSource: "mid" | "mark";
1258
+ priceSource: "mark" | "mid";
1147
1259
  symbol_a: string;
1148
1260
  symbol_b: string;
1149
1261
  direction: "ABOVE" | "BELOW";
@@ -1152,7 +1264,7 @@ declare class Core {
1152
1264
  } | {
1153
1265
  type: "price_v1";
1154
1266
  data: {
1155
- priceSource: "mid" | "mark";
1267
+ priceSource: "mark" | "mid";
1156
1268
  symbol: string;
1157
1269
  direction: "ABOVE" | "BELOW";
1158
1270
  threshold: number;
@@ -1160,7 +1272,7 @@ declare class Core {
1160
1272
  } | {
1161
1273
  type: "index_v1";
1162
1274
  data: {
1163
- priceSource: "mid" | "mark";
1275
+ priceSource: "mark" | "mid";
1164
1276
  basket: {
1165
1277
  symbol: string;
1166
1278
  weight: number;
@@ -1171,7 +1283,7 @@ declare class Core {
1171
1283
  } | {
1172
1284
  type: "weighted_ratio_v1";
1173
1285
  data: {
1174
- priceSource: "mid" | "mark";
1286
+ priceSource: "mark" | "mid";
1175
1287
  basket: {
1176
1288
  symbol: string;
1177
1289
  side: "BUY" | "SELL";
@@ -1183,21 +1295,21 @@ declare class Core {
1183
1295
  } | {
1184
1296
  type: "position_value_v1";
1185
1297
  data: {
1186
- priceSource: "mid" | "mark";
1298
+ priceSource: "mark" | "mid";
1187
1299
  direction: "ABOVE" | "BELOW";
1188
1300
  threshold: number;
1189
1301
  };
1190
1302
  } | {
1191
1303
  type: "position_upnl_value_v1";
1192
1304
  data: {
1193
- priceSource: "mid" | "mark";
1305
+ priceSource: "mark" | "mid";
1194
1306
  direction: "ABOVE" | "BELOW";
1195
1307
  threshold: number;
1196
1308
  };
1197
1309
  } | {
1198
1310
  type: "position_upnl_percentage_v1";
1199
1311
  data: {
1200
- priceSource: "mid" | "mark";
1312
+ priceSource: "mark" | "mid";
1201
1313
  direction: "ABOVE" | "BELOW";
1202
1314
  threshold_bps: number;
1203
1315
  };
@@ -1206,28 +1318,39 @@ declare class Core {
1206
1318
  type: "MARKET";
1207
1319
  position: {
1208
1320
  id: string;
1209
- initialExposure: Record<string, string>;
1321
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1210
1322
  };
1211
1323
  };
1212
1324
  triggeredAt?: string | undefined;
1213
1325
  cancelledAt?: string | undefined;
1214
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1326
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1215
1327
  fills?: {
1216
1328
  id: string;
1329
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1217
1330
  tradeAccountId: string;
1218
1331
  symbol: string;
1219
1332
  positionId: string;
1220
1333
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1221
1334
  side: "BUY" | "SELL";
1222
1335
  reduceOnly: boolean;
1336
+ isExternal: boolean;
1223
1337
  quantity: string;
1224
1338
  price: string;
1225
1339
  usd: string;
1226
1340
  timestamp: string;
1227
1341
  cloid?: string | undefined;
1228
- fee?: string | undefined;
1342
+ exchangeFillId?: string | undefined;
1343
+ tradeFee?: string | undefined;
1344
+ pearFee?: string | undefined;
1345
+ original?: {
1346
+ exchangeFillId: string;
1347
+ quantity: string;
1348
+ } | undefined;
1229
1349
  }[] | undefined;
1230
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1350
+ trailing?: {
1351
+ deltaValue: number;
1352
+ activationValue: number;
1353
+ } | undefined;
1231
1354
  })[];
1232
1355
  }>;
1233
1356
  open: (body: HttpTypes.CreateTriggerOpen, headers?: ClientHeaders) => Promise<{
@@ -1236,6 +1359,7 @@ declare class Core {
1236
1359
  tradeAccountId: string;
1237
1360
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1238
1361
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1362
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1239
1363
  createdAt: string;
1240
1364
  updatedAt: string;
1241
1365
  intent: "OPEN";
@@ -1243,7 +1367,7 @@ declare class Core {
1243
1367
  condition: {
1244
1368
  type: "ratio_v1";
1245
1369
  data: {
1246
- priceSource: "mid" | "mark";
1370
+ priceSource: "mark" | "mid";
1247
1371
  symbol_a: string;
1248
1372
  symbol_b: string;
1249
1373
  direction: "ABOVE" | "BELOW";
@@ -1252,7 +1376,7 @@ declare class Core {
1252
1376
  } | {
1253
1377
  type: "price_v1";
1254
1378
  data: {
1255
- priceSource: "mid" | "mark";
1379
+ priceSource: "mark" | "mid";
1256
1380
  symbol: string;
1257
1381
  direction: "ABOVE" | "BELOW";
1258
1382
  threshold: number;
@@ -1260,7 +1384,7 @@ declare class Core {
1260
1384
  } | {
1261
1385
  type: "index_v1";
1262
1386
  data: {
1263
- priceSource: "mid" | "mark";
1387
+ priceSource: "mark" | "mid";
1264
1388
  basket: {
1265
1389
  symbol: string;
1266
1390
  weight: number;
@@ -1271,7 +1395,7 @@ declare class Core {
1271
1395
  } | {
1272
1396
  type: "weighted_ratio_v1";
1273
1397
  data: {
1274
- priceSource: "mid" | "mark";
1398
+ priceSource: "mark" | "mid";
1275
1399
  basket: {
1276
1400
  symbol: string;
1277
1401
  side: "BUY" | "SELL";
@@ -1297,28 +1421,36 @@ declare class Core {
1297
1421
  };
1298
1422
  triggeredAt?: string | undefined;
1299
1423
  cancelledAt?: string | undefined;
1300
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1424
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1301
1425
  fills?: {
1302
1426
  id: string;
1427
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1303
1428
  tradeAccountId: string;
1304
1429
  symbol: string;
1305
1430
  positionId: string;
1306
1431
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1307
1432
  side: "BUY" | "SELL";
1308
1433
  reduceOnly: boolean;
1434
+ isExternal: boolean;
1309
1435
  quantity: string;
1310
1436
  price: string;
1311
1437
  usd: string;
1312
1438
  timestamp: string;
1313
1439
  cloid?: string | undefined;
1314
- fee?: string | undefined;
1440
+ exchangeFillId?: string | undefined;
1441
+ tradeFee?: string | undefined;
1442
+ pearFee?: string | undefined;
1443
+ original?: {
1444
+ exchangeFillId: string;
1445
+ quantity: string;
1446
+ } | undefined;
1315
1447
  }[] | undefined;
1316
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1317
1448
  } | {
1318
1449
  id: string;
1319
1450
  tradeAccountId: string;
1320
1451
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1321
1452
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1453
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1322
1454
  createdAt: string;
1323
1455
  updatedAt: string;
1324
1456
  intent: "ADJUST";
@@ -1326,7 +1458,7 @@ declare class Core {
1326
1458
  condition: {
1327
1459
  type: "ratio_v1";
1328
1460
  data: {
1329
- priceSource: "mid" | "mark";
1461
+ priceSource: "mark" | "mid";
1330
1462
  symbol_a: string;
1331
1463
  symbol_b: string;
1332
1464
  direction: "ABOVE" | "BELOW";
@@ -1335,7 +1467,7 @@ declare class Core {
1335
1467
  } | {
1336
1468
  type: "price_v1";
1337
1469
  data: {
1338
- priceSource: "mid" | "mark";
1470
+ priceSource: "mark" | "mid";
1339
1471
  symbol: string;
1340
1472
  direction: "ABOVE" | "BELOW";
1341
1473
  threshold: number;
@@ -1343,7 +1475,7 @@ declare class Core {
1343
1475
  } | {
1344
1476
  type: "index_v1";
1345
1477
  data: {
1346
- priceSource: "mid" | "mark";
1478
+ priceSource: "mark" | "mid";
1347
1479
  basket: {
1348
1480
  symbol: string;
1349
1481
  weight: number;
@@ -1354,7 +1486,7 @@ declare class Core {
1354
1486
  } | {
1355
1487
  type: "weighted_ratio_v1";
1356
1488
  data: {
1357
- priceSource: "mid" | "mark";
1489
+ priceSource: "mark" | "mid";
1358
1490
  basket: {
1359
1491
  symbol: string;
1360
1492
  side: "BUY" | "SELL";
@@ -1366,21 +1498,21 @@ declare class Core {
1366
1498
  } | {
1367
1499
  type: "position_value_v1";
1368
1500
  data: {
1369
- priceSource: "mid" | "mark";
1501
+ priceSource: "mark" | "mid";
1370
1502
  direction: "ABOVE" | "BELOW";
1371
1503
  threshold: number;
1372
1504
  };
1373
1505
  } | {
1374
1506
  type: "position_upnl_value_v1";
1375
1507
  data: {
1376
- priceSource: "mid" | "mark";
1508
+ priceSource: "mark" | "mid";
1377
1509
  direction: "ABOVE" | "BELOW";
1378
1510
  threshold: number;
1379
1511
  };
1380
1512
  } | {
1381
1513
  type: "position_upnl_percentage_v1";
1382
1514
  data: {
1383
- priceSource: "mid" | "mark";
1515
+ priceSource: "mark" | "mid";
1384
1516
  direction: "ABOVE" | "BELOW";
1385
1517
  threshold_bps: number;
1386
1518
  };
@@ -1389,7 +1521,7 @@ declare class Core {
1389
1521
  type: "MARKET";
1390
1522
  position: {
1391
1523
  id: string;
1392
- initialExposure: Record<string, string>;
1524
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1393
1525
  };
1394
1526
  legs: [{
1395
1527
  symbol: string;
@@ -1407,28 +1539,40 @@ declare class Core {
1407
1539
  };
1408
1540
  triggeredAt?: string | undefined;
1409
1541
  cancelledAt?: string | undefined;
1410
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1542
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1411
1543
  fills?: {
1412
1544
  id: string;
1545
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1413
1546
  tradeAccountId: string;
1414
1547
  symbol: string;
1415
1548
  positionId: string;
1416
1549
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1417
1550
  side: "BUY" | "SELL";
1418
1551
  reduceOnly: boolean;
1552
+ isExternal: boolean;
1419
1553
  quantity: string;
1420
1554
  price: string;
1421
1555
  usd: string;
1422
1556
  timestamp: string;
1423
1557
  cloid?: string | undefined;
1424
- fee?: string | undefined;
1558
+ exchangeFillId?: string | undefined;
1559
+ tradeFee?: string | undefined;
1560
+ pearFee?: string | undefined;
1561
+ original?: {
1562
+ exchangeFillId: string;
1563
+ quantity: string;
1564
+ } | undefined;
1425
1565
  }[] | undefined;
1426
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1566
+ trailing?: {
1567
+ deltaValue: number;
1568
+ activationValue: number;
1569
+ } | undefined;
1427
1570
  } | {
1428
1571
  id: string;
1429
1572
  tradeAccountId: string;
1430
1573
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1431
1574
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1575
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1432
1576
  createdAt: string;
1433
1577
  updatedAt: string;
1434
1578
  intent: "CLOSE";
@@ -1436,7 +1580,7 @@ declare class Core {
1436
1580
  condition: {
1437
1581
  type: "ratio_v1";
1438
1582
  data: {
1439
- priceSource: "mid" | "mark";
1583
+ priceSource: "mark" | "mid";
1440
1584
  symbol_a: string;
1441
1585
  symbol_b: string;
1442
1586
  direction: "ABOVE" | "BELOW";
@@ -1445,7 +1589,7 @@ declare class Core {
1445
1589
  } | {
1446
1590
  type: "price_v1";
1447
1591
  data: {
1448
- priceSource: "mid" | "mark";
1592
+ priceSource: "mark" | "mid";
1449
1593
  symbol: string;
1450
1594
  direction: "ABOVE" | "BELOW";
1451
1595
  threshold: number;
@@ -1453,7 +1597,7 @@ declare class Core {
1453
1597
  } | {
1454
1598
  type: "index_v1";
1455
1599
  data: {
1456
- priceSource: "mid" | "mark";
1600
+ priceSource: "mark" | "mid";
1457
1601
  basket: {
1458
1602
  symbol: string;
1459
1603
  weight: number;
@@ -1464,7 +1608,7 @@ declare class Core {
1464
1608
  } | {
1465
1609
  type: "weighted_ratio_v1";
1466
1610
  data: {
1467
- priceSource: "mid" | "mark";
1611
+ priceSource: "mark" | "mid";
1468
1612
  basket: {
1469
1613
  symbol: string;
1470
1614
  side: "BUY" | "SELL";
@@ -1476,21 +1620,21 @@ declare class Core {
1476
1620
  } | {
1477
1621
  type: "position_value_v1";
1478
1622
  data: {
1479
- priceSource: "mid" | "mark";
1623
+ priceSource: "mark" | "mid";
1480
1624
  direction: "ABOVE" | "BELOW";
1481
1625
  threshold: number;
1482
1626
  };
1483
1627
  } | {
1484
1628
  type: "position_upnl_value_v1";
1485
1629
  data: {
1486
- priceSource: "mid" | "mark";
1630
+ priceSource: "mark" | "mid";
1487
1631
  direction: "ABOVE" | "BELOW";
1488
1632
  threshold: number;
1489
1633
  };
1490
1634
  } | {
1491
1635
  type: "position_upnl_percentage_v1";
1492
1636
  data: {
1493
- priceSource: "mid" | "mark";
1637
+ priceSource: "mark" | "mid";
1494
1638
  direction: "ABOVE" | "BELOW";
1495
1639
  threshold_bps: number;
1496
1640
  };
@@ -1499,28 +1643,39 @@ declare class Core {
1499
1643
  type: "MARKET";
1500
1644
  position: {
1501
1645
  id: string;
1502
- initialExposure: Record<string, string>;
1646
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1503
1647
  };
1504
1648
  };
1505
1649
  triggeredAt?: string | undefined;
1506
1650
  cancelledAt?: string | undefined;
1507
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1651
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1508
1652
  fills?: {
1509
1653
  id: string;
1654
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1510
1655
  tradeAccountId: string;
1511
1656
  symbol: string;
1512
1657
  positionId: string;
1513
1658
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1514
1659
  side: "BUY" | "SELL";
1515
1660
  reduceOnly: boolean;
1661
+ isExternal: boolean;
1516
1662
  quantity: string;
1517
1663
  price: string;
1518
1664
  usd: string;
1519
1665
  timestamp: string;
1520
1666
  cloid?: string | undefined;
1521
- fee?: string | undefined;
1667
+ exchangeFillId?: string | undefined;
1668
+ tradeFee?: string | undefined;
1669
+ pearFee?: string | undefined;
1670
+ original?: {
1671
+ exchangeFillId: string;
1672
+ quantity: string;
1673
+ } | undefined;
1522
1674
  }[] | undefined;
1523
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1675
+ trailing?: {
1676
+ deltaValue: number;
1677
+ activationValue: number;
1678
+ } | undefined;
1524
1679
  };
1525
1680
  }>;
1526
1681
  close: (body: HttpTypes.CreateTriggerClose, headers?: ClientHeaders) => Promise<{
@@ -1529,6 +1684,7 @@ declare class Core {
1529
1684
  tradeAccountId: string;
1530
1685
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1531
1686
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1687
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1532
1688
  createdAt: string;
1533
1689
  updatedAt: string;
1534
1690
  intent: "OPEN";
@@ -1536,7 +1692,7 @@ declare class Core {
1536
1692
  condition: {
1537
1693
  type: "ratio_v1";
1538
1694
  data: {
1539
- priceSource: "mid" | "mark";
1695
+ priceSource: "mark" | "mid";
1540
1696
  symbol_a: string;
1541
1697
  symbol_b: string;
1542
1698
  direction: "ABOVE" | "BELOW";
@@ -1545,7 +1701,7 @@ declare class Core {
1545
1701
  } | {
1546
1702
  type: "price_v1";
1547
1703
  data: {
1548
- priceSource: "mid" | "mark";
1704
+ priceSource: "mark" | "mid";
1549
1705
  symbol: string;
1550
1706
  direction: "ABOVE" | "BELOW";
1551
1707
  threshold: number;
@@ -1553,7 +1709,7 @@ declare class Core {
1553
1709
  } | {
1554
1710
  type: "index_v1";
1555
1711
  data: {
1556
- priceSource: "mid" | "mark";
1712
+ priceSource: "mark" | "mid";
1557
1713
  basket: {
1558
1714
  symbol: string;
1559
1715
  weight: number;
@@ -1564,7 +1720,7 @@ declare class Core {
1564
1720
  } | {
1565
1721
  type: "weighted_ratio_v1";
1566
1722
  data: {
1567
- priceSource: "mid" | "mark";
1723
+ priceSource: "mark" | "mid";
1568
1724
  basket: {
1569
1725
  symbol: string;
1570
1726
  side: "BUY" | "SELL";
@@ -1590,28 +1746,36 @@ declare class Core {
1590
1746
  };
1591
1747
  triggeredAt?: string | undefined;
1592
1748
  cancelledAt?: string | undefined;
1593
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1749
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1594
1750
  fills?: {
1595
1751
  id: string;
1752
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1596
1753
  tradeAccountId: string;
1597
1754
  symbol: string;
1598
1755
  positionId: string;
1599
1756
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1600
1757
  side: "BUY" | "SELL";
1601
1758
  reduceOnly: boolean;
1759
+ isExternal: boolean;
1602
1760
  quantity: string;
1603
1761
  price: string;
1604
1762
  usd: string;
1605
1763
  timestamp: string;
1606
1764
  cloid?: string | undefined;
1607
- fee?: string | undefined;
1765
+ exchangeFillId?: string | undefined;
1766
+ tradeFee?: string | undefined;
1767
+ pearFee?: string | undefined;
1768
+ original?: {
1769
+ exchangeFillId: string;
1770
+ quantity: string;
1771
+ } | undefined;
1608
1772
  }[] | undefined;
1609
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1610
1773
  } | {
1611
1774
  id: string;
1612
1775
  tradeAccountId: string;
1613
1776
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1614
1777
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1778
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1615
1779
  createdAt: string;
1616
1780
  updatedAt: string;
1617
1781
  intent: "ADJUST";
@@ -1619,7 +1783,7 @@ declare class Core {
1619
1783
  condition: {
1620
1784
  type: "ratio_v1";
1621
1785
  data: {
1622
- priceSource: "mid" | "mark";
1786
+ priceSource: "mark" | "mid";
1623
1787
  symbol_a: string;
1624
1788
  symbol_b: string;
1625
1789
  direction: "ABOVE" | "BELOW";
@@ -1628,7 +1792,7 @@ declare class Core {
1628
1792
  } | {
1629
1793
  type: "price_v1";
1630
1794
  data: {
1631
- priceSource: "mid" | "mark";
1795
+ priceSource: "mark" | "mid";
1632
1796
  symbol: string;
1633
1797
  direction: "ABOVE" | "BELOW";
1634
1798
  threshold: number;
@@ -1636,7 +1800,7 @@ declare class Core {
1636
1800
  } | {
1637
1801
  type: "index_v1";
1638
1802
  data: {
1639
- priceSource: "mid" | "mark";
1803
+ priceSource: "mark" | "mid";
1640
1804
  basket: {
1641
1805
  symbol: string;
1642
1806
  weight: number;
@@ -1647,7 +1811,7 @@ declare class Core {
1647
1811
  } | {
1648
1812
  type: "weighted_ratio_v1";
1649
1813
  data: {
1650
- priceSource: "mid" | "mark";
1814
+ priceSource: "mark" | "mid";
1651
1815
  basket: {
1652
1816
  symbol: string;
1653
1817
  side: "BUY" | "SELL";
@@ -1659,21 +1823,21 @@ declare class Core {
1659
1823
  } | {
1660
1824
  type: "position_value_v1";
1661
1825
  data: {
1662
- priceSource: "mid" | "mark";
1826
+ priceSource: "mark" | "mid";
1663
1827
  direction: "ABOVE" | "BELOW";
1664
1828
  threshold: number;
1665
1829
  };
1666
1830
  } | {
1667
1831
  type: "position_upnl_value_v1";
1668
1832
  data: {
1669
- priceSource: "mid" | "mark";
1833
+ priceSource: "mark" | "mid";
1670
1834
  direction: "ABOVE" | "BELOW";
1671
1835
  threshold: number;
1672
1836
  };
1673
1837
  } | {
1674
1838
  type: "position_upnl_percentage_v1";
1675
1839
  data: {
1676
- priceSource: "mid" | "mark";
1840
+ priceSource: "mark" | "mid";
1677
1841
  direction: "ABOVE" | "BELOW";
1678
1842
  threshold_bps: number;
1679
1843
  };
@@ -1682,7 +1846,7 @@ declare class Core {
1682
1846
  type: "MARKET";
1683
1847
  position: {
1684
1848
  id: string;
1685
- initialExposure: Record<string, string>;
1849
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1686
1850
  };
1687
1851
  legs: [{
1688
1852
  symbol: string;
@@ -1700,28 +1864,40 @@ declare class Core {
1700
1864
  };
1701
1865
  triggeredAt?: string | undefined;
1702
1866
  cancelledAt?: string | undefined;
1703
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1867
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1704
1868
  fills?: {
1705
1869
  id: string;
1870
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1706
1871
  tradeAccountId: string;
1707
1872
  symbol: string;
1708
1873
  positionId: string;
1709
1874
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1710
1875
  side: "BUY" | "SELL";
1711
1876
  reduceOnly: boolean;
1877
+ isExternal: boolean;
1712
1878
  quantity: string;
1713
1879
  price: string;
1714
1880
  usd: string;
1715
1881
  timestamp: string;
1716
1882
  cloid?: string | undefined;
1717
- fee?: string | undefined;
1883
+ exchangeFillId?: string | undefined;
1884
+ tradeFee?: string | undefined;
1885
+ pearFee?: string | undefined;
1886
+ original?: {
1887
+ exchangeFillId: string;
1888
+ quantity: string;
1889
+ } | undefined;
1718
1890
  }[] | undefined;
1719
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1891
+ trailing?: {
1892
+ deltaValue: number;
1893
+ activationValue: number;
1894
+ } | undefined;
1720
1895
  } | {
1721
1896
  id: string;
1722
1897
  tradeAccountId: string;
1723
1898
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1724
1899
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1900
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1725
1901
  createdAt: string;
1726
1902
  updatedAt: string;
1727
1903
  intent: "CLOSE";
@@ -1729,7 +1905,7 @@ declare class Core {
1729
1905
  condition: {
1730
1906
  type: "ratio_v1";
1731
1907
  data: {
1732
- priceSource: "mid" | "mark";
1908
+ priceSource: "mark" | "mid";
1733
1909
  symbol_a: string;
1734
1910
  symbol_b: string;
1735
1911
  direction: "ABOVE" | "BELOW";
@@ -1738,7 +1914,7 @@ declare class Core {
1738
1914
  } | {
1739
1915
  type: "price_v1";
1740
1916
  data: {
1741
- priceSource: "mid" | "mark";
1917
+ priceSource: "mark" | "mid";
1742
1918
  symbol: string;
1743
1919
  direction: "ABOVE" | "BELOW";
1744
1920
  threshold: number;
@@ -1746,7 +1922,7 @@ declare class Core {
1746
1922
  } | {
1747
1923
  type: "index_v1";
1748
1924
  data: {
1749
- priceSource: "mid" | "mark";
1925
+ priceSource: "mark" | "mid";
1750
1926
  basket: {
1751
1927
  symbol: string;
1752
1928
  weight: number;
@@ -1757,7 +1933,7 @@ declare class Core {
1757
1933
  } | {
1758
1934
  type: "weighted_ratio_v1";
1759
1935
  data: {
1760
- priceSource: "mid" | "mark";
1936
+ priceSource: "mark" | "mid";
1761
1937
  basket: {
1762
1938
  symbol: string;
1763
1939
  side: "BUY" | "SELL";
@@ -1769,21 +1945,21 @@ declare class Core {
1769
1945
  } | {
1770
1946
  type: "position_value_v1";
1771
1947
  data: {
1772
- priceSource: "mid" | "mark";
1948
+ priceSource: "mark" | "mid";
1773
1949
  direction: "ABOVE" | "BELOW";
1774
1950
  threshold: number;
1775
1951
  };
1776
1952
  } | {
1777
1953
  type: "position_upnl_value_v1";
1778
1954
  data: {
1779
- priceSource: "mid" | "mark";
1955
+ priceSource: "mark" | "mid";
1780
1956
  direction: "ABOVE" | "BELOW";
1781
1957
  threshold: number;
1782
1958
  };
1783
1959
  } | {
1784
1960
  type: "position_upnl_percentage_v1";
1785
1961
  data: {
1786
- priceSource: "mid" | "mark";
1962
+ priceSource: "mark" | "mid";
1787
1963
  direction: "ABOVE" | "BELOW";
1788
1964
  threshold_bps: number;
1789
1965
  };
@@ -1792,28 +1968,39 @@ declare class Core {
1792
1968
  type: "MARKET";
1793
1969
  position: {
1794
1970
  id: string;
1795
- initialExposure: Record<string, string>;
1971
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1796
1972
  };
1797
1973
  };
1798
1974
  triggeredAt?: string | undefined;
1799
1975
  cancelledAt?: string | undefined;
1800
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1976
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1801
1977
  fills?: {
1802
1978
  id: string;
1979
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1803
1980
  tradeAccountId: string;
1804
1981
  symbol: string;
1805
1982
  positionId: string;
1806
1983
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1807
1984
  side: "BUY" | "SELL";
1808
1985
  reduceOnly: boolean;
1986
+ isExternal: boolean;
1809
1987
  quantity: string;
1810
1988
  price: string;
1811
1989
  usd: string;
1812
1990
  timestamp: string;
1813
1991
  cloid?: string | undefined;
1814
- fee?: string | undefined;
1992
+ exchangeFillId?: string | undefined;
1993
+ tradeFee?: string | undefined;
1994
+ pearFee?: string | undefined;
1995
+ original?: {
1996
+ exchangeFillId: string;
1997
+ quantity: string;
1998
+ } | undefined;
1815
1999
  }[] | undefined;
1816
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
2000
+ trailing?: {
2001
+ deltaValue: number;
2002
+ activationValue: number;
2003
+ } | undefined;
1817
2004
  };
1818
2005
  }>;
1819
2006
  cancel: (triggerId: string, headers?: ClientHeaders) => Promise<{
@@ -1846,16 +2033,48 @@ declare class Core {
1846
2033
  };
1847
2034
  }>;
1848
2035
  };
2036
+ misc: {
2037
+ lighter: {
2038
+ createApiKey: (body: HttpTypes.CreateLighterApiKeyParams, headers?: ClientHeaders) => Promise<{
2039
+ privateKey: string;
2040
+ publicKey: string;
2041
+ apiKeyIndex: number;
2042
+ messageToSign: string;
2043
+ txInfo: string;
2044
+ }>;
2045
+ changePubKey: (body: HttpTypes.SubmitChangePubKeyParams, headers?: ClientHeaders) => Promise<{
2046
+ txHash: string;
2047
+ }>;
2048
+ prepareApproveIntegrator: (body: HttpTypes.PrepareApproveIntegratorParams, headers?: ClientHeaders) => Promise<{
2049
+ messageToSign: string;
2050
+ txInfo: string;
2051
+ }>;
2052
+ submitApproveIntegrator: (body: HttpTypes.SubmitApproveIntegratorParams, headers?: ClientHeaders) => Promise<{
2053
+ txHash: string;
2054
+ }>;
2055
+ createAuthToken: (body: HttpTypes.CreateAuthTokenParams, headers?: ClientHeaders) => Promise<{
2056
+ token: string;
2057
+ }>;
2058
+ };
2059
+ };
1849
2060
  statistics: {
1850
- daily: (query: HttpTypes.DailyStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
2061
+ volume: (query: HttpTypes.VolumeStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
1851
2062
  data: {
1852
- date: string;
2063
+ timestamp: number;
1853
2064
  volume: number;
1854
2065
  fees: number;
2066
+ trades: number;
1855
2067
  users: number;
1856
2068
  newUsers: number;
1857
2069
  }[];
1858
2070
  }>;
2071
+ oi: (query: HttpTypes.OiStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
2072
+ data: {
2073
+ timestamp: number;
2074
+ openInterest: number;
2075
+ openPositions: number;
2076
+ }[];
2077
+ }>;
1859
2078
  };
1860
2079
  }
1861
2080