pmxtjs 2.50.16 → 2.51.1

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.
@@ -673,6 +673,7 @@ export declare const BuildOrderOperationExchangeEnum: {
673
673
  readonly Hyperliquid: "hyperliquid";
674
674
  readonly Suibets: "suibets";
675
675
  readonly Rain: "rain";
676
+ readonly Hunch: "hunch";
676
677
  readonly Mock: "mock";
677
678
  readonly Router: "router";
678
679
  };
@@ -696,6 +697,7 @@ export declare const CancelOrderOperationExchangeEnum: {
696
697
  readonly Hyperliquid: "hyperliquid";
697
698
  readonly Suibets: "suibets";
698
699
  readonly Rain: "rain";
700
+ readonly Hunch: "hunch";
699
701
  readonly Mock: "mock";
700
702
  readonly Router: "router";
701
703
  };
@@ -719,6 +721,7 @@ export declare const CloseOperationExchangeEnum: {
719
721
  readonly Hyperliquid: "hyperliquid";
720
722
  readonly Suibets: "suibets";
721
723
  readonly Rain: "rain";
724
+ readonly Hunch: "hunch";
722
725
  readonly Mock: "mock";
723
726
  readonly Router: "router";
724
727
  };
@@ -749,6 +752,7 @@ export declare const CreateOrderOperationExchangeEnum: {
749
752
  readonly Hyperliquid: "hyperliquid";
750
753
  readonly Suibets: "suibets";
751
754
  readonly Rain: "rain";
755
+ readonly Hunch: "hunch";
752
756
  readonly Mock: "mock";
753
757
  readonly Router: "router";
754
758
  };
@@ -772,6 +776,7 @@ export declare const FetchAllOrdersExchangeEnum: {
772
776
  readonly Hyperliquid: "hyperliquid";
773
777
  readonly Suibets: "suibets";
774
778
  readonly Rain: "rain";
779
+ readonly Hunch: "hunch";
775
780
  readonly Mock: "mock";
776
781
  readonly Router: "router";
777
782
  };
@@ -814,6 +819,7 @@ export declare const FetchBalanceExchangeEnum: {
814
819
  readonly Hyperliquid: "hyperliquid";
815
820
  readonly Suibets: "suibets";
816
821
  readonly Rain: "rain";
822
+ readonly Hunch: "hunch";
817
823
  readonly Mock: "mock";
818
824
  readonly Router: "router";
819
825
  };
@@ -837,6 +843,7 @@ export declare const FetchClosedOrdersExchangeEnum: {
837
843
  readonly Hyperliquid: "hyperliquid";
838
844
  readonly Suibets: "suibets";
839
845
  readonly Rain: "rain";
846
+ readonly Hunch: "hunch";
840
847
  readonly Mock: "mock";
841
848
  readonly Router: "router";
842
849
  };
@@ -860,6 +867,7 @@ export declare const FetchEventExchangeEnum: {
860
867
  readonly Hyperliquid: "hyperliquid";
861
868
  readonly Suibets: "suibets";
862
869
  readonly Rain: "rain";
870
+ readonly Hunch: "hunch";
863
871
  readonly Mock: "mock";
864
872
  readonly Router: "router";
865
873
  };
@@ -930,6 +938,7 @@ export declare const FetchEventsExchangeEnum: {
930
938
  readonly Hyperliquid: "hyperliquid";
931
939
  readonly Suibets: "suibets";
932
940
  readonly Rain: "rain";
941
+ readonly Hunch: "hunch";
933
942
  readonly Mock: "mock";
934
943
  readonly Router: "router";
935
944
  };
@@ -981,6 +990,7 @@ export declare const FetchEventsPaginatedExchangeEnum: {
981
990
  readonly Hyperliquid: "hyperliquid";
982
991
  readonly Suibets: "suibets";
983
992
  readonly Rain: "rain";
993
+ readonly Hunch: "hunch";
984
994
  readonly Mock: "mock";
985
995
  readonly Router: "router";
986
996
  };
@@ -1032,6 +1042,7 @@ export declare const FetchMarketExchangeEnum: {
1032
1042
  readonly Hyperliquid: "hyperliquid";
1033
1043
  readonly Suibets: "suibets";
1034
1044
  readonly Rain: "rain";
1045
+ readonly Hunch: "hunch";
1035
1046
  readonly Mock: "mock";
1036
1047
  readonly Router: "router";
1037
1048
  };
