@pear-protocol/core-sdk 0.0.18 → 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.
@@ -153,7 +153,7 @@ declare class Core {
153
153
  orderType: "MARKET";
154
154
  position: {
155
155
  id: string;
156
- exposure: Record<string, string>;
156
+ exposure: Record<string, `-${string}` | `+${string}`>;
157
157
  };
158
158
  legs: [{
159
159
  symbol: string;
@@ -196,7 +196,7 @@ declare class Core {
196
196
  orderType: "MARKET";
197
197
  position: {
198
198
  id: string;
199
- exposure: Record<string, string>;
199
+ exposure: Record<string, `-${string}` | `+${string}`>;
200
200
  };
201
201
  error?: string | undefined;
202
202
  orders?: {
@@ -223,18 +223,26 @@ declare class Core {
223
223
  details: (positionId: string, headers?: ClientHeaders) => Promise<{
224
224
  fills: {
225
225
  id: string;
226
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
226
227
  tradeAccountId: string;
227
228
  symbol: string;
228
229
  positionId: string;
229
230
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
230
231
  side: "BUY" | "SELL";
231
232
  reduceOnly: boolean;
233
+ isExternal: boolean;
232
234
  quantity: string;
233
235
  price: string;
234
236
  usd: string;
235
237
  timestamp: string;
236
238
  cloid?: string | undefined;
237
- 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;
238
246
  }[];
239
247
  }>;
240
248
  list: (query: HttpTypes.FillListParams, headers?: ClientHeaders) => Promise<{
@@ -242,18 +250,34 @@ declare class Core {
242
250
  nextCursor: string | undefined;
243
251
  fills: {
244
252
  id: string;
253
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
245
254
  tradeAccountId: string;
246
255
  symbol: string;
247
256
  positionId: string;
248
257
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
249
258
  side: "BUY" | "SELL";
250
259
  reduceOnly: boolean;
260
+ isExternal: boolean;
251
261
  quantity: string;
252
262
  price: string;
253
263
  usd: string;
254
264
  timestamp: string;
255
265
  cloid?: string | undefined;
256
- 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;
257
281
  }[];
258
282
  }>;
259
283
  };
@@ -292,6 +316,9 @@ declare class Core {
292
316
  };
293
317
  }[];
294
318
  }>;
319
+ symbolToIdMap: (query: HttpTypes.InstrumentListParams, headers?: ClientHeaders) => Promise<{
320
+ data: Record<string, string>;
321
+ }>;
295
322
  };
296
323
  positions: {
297
324
  list: (query: HttpTypes.PositionListParamsInput, headers?: ClientHeaders) => Promise<{
@@ -300,14 +327,23 @@ declare class Core {
300
327
  tradeAccountId: string;
301
328
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
302
329
  status: "OPEN" | "CLOSED";
303
- exposure: Record<string, string>;
304
- initialExposureUSD: Record<string, string>;
330
+ exposure: Record<string, `-${string}` | `+${string}`>;
331
+ initialExposureUSD: Record<string, `-${string}` | `+${string}`>;
305
332
  createdAt: string;
306
333
  updatedAt: string;
307
334
  closedReason?: "NETTED" | "USER" | "LIQUIDATED" | null | undefined;
308
335
  closedAt?: string | null | undefined;
309
336
  }[];
310
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
+ }>;
311
347
  };
312
348
  prices: {
313
349
  list: (query: HttpTypes.PricesQueryParams, headers?: ClientHeaders) => Promise<{
@@ -331,7 +367,7 @@ declare class Core {
331
367
  updatedAt: string;
332
368
  strategy: "TWAP";
333
369
  intent: "OPEN";
334
- sliceIntervalMs: number;
370
+ sliceIntervalSec: number;
335
371
  sliceLegs: {
336
372
  symbol: string;
337
373
  side: "BUY" | "SELL";
@@ -342,21 +378,29 @@ declare class Core {
342
378
  remainingNotional: string;
343
379
  lastSliceAt?: string | undefined;
344
380
  cancelledAt?: string | undefined;
345
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
381
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
346
382
  fills?: {
347
383
  id: string;
384
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
348
385
  tradeAccountId: string;
349
386
  symbol: string;
350
387
  positionId: string;
351
388
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
352
389
  side: "BUY" | "SELL";
353
390
  reduceOnly: boolean;
391
+ isExternal: boolean;
354
392
  quantity: string;
355
393
  price: string;
356
394
  usd: string;
357
395
  timestamp: string;
358
396
  cloid?: string | undefined;
359
- 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;
360
404
  }[] | undefined;
361
405
  } | {
362
406
  id: string;
@@ -370,30 +414,38 @@ declare class Core {
370
414
  updatedAt: string;
371
415
  strategy: "TWAP";
372
416
  intent: "CLOSE";
373
- sliceIntervalMs: number;
417
+ sliceIntervalSec: number;
374
418
  positionId: string;
375
419
  sliceLegs: {
376
420
  symbol: string;
377
421
  stepAmount: string;
378
422
  }[];
379
- initialExposure: Record<string, string>;
423
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
380
424
  lastSliceAt?: string | undefined;
381
425
  cancelledAt?: string | undefined;
382
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
426
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
383
427
  fills?: {
384
428
  id: string;
429
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
385
430
  tradeAccountId: string;
386
431
  symbol: string;
387
432
  positionId: string;
388
433
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
389
434
  side: "BUY" | "SELL";
390
435
  reduceOnly: boolean;
436
+ isExternal: boolean;
391
437
  quantity: string;
392
438
  price: string;
393
439
  usd: string;
394
440
  timestamp: string;
395
441
  cloid?: string | undefined;
396
- 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;
397
449
  }[] | undefined;
398
450
  })[];
399
451
  }>;
@@ -410,7 +462,7 @@ declare class Core {
410
462
  updatedAt: string;
411
463
  strategy: "TWAP";
412
464
  intent: "OPEN";
413
- sliceIntervalMs: number;
465
+ sliceIntervalSec: number;
414
466
  sliceLegs: {
415
467
  symbol: string;
416
468
  side: "BUY" | "SELL";
@@ -421,21 +473,29 @@ declare class Core {
421
473
  remainingNotional: string;
422
474
  lastSliceAt?: string | undefined;
423
475
  cancelledAt?: string | undefined;
424
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
476
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
425
477
  fills?: {
426
478
  id: string;
479
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
427
480
  tradeAccountId: string;
428
481
  symbol: string;
429
482
  positionId: string;
430
483
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
431
484
  side: "BUY" | "SELL";
432
485
  reduceOnly: boolean;
486
+ isExternal: boolean;
433
487
  quantity: string;
434
488
  price: string;
435
489
  usd: string;
436
490
  timestamp: string;
437
491
  cloid?: string | undefined;
438
- 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;
439
499
  }[] | undefined;
440
500
  } | {
441
501
  id: string;
@@ -449,30 +509,38 @@ declare class Core {
449
509
  updatedAt: string;
450
510
  strategy: "TWAP";
451
511
  intent: "CLOSE";
452
- sliceIntervalMs: number;
512
+ sliceIntervalSec: number;
453
513
  positionId: string;
454
514
  sliceLegs: {
455
515
  symbol: string;
456
516
  stepAmount: string;
457
517
  }[];
458
- initialExposure: Record<string, string>;
518
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
459
519
  lastSliceAt?: string | undefined;
460
520
  cancelledAt?: string | undefined;
461
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
521
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
462
522
  fills?: {
463
523
  id: string;
524
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
464
525
  tradeAccountId: string;
465
526
  symbol: string;
466
527
  positionId: string;
467
528
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
468
529
  side: "BUY" | "SELL";
469
530
  reduceOnly: boolean;
531
+ isExternal: boolean;
470
532
  quantity: string;
471
533
  price: string;
472
534
  usd: string;
473
535
  timestamp: string;
474
536
  cloid?: string | undefined;
475
- 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;
476
544
  }[] | undefined;
477
545
  };
478
546
  }>;
@@ -483,6 +551,17 @@ declare class Core {
483
551
  ids: string[];
484
552
  }>;
485
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
+ };
486
565
  trade: {
487
566
  open: (body: HttpTypes.CreateTradeOpen, headers?: ClientHeaders) => Promise<{
488
567
  execution: {
@@ -534,7 +613,7 @@ declare class Core {
534
613
  orderType: "MARKET";
535
614
  position: {
536
615
  id: string;
537
- exposure: Record<string, string>;
616
+ exposure: Record<string, `-${string}` | `+${string}`>;
538
617
  };
539
618
  legs: [{
540
619
  symbol: string;
@@ -577,7 +656,7 @@ declare class Core {
577
656
  orderType: "MARKET";
578
657
  position: {
579
658
  id: string;
580
- exposure: Record<string, string>;
659
+ exposure: Record<string, `-${string}` | `+${string}`>;
581
660
  };
582
661
  error?: string | undefined;
583
662
  orders?: {
@@ -649,7 +728,7 @@ declare class Core {
649
728
  orderType: "MARKET";
650
729
  position: {
651
730
  id: string;
652
- exposure: Record<string, string>;
731
+ exposure: Record<string, `-${string}` | `+${string}`>;
653
732
  };
654
733
  legs: [{
655
734
  symbol: string;
@@ -692,7 +771,7 @@ declare class Core {
692
771
  orderType: "MARKET";
693
772
  position: {
694
773
  id: string;
695
- exposure: Record<string, string>;
774
+ exposure: Record<string, `-${string}` | `+${string}`>;
696
775
  };
697
776
  error?: string | undefined;
698
777
  orders?: {
@@ -764,7 +843,7 @@ declare class Core {
764
843
  orderType: "MARKET";
765
844
  position: {
766
845
  id: string;
767
- exposure: Record<string, string>;
846
+ exposure: Record<string, `-${string}` | `+${string}`>;
768
847
  };
769
848
  legs: [{
770
849
  symbol: string;
@@ -807,7 +886,7 @@ declare class Core {
807
886
  orderType: "MARKET";
808
887
  position: {
809
888
  id: string;
810
- exposure: Record<string, string>;
889
+ exposure: Record<string, `-${string}` | `+${string}`>;
811
890
  };
812
891
  error?: string | undefined;
813
892
  orders?: {
@@ -879,7 +958,7 @@ declare class Core {
879
958
  orderType: "MARKET";
880
959
  position: {
881
960
  id: string;
882
- exposure: Record<string, string>;
961
+ exposure: Record<string, `-${string}` | `+${string}`>;
883
962
  };
884
963
  legs: [{
885
964
  symbol: string;
@@ -922,7 +1001,7 @@ declare class Core {
922
1001
  orderType: "MARKET";
923
1002
  position: {
924
1003
  id: string;
925
- exposure: Record<string, string>;
1004
+ exposure: Record<string, `-${string}` | `+${string}`>;
926
1005
  };
927
1006
  error?: string | undefined;
928
1007
  orders?: {
@@ -955,6 +1034,7 @@ declare class Core {
955
1034
  tradeAccountId: string;
956
1035
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
957
1036
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1037
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
958
1038
  createdAt: string;
959
1039
  updatedAt: string;
960
1040
  intent: "OPEN";
@@ -962,7 +1042,7 @@ declare class Core {
962
1042
  condition: {
963
1043
  type: "ratio_v1";
964
1044
  data: {
965
- priceSource: "mid" | "mark";
1045
+ priceSource: "mark" | "mid";
966
1046
  symbol_a: string;
967
1047
  symbol_b: string;
968
1048
  direction: "ABOVE" | "BELOW";
@@ -971,7 +1051,7 @@ declare class Core {
971
1051
  } | {
972
1052
  type: "price_v1";
973
1053
  data: {
974
- priceSource: "mid" | "mark";
1054
+ priceSource: "mark" | "mid";
975
1055
  symbol: string;
976
1056
  direction: "ABOVE" | "BELOW";
977
1057
  threshold: number;
@@ -979,7 +1059,7 @@ declare class Core {
979
1059
  } | {
980
1060
  type: "index_v1";
981
1061
  data: {
982
- priceSource: "mid" | "mark";
1062
+ priceSource: "mark" | "mid";
983
1063
  basket: {
984
1064
  symbol: string;
985
1065
  weight: number;
@@ -990,7 +1070,7 @@ declare class Core {
990
1070
  } | {
991
1071
  type: "weighted_ratio_v1";
992
1072
  data: {
993
- priceSource: "mid" | "mark";
1073
+ priceSource: "mark" | "mid";
994
1074
  basket: {
995
1075
  symbol: string;
996
1076
  side: "BUY" | "SELL";
@@ -1016,28 +1096,36 @@ declare class Core {
1016
1096
  };
1017
1097
  triggeredAt?: string | undefined;
1018
1098
  cancelledAt?: string | undefined;
1019
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1099
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1020
1100
  fills?: {
1021
1101
  id: string;
1102
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1022
1103
  tradeAccountId: string;
1023
1104
  symbol: string;
1024
1105
  positionId: string;
1025
1106
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1026
1107
  side: "BUY" | "SELL";
1027
1108
  reduceOnly: boolean;
1109
+ isExternal: boolean;
1028
1110
  quantity: string;
1029
1111
  price: string;
1030
1112
  usd: string;
1031
1113
  timestamp: string;
1032
1114
  cloid?: string | undefined;
1033
- 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;
1034
1122
  }[] | undefined;
1035
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1036
1123
  } | {
1037
1124
  id: string;
1038
1125
  tradeAccountId: string;
1039
1126
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1040
1127
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1128
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1041
1129
  createdAt: string;
1042
1130
  updatedAt: string;
1043
1131
  intent: "ADJUST";
@@ -1045,7 +1133,7 @@ declare class Core {
1045
1133
  condition: {
1046
1134
  type: "ratio_v1";
1047
1135
  data: {
1048
- priceSource: "mid" | "mark";
1136
+ priceSource: "mark" | "mid";
1049
1137
  symbol_a: string;
1050
1138
  symbol_b: string;
1051
1139
  direction: "ABOVE" | "BELOW";
@@ -1054,7 +1142,7 @@ declare class Core {
1054
1142
  } | {
1055
1143
  type: "price_v1";
1056
1144
  data: {
1057
- priceSource: "mid" | "mark";
1145
+ priceSource: "mark" | "mid";
1058
1146
  symbol: string;
1059
1147
  direction: "ABOVE" | "BELOW";
1060
1148
  threshold: number;
@@ -1062,7 +1150,7 @@ declare class Core {
1062
1150
  } | {
1063
1151
  type: "index_v1";
1064
1152
  data: {
1065
- priceSource: "mid" | "mark";
1153
+ priceSource: "mark" | "mid";
1066
1154
  basket: {
1067
1155
  symbol: string;
1068
1156
  weight: number;
@@ -1073,7 +1161,7 @@ declare class Core {
1073
1161
  } | {
1074
1162
  type: "weighted_ratio_v1";
1075
1163
  data: {
1076
- priceSource: "mid" | "mark";
1164
+ priceSource: "mark" | "mid";
1077
1165
  basket: {
1078
1166
  symbol: string;
1079
1167
  side: "BUY" | "SELL";
@@ -1085,21 +1173,21 @@ declare class Core {
1085
1173
  } | {
1086
1174
  type: "position_value_v1";
1087
1175
  data: {
1088
- priceSource: "mid" | "mark";
1176
+ priceSource: "mark" | "mid";
1089
1177
  direction: "ABOVE" | "BELOW";
1090
1178
  threshold: number;
1091
1179
  };
1092
1180
  } | {
1093
1181
  type: "position_upnl_value_v1";
1094
1182
  data: {
1095
- priceSource: "mid" | "mark";
1183
+ priceSource: "mark" | "mid";
1096
1184
  direction: "ABOVE" | "BELOW";
1097
1185
  threshold: number;
1098
1186
  };
1099
1187
  } | {
1100
1188
  type: "position_upnl_percentage_v1";
1101
1189
  data: {
1102
- priceSource: "mid" | "mark";
1190
+ priceSource: "mark" | "mid";
1103
1191
  direction: "ABOVE" | "BELOW";
1104
1192
  threshold_bps: number;
1105
1193
  };
@@ -1108,7 +1196,7 @@ declare class Core {
1108
1196
  type: "MARKET";
1109
1197
  position: {
1110
1198
  id: string;
1111
- initialExposure: Record<string, string>;
1199
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1112
1200
  };
1113
1201
  legs: [{
1114
1202
  symbol: string;
@@ -1126,28 +1214,40 @@ declare class Core {
1126
1214
  };
1127
1215
  triggeredAt?: string | undefined;
1128
1216
  cancelledAt?: string | undefined;
1129
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1217
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1130
1218
  fills?: {
1131
1219
  id: string;
1220
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1132
1221
  tradeAccountId: string;
1133
1222
  symbol: string;
1134
1223
  positionId: string;
1135
1224
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1136
1225
  side: "BUY" | "SELL";
1137
1226
  reduceOnly: boolean;
1227
+ isExternal: boolean;
1138
1228
  quantity: string;
1139
1229
  price: string;
1140
1230
  usd: string;
1141
1231
  timestamp: string;
1142
1232
  cloid?: string | undefined;
1143
- 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;
1144
1240
  }[] | undefined;
1145
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1241
+ trailing?: {
1242
+ deltaValue: number;
1243
+ activationValue: number;
1244
+ } | undefined;
1146
1245
  } | {
1147
1246
  id: string;
1148
1247
  tradeAccountId: string;
1149
1248
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1150
1249
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1250
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1151
1251
  createdAt: string;
1152
1252
  updatedAt: string;
1153
1253
  intent: "CLOSE";
@@ -1155,7 +1255,7 @@ declare class Core {
1155
1255
  condition: {
1156
1256
  type: "ratio_v1";
1157
1257
  data: {
1158
- priceSource: "mid" | "mark";
1258
+ priceSource: "mark" | "mid";
1159
1259
  symbol_a: string;
1160
1260
  symbol_b: string;
1161
1261
  direction: "ABOVE" | "BELOW";
@@ -1164,7 +1264,7 @@ declare class Core {
1164
1264
  } | {
1165
1265
  type: "price_v1";
1166
1266
  data: {
1167
- priceSource: "mid" | "mark";
1267
+ priceSource: "mark" | "mid";
1168
1268
  symbol: string;
1169
1269
  direction: "ABOVE" | "BELOW";
1170
1270
  threshold: number;
@@ -1172,7 +1272,7 @@ declare class Core {
1172
1272
  } | {
1173
1273
  type: "index_v1";
1174
1274
  data: {
1175
- priceSource: "mid" | "mark";
1275
+ priceSource: "mark" | "mid";
1176
1276
  basket: {
1177
1277
  symbol: string;
1178
1278
  weight: number;
@@ -1183,7 +1283,7 @@ declare class Core {
1183
1283
  } | {
1184
1284
  type: "weighted_ratio_v1";
1185
1285
  data: {
1186
- priceSource: "mid" | "mark";
1286
+ priceSource: "mark" | "mid";
1187
1287
  basket: {
1188
1288
  symbol: string;
1189
1289
  side: "BUY" | "SELL";
@@ -1195,21 +1295,21 @@ declare class Core {
1195
1295
  } | {
1196
1296
  type: "position_value_v1";
1197
1297
  data: {
1198
- priceSource: "mid" | "mark";
1298
+ priceSource: "mark" | "mid";
1199
1299
  direction: "ABOVE" | "BELOW";
1200
1300
  threshold: number;
1201
1301
  };
1202
1302
  } | {
1203
1303
  type: "position_upnl_value_v1";
1204
1304
  data: {
1205
- priceSource: "mid" | "mark";
1305
+ priceSource: "mark" | "mid";
1206
1306
  direction: "ABOVE" | "BELOW";
1207
1307
  threshold: number;
1208
1308
  };
1209
1309
  } | {
1210
1310
  type: "position_upnl_percentage_v1";
1211
1311
  data: {
1212
- priceSource: "mid" | "mark";
1312
+ priceSource: "mark" | "mid";
1213
1313
  direction: "ABOVE" | "BELOW";
1214
1314
  threshold_bps: number;
1215
1315
  };
@@ -1218,28 +1318,39 @@ declare class Core {
1218
1318
  type: "MARKET";
1219
1319
  position: {
1220
1320
  id: string;
1221
- initialExposure: Record<string, string>;
1321
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1222
1322
  };
1223
1323
  };
1224
1324
  triggeredAt?: string | undefined;
1225
1325
  cancelledAt?: string | undefined;
1226
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1326
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1227
1327
  fills?: {
1228
1328
  id: string;
1329
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1229
1330
  tradeAccountId: string;
1230
1331
  symbol: string;
1231
1332
  positionId: string;
1232
1333
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1233
1334
  side: "BUY" | "SELL";
1234
1335
  reduceOnly: boolean;
1336
+ isExternal: boolean;
1235
1337
  quantity: string;
1236
1338
  price: string;
1237
1339
  usd: string;
1238
1340
  timestamp: string;
1239
1341
  cloid?: string | undefined;
1240
- 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;
1241
1349
  }[] | undefined;
1242
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1350
+ trailing?: {
1351
+ deltaValue: number;
1352
+ activationValue: number;
1353
+ } | undefined;
1243
1354
  })[];
1244
1355
  }>;
1245
1356
  open: (body: HttpTypes.CreateTriggerOpen, headers?: ClientHeaders) => Promise<{
@@ -1248,6 +1359,7 @@ declare class Core {
1248
1359
  tradeAccountId: string;
1249
1360
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1250
1361
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1362
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1251
1363
  createdAt: string;
1252
1364
  updatedAt: string;
1253
1365
  intent: "OPEN";
@@ -1255,7 +1367,7 @@ declare class Core {
1255
1367
  condition: {
1256
1368
  type: "ratio_v1";
1257
1369
  data: {
1258
- priceSource: "mid" | "mark";
1370
+ priceSource: "mark" | "mid";
1259
1371
  symbol_a: string;
1260
1372
  symbol_b: string;
1261
1373
  direction: "ABOVE" | "BELOW";
@@ -1264,7 +1376,7 @@ declare class Core {
1264
1376
  } | {
1265
1377
  type: "price_v1";
1266
1378
  data: {
1267
- priceSource: "mid" | "mark";
1379
+ priceSource: "mark" | "mid";
1268
1380
  symbol: string;
1269
1381
  direction: "ABOVE" | "BELOW";
1270
1382
  threshold: number;
@@ -1272,7 +1384,7 @@ declare class Core {
1272
1384
  } | {
1273
1385
  type: "index_v1";
1274
1386
  data: {
1275
- priceSource: "mid" | "mark";
1387
+ priceSource: "mark" | "mid";
1276
1388
  basket: {
1277
1389
  symbol: string;
1278
1390
  weight: number;
@@ -1283,7 +1395,7 @@ declare class Core {
1283
1395
  } | {
1284
1396
  type: "weighted_ratio_v1";
1285
1397
  data: {
1286
- priceSource: "mid" | "mark";
1398
+ priceSource: "mark" | "mid";
1287
1399
  basket: {
1288
1400
  symbol: string;
1289
1401
  side: "BUY" | "SELL";
@@ -1309,28 +1421,36 @@ declare class Core {
1309
1421
  };
1310
1422
  triggeredAt?: string | undefined;
1311
1423
  cancelledAt?: string | undefined;
1312
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1424
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1313
1425
  fills?: {
1314
1426
  id: string;
1427
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1315
1428
  tradeAccountId: string;
1316
1429
  symbol: string;
1317
1430
  positionId: string;
1318
1431
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1319
1432
  side: "BUY" | "SELL";
1320
1433
  reduceOnly: boolean;
1434
+ isExternal: boolean;
1321
1435
  quantity: string;
1322
1436
  price: string;
1323
1437
  usd: string;
1324
1438
  timestamp: string;
1325
1439
  cloid?: string | undefined;
1326
- 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;
1327
1447
  }[] | undefined;
1328
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1329
1448
  } | {
1330
1449
  id: string;
1331
1450
  tradeAccountId: string;
1332
1451
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1333
1452
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1453
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1334
1454
  createdAt: string;
1335
1455
  updatedAt: string;
1336
1456
  intent: "ADJUST";
@@ -1338,7 +1458,7 @@ declare class Core {
1338
1458
  condition: {
1339
1459
  type: "ratio_v1";
1340
1460
  data: {
1341
- priceSource: "mid" | "mark";
1461
+ priceSource: "mark" | "mid";
1342
1462
  symbol_a: string;
1343
1463
  symbol_b: string;
1344
1464
  direction: "ABOVE" | "BELOW";
@@ -1347,7 +1467,7 @@ declare class Core {
1347
1467
  } | {
1348
1468
  type: "price_v1";
1349
1469
  data: {
1350
- priceSource: "mid" | "mark";
1470
+ priceSource: "mark" | "mid";
1351
1471
  symbol: string;
1352
1472
  direction: "ABOVE" | "BELOW";
1353
1473
  threshold: number;
@@ -1355,7 +1475,7 @@ declare class Core {
1355
1475
  } | {
1356
1476
  type: "index_v1";
1357
1477
  data: {
1358
- priceSource: "mid" | "mark";
1478
+ priceSource: "mark" | "mid";
1359
1479
  basket: {
1360
1480
  symbol: string;
1361
1481
  weight: number;
@@ -1366,7 +1486,7 @@ declare class Core {
1366
1486
  } | {
1367
1487
  type: "weighted_ratio_v1";
1368
1488
  data: {
1369
- priceSource: "mid" | "mark";
1489
+ priceSource: "mark" | "mid";
1370
1490
  basket: {
1371
1491
  symbol: string;
1372
1492
  side: "BUY" | "SELL";
@@ -1378,21 +1498,21 @@ declare class Core {
1378
1498
  } | {
1379
1499
  type: "position_value_v1";
1380
1500
  data: {
1381
- priceSource: "mid" | "mark";
1501
+ priceSource: "mark" | "mid";
1382
1502
  direction: "ABOVE" | "BELOW";
1383
1503
  threshold: number;
1384
1504
  };
1385
1505
  } | {
1386
1506
  type: "position_upnl_value_v1";
1387
1507
  data: {
1388
- priceSource: "mid" | "mark";
1508
+ priceSource: "mark" | "mid";
1389
1509
  direction: "ABOVE" | "BELOW";
1390
1510
  threshold: number;
1391
1511
  };
1392
1512
  } | {
1393
1513
  type: "position_upnl_percentage_v1";
1394
1514
  data: {
1395
- priceSource: "mid" | "mark";
1515
+ priceSource: "mark" | "mid";
1396
1516
  direction: "ABOVE" | "BELOW";
1397
1517
  threshold_bps: number;
1398
1518
  };
@@ -1401,7 +1521,7 @@ declare class Core {
1401
1521
  type: "MARKET";
1402
1522
  position: {
1403
1523
  id: string;
1404
- initialExposure: Record<string, string>;
1524
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1405
1525
  };
1406
1526
  legs: [{
1407
1527
  symbol: string;
@@ -1419,28 +1539,40 @@ declare class Core {
1419
1539
  };
1420
1540
  triggeredAt?: string | undefined;
1421
1541
  cancelledAt?: string | undefined;
1422
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1542
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1423
1543
  fills?: {
1424
1544
  id: string;
1545
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1425
1546
  tradeAccountId: string;
1426
1547
  symbol: string;
1427
1548
  positionId: string;
1428
1549
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1429
1550
  side: "BUY" | "SELL";
1430
1551
  reduceOnly: boolean;
1552
+ isExternal: boolean;
1431
1553
  quantity: string;
1432
1554
  price: string;
1433
1555
  usd: string;
1434
1556
  timestamp: string;
1435
1557
  cloid?: string | undefined;
1436
- 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;
1437
1565
  }[] | undefined;
1438
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1566
+ trailing?: {
1567
+ deltaValue: number;
1568
+ activationValue: number;
1569
+ } | undefined;
1439
1570
  } | {
1440
1571
  id: string;
1441
1572
  tradeAccountId: string;
1442
1573
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1443
1574
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1575
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1444
1576
  createdAt: string;
1445
1577
  updatedAt: string;
1446
1578
  intent: "CLOSE";
@@ -1448,7 +1580,7 @@ declare class Core {
1448
1580
  condition: {
1449
1581
  type: "ratio_v1";
1450
1582
  data: {
1451
- priceSource: "mid" | "mark";
1583
+ priceSource: "mark" | "mid";
1452
1584
  symbol_a: string;
1453
1585
  symbol_b: string;
1454
1586
  direction: "ABOVE" | "BELOW";
@@ -1457,7 +1589,7 @@ declare class Core {
1457
1589
  } | {
1458
1590
  type: "price_v1";
1459
1591
  data: {
1460
- priceSource: "mid" | "mark";
1592
+ priceSource: "mark" | "mid";
1461
1593
  symbol: string;
1462
1594
  direction: "ABOVE" | "BELOW";
1463
1595
  threshold: number;
@@ -1465,7 +1597,7 @@ declare class Core {
1465
1597
  } | {
1466
1598
  type: "index_v1";
1467
1599
  data: {
1468
- priceSource: "mid" | "mark";
1600
+ priceSource: "mark" | "mid";
1469
1601
  basket: {
1470
1602
  symbol: string;
1471
1603
  weight: number;
@@ -1476,7 +1608,7 @@ declare class Core {
1476
1608
  } | {
1477
1609
  type: "weighted_ratio_v1";
1478
1610
  data: {
1479
- priceSource: "mid" | "mark";
1611
+ priceSource: "mark" | "mid";
1480
1612
  basket: {
1481
1613
  symbol: string;
1482
1614
  side: "BUY" | "SELL";
@@ -1488,21 +1620,21 @@ declare class Core {
1488
1620
  } | {
1489
1621
  type: "position_value_v1";
1490
1622
  data: {
1491
- priceSource: "mid" | "mark";
1623
+ priceSource: "mark" | "mid";
1492
1624
  direction: "ABOVE" | "BELOW";
1493
1625
  threshold: number;
1494
1626
  };
1495
1627
  } | {
1496
1628
  type: "position_upnl_value_v1";
1497
1629
  data: {
1498
- priceSource: "mid" | "mark";
1630
+ priceSource: "mark" | "mid";
1499
1631
  direction: "ABOVE" | "BELOW";
1500
1632
  threshold: number;
1501
1633
  };
1502
1634
  } | {
1503
1635
  type: "position_upnl_percentage_v1";
1504
1636
  data: {
1505
- priceSource: "mid" | "mark";
1637
+ priceSource: "mark" | "mid";
1506
1638
  direction: "ABOVE" | "BELOW";
1507
1639
  threshold_bps: number;
1508
1640
  };
@@ -1511,28 +1643,39 @@ declare class Core {
1511
1643
  type: "MARKET";
1512
1644
  position: {
1513
1645
  id: string;
1514
- initialExposure: Record<string, string>;
1646
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1515
1647
  };
1516
1648
  };
1517
1649
  triggeredAt?: string | undefined;
1518
1650
  cancelledAt?: string | undefined;
1519
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1651
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1520
1652
  fills?: {
1521
1653
  id: string;
1654
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1522
1655
  tradeAccountId: string;
1523
1656
  symbol: string;
1524
1657
  positionId: string;
1525
1658
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1526
1659
  side: "BUY" | "SELL";
1527
1660
  reduceOnly: boolean;
1661
+ isExternal: boolean;
1528
1662
  quantity: string;
1529
1663
  price: string;
1530
1664
  usd: string;
1531
1665
  timestamp: string;
1532
1666
  cloid?: string | undefined;
1533
- 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;
1534
1674
  }[] | undefined;
1535
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1675
+ trailing?: {
1676
+ deltaValue: number;
1677
+ activationValue: number;
1678
+ } | undefined;
1536
1679
  };
1537
1680
  }>;
1538
1681
  close: (body: HttpTypes.CreateTriggerClose, headers?: ClientHeaders) => Promise<{
@@ -1541,6 +1684,7 @@ declare class Core {
1541
1684
  tradeAccountId: string;
1542
1685
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1543
1686
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1687
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1544
1688
  createdAt: string;
1545
1689
  updatedAt: string;
1546
1690
  intent: "OPEN";
@@ -1548,7 +1692,7 @@ declare class Core {
1548
1692
  condition: {
1549
1693
  type: "ratio_v1";
1550
1694
  data: {
1551
- priceSource: "mid" | "mark";
1695
+ priceSource: "mark" | "mid";
1552
1696
  symbol_a: string;
1553
1697
  symbol_b: string;
1554
1698
  direction: "ABOVE" | "BELOW";
@@ -1557,7 +1701,7 @@ declare class Core {
1557
1701
  } | {
1558
1702
  type: "price_v1";
1559
1703
  data: {
1560
- priceSource: "mid" | "mark";
1704
+ priceSource: "mark" | "mid";
1561
1705
  symbol: string;
1562
1706
  direction: "ABOVE" | "BELOW";
1563
1707
  threshold: number;
@@ -1565,7 +1709,7 @@ declare class Core {
1565
1709
  } | {
1566
1710
  type: "index_v1";
1567
1711
  data: {
1568
- priceSource: "mid" | "mark";
1712
+ priceSource: "mark" | "mid";
1569
1713
  basket: {
1570
1714
  symbol: string;
1571
1715
  weight: number;
@@ -1576,7 +1720,7 @@ declare class Core {
1576
1720
  } | {
1577
1721
  type: "weighted_ratio_v1";
1578
1722
  data: {
1579
- priceSource: "mid" | "mark";
1723
+ priceSource: "mark" | "mid";
1580
1724
  basket: {
1581
1725
  symbol: string;
1582
1726
  side: "BUY" | "SELL";
@@ -1602,28 +1746,36 @@ declare class Core {
1602
1746
  };
1603
1747
  triggeredAt?: string | undefined;
1604
1748
  cancelledAt?: string | undefined;
1605
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1749
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1606
1750
  fills?: {
1607
1751
  id: string;
1752
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1608
1753
  tradeAccountId: string;
1609
1754
  symbol: string;
1610
1755
  positionId: string;
1611
1756
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1612
1757
  side: "BUY" | "SELL";
1613
1758
  reduceOnly: boolean;
1759
+ isExternal: boolean;
1614
1760
  quantity: string;
1615
1761
  price: string;
1616
1762
  usd: string;
1617
1763
  timestamp: string;
1618
1764
  cloid?: string | undefined;
1619
- 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;
1620
1772
  }[] | undefined;
1621
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1622
1773
  } | {
1623
1774
  id: string;
1624
1775
  tradeAccountId: string;
1625
1776
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1626
1777
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1778
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1627
1779
  createdAt: string;
1628
1780
  updatedAt: string;
1629
1781
  intent: "ADJUST";
@@ -1631,7 +1783,7 @@ declare class Core {
1631
1783
  condition: {
1632
1784
  type: "ratio_v1";
1633
1785
  data: {
1634
- priceSource: "mid" | "mark";
1786
+ priceSource: "mark" | "mid";
1635
1787
  symbol_a: string;
1636
1788
  symbol_b: string;
1637
1789
  direction: "ABOVE" | "BELOW";
@@ -1640,7 +1792,7 @@ declare class Core {
1640
1792
  } | {
1641
1793
  type: "price_v1";
1642
1794
  data: {
1643
- priceSource: "mid" | "mark";
1795
+ priceSource: "mark" | "mid";
1644
1796
  symbol: string;
1645
1797
  direction: "ABOVE" | "BELOW";
1646
1798
  threshold: number;
@@ -1648,7 +1800,7 @@ declare class Core {
1648
1800
  } | {
1649
1801
  type: "index_v1";
1650
1802
  data: {
1651
- priceSource: "mid" | "mark";
1803
+ priceSource: "mark" | "mid";
1652
1804
  basket: {
1653
1805
  symbol: string;
1654
1806
  weight: number;
@@ -1659,7 +1811,7 @@ declare class Core {
1659
1811
  } | {
1660
1812
  type: "weighted_ratio_v1";
1661
1813
  data: {
1662
- priceSource: "mid" | "mark";
1814
+ priceSource: "mark" | "mid";
1663
1815
  basket: {
1664
1816
  symbol: string;
1665
1817
  side: "BUY" | "SELL";
@@ -1671,21 +1823,21 @@ declare class Core {
1671
1823
  } | {
1672
1824
  type: "position_value_v1";
1673
1825
  data: {
1674
- priceSource: "mid" | "mark";
1826
+ priceSource: "mark" | "mid";
1675
1827
  direction: "ABOVE" | "BELOW";
1676
1828
  threshold: number;
1677
1829
  };
1678
1830
  } | {
1679
1831
  type: "position_upnl_value_v1";
1680
1832
  data: {
1681
- priceSource: "mid" | "mark";
1833
+ priceSource: "mark" | "mid";
1682
1834
  direction: "ABOVE" | "BELOW";
1683
1835
  threshold: number;
1684
1836
  };
1685
1837
  } | {
1686
1838
  type: "position_upnl_percentage_v1";
1687
1839
  data: {
1688
- priceSource: "mid" | "mark";
1840
+ priceSource: "mark" | "mid";
1689
1841
  direction: "ABOVE" | "BELOW";
1690
1842
  threshold_bps: number;
1691
1843
  };
@@ -1694,7 +1846,7 @@ declare class Core {
1694
1846
  type: "MARKET";
1695
1847
  position: {
1696
1848
  id: string;
1697
- initialExposure: Record<string, string>;
1849
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1698
1850
  };
1699
1851
  legs: [{
1700
1852
  symbol: string;
@@ -1712,28 +1864,40 @@ declare class Core {
1712
1864
  };
1713
1865
  triggeredAt?: string | undefined;
1714
1866
  cancelledAt?: string | undefined;
1715
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1867
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1716
1868
  fills?: {
1717
1869
  id: string;
1870
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1718
1871
  tradeAccountId: string;
1719
1872
  symbol: string;
1720
1873
  positionId: string;
1721
1874
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1722
1875
  side: "BUY" | "SELL";
1723
1876
  reduceOnly: boolean;
1877
+ isExternal: boolean;
1724
1878
  quantity: string;
1725
1879
  price: string;
1726
1880
  usd: string;
1727
1881
  timestamp: string;
1728
1882
  cloid?: string | undefined;
1729
- 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;
1730
1890
  }[] | undefined;
1731
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
1891
+ trailing?: {
1892
+ deltaValue: number;
1893
+ activationValue: number;
1894
+ } | undefined;
1732
1895
  } | {
1733
1896
  id: string;
1734
1897
  tradeAccountId: string;
1735
1898
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1736
1899
  status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
1900
+ bracketType: "STOP_LOSS" | "TAKE_PROFIT" | "NONE";
1737
1901
  createdAt: string;
1738
1902
  updatedAt: string;
1739
1903
  intent: "CLOSE";
@@ -1741,7 +1905,7 @@ declare class Core {
1741
1905
  condition: {
1742
1906
  type: "ratio_v1";
1743
1907
  data: {
1744
- priceSource: "mid" | "mark";
1908
+ priceSource: "mark" | "mid";
1745
1909
  symbol_a: string;
1746
1910
  symbol_b: string;
1747
1911
  direction: "ABOVE" | "BELOW";
@@ -1750,7 +1914,7 @@ declare class Core {
1750
1914
  } | {
1751
1915
  type: "price_v1";
1752
1916
  data: {
1753
- priceSource: "mid" | "mark";
1917
+ priceSource: "mark" | "mid";
1754
1918
  symbol: string;
1755
1919
  direction: "ABOVE" | "BELOW";
1756
1920
  threshold: number;
@@ -1758,7 +1922,7 @@ declare class Core {
1758
1922
  } | {
1759
1923
  type: "index_v1";
1760
1924
  data: {
1761
- priceSource: "mid" | "mark";
1925
+ priceSource: "mark" | "mid";
1762
1926
  basket: {
1763
1927
  symbol: string;
1764
1928
  weight: number;
@@ -1769,7 +1933,7 @@ declare class Core {
1769
1933
  } | {
1770
1934
  type: "weighted_ratio_v1";
1771
1935
  data: {
1772
- priceSource: "mid" | "mark";
1936
+ priceSource: "mark" | "mid";
1773
1937
  basket: {
1774
1938
  symbol: string;
1775
1939
  side: "BUY" | "SELL";
@@ -1781,21 +1945,21 @@ declare class Core {
1781
1945
  } | {
1782
1946
  type: "position_value_v1";
1783
1947
  data: {
1784
- priceSource: "mid" | "mark";
1948
+ priceSource: "mark" | "mid";
1785
1949
  direction: "ABOVE" | "BELOW";
1786
1950
  threshold: number;
1787
1951
  };
1788
1952
  } | {
1789
1953
  type: "position_upnl_value_v1";
1790
1954
  data: {
1791
- priceSource: "mid" | "mark";
1955
+ priceSource: "mark" | "mid";
1792
1956
  direction: "ABOVE" | "BELOW";
1793
1957
  threshold: number;
1794
1958
  };
1795
1959
  } | {
1796
1960
  type: "position_upnl_percentage_v1";
1797
1961
  data: {
1798
- priceSource: "mid" | "mark";
1962
+ priceSource: "mark" | "mid";
1799
1963
  direction: "ABOVE" | "BELOW";
1800
1964
  threshold_bps: number;
1801
1965
  };
@@ -1804,28 +1968,39 @@ declare class Core {
1804
1968
  type: "MARKET";
1805
1969
  position: {
1806
1970
  id: string;
1807
- initialExposure: Record<string, string>;
1971
+ initialExposure: Record<string, `-${string}` | `+${string}`>;
1808
1972
  };
1809
1973
  };
1810
1974
  triggeredAt?: string | undefined;
1811
1975
  cancelledAt?: string | undefined;
1812
- cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | undefined;
1976
+ cancelledReason?: "USER" | "POSITION_CLOSED" | "SYSTEM" | "POSITION_NETTED" | undefined;
1813
1977
  fills?: {
1814
1978
  id: string;
1979
+ status: "PROVISIONAL" | "CONFIRMED" | "RECONCILED";
1815
1980
  tradeAccountId: string;
1816
1981
  symbol: string;
1817
1982
  positionId: string;
1818
1983
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
1819
1984
  side: "BUY" | "SELL";
1820
1985
  reduceOnly: boolean;
1986
+ isExternal: boolean;
1821
1987
  quantity: string;
1822
1988
  price: string;
1823
1989
  usd: string;
1824
1990
  timestamp: string;
1825
1991
  cloid?: string | undefined;
1826
- 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;
1827
1999
  }[] | undefined;
1828
- bracketType?: "STOP_LOSS" | "TAKE_PROFIT" | undefined;
2000
+ trailing?: {
2001
+ deltaValue: number;
2002
+ activationValue: number;
2003
+ } | undefined;
1829
2004
  };
1830
2005
  }>;
1831
2006
  cancel: (triggerId: string, headers?: ClientHeaders) => Promise<{
@@ -1883,15 +2058,23 @@ declare class Core {
1883
2058
  };
1884
2059
  };
1885
2060
  statistics: {
1886
- daily: (query: HttpTypes.DailyStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
2061
+ volume: (query: HttpTypes.VolumeStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
1887
2062
  data: {
1888
- date: string;
2063
+ timestamp: number;
1889
2064
  volume: number;
1890
2065
  fees: number;
2066
+ trades: number;
1891
2067
  users: number;
1892
2068
  newUsers: number;
1893
2069
  }[];
1894
2070
  }>;
2071
+ oi: (query: HttpTypes.OiStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
2072
+ data: {
2073
+ timestamp: number;
2074
+ openInterest: number;
2075
+ openPositions: number;
2076
+ }[];
2077
+ }>;
1895
2078
  };
1896
2079
  }
1897
2080