pmxt-core 2.48.6 → 2.49.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/gemini-titan/normalizer.js +9 -3
- package/dist/exchanges/gemini-titan/websocket.js +17 -5
- package/dist/exchanges/hyperliquid/normalizer.js +2 -0
- package/dist/exchanges/interfaces.d.ts +2 -2
- package/dist/exchanges/kalshi/api.d.ts +1 -1
- package/dist/exchanges/kalshi/api.js +2 -2
- package/dist/exchanges/kalshi/config.d.ts +6 -6
- package/dist/exchanges/kalshi/config.js +8 -8
- package/dist/exchanges/kalshi/fetcher.d.ts +2 -0
- package/dist/exchanges/kalshi/fetcher.js +6 -7
- package/dist/exchanges/kalshi/normalizer.js +6 -1
- package/dist/exchanges/kalshi/websocket.js +21 -9
- package/dist/exchanges/limitless/api.d.ts +1 -1
- package/dist/exchanges/limitless/api.js +1 -1
- package/dist/exchanges/limitless/client.js +2 -2
- package/dist/exchanges/limitless/config.d.ts +2 -0
- package/dist/exchanges/limitless/config.js +3 -1
- package/dist/exchanges/limitless/fetcher.d.ts +10 -0
- package/dist/exchanges/limitless/fetcher.js +2 -1
- package/dist/exchanges/limitless/index.js +1 -1
- package/dist/exchanges/limitless/utils.js +3 -3
- package/dist/exchanges/limitless/websocket.js +8 -11
- package/dist/exchanges/metaculus/utils.js +0 -1
- package/dist/exchanges/myriad/api.d.ts +1 -1
- package/dist/exchanges/myriad/api.js +17 -2
- package/dist/exchanges/myriad/normalizer.js +10 -5
- package/dist/exchanges/myriad/utils.js +2 -0
- package/dist/exchanges/opinion/api.d.ts +16 -1
- package/dist/exchanges/opinion/api.js +20 -1
- package/dist/exchanges/opinion/websocket.js +21 -14
- package/dist/exchanges/polymarket/api-clob.d.ts +13 -1
- package/dist/exchanges/polymarket/api-clob.js +26 -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/polymarket/auth.js +3 -3
- package/dist/exchanges/polymarket/config.d.ts +1 -0
- package/dist/exchanges/polymarket/config.js +4 -0
- package/dist/exchanges/polymarket/index.js +2 -1
- package/dist/exchanges/polymarket_us/websocket.js +3 -2
- package/dist/exchanges/probable/api.d.ts +1 -1
- package/dist/exchanges/probable/api.js +1 -1
- package/dist/exchanges/probable/auth.js +5 -4
- package/dist/exchanges/probable/config.d.ts +2 -0
- package/dist/exchanges/probable/config.js +5 -0
- package/dist/exchanges/probable/websocket.js +2 -1
- package/dist/exchanges/suibets/api.d.ts +1 -1
- package/dist/exchanges/suibets/api.js +1 -1
- package/dist/exchanges/suibets/config.d.ts +1 -1
- package/dist/exchanges/suibets/config.js +2 -2
- package/dist/exchanges/suibets/errors.js +9 -0
- package/dist/exchanges/suibets/fetcher.d.ts +22 -2
- package/dist/exchanges/suibets/fetcher.js +23 -5
- package/dist/exchanges/suibets/index.d.ts +1 -1
- package/dist/exchanges/suibets/index.js +1 -1
- package/dist/exchanges/suibets/normalizer.js +2 -22
- package/dist/feeds/binance/binance-feed.js +6 -3
- package/dist/feeds/chainlink/chainlink-feed.js +5 -2
- package/dist/server/openapi.yaml +2 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/throttler.js +3 -5
- package/package.json +4 -4
|
@@ -139,7 +139,7 @@ class ChainlinkFeed extends base_feed_1.BaseDataFeed {
|
|
|
139
139
|
// -- CCXT: watchTicker --
|
|
140
140
|
watchTickerImpl(symbol, callback) {
|
|
141
141
|
const sub = { symbol: symbol.toUpperCase(), callback };
|
|
142
|
-
this.subscriptions
|
|
142
|
+
this.subscriptions.push(sub);
|
|
143
143
|
this.ensureConnected().catch((err) => {
|
|
144
144
|
logger_1.logger.error('[ChainlinkFeed] initial connect failed in watchTickerImpl', { error: err instanceof Error ? err.message : String(err) });
|
|
145
145
|
});
|
|
@@ -281,7 +281,10 @@ class ChainlinkFeed extends base_feed_1.BaseDataFeed {
|
|
|
281
281
|
try {
|
|
282
282
|
msg = JSON.parse(text);
|
|
283
283
|
}
|
|
284
|
-
catch {
|
|
284
|
+
catch (error) {
|
|
285
|
+
logger_1.logger.debug('[ChainlinkFeed] failed to parse relay message', {
|
|
286
|
+
error: error instanceof Error ? error.message : String(error),
|
|
287
|
+
});
|
|
285
288
|
return;
|
|
286
289
|
}
|
|
287
290
|
if (msg.op !== 'event')
|
package/dist/server/openapi.yaml
CHANGED
package/dist/types.d.ts
CHANGED
package/dist/utils/throttler.js
CHANGED
|
@@ -17,12 +17,10 @@ class Throttler {
|
|
|
17
17
|
this.maxQueueDepth = config.maxQueueDepth ?? 1000;
|
|
18
18
|
}
|
|
19
19
|
async throttle(cost = 1) {
|
|
20
|
-
return new Promise((resolve) => {
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
21
|
if (this.queue.length >= this.maxQueueDepth) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
dropped.resolve();
|
|
25
|
-
}
|
|
22
|
+
reject(new Error(`Throttler queue full (max depth ${this.maxQueueDepth})`));
|
|
23
|
+
return;
|
|
26
24
|
}
|
|
27
25
|
this.queue.push({ resolve, cost });
|
|
28
26
|
if (!this.running) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxt-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.49.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.49.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.49.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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@polymarket/clob-client-v2": "^1.0.5",
|
|
51
51
|
"@prob/clob": "0.5.0",
|
|
52
52
|
"@solana/web3.js": "^1.98.4",
|
|
53
|
-
"axios": "^1.
|
|
53
|
+
"axios": "^1.17.0",
|
|
54
54
|
"bs58": "^6.0.0",
|
|
55
55
|
"cors": "^2.8.5",
|
|
56
56
|
"dotenv": "^17.2.3",
|