@@ -1111,6 +1122,7 @@ export declare const FetchMarketsExchangeEnum: {
1111
1122
  readonly Hyperliquid: "hyperliquid";
1112
1123
  readonly Suibets: "suibets";
1113
1124
  readonly Rain: "rain";
1125
+ readonly Hunch: "hunch";
1114
1126
  readonly Mock: "mock";
1115
1127
  readonly Router: "router";
1116
1128
  };
@@ -1162,6 +1174,7 @@ export declare const FetchMarketsPaginatedExchangeEnum: {
1162
1174
  readonly Hyperliquid: "hyperliquid";
1163
1175
  readonly Suibets: "suibets";
1164
1176
  readonly Rain: "rain";
1177
+ readonly Hunch: "hunch";
1165
1178
  readonly Mock: "mock";
1166
1179
  readonly Router: "router";
1167
1180
  };
@@ -1223,6 +1236,7 @@ export declare const FetchMyTradesExchangeEnum: {
1223
1236
  readonly Hyperliquid: "hyperliquid";
1224
1237
  readonly Suibets: "suibets";
1225
1238
  readonly Rain: "rain";
1239
+ readonly Hunch: "hunch";
1226
1240
  readonly Mock: "mock";
1227
1241
  readonly Router: "router";
1228
1242
  };
@@ -1246,6 +1260,7 @@ export declare const FetchOHLCVExchangeEnum: {
1246
1260
  readonly Hyperliquid: "hyperliquid";
1247
1261
  readonly Suibets: "suibets";
1248
1262
  readonly Rain: "rain";
1263
+ readonly Hunch: "hunch";
1249
1264
  readonly Mock: "mock";
1250
1265
  readonly Router: "router";
1251
1266
  };
@@ -1269,6 +1284,7 @@ export declare const FetchOpenOrdersExchangeEnum: {
1269
1284
  readonly Hyperliquid: "hyperliquid";
1270
1285
  readonly Suibets: "suibets";
1271
1286
  readonly Rain: "rain";
1287
+ readonly Hunch: "hunch";
1272
1288
  readonly Mock: "mock";
1273
1289
  readonly Router: "router";
1274
1290
  };
@@ -1292,6 +1308,7 @@ export declare const FetchOrderExchangeEnum: {
1292
1308
  readonly Hyperliquid: "hyperliquid";
1293
1309
  readonly Suibets: "suibets";
1294
1310
  readonly Rain: "rain";
1311
+ readonly Hunch: "hunch";
1295
1312
  readonly Mock: "mock";
1296
1313
  readonly Router: "router";
1297
1314
  };
@@ -1315,6 +1332,7 @@ export declare const FetchOrderBookExchangeEnum: {
1315
1332
  readonly Hyperliquid: "hyperliquid";
1316
1333
  readonly Suibets: "suibets";
1317
1334
  readonly Rain: "rain";
1335
+ readonly Hunch: "hunch";
1318
1336
  readonly Mock: "mock";
1319
1337
  readonly Router: "router";
1320
1338
  };
@@ -1346,6 +1364,7 @@ export declare const FetchOrderBooksOperationExchangeEnum: {
1346
1364
  readonly Hyperliquid: "hyperliquid";
1347
1365
  readonly Suibets: "suibets";
1348
1366
  readonly Rain: "rain";
1367
+ readonly Hunch: "hunch";
1349
1368
  readonly Mock: "mock";
1350
1369
  readonly Router: "router";
1351
1370
  };
@@ -1369,6 +1388,7 @@ export declare const FetchPositionsExchangeEnum: {
1369
1388
  readonly Hyperliquid: "hyperliquid";
1370
1389
  readonly Suibets: "suibets";
1371
1390
  readonly Rain: "rain";
1391
+ readonly Hunch: "hunch";
1372
1392
  readonly Mock: "mock";
1373
1393
  readonly Router: "router";
1374
1394
  };
@@ -1420,6 +1440,7 @@ export declare const FetchSeriesExchangeEnum: {
1420
1440
  readonly Hyperliquid: "hyperliquid";
1421
1441
  readonly Suibets: "suibets";
1422
1442
  readonly Rain: "rain";
1443
+ readonly Hunch: "hunch";
1423
1444
  readonly Mock: "mock";
1424
1445
  readonly Router: "router";
1425
1446
  };
