pmxtjs 2.51.0 → 2.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +28 -0
- package/dist/esm/generated/src/apis/DefaultApi.js +28 -0
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.js +3 -2
- package/dist/esm/pmxt/client.d.ts +21 -3
- package/dist/esm/pmxt/client.js +48 -18
- package/dist/esm/pmxt/escrow.js +109 -10
- package/dist/esm/pmxt/server-manager.js +5 -3
- package/dist/generated/src/apis/DefaultApi.d.ts +28 -0
- package/dist/generated/src/apis/DefaultApi.js +28 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/pmxt/client.d.ts +21 -3
- package/dist/pmxt/client.js +48 -17
- package/dist/pmxt/escrow.js +109 -10
- package/dist/pmxt/server-manager.js +5 -3
- package/generated/docs/DefaultApi.md +56 -56
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +28 -0
- package/index.ts +3 -2
- package/package.json +2 -2
- package/pmxt/client.ts +61 -17
- package/pmxt/escrow.ts +131 -11
- package/pmxt/server-manager.ts +5 -3
|
@@ -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
|
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* console.log(markets[0].title);
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Rain, Mock } from "./pmxt/client.js";
|
|
20
|
+
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Rain, Hunch, Mock } from "./pmxt/client.js";
|
|
21
21
|
import { Router } from "./pmxt/router.js";
|
|
22
22
|
import { ServerManager } from "./pmxt/server-manager.js";
|
|
23
23
|
import { FeedClient } from "./pmxt/feed-client.js";
|
|
24
24
|
import * as models from "./pmxt/models.js";
|
|
25
25
|
import * as errors from "./pmxt/errors.js";
|
|
26
|
-
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Mock, PolymarketOptions } from "./pmxt/client.js";
|
|
26
|
+
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock, PolymarketOptions } from "./pmxt/client.js";
|
|
27
27
|
export { FeedClient } from "./pmxt/feed-client.js";
|
|
28
28
|
export type { Ticker, Tickers, OHLCV, Market as FeedMarket, OracleRound, FeedClientOptions } from "./pmxt/feed-client.js";
|
|
29
29
|
export { Router } from "./pmxt/router.js";
|
|
@@ -97,6 +97,7 @@ declare const pmxt: {
|
|
|
97
97
|
SuiBets: typeof SuiBets;
|
|
98
98
|
Suibets: typeof SuiBets;
|
|
99
99
|
Rain: typeof Rain;
|
|
100
|
+
Hunch: typeof Hunch;
|
|
100
101
|
Mock: typeof Mock;
|
|
101
102
|
Router: typeof Router;
|
|
102
103
|
ServerManager: typeof ServerManager;
|
package/dist/esm/index.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* console.log(markets[0].title);
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Mock } from "./pmxt/client.js";
|
|
20
|
+
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock } from "./pmxt/client.js";
|
|
21
21
|
import { Router } from "./pmxt/router.js";
|
|
22
22
|
import { ServerManager } from "./pmxt/server-manager.js";
|
|
23
23
|
import { FeedClient } from "./pmxt/feed-client.js";
|
|
24
24
|
import * as models from "./pmxt/models.js";
|
|
25
25
|
import * as errors from "./pmxt/errors.js";
|
|
26
|
-
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Mock } from "./pmxt/client.js";
|
|
26
|
+
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock } from "./pmxt/client.js";
|
|
27
27
|
export { FeedClient } from "./pmxt/feed-client.js";
|
|
28
28
|
export { Router } from "./pmxt/router.js";
|
|
29
29
|
export { ServerManager } from "./pmxt/server-manager.js";
|
|
@@ -78,6 +78,7 @@ const pmxt = {
|
|
|
78
78
|
SuiBets,
|
|
79
79
|
Suibets,
|
|
80
80
|
Rain,
|
|
81
|
+
Hunch,
|
|
81
82
|
Mock,
|
|
82
83
|
Router,
|
|
83
84
|
ServerManager,
|
|
@@ -105,6 +105,7 @@ export declare abstract class Exchange {
|
|
|
105
105
|
private _wsClient;
|
|
106
106
|
/** Sticky flag: true if the sidecar /ws endpoint is unavailable. */
|
|
107
107
|
private _wsUnsupported;
|
|
108
|
+
private readonly _useSidecarLockBaseUrl;
|
|
108
109
|
constructor(exchangeName: string, options?: ExchangeOptions);
|
|
109
110
|
private initializeServer;
|
|
110
111
|
protected handleResponse(response: any): any;
|
|
@@ -125,9 +126,9 @@ export declare abstract class Exchange {
|
|
|
125
126
|
/**
|
|
126
127
|
* Resolve the current sidecar base URL.
|
|
127
128
|
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
129
|
+
* Hosted mode and explicit baseUrl clients keep the configured basePath.
|
|
130
|
+
* Default local clients re-read the lock-file port on every call so they
|
|
131
|
+
* pick up sidecar restarts that land on a different port.
|
|
131
132
|
*/
|
|
132
133
|
private resolveBaseUrl;
|
|
133
134
|
/**
|
|
@@ -576,6 +577,14 @@ export interface PolymarketOptions {
|
|
|
576
577
|
proxyAddress?: string;
|
|
577
578
|
/** Optional signature type */
|
|
578
579
|
signatureType?: 'eoa' | 'poly-proxy' | 'gnosis-safe' | number;
|
|
580
|
+
/**
|
|
581
|
+
* EVM wallet address used for hosted reads/writes.
|
|
582
|
+
*/
|
|
583
|
+
walletAddress?: string;
|
|
584
|
+
/**
|
|
585
|
+
* External signer used for hosted writes.
|
|
586
|
+
*/
|
|
587
|
+
signer?: Signer;
|
|
579
588
|
}
|
|
580
589
|
export declare class Polymarket extends Exchange {
|
|
581
590
|
constructor(options?: PolymarketOptions);
|
|
@@ -856,6 +865,15 @@ export declare const Suibets: typeof SuiBets;
|
|
|
856
865
|
export declare class Rain extends Exchange {
|
|
857
866
|
constructor(options?: ExchangeOptions);
|
|
858
867
|
}
|
|
868
|
+
/**
|
|
869
|
+
* Hunch exchange client.
|
|
870
|
+
*
|
|
871
|
+
* Hunch is a crypto-native prediction market. Reads are unauthenticated;
|
|
872
|
+
* trading requires an EVM private key.
|
|
873
|
+
*/
|
|
874
|
+
export declare class Hunch extends Exchange {
|
|
875
|
+
constructor(options?: ExchangeOptions);
|
|
876
|
+
}
|
|
859
877
|
/**
|
|
860
878
|
* Mock exchange client.
|
|
861
879
|
*
|
package/dist/esm/pmxt/client.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { Configuration, DefaultApi, } from "../generated/src/index.js";
|
|
8
8
|
import { MarketList, } from "./models.js";
|
|
9
9
|
import { ServerManager } from "./server-manager.js";
|
|
10
|
-
import { PmxtError, fromServerError, InvalidOrder } from "./errors.js";
|
|
11
|
-
import { resolvePmxtBaseUrl } from "./constants.js";
|
|
10
|
+
import { PmxtError, fromServerError, InvalidOrder, NotSupported } from "./errors.js";
|
|
11
|
+
import { ENV, resolvePmxtBaseUrl } from "./constants.js";
|
|
12
12
|
import { SidecarWsClient } from "./ws-client.js";
|
|
13
13
|
import { logger } from "./logger.js";
|
|
14
14
|
// Hosted-mode trading dispatch.
|
|
@@ -190,6 +190,7 @@ export class Exchange {
|
|
|
190
190
|
_wsClient = null;
|
|
191
191
|
/** Sticky flag: true if the sidecar /ws endpoint is unavailable. */
|
|
192
192
|
_wsUnsupported = false;
|
|
193
|
+
_useSidecarLockBaseUrl;
|
|
193
194
|
constructor(exchangeName, options = {}) {
|
|
194
195
|
this.exchangeName = exchangeName.toLowerCase();
|
|
195
196
|
this.apiKey = options.apiKey;
|
|
@@ -207,6 +208,9 @@ export class Exchange {
|
|
|
207
208
|
const baseUrl = resolved.baseUrl;
|
|
208
209
|
this.pmxtApiKey = resolved.pmxtApiKey;
|
|
209
210
|
this.isHosted = resolved.isHosted;
|
|
211
|
+
const hasBaseUrlOverride = Boolean(options.baseUrl ||
|
|
212
|
+
(typeof process !== "undefined" && process.env[ENV.BASE_URL]));
|
|
213
|
+
this._useSidecarLockBaseUrl = !this.isHosted && !hasBaseUrlOverride;
|
|
210
214
|
// Hosted trading bridge: if the caller passed a privateKey but no
|
|
211
215
|
// explicit signer, lazily wrap it in an EthersSigner so that
|
|
212
216
|
// `pmxt.Polymarket(pmxtApiKey, privateKey)` just works without the
|
|
@@ -247,15 +251,17 @@ export class Exchange {
|
|
|
247
251
|
if (autoStartServer) {
|
|
248
252
|
try {
|
|
249
253
|
await this.serverManager.ensureServerRunning();
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
254
|
+
if (this._useSidecarLockBaseUrl) {
|
|
255
|
+
// Get the actual port the server is running on
|
|
256
|
+
// (may differ from default if default port was busy)
|
|
257
|
+
const actualPort = this.serverManager.getRunningPort();
|
|
258
|
+
const newBaseUrl = `http://localhost:${actualPort}`;
|
|
259
|
+
// Update API client with actual base URL
|
|
260
|
+
this.config = new Configuration({
|
|
261
|
+
basePath: newBaseUrl,
|
|
262
|
+
});
|
|
263
|
+
this.api = new DefaultApi(this.config);
|
|
264
|
+
}
|
|
259
265
|
}
|
|
260
266
|
catch (error) {
|
|
261
267
|
const msg = `Failed to start PMXT server: ${error instanceof Error ? error.message : error}\n\n` +
|
|
@@ -329,12 +335,12 @@ export class Exchange {
|
|
|
329
335
|
/**
|
|
330
336
|
* Resolve the current sidecar base URL.
|
|
331
337
|
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
338
|
+
* Hosted mode and explicit baseUrl clients keep the configured basePath.
|
|
339
|
+
* Default local clients re-read the lock-file port on every call so they
|
|
340
|
+
* pick up sidecar restarts that land on a different port.
|
|
335
341
|
*/
|
|
336
342
|
resolveBaseUrl() {
|
|
337
|
-
if (this.isHosted)
|
|
343
|
+
if (this.isHosted || !this._useSidecarLockBaseUrl)
|
|
338
344
|
return this.config.basePath;
|
|
339
345
|
const port = this.serverManager.getRunningPort();
|
|
340
346
|
return `http://localhost:${port}`;
|
|
@@ -1018,7 +1024,10 @@ export class Exchange {
|
|
|
1018
1024
|
const route = HOSTED_METHOD_ROUTES.get("fetchOrder");
|
|
1019
1025
|
const path = formatRoutePath(route, { order_id: orderId });
|
|
1020
1026
|
const data = await _tradingRequest(this, { method: route.method, path });
|
|
1021
|
-
|
|
1027
|
+
const payload = data && typeof data === "object" && "order" in data
|
|
1028
|
+
? data.order
|
|
1029
|
+
: data;
|
|
1030
|
+
return orderFromV0(payload);
|
|
1022
1031
|
}
|
|
1023
1032
|
try {
|
|
1024
1033
|
const args = [];
|
|
@@ -1124,6 +1133,9 @@ export class Exchange {
|
|
|
1124
1133
|
}
|
|
1125
1134
|
async fetchClosedOrders(params) {
|
|
1126
1135
|
await this.initPromise;
|
|
1136
|
+
if (this.isHosted) {
|
|
1137
|
+
throw new NotSupported("fetchClosedOrders is not available in hosted trading mode.");
|
|
1138
|
+
}
|
|
1127
1139
|
try {
|
|
1128
1140
|
const args = [];
|
|
1129
1141
|
if (params !== undefined)
|
|
@@ -1152,6 +1164,9 @@ export class Exchange {
|
|
|
1152
1164
|
}
|
|
1153
1165
|
async fetchAllOrders(params) {
|
|
1154
1166
|
await this.initPromise;
|
|
1167
|
+
if (this.isHosted) {
|
|
1168
|
+
throw new NotSupported("fetchAllOrders is not available in hosted trading mode.");
|
|
1169
|
+
}
|
|
1155
1170
|
try {
|
|
1156
1171
|
const args = [];
|
|
1157
1172
|
if (params !== undefined)
|
|
@@ -1185,7 +1200,9 @@ export class Exchange {
|
|
|
1185
1200
|
const route = HOSTED_METHOD_ROUTES.get("fetchPositions");
|
|
1186
1201
|
const path = formatRoutePath(route, { address: resolvedAddress });
|
|
1187
1202
|
const data = await _tradingRequest(this, { method: route.method, path });
|
|
1188
|
-
const list = Array.isArray(data)
|
|
1203
|
+
const list = Array.isArray(data)
|
|
1204
|
+
? data
|
|
1205
|
+
: (data && Array.isArray(data.positions) ? data.positions : []);
|
|
1189
1206
|
return list.map((p) => positionFromV0(p));
|
|
1190
1207
|
}
|
|
1191
1208
|
try {
|
|
@@ -1221,7 +1238,9 @@ export class Exchange {
|
|
|
1221
1238
|
const route = HOSTED_METHOD_ROUTES.get("fetchBalance");
|
|
1222
1239
|
const path = formatRoutePath(route, { address: resolvedAddress });
|
|
1223
1240
|
const data = await _tradingRequest(this, { method: route.method, path });
|
|
1224
|
-
const list = Array.isArray(data)
|
|
1241
|
+
const list = Array.isArray(data)
|
|
1242
|
+
? data
|
|
1243
|
+
: (data && Array.isArray(data.balances) ? data.balances : []);
|
|
1225
1244
|
return list.map((b) => balanceFromV0(b));
|
|
1226
1245
|
}
|
|
1227
1246
|
try {
|
|
@@ -3034,6 +3053,17 @@ export class Rain extends Exchange {
|
|
|
3034
3053
|
super("rain", options);
|
|
3035
3054
|
}
|
|
3036
3055
|
}
|
|
3056
|
+
/**
|
|
3057
|
+
* Hunch exchange client.
|
|
3058
|
+
*
|
|
3059
|
+
* Hunch is a crypto-native prediction market. Reads are unauthenticated;
|
|
3060
|
+
* trading requires an EVM private key.
|
|
3061
|
+
*/
|
|
3062
|
+
export class Hunch extends Exchange {
|
|
3063
|
+
constructor(options = {}) {
|
|
3064
|
+
super("hunch", options);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3037
3067
|
/**
|
|
3038
3068
|
* Mock exchange client.
|
|
3039
3069
|
*
|