@predictorsdk/client 0.4.0 → 0.5.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/Client.d.ts +56 -0
- package/dist/Client.js +290 -0
- package/dist/api/client/requests/GetEventRequest.d.ts +13 -0
- package/dist/api/client/requests/GetEventRequest.js +2 -0
- package/dist/api/client/requests/ListPolymarketWalletPositionsRequest.d.ts +16 -0
- package/dist/api/client/requests/ListPolymarketWalletPositionsRequest.js +2 -0
- package/dist/api/client/requests/index.d.ts +2 -0
- package/dist/api/types/EventFanout.d.ts +8 -0
- package/dist/api/types/EventFanout.js +2 -0
- package/dist/api/types/EventMarket.d.ts +6 -0
- package/dist/api/types/EventMarket.js +2 -0
- package/dist/api/types/EventResponse.d.ts +13 -0
- package/dist/api/types/EventResponse.js +2 -0
- package/dist/api/types/EventResponsePlatform.d.ts +8 -0
- package/dist/api/types/EventResponsePlatform.js +8 -0
- package/dist/api/types/GetEventRequestPlatform.d.ts +7 -0
- package/dist/api/types/GetEventRequestPlatform.js +7 -0
- package/dist/api/types/PaginationBlock.d.ts +1 -1
- package/dist/api/types/PolymarketPosition.d.ts +8 -0
- package/dist/api/types/PolymarketPosition.js +2 -0
- package/dist/api/types/PolymarketPositionsResponse.d.ts +7 -0
- package/dist/api/types/PolymarketPositionsResponse.js +2 -0
- package/dist/api/types/index.d.ts +7 -0
- package/dist/api/types/index.js +7 -0
- package/dist/serialization/types/EventFanout.d.ts +11 -0
- package/dist/serialization/types/EventFanout.js +7 -0
- package/dist/serialization/types/EventMarket.d.ts +10 -0
- package/dist/serialization/types/EventMarket.js +6 -0
- package/dist/serialization/types/EventResponse.d.ts +16 -0
- package/dist/serialization/types/EventResponse.js +12 -0
- package/dist/serialization/types/EventResponsePlatform.d.ts +7 -0
- package/dist/serialization/types/EventResponsePlatform.js +3 -0
- package/dist/serialization/types/GetEventRequestPlatform.d.ts +7 -0
- package/dist/serialization/types/GetEventRequestPlatform.js +3 -0
- package/dist/serialization/types/PolymarketPosition.d.ts +11 -0
- package/dist/serialization/types/PolymarketPosition.js +7 -0
- package/dist/serialization/types/PolymarketPositionsResponse.d.ts +13 -0
- package/dist/serialization/types/PolymarketPositionsResponse.js +9 -0
- package/dist/serialization/types/index.d.ts +7 -0
- package/dist/serialization/types/index.js +7 -0
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
|
@@ -93,6 +93,62 @@ export declare class PredictorSDKClient {
|
|
|
93
93
|
*/
|
|
94
94
|
getPolymarketWallet(request?: PredictorSDK.GetPolymarketWalletRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.PolymarketWalletResponse>;
|
|
95
95
|
private __getPolymarketWallet;
|
|
96
|
+
/**
|
|
97
|
+
* Returns the current Polymarket positions for a wallet. Accepts either a wallet `address` (proxy address only — see note below) or a Polymarket `username`. Exactly one of the two must be supplied — passing both returns `400`.
|
|
98
|
+
*
|
|
99
|
+
* v1 surfaces a minimal field set so the endpoint scaffolding can be verified end-to-end: `condition_id` (which market), `outcome` (which side), and `shares` (how much). Title/slug, avg/current price, PnL (`cash_pnl`, `realized_pnl`), `redeemable`/`mergeable` flags, and event metadata will be added in follow-ups.
|
|
100
|
+
*
|
|
101
|
+
* `total` in the pagination block is always `0` because the upstream Data API does not return a total count; rely on `has_more` + `next_cursor` to paginate.
|
|
102
|
+
*
|
|
103
|
+
* **EOA inputs are not auto-resolved on this endpoint.** Unlike `/v1/polymarket/wallet`, this endpoint does not perform the EOA→proxy CREATE2 resolution. Callers with a signer EOA should call `/v1/polymarket/wallet` first to resolve the proxy, then pass the returned `address`. Passing an EOA directly will return an empty `data` array.
|
|
104
|
+
*
|
|
105
|
+
* @param {PredictorSDK.ListPolymarketWalletPositionsRequest} request
|
|
106
|
+
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link PredictorSDK.BadRequestError}
|
|
109
|
+
* @throws {@link PredictorSDK.UnauthorizedError}
|
|
110
|
+
* @throws {@link PredictorSDK.PaymentRequiredError}
|
|
111
|
+
* @throws {@link PredictorSDK.ForbiddenError}
|
|
112
|
+
* @throws {@link PredictorSDK.NotFoundError}
|
|
113
|
+
* @throws {@link PredictorSDK.TooManyRequestsError}
|
|
114
|
+
* @throws {@link PredictorSDK.BadGatewayError}
|
|
115
|
+
* @throws {@link PredictorSDK.ServiceUnavailableError}
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.listPolymarketWalletPositions({
|
|
119
|
+
* address: "0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b"
|
|
120
|
+
* })
|
|
121
|
+
*/
|
|
122
|
+
listPolymarketWalletPositions(request?: PredictorSDK.ListPolymarketWalletPositionsRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.PolymarketPositionsResponse>;
|
|
123
|
+
private __listPolymarketWalletPositions;
|
|
124
|
+
/**
|
|
125
|
+
* Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, or a Predict market identifier. The `platform` is inferred from the ID format when unambiguous; callers must pass `?platform=` for numeric IDs or kebab-case slugs that could belong to either Polymarket or Predict.
|
|
126
|
+
*
|
|
127
|
+
* Response is minimal in v0: each market is returned with its platform-native `market_id` and a human-readable `title`. Pricing, volume, status, and timestamps are intentionally deferred — they'll be added as additive fields to `EventMarket` in a later release. The endpoint mirrors the `/v1/markets` rollout pattern (titles first, fields later).
|
|
128
|
+
*
|
|
129
|
+
* **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26MAY221840CLEPHI` holds the moneyline, `KXMLBF5TOTAL-26MAY221840CLEPHI` holds the totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
|
|
130
|
+
*
|
|
131
|
+
* **Polymarket** events already nest the moneyline plus all spread/totals/game-level prop markets under a single event slug, so no fanout is performed. **SX Bet** fixtures similarly bundle game lines per `eventId`. **Predict** currently treats `event_id` as a market identifier and wraps the single market as a 1-element event response, since the upstream `event` concept on Predict is closer to a category than to a multi-market container.
|
|
132
|
+
*
|
|
133
|
+
* @param {PredictorSDK.GetEventRequest} request
|
|
134
|
+
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
135
|
+
*
|
|
136
|
+
* @throws {@link PredictorSDK.BadRequestError}
|
|
137
|
+
* @throws {@link PredictorSDK.UnauthorizedError}
|
|
138
|
+
* @throws {@link PredictorSDK.PaymentRequiredError}
|
|
139
|
+
* @throws {@link PredictorSDK.ForbiddenError}
|
|
140
|
+
* @throws {@link PredictorSDK.NotFoundError}
|
|
141
|
+
* @throws {@link PredictorSDK.TooManyRequestsError}
|
|
142
|
+
* @throws {@link PredictorSDK.BadGatewayError}
|
|
143
|
+
* @throws {@link PredictorSDK.ServiceUnavailableError}
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* await client.getEvent({
|
|
147
|
+
* eventId: "KXMLBGAME-26MAY221840CLEPHI"
|
|
148
|
+
* })
|
|
149
|
+
*/
|
|
150
|
+
getEvent(request: PredictorSDK.GetEventRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.EventResponse>;
|
|
151
|
+
private __getEvent;
|
|
96
152
|
/**
|
|
97
153
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
98
154
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
package/dist/Client.js
CHANGED
|
@@ -519,6 +519,296 @@ export class PredictorSDKClient {
|
|
|
519
519
|
}
|
|
520
520
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/polymarket/wallet");
|
|
521
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* Returns the current Polymarket positions for a wallet. Accepts either a wallet `address` (proxy address only — see note below) or a Polymarket `username`. Exactly one of the two must be supplied — passing both returns `400`.
|
|
524
|
+
*
|
|
525
|
+
* v1 surfaces a minimal field set so the endpoint scaffolding can be verified end-to-end: `condition_id` (which market), `outcome` (which side), and `shares` (how much). Title/slug, avg/current price, PnL (`cash_pnl`, `realized_pnl`), `redeemable`/`mergeable` flags, and event metadata will be added in follow-ups.
|
|
526
|
+
*
|
|
527
|
+
* `total` in the pagination block is always `0` because the upstream Data API does not return a total count; rely on `has_more` + `next_cursor` to paginate.
|
|
528
|
+
*
|
|
529
|
+
* **EOA inputs are not auto-resolved on this endpoint.** Unlike `/v1/polymarket/wallet`, this endpoint does not perform the EOA→proxy CREATE2 resolution. Callers with a signer EOA should call `/v1/polymarket/wallet` first to resolve the proxy, then pass the returned `address`. Passing an EOA directly will return an empty `data` array.
|
|
530
|
+
*
|
|
531
|
+
* @param {PredictorSDK.ListPolymarketWalletPositionsRequest} request
|
|
532
|
+
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
533
|
+
*
|
|
534
|
+
* @throws {@link PredictorSDK.BadRequestError}
|
|
535
|
+
* @throws {@link PredictorSDK.UnauthorizedError}
|
|
536
|
+
* @throws {@link PredictorSDK.PaymentRequiredError}
|
|
537
|
+
* @throws {@link PredictorSDK.ForbiddenError}
|
|
538
|
+
* @throws {@link PredictorSDK.NotFoundError}
|
|
539
|
+
* @throws {@link PredictorSDK.TooManyRequestsError}
|
|
540
|
+
* @throws {@link PredictorSDK.BadGatewayError}
|
|
541
|
+
* @throws {@link PredictorSDK.ServiceUnavailableError}
|
|
542
|
+
*
|
|
543
|
+
* @example
|
|
544
|
+
* await client.listPolymarketWalletPositions({
|
|
545
|
+
* address: "0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b"
|
|
546
|
+
* })
|
|
547
|
+
*/
|
|
548
|
+
listPolymarketWalletPositions(request = {}, requestOptions) {
|
|
549
|
+
return core.HttpResponsePromise.fromPromise(this.__listPolymarketWalletPositions(request, requestOptions));
|
|
550
|
+
}
|
|
551
|
+
async __listPolymarketWalletPositions(request = {}, requestOptions) {
|
|
552
|
+
const { address, username, limit, cursor } = request;
|
|
553
|
+
const _queryParams = {
|
|
554
|
+
address,
|
|
555
|
+
username,
|
|
556
|
+
limit,
|
|
557
|
+
cursor,
|
|
558
|
+
};
|
|
559
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
560
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
561
|
+
const _response = await core.fetcher({
|
|
562
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
563
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
564
|
+
environments.PredictorSDKEnvironment.Production, "v1/polymarket/wallet/positions"),
|
|
565
|
+
method: "GET",
|
|
566
|
+
headers: _headers,
|
|
567
|
+
queryString: core.url
|
|
568
|
+
.queryBuilder()
|
|
569
|
+
.addMany(_queryParams)
|
|
570
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
571
|
+
.build(),
|
|
572
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
573
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
574
|
+
abortSignal: requestOptions?.abortSignal,
|
|
575
|
+
fetchFn: this._options?.fetch,
|
|
576
|
+
logging: this._options.logging,
|
|
577
|
+
});
|
|
578
|
+
if (_response.ok) {
|
|
579
|
+
return {
|
|
580
|
+
data: serializers.PolymarketPositionsResponse.parseOrThrow(_response.body, {
|
|
581
|
+
unrecognizedObjectKeys: "passthrough",
|
|
582
|
+
allowUnrecognizedUnionMembers: true,
|
|
583
|
+
allowUnrecognizedEnumValues: true,
|
|
584
|
+
skipValidation: true,
|
|
585
|
+
breadcrumbsPrefix: ["response"],
|
|
586
|
+
}),
|
|
587
|
+
rawResponse: _response.rawResponse,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
if (_response.error.reason === "status-code") {
|
|
591
|
+
switch (_response.error.statusCode) {
|
|
592
|
+
case 400:
|
|
593
|
+
throw new PredictorSDK.BadRequestError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
594
|
+
unrecognizedObjectKeys: "passthrough",
|
|
595
|
+
allowUnrecognizedUnionMembers: true,
|
|
596
|
+
allowUnrecognizedEnumValues: true,
|
|
597
|
+
skipValidation: true,
|
|
598
|
+
breadcrumbsPrefix: ["response"],
|
|
599
|
+
}), _response.rawResponse);
|
|
600
|
+
case 401:
|
|
601
|
+
throw new PredictorSDK.UnauthorizedError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
602
|
+
unrecognizedObjectKeys: "passthrough",
|
|
603
|
+
allowUnrecognizedUnionMembers: true,
|
|
604
|
+
allowUnrecognizedEnumValues: true,
|
|
605
|
+
skipValidation: true,
|
|
606
|
+
breadcrumbsPrefix: ["response"],
|
|
607
|
+
}), _response.rawResponse);
|
|
608
|
+
case 402:
|
|
609
|
+
throw new PredictorSDK.PaymentRequiredError(serializers.PaymentRequiredErrorBody.parseOrThrow(_response.error.body, {
|
|
610
|
+
unrecognizedObjectKeys: "passthrough",
|
|
611
|
+
allowUnrecognizedUnionMembers: true,
|
|
612
|
+
allowUnrecognizedEnumValues: true,
|
|
613
|
+
skipValidation: true,
|
|
614
|
+
breadcrumbsPrefix: ["response"],
|
|
615
|
+
}), _response.rawResponse);
|
|
616
|
+
case 403:
|
|
617
|
+
throw new PredictorSDK.ForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
618
|
+
unrecognizedObjectKeys: "passthrough",
|
|
619
|
+
allowUnrecognizedUnionMembers: true,
|
|
620
|
+
allowUnrecognizedEnumValues: true,
|
|
621
|
+
skipValidation: true,
|
|
622
|
+
breadcrumbsPrefix: ["response"],
|
|
623
|
+
}), _response.rawResponse);
|
|
624
|
+
case 404:
|
|
625
|
+
throw new PredictorSDK.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
626
|
+
unrecognizedObjectKeys: "passthrough",
|
|
627
|
+
allowUnrecognizedUnionMembers: true,
|
|
628
|
+
allowUnrecognizedEnumValues: true,
|
|
629
|
+
skipValidation: true,
|
|
630
|
+
breadcrumbsPrefix: ["response"],
|
|
631
|
+
}), _response.rawResponse);
|
|
632
|
+
case 429:
|
|
633
|
+
throw new PredictorSDK.TooManyRequestsError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
634
|
+
unrecognizedObjectKeys: "passthrough",
|
|
635
|
+
allowUnrecognizedUnionMembers: true,
|
|
636
|
+
allowUnrecognizedEnumValues: true,
|
|
637
|
+
skipValidation: true,
|
|
638
|
+
breadcrumbsPrefix: ["response"],
|
|
639
|
+
}), _response.rawResponse);
|
|
640
|
+
case 502:
|
|
641
|
+
throw new PredictorSDK.BadGatewayError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
642
|
+
unrecognizedObjectKeys: "passthrough",
|
|
643
|
+
allowUnrecognizedUnionMembers: true,
|
|
644
|
+
allowUnrecognizedEnumValues: true,
|
|
645
|
+
skipValidation: true,
|
|
646
|
+
breadcrumbsPrefix: ["response"],
|
|
647
|
+
}), _response.rawResponse);
|
|
648
|
+
case 503:
|
|
649
|
+
throw new PredictorSDK.ServiceUnavailableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
650
|
+
unrecognizedObjectKeys: "passthrough",
|
|
651
|
+
allowUnrecognizedUnionMembers: true,
|
|
652
|
+
allowUnrecognizedEnumValues: true,
|
|
653
|
+
skipValidation: true,
|
|
654
|
+
breadcrumbsPrefix: ["response"],
|
|
655
|
+
}), _response.rawResponse);
|
|
656
|
+
default:
|
|
657
|
+
throw new errors.PredictorSDKError({
|
|
658
|
+
statusCode: _response.error.statusCode,
|
|
659
|
+
body: _response.error.body,
|
|
660
|
+
rawResponse: _response.rawResponse,
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/polymarket/wallet/positions");
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, or a Predict market identifier. The `platform` is inferred from the ID format when unambiguous; callers must pass `?platform=` for numeric IDs or kebab-case slugs that could belong to either Polymarket or Predict.
|
|
668
|
+
*
|
|
669
|
+
* Response is minimal in v0: each market is returned with its platform-native `market_id` and a human-readable `title`. Pricing, volume, status, and timestamps are intentionally deferred — they'll be added as additive fields to `EventMarket` in a later release. The endpoint mirrors the `/v1/markets` rollout pattern (titles first, fields later).
|
|
670
|
+
*
|
|
671
|
+
* **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26MAY221840CLEPHI` holds the moneyline, `KXMLBF5TOTAL-26MAY221840CLEPHI` holds the totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
|
|
672
|
+
*
|
|
673
|
+
* **Polymarket** events already nest the moneyline plus all spread/totals/game-level prop markets under a single event slug, so no fanout is performed. **SX Bet** fixtures similarly bundle game lines per `eventId`. **Predict** currently treats `event_id` as a market identifier and wraps the single market as a 1-element event response, since the upstream `event` concept on Predict is closer to a category than to a multi-market container.
|
|
674
|
+
*
|
|
675
|
+
* @param {PredictorSDK.GetEventRequest} request
|
|
676
|
+
* @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
677
|
+
*
|
|
678
|
+
* @throws {@link PredictorSDK.BadRequestError}
|
|
679
|
+
* @throws {@link PredictorSDK.UnauthorizedError}
|
|
680
|
+
* @throws {@link PredictorSDK.PaymentRequiredError}
|
|
681
|
+
* @throws {@link PredictorSDK.ForbiddenError}
|
|
682
|
+
* @throws {@link PredictorSDK.NotFoundError}
|
|
683
|
+
* @throws {@link PredictorSDK.TooManyRequestsError}
|
|
684
|
+
* @throws {@link PredictorSDK.BadGatewayError}
|
|
685
|
+
* @throws {@link PredictorSDK.ServiceUnavailableError}
|
|
686
|
+
*
|
|
687
|
+
* @example
|
|
688
|
+
* await client.getEvent({
|
|
689
|
+
* eventId: "KXMLBGAME-26MAY221840CLEPHI"
|
|
690
|
+
* })
|
|
691
|
+
*/
|
|
692
|
+
getEvent(request, requestOptions) {
|
|
693
|
+
return core.HttpResponsePromise.fromPromise(this.__getEvent(request, requestOptions));
|
|
694
|
+
}
|
|
695
|
+
async __getEvent(request, requestOptions) {
|
|
696
|
+
const { eventId, platform } = request;
|
|
697
|
+
const _queryParams = {
|
|
698
|
+
platform: platform != null
|
|
699
|
+
? serializers.GetEventRequestPlatform.jsonOrThrow(platform, {
|
|
700
|
+
unrecognizedObjectKeys: "strip",
|
|
701
|
+
omitUndefined: true,
|
|
702
|
+
})
|
|
703
|
+
: undefined,
|
|
704
|
+
};
|
|
705
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
706
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
707
|
+
const _response = await core.fetcher({
|
|
708
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
709
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
710
|
+
environments.PredictorSDKEnvironment.Production, `v1/events/${core.url.encodePathParam(eventId)}`),
|
|
711
|
+
method: "GET",
|
|
712
|
+
headers: _headers,
|
|
713
|
+
queryString: core.url
|
|
714
|
+
.queryBuilder()
|
|
715
|
+
.addMany(_queryParams)
|
|
716
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
717
|
+
.build(),
|
|
718
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
719
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
720
|
+
abortSignal: requestOptions?.abortSignal,
|
|
721
|
+
fetchFn: this._options?.fetch,
|
|
722
|
+
logging: this._options.logging,
|
|
723
|
+
});
|
|
724
|
+
if (_response.ok) {
|
|
725
|
+
return {
|
|
726
|
+
data: serializers.EventResponse.parseOrThrow(_response.body, {
|
|
727
|
+
unrecognizedObjectKeys: "passthrough",
|
|
728
|
+
allowUnrecognizedUnionMembers: true,
|
|
729
|
+
allowUnrecognizedEnumValues: true,
|
|
730
|
+
skipValidation: true,
|
|
731
|
+
breadcrumbsPrefix: ["response"],
|
|
732
|
+
}),
|
|
733
|
+
rawResponse: _response.rawResponse,
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
if (_response.error.reason === "status-code") {
|
|
737
|
+
switch (_response.error.statusCode) {
|
|
738
|
+
case 400:
|
|
739
|
+
throw new PredictorSDK.BadRequestError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
740
|
+
unrecognizedObjectKeys: "passthrough",
|
|
741
|
+
allowUnrecognizedUnionMembers: true,
|
|
742
|
+
allowUnrecognizedEnumValues: true,
|
|
743
|
+
skipValidation: true,
|
|
744
|
+
breadcrumbsPrefix: ["response"],
|
|
745
|
+
}), _response.rawResponse);
|
|
746
|
+
case 401:
|
|
747
|
+
throw new PredictorSDK.UnauthorizedError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
748
|
+
unrecognizedObjectKeys: "passthrough",
|
|
749
|
+
allowUnrecognizedUnionMembers: true,
|
|
750
|
+
allowUnrecognizedEnumValues: true,
|
|
751
|
+
skipValidation: true,
|
|
752
|
+
breadcrumbsPrefix: ["response"],
|
|
753
|
+
}), _response.rawResponse);
|
|
754
|
+
case 402:
|
|
755
|
+
throw new PredictorSDK.PaymentRequiredError(serializers.PaymentRequiredErrorBody.parseOrThrow(_response.error.body, {
|
|
756
|
+
unrecognizedObjectKeys: "passthrough",
|
|
757
|
+
allowUnrecognizedUnionMembers: true,
|
|
758
|
+
allowUnrecognizedEnumValues: true,
|
|
759
|
+
skipValidation: true,
|
|
760
|
+
breadcrumbsPrefix: ["response"],
|
|
761
|
+
}), _response.rawResponse);
|
|
762
|
+
case 403:
|
|
763
|
+
throw new PredictorSDK.ForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
764
|
+
unrecognizedObjectKeys: "passthrough",
|
|
765
|
+
allowUnrecognizedUnionMembers: true,
|
|
766
|
+
allowUnrecognizedEnumValues: true,
|
|
767
|
+
skipValidation: true,
|
|
768
|
+
breadcrumbsPrefix: ["response"],
|
|
769
|
+
}), _response.rawResponse);
|
|
770
|
+
case 404:
|
|
771
|
+
throw new PredictorSDK.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
772
|
+
unrecognizedObjectKeys: "passthrough",
|
|
773
|
+
allowUnrecognizedUnionMembers: true,
|
|
774
|
+
allowUnrecognizedEnumValues: true,
|
|
775
|
+
skipValidation: true,
|
|
776
|
+
breadcrumbsPrefix: ["response"],
|
|
777
|
+
}), _response.rawResponse);
|
|
778
|
+
case 429:
|
|
779
|
+
throw new PredictorSDK.TooManyRequestsError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
780
|
+
unrecognizedObjectKeys: "passthrough",
|
|
781
|
+
allowUnrecognizedUnionMembers: true,
|
|
782
|
+
allowUnrecognizedEnumValues: true,
|
|
783
|
+
skipValidation: true,
|
|
784
|
+
breadcrumbsPrefix: ["response"],
|
|
785
|
+
}), _response.rawResponse);
|
|
786
|
+
case 502:
|
|
787
|
+
throw new PredictorSDK.BadGatewayError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
788
|
+
unrecognizedObjectKeys: "passthrough",
|
|
789
|
+
allowUnrecognizedUnionMembers: true,
|
|
790
|
+
allowUnrecognizedEnumValues: true,
|
|
791
|
+
skipValidation: true,
|
|
792
|
+
breadcrumbsPrefix: ["response"],
|
|
793
|
+
}), _response.rawResponse);
|
|
794
|
+
case 503:
|
|
795
|
+
throw new PredictorSDK.ServiceUnavailableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
796
|
+
unrecognizedObjectKeys: "passthrough",
|
|
797
|
+
allowUnrecognizedUnionMembers: true,
|
|
798
|
+
allowUnrecognizedEnumValues: true,
|
|
799
|
+
skipValidation: true,
|
|
800
|
+
breadcrumbsPrefix: ["response"],
|
|
801
|
+
}), _response.rawResponse);
|
|
802
|
+
default:
|
|
803
|
+
throw new errors.PredictorSDKError({
|
|
804
|
+
statusCode: _response.error.statusCode,
|
|
805
|
+
body: _response.error.body,
|
|
806
|
+
rawResponse: _response.rawResponse,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/events/{event_id}");
|
|
811
|
+
}
|
|
522
812
|
/**
|
|
523
813
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
524
814
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* eventId: "KXMLBGAME-26MAY221840CLEPHI"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface GetEventRequest {
|
|
9
|
+
/** Platform-native event identifier. Examples per platform: Kalshi event ticker (`KXMLBGAME-26MAY221840CLEPHI`), Polymarket event slug (`mlb-cle-phi-2026-05-22`), SX Bet event id (`L10073358`), Predict market id (`110629`). */
|
|
10
|
+
eventId: string;
|
|
11
|
+
/** Optional platform override. When omitted, inferred from the `event_id` format: `KX…` → Kalshi, `L\d+` → SX Bet. Numeric IDs and kebab-case slugs are ambiguous between Polymarket and Predict; supplying `platform` is required in that case or the response is `400`. */
|
|
12
|
+
platform?: PredictorSDK.GetEventRequestPlatform;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* address: "0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface ListPolymarketWalletPositionsRequest {
|
|
8
|
+
/** Polymarket proxy wallet address. Must match `^0x[a-fA-F0-9]{40}$`. Mixed-case input is accepted and lowercased in the response. Mutually exclusive with `username`; exactly one of the two is required. */
|
|
9
|
+
address?: string;
|
|
10
|
+
/** Polymarket display name to resolve to a proxy wallet. Match is case-insensitive and exact against the user's stored `name`. A leading `@` is accepted and stripped. Mutually exclusive with `address`. */
|
|
11
|
+
username?: string;
|
|
12
|
+
/** Number of items per page. Defaults to 50. */
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** Opaque cursor from a previous response's `pagination.next_cursor`. Bound to the resolved wallet address — replaying a cursor against a different identifier returns `400`. */
|
|
15
|
+
cursor?: string;
|
|
16
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { GetBinanceCryptoPricesRequest } from "./GetBinanceCryptoPricesRequest.js";
|
|
2
|
+
export type { GetEventRequest } from "./GetEventRequest.js";
|
|
2
3
|
export type { GetMarketsRequest } from "./GetMarketsRequest.js";
|
|
3
4
|
export type { GetPolymarketWalletRequest } from "./GetPolymarketWalletRequest.js";
|
|
4
5
|
export type { GetSportsMatchingMarketsRequest } from "./GetSportsMatchingMarketsRequest.js";
|
|
6
|
+
export type { ListPolymarketWalletPositionsRequest } from "./ListPolymarketWalletPositionsRequest.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface EventFanout {
|
|
2
|
+
/** Sibling event tickers the server attempted to fetch alongside the primary event. Determined by the Kalshi sibling registry for the primary event's series. */
|
|
3
|
+
siblingsAttempted: string[];
|
|
4
|
+
/** Sibling event tickers that returned successfully and contributed markets to the merged response. */
|
|
5
|
+
siblingsReturned: string[];
|
|
6
|
+
/** Sibling event tickers that did not exist upstream (404) or errored. The primary event still returned 200 — these are reported for observability, not as request failures. */
|
|
7
|
+
siblingsMissing: string[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface EventMarket {
|
|
2
|
+
/** Platform-native market identifier. Kalshi ticker (`KXMLBGAME-26MAY221840CLEPHI-CLE`), Polymarket numeric market id, SX Bet `marketHash`, or Predict market id. */
|
|
3
|
+
marketId: string;
|
|
4
|
+
/** Human-readable market title/question. */
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../index.js";
|
|
2
|
+
export interface EventResponse {
|
|
3
|
+
/** Echo of the platform-native event identifier supplied in the request path. */
|
|
4
|
+
eventId: string;
|
|
5
|
+
/** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
|
|
6
|
+
platform: PredictorSDK.EventResponsePlatform;
|
|
7
|
+
/** Human-readable event title from the platform. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Markets nested under this event. Order is platform-native for the primary event, followed by markets from fanout siblings (Kalshi sports) in registry order. */
|
|
10
|
+
markets: PredictorSDK.EventMarket[];
|
|
11
|
+
/** Present when the response was assembled from multiple upstream events (Kalshi sports sibling fanout). Lists which sibling event tickers were attempted, which contributed markets, and which failed or didn't exist. Absent for non-Kalshi platforms and for Kalshi events whose series is not in the sibling registry. */
|
|
12
|
+
fanout?: PredictorSDK.EventFanout;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
|
|
2
|
+
export declare const EventResponsePlatform: {
|
|
3
|
+
readonly Kalshi: "kalshi";
|
|
4
|
+
readonly Polymarket: "polymarket";
|
|
5
|
+
readonly Predict: "predict";
|
|
6
|
+
readonly Sxbet: "sxbet";
|
|
7
|
+
};
|
|
8
|
+
export type EventResponsePlatform = (typeof EventResponsePlatform)[keyof typeof EventResponsePlatform];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
|
|
3
|
+
export const EventResponsePlatform = {
|
|
4
|
+
Kalshi: "kalshi",
|
|
5
|
+
Polymarket: "polymarket",
|
|
6
|
+
Predict: "predict",
|
|
7
|
+
Sxbet: "sxbet",
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const GetEventRequestPlatform: {
|
|
2
|
+
readonly Kalshi: "kalshi";
|
|
3
|
+
readonly Polymarket: "polymarket";
|
|
4
|
+
readonly Predict: "predict";
|
|
5
|
+
readonly Sxbet: "sxbet";
|
|
6
|
+
};
|
|
7
|
+
export type GetEventRequestPlatform = (typeof GetEventRequestPlatform)[keyof typeof GetEventRequestPlatform];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface PaginationBlock {
|
|
2
2
|
/** Number of items requested per page (echoes the `limit` query param). */
|
|
3
3
|
limit: number;
|
|
4
|
-
/** Total matching items across all pages. */
|
|
4
|
+
/** Total matching items across all pages, when known. Set to `0` for endpoints whose upstream does not expose a total count — clients should rely on `has_more` and `next_cursor` to paginate in that case. */
|
|
5
5
|
total: number;
|
|
6
6
|
/** Whether additional pages exist beyond this one. */
|
|
7
7
|
hasMore: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PolymarketPosition {
|
|
2
|
+
/** Polymarket condition ID (`0x`-prefixed hex). */
|
|
3
|
+
conditionId: string;
|
|
4
|
+
/** Outcome label held in this position (`Yes`/`No` for binary markets). */
|
|
5
|
+
outcome: string;
|
|
6
|
+
/** Number of outcome shares held. */
|
|
7
|
+
shares: number;
|
|
8
|
+
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export * from "./CryptoPriceItem.js";
|
|
2
2
|
export * from "./CryptoPricesResponse.js";
|
|
3
3
|
export * from "./ErrorResponse.js";
|
|
4
|
+
export * from "./EventFanout.js";
|
|
5
|
+
export * from "./EventMarket.js";
|
|
6
|
+
export * from "./EventResponse.js";
|
|
7
|
+
export * from "./EventResponsePlatform.js";
|
|
8
|
+
export * from "./GetEventRequestPlatform.js";
|
|
4
9
|
export * from "./MarketsListResponse.js";
|
|
5
10
|
export * from "./PaginationBlock.js";
|
|
6
11
|
export * from "./PaymentRequiredErrorAction.js";
|
|
7
12
|
export * from "./PaymentRequiredErrorBody.js";
|
|
8
13
|
export * from "./PlatformMarket.js";
|
|
9
14
|
export * from "./PlatformMarketPlatform.js";
|
|
15
|
+
export * from "./PolymarketPosition.js";
|
|
16
|
+
export * from "./PolymarketPositionsResponse.js";
|
|
10
17
|
export * from "./PolymarketWalletResponse.js";
|
|
11
18
|
export * from "./SportsMatchingResponse.js";
|
|
12
19
|
export * from "./UnifiedMarket.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export * from "./CryptoPriceItem.js";
|
|
2
2
|
export * from "./CryptoPricesResponse.js";
|
|
3
3
|
export * from "./ErrorResponse.js";
|
|
4
|
+
export * from "./EventFanout.js";
|
|
5
|
+
export * from "./EventMarket.js";
|
|
6
|
+
export * from "./EventResponse.js";
|
|
7
|
+
export * from "./EventResponsePlatform.js";
|
|
8
|
+
export * from "./GetEventRequestPlatform.js";
|
|
4
9
|
export * from "./MarketsListResponse.js";
|
|
5
10
|
export * from "./PaginationBlock.js";
|
|
6
11
|
export * from "./PaymentRequiredErrorAction.js";
|
|
7
12
|
export * from "./PaymentRequiredErrorBody.js";
|
|
8
13
|
export * from "./PlatformMarket.js";
|
|
9
14
|
export * from "./PlatformMarketPlatform.js";
|
|
15
|
+
export * from "./PolymarketPosition.js";
|
|
16
|
+
export * from "./PolymarketPositionsResponse.js";
|
|
10
17
|
export * from "./PolymarketWalletResponse.js";
|
|
11
18
|
export * from "./SportsMatchingResponse.js";
|
|
12
19
|
export * from "./UnifiedMarket.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const EventFanout: core.serialization.ObjectSchema<serializers.EventFanout.Raw, PredictorSDK.EventFanout>;
|
|
5
|
+
export declare namespace EventFanout {
|
|
6
|
+
interface Raw {
|
|
7
|
+
siblings_attempted: string[];
|
|
8
|
+
siblings_returned: string[];
|
|
9
|
+
siblings_missing: string[];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
export const EventFanout = core.serialization.object({
|
|
4
|
+
siblingsAttempted: core.serialization.property("siblings_attempted", core.serialization.list(core.serialization.string())),
|
|
5
|
+
siblingsReturned: core.serialization.property("siblings_returned", core.serialization.list(core.serialization.string())),
|
|
6
|
+
siblingsMissing: core.serialization.property("siblings_missing", core.serialization.list(core.serialization.string())),
|
|
7
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const EventMarket: core.serialization.ObjectSchema<serializers.EventMarket.Raw, PredictorSDK.EventMarket>;
|
|
5
|
+
export declare namespace EventMarket {
|
|
6
|
+
interface Raw {
|
|
7
|
+
market_id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
export const EventMarket = core.serialization.object({
|
|
4
|
+
marketId: core.serialization.property("market_id", core.serialization.string()),
|
|
5
|
+
title: core.serialization.string(),
|
|
6
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
import { EventFanout } from "./EventFanout.js";
|
|
5
|
+
import { EventMarket } from "./EventMarket.js";
|
|
6
|
+
import { EventResponsePlatform } from "./EventResponsePlatform.js";
|
|
7
|
+
export declare const EventResponse: core.serialization.ObjectSchema<serializers.EventResponse.Raw, PredictorSDK.EventResponse>;
|
|
8
|
+
export declare namespace EventResponse {
|
|
9
|
+
interface Raw {
|
|
10
|
+
event_id: string;
|
|
11
|
+
platform: EventResponsePlatform.Raw;
|
|
12
|
+
title: string;
|
|
13
|
+
markets: EventMarket.Raw[];
|
|
14
|
+
fanout?: EventFanout.Raw | null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import { EventFanout } from "./EventFanout.js";
|
|
4
|
+
import { EventMarket } from "./EventMarket.js";
|
|
5
|
+
import { EventResponsePlatform } from "./EventResponsePlatform.js";
|
|
6
|
+
export const EventResponse = core.serialization.object({
|
|
7
|
+
eventId: core.serialization.property("event_id", core.serialization.string()),
|
|
8
|
+
platform: EventResponsePlatform,
|
|
9
|
+
title: core.serialization.string(),
|
|
10
|
+
markets: core.serialization.list(EventMarket),
|
|
11
|
+
fanout: EventFanout.optional(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const EventResponsePlatform: core.serialization.Schema<serializers.EventResponsePlatform.Raw, PredictorSDK.EventResponsePlatform>;
|
|
5
|
+
export declare namespace EventResponsePlatform {
|
|
6
|
+
type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const GetEventRequestPlatform: core.serialization.Schema<serializers.GetEventRequestPlatform.Raw, PredictorSDK.GetEventRequestPlatform>;
|
|
5
|
+
export declare namespace GetEventRequestPlatform {
|
|
6
|
+
type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const PolymarketPosition: core.serialization.ObjectSchema<serializers.PolymarketPosition.Raw, PredictorSDK.PolymarketPosition>;
|
|
5
|
+
export declare namespace PolymarketPosition {
|
|
6
|
+
interface Raw {
|
|
7
|
+
condition_id: string;
|
|
8
|
+
outcome: string;
|
|
9
|
+
shares: number;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
export const PolymarketPosition = core.serialization.object({
|
|
4
|
+
conditionId: core.serialization.property("condition_id", core.serialization.string()),
|
|
5
|
+
outcome: core.serialization.string(),
|
|
6
|
+
shares: core.serialization.number(),
|
|
7
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as PredictorSDK from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
import { PaginationBlock } from "./PaginationBlock.js";
|
|
5
|
+
import { PolymarketPosition } from "./PolymarketPosition.js";
|
|
6
|
+
export declare const PolymarketPositionsResponse: core.serialization.ObjectSchema<serializers.PolymarketPositionsResponse.Raw, PredictorSDK.PolymarketPositionsResponse>;
|
|
7
|
+
export declare namespace PolymarketPositionsResponse {
|
|
8
|
+
interface Raw {
|
|
9
|
+
address: string;
|
|
10
|
+
data: PolymarketPosition.Raw[];
|
|
11
|
+
pagination: PaginationBlock.Raw;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import { PaginationBlock } from "./PaginationBlock.js";
|
|
4
|
+
import { PolymarketPosition } from "./PolymarketPosition.js";
|
|
5
|
+
export const PolymarketPositionsResponse = core.serialization.object({
|
|
6
|
+
address: core.serialization.string(),
|
|
7
|
+
data: core.serialization.list(PolymarketPosition),
|
|
8
|
+
pagination: PaginationBlock,
|
|
9
|
+
});
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export * from "./CryptoPriceItem.js";
|
|
2
2
|
export * from "./CryptoPricesResponse.js";
|
|
3
3
|
export * from "./ErrorResponse.js";
|
|
4
|
+
export * from "./EventFanout.js";
|
|
5
|
+
export * from "./EventMarket.js";
|
|
6
|
+
export * from "./EventResponse.js";
|
|
7
|
+
export * from "./EventResponsePlatform.js";
|
|
8
|
+
export * from "./GetEventRequestPlatform.js";
|
|
4
9
|
export * from "./MarketsListResponse.js";
|
|
5
10
|
export * from "./PaginationBlock.js";
|
|
6
11
|
export * from "./PaymentRequiredErrorAction.js";
|
|
7
12
|
export * from "./PaymentRequiredErrorBody.js";
|
|
8
13
|
export * from "./PlatformMarket.js";
|
|
9
14
|
export * from "./PlatformMarketPlatform.js";
|
|
15
|
+
export * from "./PolymarketPosition.js";
|
|
16
|
+
export * from "./PolymarketPositionsResponse.js";
|
|
10
17
|
export * from "./PolymarketWalletResponse.js";
|
|
11
18
|
export * from "./SportsMatchingResponse.js";
|
|
12
19
|
export * from "./UnifiedMarket.js";
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export * from "./CryptoPriceItem.js";
|
|
2
2
|
export * from "./CryptoPricesResponse.js";
|
|
3
3
|
export * from "./ErrorResponse.js";
|
|
4
|
+
export * from "./EventFanout.js";
|
|
5
|
+
export * from "./EventMarket.js";
|
|
6
|
+
export * from "./EventResponse.js";
|
|
7
|
+
export * from "./EventResponsePlatform.js";
|
|
8
|
+
export * from "./GetEventRequestPlatform.js";
|
|
4
9
|
export * from "./MarketsListResponse.js";
|
|
5
10
|
export * from "./PaginationBlock.js";
|
|
6
11
|
export * from "./PaymentRequiredErrorAction.js";
|
|
7
12
|
export * from "./PaymentRequiredErrorBody.js";
|
|
8
13
|
export * from "./PlatformMarket.js";
|
|
9
14
|
export * from "./PlatformMarketPlatform.js";
|
|
15
|
+
export * from "./PolymarketPosition.js";
|
|
16
|
+
export * from "./PolymarketPositionsResponse.js";
|
|
10
17
|
export * from "./PolymarketWalletResponse.js";
|
|
11
18
|
export * from "./SportsMatchingResponse.js";
|
|
12
19
|
export * from "./UnifiedMarket.js";
|