@@ -1443,6 +1464,7 @@ export declare const FetchTradesExchangeEnum: {
1443
1464
  readonly Hyperliquid: "hyperliquid";
1444
1465
  readonly Suibets: "suibets";
1445
1466
  readonly Rain: "rain";
1467
+ readonly Hunch: "hunch";
1446
1468
  readonly Mock: "mock";
1447
1469
  readonly Router: "router";
1448
1470
  };
@@ -1466,6 +1488,7 @@ export declare const FilterEventsOperationExchangeEnum: {
1466
1488
  readonly Hyperliquid: "hyperliquid";
1467
1489
  readonly Suibets: "suibets";
1468
1490
  readonly Rain: "rain";
1491
+ readonly Hunch: "hunch";
1469
1492
  readonly Mock: "mock";
1470
1493
  readonly Router: "router";
1471
1494
  };
@@ -1489,6 +1512,7 @@ export declare const FilterMarketsOperationExchangeEnum: {
1489
1512
  readonly Hyperliquid: "hyperliquid";
1490
1513
  readonly Suibets: "suibets";
1491
1514
  readonly Rain: "rain";
1515
+ readonly Hunch: "hunch";
1492
1516
  readonly Mock: "mock";
1493
1517
  readonly Router: "router";
1494
1518
  };
@@ -1512,6 +1536,7 @@ export declare const GetExecutionPriceOperationExchangeEnum: {
1512
1536
  readonly Hyperliquid: "hyperliquid";
1513
1537
  readonly Suibets: "suibets";
1514
1538
  readonly Rain: "rain";
1539
+ readonly Hunch: "hunch";
1515
1540
  readonly Mock: "mock";
1516
1541
  readonly Router: "router";
1517
1542
  };
@@ -1535,6 +1560,7 @@ export declare const GetExecutionPriceDetailedOperationExchangeEnum: {
1535
1560
  readonly Hyperliquid: "hyperliquid";
1536
1561
  readonly Suibets: "suibets";
1537
1562
  readonly Rain: "rain";
1563
+ readonly Hunch: "hunch";
1538
1564
  readonly Mock: "mock";
1539
1565
  readonly Router: "router";
1540
1566
  };
@@ -1558,6 +1584,7 @@ export declare const LoadMarketsOperationExchangeEnum: {
1558
1584
  readonly Hyperliquid: "hyperliquid";
1559
1585
  readonly Suibets: "suibets";
1560
1586
  readonly Rain: "rain";
1587
+ readonly Hunch: "hunch";
1561
1588
  readonly Mock: "mock";
1562
1589
  readonly Router: "router";
1563
1590
  };
@@ -1581,6 +1608,7 @@ export declare const SubmitOrderOperationExchangeEnum: {
1581
1608
  readonly Hyperliquid: "hyperliquid";
1582
1609
  readonly Suibets: "suibets";
1583
1610
  readonly Rain: "rain";
1611
+ readonly Hunch: "hunch";
1584
1612
  readonly Mock: "mock";
1585
1613
  readonly Router: "router";
1586
1614
  };
@@ -1565,6 +1565,7 @@ export const BuildOrderOperationExchangeEnum = {
1565
1565
  Hyperliquid: 'hyperliquid',
1566
1566
  Suibets: 'suibets',
1567
1567
  Rain: 'rain',
1568
+ Hunch: 'hunch',
1568
1569
  Mock: 'mock',
1569
1570
  Router: 'router'
1570
1571
  };
@@ -1587,6 +1588,7 @@ export const CancelOrderOperationExchangeEnum = {
1587
1588
  Hyperliquid: 'hyperliquid',
1588
1589
  Suibets: 'suibets',
1589
1590
  Rain: 'rain',
1591
+ Hunch: 'hunch',
1590
1592
  Mock: 'mock',
1591
1593
  Router: 'router'
1592
1594
  };
@@ -1609,6 +1611,7 @@ export const CloseOperationExchangeEnum = {
1609
1611
  Hyperliquid: 'hyperliquid',
1610
1612
  Suibets: 'suibets',
1611
1613
  Rain: 'rain',
1614
+ Hunch: 'hunch',
1612
1615
  Mock: 'mock',
1613
1616
  Router: 'router'
1614
1617
  };
