pmxt-core 2.37.14 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exchanges/hyperliquid/auth.d.ts +30 -0
- package/dist/exchanges/hyperliquid/auth.js +145 -0
- package/dist/exchanges/hyperliquid/config.d.ts +17 -0
- package/dist/exchanges/hyperliquid/config.js +28 -0
- package/dist/exchanges/hyperliquid/errors.d.ts +18 -0
- package/dist/exchanges/hyperliquid/errors.js +61 -0
- package/dist/exchanges/hyperliquid/fetcher.d.ts +140 -0
- package/dist/exchanges/hyperliquid/fetcher.js +137 -0
- package/dist/exchanges/hyperliquid/index.d.ts +31 -0
- package/dist/exchanges/hyperliquid/index.js +219 -0
- package/dist/exchanges/hyperliquid/normalizer.d.ts +18 -0
- package/dist/exchanges/hyperliquid/normalizer.js +339 -0
- package/dist/exchanges/hyperliquid/utils.d.ts +41 -0
- package/dist/exchanges/hyperliquid/utils.js +76 -0
- package/dist/exchanges/kalshi/api.d.ts +1 -1
- package/dist/exchanges/kalshi/api.js +1 -1
- package/dist/exchanges/limitless/api.d.ts +1 -1
- package/dist/exchanges/limitless/api.js +1 -1
- package/dist/exchanges/myriad/api.d.ts +1 -1
- package/dist/exchanges/myriad/api.js +1 -1
- package/dist/exchanges/opinion/api.d.ts +1 -1
- package/dist/exchanges/opinion/api.js +1 -1
- package/dist/exchanges/polymarket/api-clob.d.ts +1 -1
- package/dist/exchanges/polymarket/api-clob.js +1 -1
- package/dist/exchanges/polymarket/api-data.d.ts +1 -1
- package/dist/exchanges/polymarket/api-data.js +1 -1
- package/dist/exchanges/polymarket/api-gamma.d.ts +1 -1
- package/dist/exchanges/polymarket/api-gamma.js +1 -1
- package/dist/exchanges/probable/api.d.ts +1 -1
- package/dist/exchanges/probable/api.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -1
- package/dist/server/exchange-factory.js +6 -0
- package/dist/server/openapi.yaml +15 -0
- package/package.json +4 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.498Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const kalshiApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.kalshiApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.498Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.kalshiApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.536Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const limitlessApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.limitlessApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.536Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.limitlessApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.550Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const myriadApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.myriadApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.550Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.myriadApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.556Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const opinionApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.opinionApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.556Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.opinionApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.506Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketClobSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketClobSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.506Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketClobSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.518Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketDataSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketDataSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.518Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketDataSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.516Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketGammaSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketGammaSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.516Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketGammaSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
3
|
-
* Generated at: 2026-05-
|
|
3
|
+
* Generated at: 2026-05-08T19:42:37.540Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const probableApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.probableApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
6
|
-
* Generated at: 2026-05-
|
|
6
|
+
* Generated at: 2026-05-08T19:42:37.540Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.probableApiSpec = {
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './exchanges/opinion';
|
|
|
14
14
|
export * from './exchanges/metaculus';
|
|
15
15
|
export * from './exchanges/smarkets';
|
|
16
16
|
export * from './exchanges/polymarket_us';
|
|
17
|
+
export * from './exchanges/hyperliquid';
|
|
17
18
|
export * from './router';
|
|
18
19
|
export * from './server/app';
|
|
19
20
|
export * from './server/utils/port-manager';
|
|
@@ -29,6 +30,7 @@ import { OpinionExchange } from './exchanges/opinion';
|
|
|
29
30
|
import { MetaculusExchange } from './exchanges/metaculus';
|
|
30
31
|
import { SmarketsExchange } from './exchanges/smarkets';
|
|
31
32
|
import { PolymarketUSExchange } from './exchanges/polymarket_us';
|
|
33
|
+
import { HyperliquidExchange } from './exchanges/hyperliquid';
|
|
32
34
|
import { Router } from './router';
|
|
33
35
|
declare const pmxt: {
|
|
34
36
|
Polymarket: typeof PolymarketExchange;
|
|
@@ -42,6 +44,7 @@ declare const pmxt: {
|
|
|
42
44
|
Metaculus: typeof MetaculusExchange;
|
|
43
45
|
Smarkets: typeof SmarketsExchange;
|
|
44
46
|
PolymarketUS: typeof PolymarketUSExchange;
|
|
47
|
+
Hyperliquid: typeof HyperliquidExchange;
|
|
45
48
|
Router: typeof Router;
|
|
46
49
|
};
|
|
47
50
|
export declare const Polymarket: typeof PolymarketExchange;
|
|
@@ -55,4 +58,5 @@ export declare const Opinion: typeof OpinionExchange;
|
|
|
55
58
|
export declare const Metaculus: typeof MetaculusExchange;
|
|
56
59
|
export declare const Smarkets: typeof SmarketsExchange;
|
|
57
60
|
export declare const PolymarketUS: typeof PolymarketUSExchange;
|
|
61
|
+
export declare const Hyperliquid: typeof HyperliquidExchange;
|
|
58
62
|
export default pmxt;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.PolymarketUS = exports.Smarkets = exports.Metaculus = exports.Opinion = exports.Myriad = exports.Baozi = exports.Probable = exports.KalshiDemo = exports.Kalshi = exports.Limitless = exports.Polymarket = exports.parseOpenApiSpec = void 0;
|
|
17
|
+
exports.Hyperliquid = exports.PolymarketUS = exports.Smarkets = exports.Metaculus = exports.Opinion = exports.Myriad = exports.Baozi = exports.Probable = exports.KalshiDemo = exports.Kalshi = exports.Limitless = exports.Polymarket = exports.parseOpenApiSpec = void 0;
|
|
18
18
|
__exportStar(require("./BaseExchange"), exports);
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
__exportStar(require("./utils/math"), exports);
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./exchanges/opinion"), exports);
|
|
|
32
32
|
__exportStar(require("./exchanges/metaculus"), exports);
|
|
33
33
|
__exportStar(require("./exchanges/smarkets"), exports);
|
|
34
34
|
__exportStar(require("./exchanges/polymarket_us"), exports);
|
|
35
|
+
__exportStar(require("./exchanges/hyperliquid"), exports);
|
|
35
36
|
__exportStar(require("./router"), exports);
|
|
36
37
|
__exportStar(require("./server/app"), exports);
|
|
37
38
|
__exportStar(require("./server/utils/port-manager"), exports);
|
|
@@ -47,6 +48,7 @@ const opinion_1 = require("./exchanges/opinion");
|
|
|
47
48
|
const metaculus_1 = require("./exchanges/metaculus");
|
|
48
49
|
const smarkets_1 = require("./exchanges/smarkets");
|
|
49
50
|
const polymarket_us_1 = require("./exchanges/polymarket_us");
|
|
51
|
+
const hyperliquid_1 = require("./exchanges/hyperliquid");
|
|
50
52
|
const router_1 = require("./router");
|
|
51
53
|
const pmxt = {
|
|
52
54
|
Polymarket: polymarket_1.PolymarketExchange,
|
|
@@ -60,6 +62,7 @@ const pmxt = {
|
|
|
60
62
|
Metaculus: metaculus_1.MetaculusExchange,
|
|
61
63
|
Smarkets: smarkets_1.SmarketsExchange,
|
|
62
64
|
PolymarketUS: polymarket_us_1.PolymarketUSExchange,
|
|
65
|
+
Hyperliquid: hyperliquid_1.HyperliquidExchange,
|
|
63
66
|
Router: router_1.Router,
|
|
64
67
|
};
|
|
65
68
|
exports.Polymarket = polymarket_1.PolymarketExchange;
|
|
@@ -73,4 +76,5 @@ exports.Opinion = opinion_1.OpinionExchange;
|
|
|
73
76
|
exports.Metaculus = metaculus_1.MetaculusExchange;
|
|
74
77
|
exports.Smarkets = smarkets_1.SmarketsExchange;
|
|
75
78
|
exports.PolymarketUS = polymarket_us_1.PolymarketUSExchange;
|
|
79
|
+
exports.Hyperliquid = hyperliquid_1.HyperliquidExchange;
|
|
76
80
|
exports.default = pmxt;
|
|
@@ -12,6 +12,7 @@ const opinion_1 = require("../exchanges/opinion");
|
|
|
12
12
|
const metaculus_1 = require("../exchanges/metaculus");
|
|
13
13
|
const smarkets_1 = require("../exchanges/smarkets");
|
|
14
14
|
const polymarket_us_1 = require("../exchanges/polymarket_us");
|
|
15
|
+
const hyperliquid_1 = require("../exchanges/hyperliquid");
|
|
15
16
|
const router_1 = require("../router");
|
|
16
17
|
function createExchange(name, credentials, bearerToken) {
|
|
17
18
|
switch (name) {
|
|
@@ -90,6 +91,11 @@ function createExchange(name, credentials, bearerToken) {
|
|
|
90
91
|
apiKey: credentials?.apiKey || process.env.POLYMARKET_US_KEY_ID,
|
|
91
92
|
privateKey: credentials?.privateKey || process.env.POLYMARKET_US_SECRET_KEY,
|
|
92
93
|
});
|
|
94
|
+
case "hyperliquid":
|
|
95
|
+
return new hyperliquid_1.HyperliquidExchange({
|
|
96
|
+
apiKey: credentials?.apiKey || process.env.HYPERLIQUID_WALLET_ADDRESS,
|
|
97
|
+
privateKey: credentials?.privateKey || process.env.HYPERLIQUID_PRIVATE_KEY,
|
|
98
|
+
});
|
|
93
99
|
case "router":
|
|
94
100
|
return new router_1.Router({
|
|
95
101
|
apiKey: bearerToken,
|
package/dist/server/openapi.yaml
CHANGED
|
@@ -3669,6 +3669,21 @@ x-sdk-constructors:
|
|
|
3669
3669
|
tsName: privateKey
|
|
3670
3670
|
type: string
|
|
3671
3671
|
description: Private key for authentication
|
|
3672
|
+
hyperliquid:
|
|
3673
|
+
className: Hyperliquid
|
|
3674
|
+
params:
|
|
3675
|
+
- name: pmxt_api_key
|
|
3676
|
+
tsName: pmxtApiKey
|
|
3677
|
+
type: string
|
|
3678
|
+
description: PMXT API key for hosted access
|
|
3679
|
+
- name: api_key
|
|
3680
|
+
tsName: apiKey
|
|
3681
|
+
type: string
|
|
3682
|
+
description: API key for authentication
|
|
3683
|
+
- name: private_key
|
|
3684
|
+
tsName: privateKey
|
|
3685
|
+
type: string
|
|
3686
|
+
description: Private key for authentication
|
|
3672
3687
|
router:
|
|
3673
3688
|
className: Router
|
|
3674
3689
|
params:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxt-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "pmxt is a unified prediction market data API. The ccxt for prediction markets.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test": "jest -c jest.config.js",
|
|
30
30
|
"server": "tsx watch src/server/index.ts",
|
|
31
31
|
"server:prod": "node dist/server/index.js",
|
|
32
|
-
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.
|
|
33
|
-
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.
|
|
32
|
+
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.38.0,library=urllib3",
|
|
33
|
+
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.38.0,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.js",
|
|
34
34
|
"fetch:openapi": "node scripts/fetch-openapi-specs.js",
|
|
35
35
|
"extract:jsdoc": "node ../scripts/extract-jsdoc.js",
|
|
36
36
|
"generate:docs": "npm run extract:jsdoc && node ../scripts/generate-api-docs.js",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"express": "^5.2.1",
|
|
60
60
|
"isows": "^1.0.6",
|
|
61
61
|
"jest": "^30.2.0",
|
|
62
|
+
"msgpackr": "^2.0.1",
|
|
62
63
|
"polymarket-us": "0.1.1",
|
|
63
64
|
"tsx": "^4.21.0",
|
|
64
65
|
"ws": "^8.18.0"
|