@predictorsdk/client 0.12.0 → 0.13.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.
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +1 -1
- package/dist/api/types/CanonicalSportsEvent.d.ts +2 -0
- package/dist/api/types/PlatformMarket.d.ts +2 -0
- package/dist/serialization/types/PlatformMarket.d.ts +1 -0
- package/dist/serialization/types/PlatformMarket.js +1 -0
- package/package.json +2 -2
package/dist/Client.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class PredictorSDKClient {
|
|
|
25
25
|
getPlans(requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.PlansResponse>;
|
|
26
26
|
private __getPlans;
|
|
27
27
|
/**
|
|
28
|
-
* Find cross-platform market matches for sports events. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination.
|
|
28
|
+
* Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, and MLB; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
|
|
29
29
|
*
|
|
30
30
|
* @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
|
|
31
31
|
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/Client.js
CHANGED
|
@@ -75,7 +75,7 @@ export class PredictorSDKClient {
|
|
|
75
75
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/plans");
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Find cross-platform market matches for sports events. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination.
|
|
78
|
+
* Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, and MLB; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
|
|
79
79
|
*
|
|
80
80
|
* @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
|
|
81
81
|
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -2,7 +2,9 @@ import type * as PredictorSDK from "../index.js";
|
|
|
2
2
|
export interface CanonicalSportsEvent {
|
|
3
3
|
/** Stable canonical event key. */
|
|
4
4
|
eventId: string;
|
|
5
|
+
/** Canonical sport slug. `basketball`, `hockey`, or `baseball` today. */
|
|
5
6
|
sport?: string;
|
|
7
|
+
/** Canonical league slug. Cross-platform matching covers `nba`, `wnba`, `nhl`, and `mlb` today. The value is the first segment of `event_id`, so `wnba-tor-wsh-2026-08-19` is a WNBA game. Treat this as an open set — leagues are added without a breaking change. */
|
|
6
8
|
league?: string;
|
|
7
9
|
title: string;
|
|
8
10
|
participants?: PredictorSDK.CanonicalSportsParticipant[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type * as PredictorSDK from "../index.js";
|
|
2
2
|
export interface PlatformMarket {
|
|
3
3
|
platform: PredictorSDK.PlatformMarketPlatform;
|
|
4
|
+
/** Provider-native parent event or fixture identifier for the path in `GET /v1/events/{event_id}`. Kalshi uses its event ticker, Polymarket its event slug (or numeric event ID fallback), Predict its market ID, SX Bet its `L...` fixture ID, and AlphaArcade its parent market ULID. Always pair it with the events endpoint's `platform` query parameter, passing this row's `platform` value (matched case-insensitively). Predict market IDs and AlphaArcade ULIDs are not shape-distinguishable from Polymarket identifiers, so without that override the events endpoint probes Polymarket first and can answer `200` with an unrelated Polymarket event instead of `404`. Retained snapshots created before this field was introduced may omit it. */
|
|
5
|
+
eventId?: string;
|
|
4
6
|
/** Kalshi event ticker. Present when platform is KALSHI. */
|
|
5
7
|
eventTicker?: string;
|
|
6
8
|
/** Kalshi market tickers. Present when platform is KALSHI. */
|
|
@@ -6,6 +6,7 @@ export declare const PlatformMarket: core.serialization.ObjectSchema<serializers
|
|
|
6
6
|
export declare namespace PlatformMarket {
|
|
7
7
|
interface Raw {
|
|
8
8
|
platform: PlatformMarketPlatform.Raw;
|
|
9
|
+
event_id?: string | null;
|
|
9
10
|
event_ticker?: string | null;
|
|
10
11
|
market_tickers?: string[] | null;
|
|
11
12
|
market_slug?: string | null;
|
|
@@ -3,6 +3,7 @@ import * as core from "../../core/index.js";
|
|
|
3
3
|
import { PlatformMarketPlatform } from "./PlatformMarketPlatform.js";
|
|
4
4
|
export const PlatformMarket = core.serialization.object({
|
|
5
5
|
platform: PlatformMarketPlatform,
|
|
6
|
+
eventId: core.serialization.property("event_id", core.serialization.string().optional()),
|
|
6
7
|
eventTicker: core.serialization.property("event_ticker", core.serialization.string().optional()),
|
|
7
8
|
marketTickers: core.serialization.property("market_tickers", core.serialization.list(core.serialization.string()).optional()),
|
|
8
9
|
marketSlug: core.serialization.property("market_slug", core.serialization.string().optional()),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@predictorsdk/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "The official TypeScript/JavaScript client for the PredictorSDK matching markets API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^
|
|
50
|
+
"@types/node": "^26.2.0",
|
|
51
51
|
"typescript": "^5.7.0"
|
|
52
52
|
}
|
|
53
53
|
}
|