@@ -1637,6 +1640,7 @@ export const CreateOrderOperationExchangeEnum = {
1637
1640
  Hyperliquid: 'hyperliquid',
1638
1641
  Suibets: 'suibets',
1639
1642
  Rain: 'rain',
1643
+ Hunch: 'hunch',
1640
1644
  Mock: 'mock',
1641
1645
  Router: 'router'
1642
1646
  };
@@ -1659,6 +1663,7 @@ export const FetchAllOrdersExchangeEnum = {
1659
1663
  Hyperliquid: 'hyperliquid',
1660
1664
  Suibets: 'suibets',
1661
1665
  Rain: 'rain',
1666
+ Hunch: 'hunch',
1662
1667
  Mock: 'mock',
1663
1668
  Router: 'router'
1664
1669
  };
@@ -1698,6 +1703,7 @@ export const FetchBalanceExchangeEnum = {
1698
1703
  Hyperliquid: 'hyperliquid',
1699
1704
  Suibets: 'suibets',
1700
1705
  Rain: 'rain',
1706
+ Hunch: 'hunch',
1701
1707
  Mock: 'mock',
1702
1708
  Router: 'router'
1703
1709
  };
@@ -1720,6 +1726,7 @@ export const FetchClosedOrdersExchangeEnum = {
1720
1726
  Hyperliquid: 'hyperliquid',
1721
1727
  Suibets: 'suibets',
1722
1728
  Rain: 'rain',
1729
+ Hunch: 'hunch',
1723
1730
  Mock: 'mock',
1724
1731
  Router: 'router'
1725
1732
  };
@@ -1742,6 +1749,7 @@ export const FetchEventExchangeEnum = {
1742
1749
  Hyperliquid: 'hyperliquid',
1743
1750
  Suibets: 'suibets',
1744
1751
  Rain: 'rain',
1752
+ Hunch: 'hunch',
1745
1753
  Mock: 'mock',
1746
1754
  Router: 'router'
1747
1755
  };
@@ -1806,6 +1814,7 @@ export const FetchEventsExchangeEnum = {
1806
1814
  Hyperliquid: 'hyperliquid',
1807
1815
  Suibets: 'suibets',
1808
1816
  Rain: 'rain',
1817
+ Hunch: 'hunch',
1809
1818
  Mock: 'mock',
1810
1819
  Router: 'router'
1811
1820
  };
@@ -1853,6 +1862,7 @@ export const FetchEventsPaginatedExchangeEnum = {
1853
1862
  Hyperliquid: 'hyperliquid',
1854
1863
  Suibets: 'suibets',
1855
1864
  Rain: 'rain',
1865
+ Hunch: 'hunch',
1856
1866
  Mock: 'mock',
1857
1867
  Router: 'router'
1858
1868
  };
@@ -1900,6 +1910,7 @@ export const FetchMarketExchangeEnum = {
1900
1910
  Hyperliquid: 'hyperliquid',
1901
1911
  Suibets: 'suibets',
1902
1912
  Rain: 'rain',
1913
+ Hunch: 'hunch',
1903
1914
  Mock: 'mock',
1904
1915
  Router: 'router'
1905
1916
  };
@@ -1972,6 +1983,7 @@ export const FetchMarketsExchangeEnum = {
1972
1983
  Hyperliquid: 'hyperliquid',
1973
1984
  Suibets: 'suibets',
1974
1985
  Rain: 'rain',
1986
+ Hunch: 'hunch',
1975
1987
  Mock: 'mock',
1976
1988
  Router: 'router'
1977
1989
  };
@@ -2019,6 +2031,7 @@ export const FetchMarketsPaginatedExchangeEnum = {
2019
2031
  Hyperliquid: 'hyperliquid',
2020
2032
  Suibets: 'suibets',
2021
2033
  Rain: 'rain',
2034
+ Hunch: 'hunch',
2022
2035
  Mock: 'mock',
2023
2036
  Router: 'router'
2024
2037
  };
@@ -2075,6 +2088,7 @@ export const FetchMyTradesExchangeEnum = {
2075
2088
  Hyperliquid: 'hyperliquid',
2076
2089
  Suibets: 'suibets',
2077
2090
  Rain: 'rain',
2091
+ Hunch: 'hunch',
2078
2092
  Mock: 'mock',
2079
2093
  Router: 'router'
2080
2094
  };
@@ -2097,6 +2111,7 @@ export const FetchOHLCVExchangeEnum = {
2097
2111
  Hyperliquid: 'hyperliquid',
2098
2112
  Suibets: 'suibets',
2099
2113
  Rain: 'rain',
2114
+ Hunch: 'hunch',
2100
2115
  Mock: 'mock',
2101
2116
  Router: 'router'
2102
2117
  };
@@ -2119,6 +2134,7 @@ export const FetchOpenOrdersExchangeEnum = {
2119
2134
  Hyperliquid: 'hyperliquid',
2120
2135
  Suibets: 'suibets',
2121
2136
  Rain: 'rain',
2137
+ Hunch: 'hunch',
2122
2138
  Mock: 'mock',
2123
2139
  Router: 'router'
2124
2140
  };
@@ -2141,6 +2157,7 @@ export const FetchOrderExchangeEnum = {
2141
2157
  Hyperliquid: 'hyperliquid',
2142
2158
  Suibets: 'suibets',
2143
2159
  Rain: 'rain',
2160
+ Hunch: 'hunch',
2144
2161
  Mock: 'mock',
2145
2162
  Router: 'router'
2146
2163
  };
@@ -2163,6 +2180,7 @@ export const FetchOrderBookExchangeEnum = {
2163
2180
  Hyperliquid: 'hyperliquid',
2164
2181
  Suibets: 'suibets',
2165
2182
  Rain: 'rain',
2183
+ Hunch: 'hunch',
2166
2184
  Mock: 'mock',
2167
2185
  Router: 'router'
2168
2186
  };
@@ -2192,6 +2210,7 @@ export const FetchOrderBooksOperationExchangeEnum = {
2192
2210
  Hyperliquid: 'hyperliquid',
2193
2211
  Suibets: 'suibets',
2194
2212
  Rain: 'rain',
2213
+ Hunch: 'hunch',
2195
2214
  Mock: 'mock',
2196
2215
  Router: 'router'
2197
2216
  };
@@ -2214,6 +2233,7 @@ export const FetchPositionsExchangeEnum = {
2214
2233
  Hyperliquid: 'hyperliquid',
2215
2234
  Suibets: 'suibets',
2216
2235
  Rain: 'rain',
2236
+ Hunch: 'hunch',
2217
2237
  Mock: 'mock',
2218
2238
  Router: 'router'
2219
2239
  };
@@ -2261,6 +2281,7 @@ export const FetchSeriesExchangeEnum = {
2261
2281
  Hyperliquid: 'hyperliquid',
2262
2282
  Suibets: 'suibets',
2263
2283
  Rain: 'rain',
2284
+ Hunch: 'hunch',
2264
2285
  Mock: 'mock',
2265
2286
  Router: 'router'
2266
2287
  };
@@ -2283,6 +2304,7 @@ export const FetchTradesExchangeEnum = {
2283
2304
  Hyperliquid: 'hyperliquid',
2284
2305
  Suibets: 'suibets',
2285
2306
  Rain: 'rain',
2307
+ Hunch: 'hunch',
2286
2308
  Mock: 'mock',
2287
2309
  Router: 'router'
2288
2310
  };
@@ -2305,6 +2327,7 @@ export const FilterEventsOperationExchangeEnum = {
2305
2327
  Hyperliquid: 'hyperliquid',
2306
2328
  Suibets: 'suibets',
2307
2329
  Rain: 'rain',
2330
+ Hunch: 'hunch',
2308
2331
  Mock: 'mock',
2309
2332
  Router: 'router'
2310
2333
  };
@@ -2327,6 +2350,7 @@ export const FilterMarketsOperationExchangeEnum = {
2327
2350
  Hyperliquid: 'hyperliquid',
2328
2351
  Suibets: 'suibets',
2329
2352
  Rain: 'rain',
2353
+ Hunch: 'hunch',
2330
2354
  Mock: 'mock',
2331
2355
  Router: 'router'
2332
2356
  };
@@ -2349,6 +2373,7 @@ export const GetExecutionPriceOperationExchangeEnum = {
2349
2373
  Hyperliquid: 'hyperliquid',
2350
2374
  Suibets: 'suibets',
2351
2375
  Rain: 'rain',
2376
+ Hunch: 'hunch',
2352
2377
  Mock: 'mock',
2353
2378
  Router: 'router'
2354
2379
  };
@@ -2371,6 +2396,7 @@ export const GetExecutionPriceDetailedOperationExchangeEnum = {
2371
2396
  Hyperliquid: 'hyperliquid',
2372
2397
  Suibets: 'suibets',
2373
2398
  Rain: 'rain',
2399
+ Hunch: 'hunch',
2374
2400
  Mock: 'mock',
2375
2401
  Router: 'router'
2376
2402
  };
@@ -2393,6 +2419,7 @@ export const LoadMarketsOperationExchangeEnum = {
2393
2419
  Hyperliquid: 'hyperliquid',
2394
2420
  Suibets: 'suibets',
2395
2421
  Rain: 'rain',
2422
+ Hunch: 'hunch',
2396
2423
  Mock: 'mock',
2397
2424
  Router: 'router'
2398
2425
  };
@@ -2415,6 +2442,7 @@ export const SubmitOrderOperationExchangeEnum = {
2415
2442
  Hyperliquid: 'hyperliquid',
2416
2443
  Suibets: 'suibets',
2417
2444
  Rain: 'rain',
2445
+ Hunch: 'hunch',
2418
2446
  Mock: 'mock',
2419
2447
  Router: 'router'
2420
2448
  };
@@ -57,6 +57,18 @@ export interface UserTrade {
57
57
  * @memberof UserTrade
58
58
  */
59
59
  orderId?: string;
60
+ /**
61
+ * The market this trade belongs to, when the venue exposes it (e.g. derivable from the fill's coin/asset).
62
+ * @type {string}
63
+ * @memberof UserTrade
64
+ */
65
+ marketId?: string;
66
+ /**
67
+ * Trading fee paid by the user for this fill, when the venue exposes it.
68
+ * @type {number}
69
+ * @memberof UserTrade
70
+ */
71
+ fee?: number;
60
72
  /**
61
73
  * Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.
62
74
  * @type {string}
@@ -50,6 +50,8 @@ export function UserTradeFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'side': json['side'],
51
51
  'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
52
52
  'orderId': json['orderId'] == null ? undefined : json['orderId'],
53
+ 'marketId': json['marketId'] == null ? undefined : json['marketId'],
54
+ 'fee': json['fee'] == null ? undefined : json['fee'],
53
55
  'txHash': json['txHash'] == null ? undefined : json['txHash'],
54
56
  'chain': json['chain'] == null ? undefined : json['chain'],
55
57
  'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'],
@@ -70,6 +72,8 @@ export function UserTradeToJSONTyped(value, ignoreDiscriminator = false) {
70
72
  'side': value['side'],
71
73
  'outcomeId': value['outcomeId'],
72
74
  'orderId': value['orderId'],
75
+ 'marketId': value['marketId'],
76
+ 'fee': value['fee'],
73
77
  'txHash': value['txHash'],
74
78
  'chain': value['chain'],
75
79
  'blockNumber': value['blockNumber'],
@@ -5,7 +5,7 @@
5
5
  * OpenAPI client, matching the Python API exactly.
6
6
  */
7
7
  import { Configuration, DefaultApi, ExchangeCredentials } from "../generated/src/index.js";
8
- import { Balance, BuiltOrder, CreateOrderParams, EventFetchParams, EventFilterCriteria, EventFilterFunction, ExecutionPriceResult, FetchOrderBookParams, MarketFetchParams, MarketFilterCriteria, MarketFilterFunction, MarketOutcome, MyTradesParams, Order, OrderBook, OrderHistoryParams, PaginatedMarketsResult, Position, SeriesFetchParams, PriceCandle, SubscribedAddressSnapshot, SubscriptionOption, Trade, UnifiedEvent, UnifiedMarket, UnifiedSeries, UserTrade, FirehoseEvent, FetchMatchedMarketClustersParams } from "./models.js";
8
+ import { Balance, BuiltOrder, CreateOrderParams, EventFetchParams, EventFilterCriteria, EventFilterFunction, ExecutionPriceResult, FetchOrderBookParams, MarketFetchParams, MarketFilterCriteria, MarketFilterFunction, MarketOutcome, MyTradesParams, Order, OrderBook, OrderHistoryParams, PaginatedMarketsResult, PaginatedEventsResult, Position, SeriesFetchParams, PriceCandle, SubscribedAddressSnapshot, SubscriptionOption, Trade, UnifiedEvent, UnifiedMarket, UnifiedSeries, UserTrade, FirehoseEvent, FetchMatchedMarketClustersParams } from "./models.js";
9
9
  import { ServerManager } from "./server-manager.js";
10
10
  import type { Signer } from "./signers.js";
11
11
  import { Escrow } from "./escrow.js";
@@ -212,6 +212,7 @@ export declare abstract class Exchange {
212
212
  loadMarkets(reload?: boolean): Promise<Record<string, UnifiedMarket>>;
213
213
  fetchMarkets(params?: MarketFetchParams): Promise<UnifiedMarket[]>;
214
214
  fetchMarketsPaginated(params?: any): Promise<PaginatedMarketsResult>;
215
+ fetchEventsPaginated(params?: any): Promise<PaginatedEventsResult>;
215
216
  fetchEvents(params?: EventFetchParams): Promise<UnifiedEvent[]>;
216
217
  fetchSeries(params?: SeriesFetchParams): Promise<UnifiedSeries[]>;
217
218
  fetchMarket(params?: MarketFetchParams): Promise<UnifiedMarket>;
@@ -740,6 +740,38 @@ export class Exchange {
740
740
  throw new PmxtError(`Failed to fetchMarketsPaginated: ${error}`);
741
741
  }
742
742
  }
743
+ async fetchEventsPaginated(params) {
744
+ await this.initPromise;
745
+ try {
746
+ const args = [];
747
+ if (params !== undefined)
748
+ args.push(params);
749
+ const response = await this.fetchWithRetry(`${this.resolveBaseUrl()}/api/${this.exchangeName}/fetchEventsPaginated`, {
750
+ method: 'POST',
751
+ headers: { 'Content-Type': 'application/json', ...this.getAuthHeaders() },
752
+ body: JSON.stringify({ args, credentials: this.getCredentials() }),
753
+ });
754
+ if (!response.ok) {
755
+ const body = await response.json().catch(() => ({}));
756
+ if (body.error && typeof body.error === "object") {
757
+ throw fromServerError(body.error);
758
+ }
759
+ throw new PmxtError(body.error?.message || response.statusText);
760
+ }
761
+ const json = await response.json();
762
+ const data = this.handleResponse(json);
763
+ return {
764
+ data: (data.data || []).map(convertEvent),
765
+ total: data.total,
766
+ nextCursor: data.nextCursor,
767
+ };
768
+ }
769
+ catch (error) {
770
+ if (error instanceof PmxtError)
771
+ throw error;
772
+ throw new PmxtError(`Failed to fetchEventsPaginated: ${error}`);
773
+ }
774
+ }
743
775
  async fetchEvents(params) {
744
776
  await this.initPromise;
745
777
  try {
@@ -1567,7 +1599,7 @@ export class Exchange {
1567
1599
  paramsDict.limit = params.limit;
1568
1600
  }
1569
1601
  const args = [resolvedOutcomeId, paramsDict];
1570
- const query = { id: resolvedOutcomeId, ...paramsDict };
1602
+ const query = { outcomeId: resolvedOutcomeId, ...paramsDict };
1571
1603
  const json = await this.sidecarReadRequest('fetchOHLCV', query, args);
1572
1604
  const data = this.handleResponse(json);
1573
1605
  return data.map(convertCandle);
@@ -1605,7 +1637,7 @@ export class Exchange {
1605
1637
  paramsDict.end = params.end instanceof Date ? params.end.toISOString() : params.end;
1606
1638
  }
1607
1639
  const args = [resolvedOutcomeId, paramsDict];
1608
- const query = { id: resolvedOutcomeId, ...paramsDict };
1640
+ const query = { outcomeId: resolvedOutcomeId, ...paramsDict };
1609
1641
  const json = await this.sidecarReadRequest('fetchTrades', query, args);
1610
1642
  const data = this.handleResponse(json);
1611
1643
  return data.map(convertTrade);