@0xinsider/sdk 0.28.0 → 0.30.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/README.md +4 -0
- package/dist/client.d.ts +6 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +19 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +12 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +17 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +3 -3
- package/dist/provenance.js.map +1 -1
- package/dist/schema.d.ts +129 -44
- package/dist/schema.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -76,8 +76,8 @@ export type ApiError = {
|
|
|
76
76
|
/** The recommended next request instant (RFC3339), always in the future. Present on every retryable error: `pick_not_released`, `rate_limited`, `rate_limit_unavailable`, and `read_model_warming`. Omitted otherwise. The absolute twin of `Retry-After`; prefer the header for the sleep duration. For `pick_not_released`, the earliest of the next scheduled release, the next automatic selector attempt, the operating-window start, or about 60 seconds. See that response. */
|
|
77
77
|
retry_at?: string;
|
|
78
78
|
freshness?: FreshnessFailure;
|
|
79
|
-
/** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
|
|
80
|
-
reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
|
|
79
|
+
/** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
|
|
80
|
+
reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "market_out_of_scope" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
|
|
81
81
|
};
|
|
82
82
|
meta: ResponseMeta;
|
|
83
83
|
};
|
|
@@ -90,8 +90,8 @@ export type ApiErrorBody = {
|
|
|
90
90
|
/** The recommended next retry instant (RFC3339). Present on every retryable error (reason=pick_not_released, code=rate_limited including reason=monthly_quota_exceeded, code=rate_limit_unavailable, reason=read_model_warming) and omitted otherwise. Always in the future. For pick_not_released, the recommendation is advisory and can change before a pick becomes available. Schedule the next request from the returned value instead of inferring a release schedule or polling. Prefer Retry-After for the duration because it is immune to client clock skew. */
|
|
91
91
|
retry_at?: string;
|
|
92
92
|
freshness?: FreshnessFailure;
|
|
93
|
-
/** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
|
|
94
|
-
reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
|
|
93
|
+
/** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
|
|
94
|
+
reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "market_out_of_scope" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
|
|
95
95
|
};
|
|
96
96
|
export type BatchMarketFlowItem = {
|
|
97
97
|
/** Zero-based request index. Duplicate inputs keep separate result rows. */
|
|
@@ -103,6 +103,7 @@ export type BatchMarketFlowItem = {
|
|
|
103
103
|
};
|
|
104
104
|
export type BatchRateLimitMeta = {
|
|
105
105
|
basis: "batch_items_per_minute";
|
|
106
|
+
/** The batch item budget per minute for the caller's plan: 2500 item units on Pro, 5000 on Max. The same number X-Batch-RateLimit-Limit reports. */
|
|
106
107
|
limit: number;
|
|
107
108
|
remaining: number;
|
|
108
109
|
/** Unix timestamp when the batch item window resets. */
|
|
@@ -563,6 +564,8 @@ export type EdgeHunterObservation = {
|
|
|
563
564
|
observed_at: string;
|
|
564
565
|
/** Source cohort or additive projection view. emerging_pile is projected from wider_holder after source computation, overlaps its funnel denominator, and uses the source row's directional evidence. */
|
|
565
566
|
cohort: "wider_holder" | "in_play" | "emerging_pile";
|
|
567
|
+
/** Which evaluation place in its sport the row took this refresh. most_held: a wider_holder place for up to 8 markets per sport kicking off within 24 hours, most graded holders first, kept until kickoff while the holder page still shows a card or could not be read; also every in_play row, whose places go most graded holders first. soonest_kickoff: a wider_holder place among the sport's 8 soonest kickoffs, which is not kept. emerging_pile rows carry their source wider_holder row's value. Filter on most_held to keep the most-held selection. most_held_48h: every row of an admission=most_held_48h response, which is that opt-in selection (up to 8 markets per sport within 48 hours, most graded holders first, recomputed every refresh), including a market a default place also evaluates; it never appears on a default response. */
|
|
568
|
+
admitted_by: "most_held" | "soonest_kickoff" | "most_held_48h";
|
|
566
569
|
/** Always true. This row must not be routed to an order executor. */
|
|
567
570
|
observation_only: true;
|
|
568
571
|
/**
|
|
@@ -598,9 +601,9 @@ export type EdgeHunterObservation = {
|
|
|
598
601
|
conviction_score: number;
|
|
599
602
|
/** Whether the provider holder page came from the shared cache or a live provider read. */
|
|
600
603
|
provider_read_source: "cached" | "live";
|
|
601
|
-
/** True only when provider
|
|
604
|
+
/** True only when the provider page read for each outcome token listed every holder of that token. Observation collection reads one 100-row page per token; a token with more holders stays incomplete. False means holder counts and dollar totals measure the observed positive-holder subset. sharp_pct describes that observed subset and is not a lower bound on the full-population percentage. Incomplete scans cannot satisfy a future capital-promotion gate. */
|
|
602
605
|
holder_scan_complete: boolean;
|
|
603
|
-
/** Proven provider holder observation time. A warm cache hit uses only the original provider completion time from its companion metadata, never cache-read time. Null, malformed, future, or stale holder time fails in-play closed. */
|
|
606
|
+
/** Proven provider holder observation time. A warm cache hit uses only the original provider completion time from its companion metadata, never cache-read time. A wider_holder or emerging_pile row whose holder read did not finish in the current pass may reuse that market's last pregame holder page for up to 15 minutes; an in_play row may reuse its last in-play page, read after the provider reported the game live and never before that market's own kickoff, for up to 10 minutes. Both ages are counted when the snapshot is computed. Either reuse carries that page's original time here and provider_read_source cached. A pregame market more than an hour before kickoff reuses its last page the same way until that page is 10 minutes old, and only then is read again. Once that market's own kickoff has passed, an in_play row with provider_read_source cached, a warm hit or a reuse, never carries a page read before it. Null, malformed, future, or stale holder time fails in-play closed. */
|
|
604
607
|
holder_snapshot_at: string | null;
|
|
605
608
|
/** Truthful state of the directional read, which classifies each graded holder by its fresh synced legs across the game's markets and, when holder_scan_complete is true, by Polymarket's currentValue on both outcomes of this market. A wider_holder row can remain emitted with unavailable and terminal wider_holder_emitted; in_play fails closed instead and terminates as in_play_directional_unavailable. */
|
|
606
609
|
directional_status: "available" | "unknown_ungrouped" | "unknown_stale" | "unavailable";
|
|
@@ -615,7 +618,7 @@ export type EdgeHunterObservation = {
|
|
|
615
618
|
/** Required nullable frozen metadata context. Null only during the legacy-generation transition; selected reads require sidecar readiness and fail closed with 503 instead. */
|
|
616
619
|
market_context: EdgeHunterMarketContext | null;
|
|
617
620
|
};
|
|
618
|
-
/** Measured coverage of the frozen canonical observation generation and this requested page. For sports and esports reads, the first four counts remain global through category, cohort and all selectors. They are neither a census of all provider markets nor a count of successfully evaluated holders. Selected and returned counts describe the requested projection. An unmappable legacy category synthesizes a zero-work empty generation with all six counts zero and no degradation reasons; it does not read the all-sports cache. */
|
|
621
|
+
/** Measured coverage of the frozen canonical observation generation and this requested page. For sports and esports reads, the first four counts remain global through category, cohort and all selectors; with admission=most_held_48h they count that selection's generation, where every wider_holder candidate it did not take is capacity_limited. They are neither a census of all provider markets nor a count of successfully evaluated holders. Selected and returned counts describe the requested projection. An unmappable legacy category synthesizes a zero-work empty generation with all six counts zero and no degradation reasons; it does not read the all-sports cache. */
|
|
619
622
|
export type EdgeHunterObservationCoverage = {
|
|
620
623
|
/** Sum of canonical source-generation funnel input across all sports, before category, cohort or selector projection. */
|
|
621
624
|
input_markets: number;
|
|
@@ -623,7 +626,7 @@ export type EdgeHunterObservationCoverage = {
|
|
|
623
626
|
capacity_limited_markets: number;
|
|
624
627
|
/** All wider_holder and in_play observations emitted in the canonical source generation, before cohort, category or selector projection. Emerging pile is an overlapping projection and does not add source emissions. */
|
|
625
628
|
emitted_observations: number;
|
|
626
|
-
/** Canonical source-generation markets whose attempted holder scan did not establish complete coverage, including incomplete scans that did not emit an observation. */
|
|
629
|
+
/** Canonical source-generation markets whose attempted holder scan did not establish complete coverage, including incomplete scans that did not emit an observation. Collection reads one 100-row page per token, so a market with more holders on a token counts here by design; this count does not by itself degrade the generation. */
|
|
627
630
|
incomplete_holder_markets: number;
|
|
628
631
|
/** Observations matching the requested cohort, category, selectors and applicable pinned projection cutoff before pagination. */
|
|
629
632
|
selected_observations: number;
|
|
@@ -632,11 +635,29 @@ export type EdgeHunterObservationCoverage = {
|
|
|
632
635
|
};
|
|
633
636
|
/** One observed cause of operational degradation in the canonical all-sports observation generation. Reasons are independent of the one-terminal-per-input funnel and remain unchanged through category, cohort and selector projection. Intentional capacity limits and an unconfigured upcoming source are not degradation reasons. */
|
|
634
637
|
export type EdgeHunterObservationDegradationReason = {
|
|
635
|
-
/** Recorded producer cause. holder_scan_incomplete
|
|
638
|
+
/** Recorded producer cause. holder_scan_incomplete is retired and no longer emitted: the one-page holder read is an intentional bound, disclosed by each row's holder_scan_complete and by coverage.incomplete_holder_markets, and it does not degrade a generation. directional_unavailable can accompany an emitted wider_holder row; live_source_stale means provider live evidence exceeded its freshness bound. Other values identify reconciliation, applicable board-source or terminal failure evidence. */
|
|
636
639
|
reason: "holder_scan_incomplete" | "live_source_stale" | "directional_unavailable" | "funnel_unreconciled" | "board_live_unavailable" | "board_upcoming_unavailable" | "provider_unavailable" | "holder_deadline_unavailable" | "holder_computation_unavailable" | "missing_stored_market" | "price_unavailable" | "in_play_stale_observed" | "in_play_directional_unavailable" | "internal_unclassified" | "board_source_unavailable" | "board_deadline_unavailable";
|
|
637
640
|
/** Canonical sport for the recorded cause; null only for generation-wide evidence without a sport attribution. */
|
|
638
641
|
sport: string | null;
|
|
639
642
|
};
|
|
643
|
+
/** A market whose wider_holder card left this selection before kickoff, with why it left. */
|
|
644
|
+
export type EdgeHunterObservationDeparture = {
|
|
645
|
+
/** Raw Polymarket condition id. */
|
|
646
|
+
condition_id: string;
|
|
647
|
+
event_slug: string | null;
|
|
648
|
+
/** Canonical sport bucket the departed card carried. */
|
|
649
|
+
category: "Basketball" | "Football" | "Baseball" | "Hockey" | "MMA" | "Boxing" | "Soccer" | "Cricket" | "Golf" | "Tennis" | "Esports" | "Racing" | "Table Tennis" | "Pickleball";
|
|
650
|
+
/** The departed card's admitted_by: most_held_48h on an admission=most_held_48h response. */
|
|
651
|
+
admitted_by: "most_held" | "soonest_kickoff" | "most_held_48h";
|
|
652
|
+
/** Kickoff the departed card carried, in UTC. The entry leaves the list once it passes. */
|
|
653
|
+
game_start_time: string;
|
|
654
|
+
/** The departed card's observed_at: when its last evaluation finished. */
|
|
655
|
+
last_observed_at: string;
|
|
656
|
+
/** snapshot_as_of of the first snapshot of this selection without the card. */
|
|
657
|
+
departed_at: string;
|
|
658
|
+
/** Why the market has no card: its terminal in this selection's funnel in the snapshot it left, and while that terminal reports a read that did not finish (holder_deadline_unavailable, provider_unavailable, holder_computation_unavailable, internal_unclassified), the terminal of each later snapshot until one answers; an answered reason never changes. primary_slate_candidate: the market joined the funded slate, which view=signals covers. capacity_limited: it lost its evaluation place without another outcome. missing_stored_market: the market was no longer in the stored market universe. Any other value means what it means in the funnel, for example split_holder_pile, no_current_graded_holder or resolved. */
|
|
659
|
+
reason: EdgeHunterObservationTerminalReason;
|
|
660
|
+
};
|
|
640
661
|
/** Full Edge Hunter observations list envelope. Required degradation_reasons explains the source-generation verdict; required coverage distinguishes source input, intentional capacity exclusions, source emissions, incomplete holder scans, selection and the returned page. The view literal distinguishes advanced collections, including empty pages. */
|
|
641
662
|
export type EdgeHunterObservationsResponse = {
|
|
642
663
|
object: "list";
|
|
@@ -647,15 +668,19 @@ export type EdgeHunterObservationsResponse = {
|
|
|
647
668
|
next_cursor: string | null;
|
|
648
669
|
/** Completion time of the shared observation snapshot pinned by the cursor. */
|
|
649
670
|
snapshot_as_of: string;
|
|
650
|
-
/** True when an operational failure or unknown provider-board, holder, directional, reconciliation, or internal completeness state made this snapshot partial. This is snapshot-wide and can retain degradation that the funnel's one-terminal-per-input accounting cannot represent. Inspect degradation_reasons for every recorded source-generation cause and its nullable canonical sport attribution. Intentional
|
|
671
|
+
/** True when an operational failure or unknown provider-board, holder, directional, reconciliation, or internal completeness state made this snapshot partial. This is snapshot-wide and can retain degradation that the funnel's one-terminal-per-input accounting cannot represent. Inspect degradation_reasons for every recorded source-generation cause and its nullable canonical sport attribution. Intentional bounds do not by themselves set this field: capacity_limited rows remain fully accounted in the funnel, and a holder scan the one-page read leaves incomplete counts in coverage.incomplete_holder_markets; board_upcoming_status=not_configured is not a failure. */
|
|
651
672
|
degraded: boolean;
|
|
652
|
-
/** Sorted, deduplicated causes from the canonical all-sports generation, unchanged by category, cohort or selectors. Empty exactly when degraded is false. Capacity-limited input and board_upcoming_status=not_configured do not by themselves add a reason. */
|
|
673
|
+
/** Sorted, deduplicated causes from the canonical all-sports generation, unchanged by category, cohort or selectors; with admission=most_held_48h, from that selection's generation. Empty exactly when degraded is false. Capacity-limited input, the one-page holder bound (holder_scan_complete=false) and board_upcoming_status=not_configured do not by themselves add a reason. */
|
|
653
674
|
degradation_reasons: EdgeHunterObservationDegradationReason[];
|
|
654
675
|
coverage: EdgeHunterObservationCoverage;
|
|
655
676
|
funnel: EdgeHunterFunnelReport;
|
|
656
677
|
meta: ResponseMeta;
|
|
657
678
|
/** Normalized axes requested with a selector or category; omitted on an unselected default read. */
|
|
658
679
|
selection?: EdgeHunterSelection;
|
|
680
|
+
/** Echoes the opt-in admission rule a request named; omitted on a default read. When present, data, funnel, coverage, degraded and degradation_reasons describe that selection, not the default one. */
|
|
681
|
+
admission?: "most_held_48h";
|
|
682
|
+
/** cohort=wider_holder only, for the default selection and for admission=most_held_48h: markets that had a wider_holder card in an earlier snapshot of the same selection, have none in this one, and have not kicked off. Newest departed_at first. An entry stays until the game_start_time it carries passes, and leaves as soon as the market has a card again; while it stays only a reason that reports an unfinished read changes (see reason), and a later departure of the same market is a new entry. Filtered by the same category and selectors as data, and identical on every page of one snapshot. At most 336 entries; when more are open, the oldest departures leave first. An empty array means no card of this selection is departed. Omitted on in_play and emerging_pile, and on a snapshot that could not establish its departures, never reported as an empty array. Tracking that restarts after its record is lost starts empty. */
|
|
683
|
+
departures?: EdgeHunterObservationDeparture[];
|
|
659
684
|
};
|
|
660
685
|
/** Closed 25-value terminal-reason vocabulary for the accountable Edge Hunter observation funnel. capacity_limited is intentional bounded provider-work admission and does not itself set the snapshot degraded. board_source_unavailable is a completed board-source failure; board_deadline_unavailable means live-board work missed either an internal configured-scope deadline or the outer fair-wave deadline; both classify only already-started rows, so for the upcoming source read funnel.sports[].board_upcoming_status instead; provider_unavailable is reserved for an attempted holder-provider failure; holder_deadline_unavailable is holder cache/provider absolute-deadline exhaustion. */
|
|
661
686
|
export type EdgeHunterObservationTerminalReason = "outside_horizon" | "resolved" | "provider_closed" | "provider_excluded" | "invalid_market" | "missing_token" | "missing_stored_market" | "not_provider_live" | "board_source_unavailable" | "board_deadline_unavailable" | "primary_slate_candidate" | "zero_indexed_holder_research" | "capacity_limited" | "provider_unavailable" | "holder_deadline_unavailable" | "holder_computation_unavailable" | "holder_scan_incomplete" | "no_current_graded_holder" | "split_holder_pile" | "price_unavailable" | "wider_holder_emitted" | "in_play_emitted" | "in_play_stale_observed" | "in_play_directional_unavailable" | "internal_unclassified";
|
|
@@ -854,7 +879,7 @@ export type EdgeHunterSportFunnelReport = {
|
|
|
854
879
|
board_upcoming_configured: boolean;
|
|
855
880
|
/** Whether every configured upcoming-board scope completed as available. False with board_upcoming_configured=false means not applicable. When board_upcoming_configured is true and this flag is false, read board_upcoming_status for the cause (it reads unknown, i.e. no recorded cause, only on a snapshot cached before that field existed, which self-clears within one TTL): the board_source_unavailable and board_deadline_unavailable terminals are assigned only to already-started rows (the live half) and are structurally 0 for the upcoming source, so they never explain this flag. */
|
|
856
881
|
board_upcoming_available: boolean;
|
|
857
|
-
/** Why the upcoming-board source is (un)available. Board supply is one canonical-sport union: the bare category owns live truth and every configured composed league scope contributes upcoming rows; folded leagues without a configured board (currently NCAAB and CFL) are not in the upcoming union. available: every configured scope completed truthfully (a successful empty schedule still counts). capacity_limited: provider pagination or a configured upcoming cache published an intentionally bounded complete-event prefix; those rows are excluded from diagnostic-universe input and must not be treated as a complete upcoming universe. Cache-bound prefixes are limited to
|
|
882
|
+
/** Why the upcoming-board source is (un)available. Board supply is one canonical-sport union: the bare category owns live truth and every configured composed league scope contributes upcoming rows; folded leagues without a configured board (currently NCAAB and CFL) are not in the upcoming union. available: every configured scope completed truthfully (a successful empty schedule still counts). capacity_limited: provider pagination or a configured upcoming cache published an intentionally bounded complete-event prefix; those rows are excluded from diagnostic-universe input and must not be treated as a complete upcoming universe. Cache-bound prefixes are limited to an exact 5,000,000-byte final envelope. source_unavailable: composition failed before a truthful union; resolved scope readers turn half failures into cold_unavailable, so fresh producers are whole-union identity reconciliation or a registry contract failure and carry zero rows. cold_unavailable: every scope completed but at least one reported its upcoming half unavailable because no servable entry was inside the stale-serve bound and the background warm did not land in time; it is not by itself proof of a provider outage. deadline_unavailable: an internal configured-scope deadline or the outer bounded fair wave expired. An internal deadline may retain healthy bare-category or sibling-scope rows; the outer wave records zero rows. These upcoming fields do not describe league live-membership availability. If the bare-category live scope fails, all live rows are dropped even when a league scope completed, because the bare category is the sole live-truth owner. not_configured: no upcoming scope applies to the sport. unknown: exactly one cause -- a snapshot cached before this field existed whose legacy flags recorded an unavailable-but-configured half without saying why. Every freshly computed snapshot reports a concrete status, and a legacy available or not-configured row is reconstructed exactly, so unknown self-clears within one TTL. board_upcoming_available is exactly board_upcoming_status == available. */
|
|
858
883
|
board_upcoming_status: "unknown" | "not_configured" | "available" | "capacity_limited" | "source_unavailable" | "cold_unavailable" | "deadline_unavailable";
|
|
859
884
|
/** Configured upcoming scopes that did not complete as available. Values are category, a provider league tag slug (nfl, cfb, nba, wnba, euroleague-basketball, nhl, mls, valorant, league-of-legends, counter-strike-2, or dota-2), registry when the compiled scope/projection contract drifted, union when cross-scope identity reconciliation failed, or wave when the outer fair-wave deadline expired before scope-level evidence returned. Empty means no unavailable upcoming scope was identified; this includes healthy/not-configured rows and a legacy cached row. Observation league scopes are upcoming-only and perform no live-membership read. */
|
|
860
885
|
board_upcoming_unavailable_scopes: ("category" | "nfl" | "cfb" | "nba" | "wnba" | "euroleague-basketball" | "nhl" | "mls" | "valorant" | "league-of-legends" | "counter-strike-2" | "dota-2" | "registry" | "union" | "wave")[];
|
|
@@ -1028,6 +1053,8 @@ export type ExploreMarket = {
|
|
|
1028
1053
|
smart_count: number | null;
|
|
1029
1054
|
/** The outcome graded money leans toward RELATIVE TO THE PRICE: named only when the graded money's share of a side diverges from that side's price-implied share by at least 10 points, with at least $500 on the leaning side and outside the crowded-side guard. Null when the money sits with the price (no lean), when there is no graded money, or when the price is unavailable. The same rule as the market page. */
|
|
1030
1055
|
smart_label: string | null;
|
|
1056
|
+
/** When the oldest stored smart-money wallet behind this split (smart_score, smart_count and smart_label) last finished syncing. Graded wallets sync on different schedules, so this is often hours or days ago. Some holdings in the split can come from a Polymarket holder read cached for up to 3 minutes, which this time does not describe. Null when there is no split or a wallet's sync time is unknown. */
|
|
1057
|
+
sharp_money_as_of: string | null;
|
|
1031
1058
|
/** Display label for the YES/outcome_index=0 side, enriched from provider outcome metadata when available. */
|
|
1032
1059
|
outcome_yes_label: string | null;
|
|
1033
1060
|
/** Display label for the NO/outcome_index=1 side, enriched from provider outcome metadata when available. */
|
|
@@ -1078,9 +1105,13 @@ export type ExportCompleteness = {
|
|
|
1078
1105
|
sync_coverage: number;
|
|
1079
1106
|
};
|
|
1080
1107
|
export type ExportCounts = {
|
|
1108
|
+
/** Daily P&L rows. The daily P&L covers every market of the wallet. */
|
|
1081
1109
|
pnl_days: number;
|
|
1110
|
+
/** The wallet's sports and esports markets: the rows of the export's markets section, before its 50,000-row cap. */
|
|
1082
1111
|
exported_markets: number;
|
|
1112
|
+
/** Estimated trades in the wallet's sports and esports markets: the summed trade counts of those markets. The file counts its own rows in generation.source_watermarks.trades.rows. */
|
|
1083
1113
|
estimated_trade_rows: number;
|
|
1114
|
+
/** Estimated file size from estimated_trade_rows and exported_markets. */
|
|
1084
1115
|
estimated_size_mb: number;
|
|
1085
1116
|
};
|
|
1086
1117
|
/** `export_job_cancelled` data: the owner's export stopped because its owner cancelled it. */
|
|
@@ -1120,7 +1151,9 @@ export type ExportJobReadyData = {
|
|
|
1120
1151
|
export type ExportSourceRange = {
|
|
1121
1152
|
first_pnl_date: string | null;
|
|
1122
1153
|
last_pnl_date: string | null;
|
|
1154
|
+
/** The latest trade in the wallet's sports and esports markets. Null when it has none. */
|
|
1123
1155
|
latest_trade_at: string | null;
|
|
1156
|
+
/** Same instant as latest_trade_at: the latest activity of the markets the export holds. */
|
|
1124
1157
|
latest_market_activity_at: string | null;
|
|
1125
1158
|
};
|
|
1126
1159
|
export type ExportVolumeReconciliation = {
|
|
@@ -1128,6 +1161,7 @@ export type ExportVolumeReconciliation = {
|
|
|
1128
1161
|
provider_lifetime_volume: number | null;
|
|
1129
1162
|
/** Cash in USD, buys and sells, summed over the daily P&L rows this export carries, from the fills 0xinsider has stored for the wallet. It can cover less history than provider_lifetime_volume; never Polymarket's share count. */
|
|
1130
1163
|
exported_activity_volume: number;
|
|
1164
|
+
/** Cost basis in USD summed over the wallet's sports and esports markets, the markets section of the export. */
|
|
1131
1165
|
exported_market_cost_basis: number;
|
|
1132
1166
|
/** provider_lifetime_volume minus exported_activity_volume, in USD, rounded to cents. Null when provider_lifetime_volume is null. */
|
|
1133
1167
|
provider_activity_volume_gap: number | null;
|
|
@@ -1315,7 +1349,7 @@ export type GameStatus = {
|
|
|
1315
1349
|
period?: string;
|
|
1316
1350
|
/** The game clock as the provider spells it, never reformatted. Omitted when the provider sent none. */
|
|
1317
1351
|
clock?: string;
|
|
1318
|
-
/**
|
|
1352
|
+
/** Whether the game is in play. It is the provider's own in-play flag, except that a game the provider reports suspended (period SUS) or rescheduled to a later kickoff reads false. Omitted when no live-score frame exists, which is not the same as false. */
|
|
1319
1353
|
live?: boolean;
|
|
1320
1354
|
/** Whether the game is over. Always present. */
|
|
1321
1355
|
ended: boolean;
|
|
@@ -1432,9 +1466,9 @@ export type LargeTrade = {
|
|
|
1432
1466
|
traded_at: string;
|
|
1433
1467
|
size_usd: number;
|
|
1434
1468
|
side: "BUY" | "SELL";
|
|
1435
|
-
/** Traded outcome label (e.g. "Yes"/"No"/team name), resolved provider-first from the trade's outcome_index against market_canonical (index 0 -> yes, 1 -> no). Distinct axis from side (BUY/SELL): side is the trade direction, outcome is which leg was traded. null for multi-outcome (outcome_index >= 2) or unsynced markets, and for a Polymarket trade recorded before 2026-04-02T00:00:00Z
|
|
1469
|
+
/** Traded outcome label (e.g. "Yes"/"No"/team name), resolved provider-first from the trade's outcome_index against market_canonical (index 0 -> yes, 1 -> no). Distinct axis from side (BUY/SELL): side is the trade direction, outcome is which leg was traded. null for multi-outcome (outcome_index >= 2) or unsynced markets, and for a Polymarket trade recorded before 2026-04-02T00:00:00Z unless its stored outcome_index was verified against the fill's own trade records (before that date the stored index was wrong for a large share of trades; an unverified side is unknown, not defaulted). */
|
|
1436
1470
|
outcome: string | null;
|
|
1437
|
-
/** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the traded outcome; null when unavailable (e.g. unsynced markets) and for a Polymarket trade recorded before 2026-04-02T00:00:00Z
|
|
1471
|
+
/** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the traded outcome; null when unavailable (e.g. unsynced markets) and for a Polymarket trade recorded before 2026-04-02T00:00:00Z whose traded side is not verified (the same rule as outcome). */
|
|
1438
1472
|
token_id: string | null;
|
|
1439
1473
|
price: number;
|
|
1440
1474
|
/** Current trade review score on a 0..1 scale; higher values indicate a stronger review signal. This is the current response value and can differ from the recorded score. Missing measurements remain unavailable. */
|
|
@@ -1559,7 +1593,7 @@ export type LeaderboardEntry = {
|
|
|
1559
1593
|
markets_traded?: number;
|
|
1560
1594
|
/** The wallet's win rate across ALL categories, not the filtered one. ?category= decides WHICH wallets are listed (the wallet must be ranked in that category); it does not rescope this field, so a soccer-filtered list still reports each wallet's overall rate. For a per-category record use GET /api/v1/trader/{address}/categories. */
|
|
1561
1595
|
win_rate?: number;
|
|
1562
|
-
/** Observed trading style identifier. New rows use two_sided, category_focused, high_activity, diversified, mixed, or unclassified. Historical identifiers remain readable during normal reclassification; style does not predict skill or intent. */
|
|
1596
|
+
/** Observed trading style identifier. New rows use two_sided, category_focused, high_activity, diversified, mixed, or unclassified, counted over the wallet's sports and esports markets only. Historical identifiers remain readable during normal reclassification; style does not predict skill or intent. */
|
|
1563
1597
|
strategy_type?: string;
|
|
1564
1598
|
/** Provider platform. Always polymarket. */
|
|
1565
1599
|
platform: "polymarket";
|
|
@@ -1711,6 +1745,8 @@ export type MarketHolder = {
|
|
|
1711
1745
|
/** Resolved markets in the category that this wallet closed with a profit or a loss. A market resolved at zero realized P&L is in neither count. */
|
|
1712
1746
|
decided: number;
|
|
1713
1747
|
};
|
|
1748
|
+
/** The wallet's average entry price in the market's canonical category, as a 0..1 fraction of $1 (0.98 is 98 cents). Its sample is the wallet's settled markets in that category of $20 or more where it bought one side at a known price, so it can differ from the `category_win_record` sample. A wallet that buys near-certain outcomes wins almost every time, so read the win rate beside this price. Present only with `category_win_rate_status` = `measured`, and only when that sample has at least 5 markets. When `category_win_rate_game` is present the price is still the `Esports` category's: there is no per-game price. Absent otherwise and on payloads predating the field. */
|
|
1749
|
+
category_avg_price?: number;
|
|
1714
1750
|
/** For an esports market, the game `category_win_rate` and `category_win_record` were measured in: `LoL`, `CS2`, `Dota 2`, `Valorant`, `Call of Duty`, `Honor of Kings`, `Mobile Legends: Bang Bang`, `Overwatch`, `Rainbow Six Siege`, `Rocket League` or `StarCraft II`. Present only when the wallet's record in that game clears the 5-resolved-market floor, in which case the rate and record are the game's rather than the `Esports` bucket's. Absent when the rate is the bucket's (the wallet's game history is under the floor), on every non-esports market, and beside every non-measured status. Label the rate with this when present and with the market's `category` otherwise. */
|
|
1715
1751
|
category_win_rate_game?: string;
|
|
1716
1752
|
/** Why `category_win_rate` is present or absent: `measured` (rate present), `not_enough_data` (under the floor of 5 decided markets in the category), or `unavailable` (the market has no canonical category, or the read failed; retry later). Always present on this route. */
|
|
@@ -1918,6 +1954,8 @@ export type PickHolder = {
|
|
|
1918
1954
|
/** Resolved markets in the category that this wallet closed with a profit or a loss. A market resolved at zero realized P&L is in neither count. */
|
|
1919
1955
|
decided: number;
|
|
1920
1956
|
};
|
|
1957
|
+
/** The wallet's average entry price in the pick's canonical category, as a 0..1 fraction of $1 (0.98 is 98 cents). Its sample is the wallet's settled markets in that category of $20 or more where it bought one side at a known price, so it can differ from the `category_win_record` sample. A wallet that buys near-certain outcomes wins almost every time, so read the win rate beside this price. Present only with `category_win_rate_status` = `measured`, and only when that sample has at least 5 markets. When `category_win_rate_game` is present the price is still the `Esports` category's: there is no per-game price. Absent otherwise and on payloads predating the field. */
|
|
1958
|
+
category_avg_price?: number;
|
|
1921
1959
|
/** For an esports pick, the game `category_win_rate` and `category_win_record` were measured in, by the same name the pick's `display_category` uses for it: `LoL`, `CS2`, `Dota 2`, `Valorant`, `Call of Duty`, `Honor of Kings`, `Mobile Legends: Bang Bang`, `Overwatch`, `Rainbow Six Siege`, `Rocket League` or `StarCraft II`. Present only when the wallet's record in that game clears the 5-resolved-market floor, in which case the rate and record are the game's rather than the `Esports` bucket's. Absent when the rate is the bucket's (the wallet's game history is under the floor), on every non-esports pick, beside every non-measured status, and on payloads predating the field. Label the rate with this when present and with `category` otherwise. */
|
|
1922
1960
|
category_win_rate_game?: string;
|
|
1923
1961
|
/** Why `category_win_rate` is present or absent on a `display_holders` entry: `measured` (rate present), `not_enough_data` (the wallet is below the resolved-market floor of 5 in the category), or `unavailable` (the annotation read failed; retry later). Absent entirely on `holders` entries, legacy rows, and payloads predating the field -- absence means the roster was never annotated, not a small sample. */
|
|
@@ -2144,11 +2182,11 @@ export type PickOfTheDayArchiveDay = {
|
|
|
2144
2182
|
wins: number;
|
|
2145
2183
|
/** Picks on the day that resolved as a loss, counted by the same pass as hit_rate.losses. */
|
|
2146
2184
|
losses: number;
|
|
2147
|
-
/** Picks on the day that resolved void
|
|
2185
|
+
/** Picks on the day that resolved void: the market settled with no winner, or the game was suspended or postponed and not completed within 72 hours of kickoff. A void is neither a win nor a loss and is not staked, so it enters no money figure. */
|
|
2148
2186
|
void: number;
|
|
2149
2187
|
/** Picks on the day not yet resolved. A day whose picks are all pending is a real 0-0 day with pending > 0, not a missing record. */
|
|
2150
2188
|
pending: number;
|
|
2151
|
-
/** Net units over the day's visible, valued,
|
|
2189
|
+
/** Net units over the day's visible, valued, staked (win or loss) picks: the same population staked_usd runs over. Omitted when the day has not scored -- every pick still pending or void, or a price-gated current row -- which is not the same as a real 0.0 day. */
|
|
2152
2190
|
unit_score?: number;
|
|
2153
2191
|
/** unit_score pre-formatted as signed units to two decimals (for example +1.24u or -2.00u), by the same formatter the per-pick unit_score_display and hit_rate.unit_score_display use. Present exactly when unit_score is; unit_score is the source value. */
|
|
2154
2192
|
unit_score_display?: string;
|
|
@@ -2185,13 +2223,13 @@ export type PickOfTheDayArchiveEntry = {
|
|
|
2185
2223
|
resolved_at?: string;
|
|
2186
2224
|
/** The flat stake this row was valued at, in USD: 1000 since 2026-09-22 (100 before). Every row of the record is valued at the current stake, including picks published before the change. Present exactly when return_usd is. */
|
|
2187
2225
|
stake_usd?: number;
|
|
2188
|
-
/** Gross return of stake_usd on this resolved pick: a win returns stake_usd / backed_price
|
|
2226
|
+
/** Gross return of stake_usd on this resolved pick: a win returns stake_usd / backed_price and a loss returns 0. A loss always returns 0 (the whole stake is lost regardless of price). The operand is published beside it as backed_price on every row that carries a return, so the entry never has to be recovered by inverting this number. Omitted (not null) for a still-pending pick, for a void (the market settled with no winner, or the game was suspended or postponed and not completed within 72 hours of kickoff, so the pick is not staked) and for a resolved WIN with no frozen price (a win's payout needs the price); mirrors the backend skip-when-absent behavior and the route-client optional (non-nullable) schema. */
|
|
2189
2227
|
return_usd?: number;
|
|
2190
|
-
/** The same return on a literal $100 (a win returns 100 / backed_price, a loss 0
|
|
2228
|
+
/** The same return on a literal $100 (a win returns 100 / backed_price, a loss 0), kept for compatibility: the field predates stake_usd and its name promises the $100 basis. Present exactly when return_usd is. */
|
|
2191
2229
|
return_per_100?: number;
|
|
2192
|
-
/** Pre-formatted return_usd as USD with cents: "$2,000.00". Present exactly when return_usd is -- it is formatted from that already-gated value -- so it is omitted for a still-pending pick, an unpriced win, and any pick whose backed side is withheld. Convenience only; return_usd is the source value. */
|
|
2230
|
+
/** Pre-formatted return_usd as USD with cents: "$2,000.00". Present exactly when return_usd is -- it is formatted from that already-gated value -- so it is omitted for a still-pending pick, a void, an unpriced win, and any pick whose backed side is withheld. Convenience only; return_usd is the source value. */
|
|
2193
2231
|
payout_display?: string;
|
|
2194
|
-
/** Frozen price of the backed side (0..1) that return_usd and return_per_100 were computed from: on a win, stake_usd / backed_price equals return_usd. It is the Polymarket CLOB order book midpoint at release, frozen write-once at publication, not an executed fill: a buyer lifts the ask, so a subscriber's own entry is usually a little worse than this price. Present exactly when return_usd is, so it is omitted for a still-pending pick, an unpriced win, and any pick whose backed side is withheld. */
|
|
2232
|
+
/** Frozen price of the backed side (0..1) that return_usd and return_per_100 were computed from: on a win, stake_usd / backed_price equals return_usd. It is the Polymarket CLOB order book midpoint at release, frozen write-once at publication, not an executed fill: a buyer lifts the ask, so a subscriber's own entry is usually a little worse than this price. Present exactly when return_usd is, and on a void, which carries no return: so it is omitted for a still-pending pick, an unpriced win, and any pick whose backed side is withheld. */
|
|
2195
2233
|
backed_price?: number;
|
|
2196
2234
|
/** Closing-line value toward the backed side, computed as (close / entry - 1) * 100. Omitted when the row is gated, ineligible, or not measured. */
|
|
2197
2235
|
clv_pct?: number;
|
|
@@ -2285,9 +2323,9 @@ export type PickOfTheDayHitRate = {
|
|
|
2285
2323
|
pending: number;
|
|
2286
2324
|
/** The flat stake every money figure here assumes, in USD: 1000 since 2026-09-22 (100 before). Always present. */
|
|
2287
2325
|
stake_usd: number;
|
|
2288
|
-
/** Cumulative profit (USD) of a stake_usd-per-pick strategy over visible valued
|
|
2326
|
+
/** Cumulative profit (USD) of a stake_usd-per-pick strategy over visible valued settled picks: a priced win pays stake_usd/backed_price - stake_usd, every visible loss pays -stake_usd independent of price. A void is not staked and adds nothing. An unpriced visible win and a current non-Insider row whose price is gated remain in wins/losses but are excluded from price-derived totals. */
|
|
2289
2327
|
net_profit_usd: number;
|
|
2290
|
-
/** Total staked (USD) = stake_usd * count of visible valued
|
|
2328
|
+
/** Total staked (USD) = stake_usd * count of visible valued settled picks: every visible loss and every priced win. Voids, unpriced wins and current non-Insider rows whose price is gated are excluded. */
|
|
2291
2329
|
staked_usd: number;
|
|
2292
2330
|
/** Return on the staked amount as a percentage (net_profit_usd / staked_usd * 100, to 1 decimal); 0 when nothing is staked. */
|
|
2293
2331
|
roi_pct: number;
|
|
@@ -2335,7 +2373,7 @@ export type PickOfTheDayHitRate = {
|
|
|
2335
2373
|
clv_beats_close: number;
|
|
2336
2374
|
/** Measured public rows where close exactly equals entry. */
|
|
2337
2375
|
clv_ties: number;
|
|
2338
|
-
/** Cumulative track-record series, one point per decided (win/loss) pick in ascending pick_date order (
|
|
2376
|
+
/** Cumulative track-record series, one point per decided (win/loss) pick in ascending pick_date order (pending and void picks add no point). A non-valued decided row carries cumulative profit forward while advancing hit rate. The last point's net_profit_usd and hit_rate_pct equal the headline net_profit_usd and pct by construction. Empty when nothing is decided. */
|
|
2339
2377
|
series: {
|
|
2340
2378
|
/** The decided pick's publish date (YYYY-MM-DD). */
|
|
2341
2379
|
date: string;
|
|
@@ -2385,6 +2423,8 @@ export type PickOfTheDayLedgerOpenedEntry = {
|
|
|
2385
2423
|
payload: PickOfTheDayCommitmentPayload;
|
|
2386
2424
|
/** How the pick settled. Never pending: a pending pick is a sealed entry. */
|
|
2387
2425
|
outcome: "win" | "loss" | "void";
|
|
2426
|
+
/** Why the site withdrew this pick from its track record, or null when the pick counts. provider_game_cancelled: Polymarket marked the game Cancelled while the pick was pending. published_after_kickoff: the pick was published at or after its game started, including a suspended match that resumed later, so it was never a pre-game pick; this can be set after the pick settled. A withdrawn pick keeps its commitment and its real outcome here, but the site's record leaves it out of every count and money figure. Not part of the hashed payload, so it never moves commitment_hash. */
|
|
2427
|
+
withdrawal_reason: "provider_game_cancelled" | "published_after_kickoff" | null;
|
|
2388
2428
|
/** Frozen matchup, for a reader. */
|
|
2389
2429
|
matchup: string;
|
|
2390
2430
|
/** Frozen canonical sport bucket (for example Basketball or MMA), not the exact public league identity; the archive owns that. */
|
|
@@ -2451,6 +2491,8 @@ export type PickOfTheDayLedgerUncommittedEntry = {
|
|
|
2451
2491
|
pre_commitment: true;
|
|
2452
2492
|
/** How the pick settled, or pending. */
|
|
2453
2493
|
outcome: "pending" | "win" | "loss" | "void";
|
|
2494
|
+
/** Omitted while the pick is pending; once it settles, why the site withdrew it from its track record, or null when the pick counts. provider_game_cancelled: Polymarket marked the game Cancelled while the pick was pending. published_after_kickoff: the pick was published at or after its game started, including a suspended match that resumed later, so it was never a pre-game pick; this can be set after the pick settled. A withdrawn pick stays here with its real outcome, but the site's record leaves it out of every count and money figure. */
|
|
2495
|
+
withdrawal_reason?: "provider_game_cancelled" | "published_after_kickoff" | null;
|
|
2454
2496
|
/** Frozen matchup, for a reader. */
|
|
2455
2497
|
matchup?: string;
|
|
2456
2498
|
/** Frozen canonical sport bucket (for example Basketball or MMA), not the exact public league identity; the archive owns that. */
|
|
@@ -2819,6 +2861,8 @@ export type ReportPayload = {
|
|
|
2819
2861
|
categories: Record<string, unknown>[] | null;
|
|
2820
2862
|
/** Counts of current grades for distinct Polymarket traders with at least one whale alert in the report's source date range. The grade is the current projection at snapshot materialization time, not a historical grade at trade time. Traders without a current ranking projection are omitted; a null grade entry means the active trader's current grade is unavailable. */
|
|
2821
2863
|
grade_distribution: Record<string, unknown>[] | null;
|
|
2864
|
+
/** Which markets the report counts. sports_and_esports for a period that ends on or after 2026-10-21: totals, categories, top trades and the grade cohort cover sports and esports markets only. all_markets for an earlier period, whose stored report keeps every Polymarket market it published. */
|
|
2865
|
+
market_scope: "all_markets" | "sports_and_esports";
|
|
2822
2866
|
};
|
|
2823
2867
|
export type ReportReconciliation = {
|
|
2824
2868
|
volume_kind: "local_whale_activity_volume";
|
|
@@ -3113,6 +3157,8 @@ export type Trader = {
|
|
|
3113
3157
|
last_30d?: number;
|
|
3114
3158
|
/** Additive lossless counterpart. Omitted when the trusted native realized-P&L source is unavailable; existing numeric fields keep their display-safe v1 semantics. */
|
|
3115
3159
|
exact?: TraderPnlExact;
|
|
3160
|
+
/** Additive (#27311): the wallet's sports and esports record, the figure the 0xinsider profile headlines. Omitted until 0xinsider has computed the wallet's record; absent means not computed yet, never zero. The other pnl fields stay Polymarket's wallet-wide figures. */
|
|
3161
|
+
in_scope?: TraderPnlInScope;
|
|
3116
3162
|
};
|
|
3117
3163
|
stats: {
|
|
3118
3164
|
markets_traded?: number;
|
|
@@ -3124,7 +3170,7 @@ export type Trader = {
|
|
|
3124
3170
|
exact?: TraderStatsExact;
|
|
3125
3171
|
};
|
|
3126
3172
|
strategy?: {
|
|
3127
|
-
/** Observed trading style identifier. New rows use two_sided, category_focused, high_activity, diversified, mixed, or unclassified. Historical identifiers remain readable during normal reclassification; style does not predict skill or intent. */
|
|
3173
|
+
/** Observed trading style identifier. New rows use two_sided, category_focused, high_activity, diversified, mixed, or unclassified, counted over the wallet's sports and esports markets only. Historical identifiers remain readable during normal reclassification; style does not predict skill or intent. */
|
|
3128
3174
|
strategy_type: string;
|
|
3129
3175
|
description?: string;
|
|
3130
3176
|
confidence?: number;
|
|
@@ -3194,7 +3240,7 @@ export type TraderCategoryRecords = {
|
|
|
3194
3240
|
};
|
|
3195
3241
|
export type TraderContext = {
|
|
3196
3242
|
trader: Trader;
|
|
3197
|
-
/** Aggregate position and P&L coverage for the trader. Omitted entirely (key absent, never null) when the trader is not in the local database or native net economics is unavailable. Realized fields remain numbers when present, including a genuine zero. */
|
|
3243
|
+
/** Aggregate position and P&L coverage for the trader. Counts all Polymarket markets, not only sports and esports. Omitted entirely (key absent, never null) when the trader is not in the local database or native net economics is unavailable. Realized fields remain numbers when present, including a genuine zero. */
|
|
3198
3244
|
position_summary?: {
|
|
3199
3245
|
/** Provider markets_traded count when known; null when the provider total is unavailable. */
|
|
3200
3246
|
markets_total: number | null;
|
|
@@ -3275,6 +3321,8 @@ export type TraderExportGeneration = {
|
|
|
3275
3321
|
selected_at: string;
|
|
3276
3322
|
consistency: "repeatable_read";
|
|
3277
3323
|
source_watermarks: TraderExportSourceWatermarks;
|
|
3324
|
+
/** The markets the file's trades and markets sections hold: sports and esports markets only (export_metadata.scope_note in a JSON or NDJSON file names the sections that still cover every market). Absent on a file written before 2026-10-22, which holds every market; a submit never reuses such a file. */
|
|
3325
|
+
product_scope?: "sports_esports_v1";
|
|
3278
3326
|
};
|
|
3279
3327
|
export type TraderExportJob = {
|
|
3280
3328
|
object: "trader_export_job";
|
|
@@ -3283,7 +3331,9 @@ export type TraderExportJob = {
|
|
|
3283
3331
|
/** queued: accepted, not started. running: the worker is streaming rows. reconcile_required: the upload finished but the storage completion answer was lost; the hourly reconciler reads the object back and moves the job to ready or failed, and expires_at bounds the wait. ready: downloadable until expires_at. failed: terminal; error says why; submit a new export. expired: the retention window passed; the file is retired, the download route answers 410, submit a new export. cancel_requested: the owner cancelled a running job (POST /api/v1/trader/{address}/export/cancel); the worker stops at its next safe point and the job reads cancelled. cancelled: terminal; the owner cancelled the job and no file was published; submit a new export. A job that has not reached ready by expires_at reads failed with error 'export expired before completion'. failed, cancelled and expired rows stay readable for 48 hours, then the job answers 404. */
|
|
3284
3332
|
status: "queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled";
|
|
3285
3333
|
format: "json" | "ndjson" | "csv";
|
|
3334
|
+
/** Trade rows the file holds: trades in the wallet's sports and esports markets, counted in the file's own read snapshot. Null until the worker has read the snapshot (queued, and early in running); a job accepted before 2026-10-22 can carry the earlier all-markets estimate until its file is read. */
|
|
3286
3335
|
total_trades: number | null;
|
|
3336
|
+
/** Trade rows written so far; equals total_trades once the file is read. */
|
|
3287
3337
|
processed_trades: number | null;
|
|
3288
3338
|
file_size: number | null;
|
|
3289
3339
|
error: string | null;
|
|
@@ -3343,6 +3393,8 @@ export type TraderExportPositionWatermark = {
|
|
|
3343
3393
|
};
|
|
3344
3394
|
export type TraderExportSnapshot = {
|
|
3345
3395
|
address: string;
|
|
3396
|
+
/** The markets the export file's trades and markets sections hold: sports and esports markets only. counts.exported_markets, counts.estimated_trade_rows, counts.estimated_size_mb, reconciliation.exported_market_cost_basis and source_range.latest_trade_at and latest_market_activity_at describe those markets. The pnl dates, pnl_days, exported_activity_volume and completeness cover every market of the wallet. */
|
|
3397
|
+
product_scope: "sports_esports_v1";
|
|
3346
3398
|
generated_at: string;
|
|
3347
3399
|
source_range: ExportSourceRange;
|
|
3348
3400
|
completeness: ExportCompleteness;
|
|
@@ -3358,7 +3410,9 @@ export type TraderExportSourceWatermarks = {
|
|
|
3358
3410
|
};
|
|
3359
3411
|
export type TraderExportTradeWatermark = {
|
|
3360
3412
|
source: string;
|
|
3413
|
+
/** sports_esports_rows: the file holds every stored trade in the wallet's sports and esports markets. all_matching_rows on a file written before 2026-10-22, which holds every market's trades. */
|
|
3361
3414
|
coverage: string;
|
|
3415
|
+
/** Trade rows the file holds, counted in the same read snapshot as the rows. */
|
|
3362
3416
|
rows: number;
|
|
3363
3417
|
first_activity_date: string | null;
|
|
3364
3418
|
};
|
|
@@ -3511,6 +3565,23 @@ export type TraderPnlExact = {
|
|
|
3511
3565
|
/** Native Polymarket realized P&L plus credited maker and taker rebates, with fees included, from the trusted matching `trader_trading_pnl.net_realized_pnl` snapshot. */
|
|
3512
3566
|
realized: ExactDecimal;
|
|
3513
3567
|
};
|
|
3568
|
+
/** A wallet's sports and esports record (#27311): Polymarket's published realized P&L (pnl.realized plus any published pnl.correction) split into the part earned on sports and esports markets. Fees, refunds and rebates stay in, apportioned by cost. A wallet wholly in sports keeps the published figure exactly; one with no sports market gets 0. Refreshed after each wallet sync; as_of dates it. */
|
|
3569
|
+
export type TraderPnlInScope = {
|
|
3570
|
+
/** Names the split rule, currently sports_esports_split_v1. A new value means the rule changed; compare figures only within one basis. */
|
|
3571
|
+
basis: string;
|
|
3572
|
+
/** Sports and esports realized P&L in USD, display-safe. null when the wallet has no published realized figure to split. */
|
|
3573
|
+
realized_pnl: number | null;
|
|
3574
|
+
/** Sports and esports markets the wallet has traded, any status. */
|
|
3575
|
+
markets: number;
|
|
3576
|
+
/** Of those, the markets that have resolved. */
|
|
3577
|
+
markets_resolved: number;
|
|
3578
|
+
/** Share of decided sports and esports markets the wallet won, 0 to 1. null with no decided market. */
|
|
3579
|
+
win_rate: number | null;
|
|
3580
|
+
/** The wallet's markets outside sports and esports, which 0xinsider no longer lists. */
|
|
3581
|
+
markets_out_of_scope: number;
|
|
3582
|
+
/** When the record behind these figures was computed. */
|
|
3583
|
+
as_of: string;
|
|
3584
|
+
};
|
|
3514
3585
|
/** Lossless counterparts for trader statistics. The object is omitted when the verified provider observation is unavailable. */
|
|
3515
3586
|
export type TraderStatsExact = {
|
|
3516
3587
|
/** stats.total_volume as an exact decimal: full-history both-sides cash volume in USD, Polymarket user-volume `volume_usdc`, from the verified `trader_usd_volume` observation. Never Polymarket's share count. */
|
|
@@ -3630,6 +3701,7 @@ export type Usage = {
|
|
|
3630
3701
|
data: {
|
|
3631
3702
|
rate_limit: {
|
|
3632
3703
|
used: number;
|
|
3704
|
+
/** The per-minute window's limit for the caller's plan: 100 requests on Pro, 200 on Max. The same number RateLimit-Limit reports on a counted request. */
|
|
3633
3705
|
limit: number;
|
|
3634
3706
|
remaining: number;
|
|
3635
3707
|
reset_at: number;
|
|
@@ -3660,6 +3732,8 @@ export type Usage = {
|
|
|
3660
3732
|
pay_as_you_go: boolean;
|
|
3661
3733
|
/** The most requests this account is admitted in a UTC calendar month once enforcement has begun: limit, or four times limit with pay as you go on (2,000,000 for Pro). null for an admin account, which no number stops. Additive since 2026-09-22. */
|
|
3662
3734
|
ceiling: number | null;
|
|
3735
|
+
/** Why pay as you go is unavailable, or null. usage_price_reconciliation_required: the account's usage subscription carries a historical price whose included requests differ from its plan's, so pay as you go stays off (pay_as_you_go false) until billing reconciles it. Always sent since 2026-10-17. */
|
|
3736
|
+
unavailable_reason: "usage_price_reconciliation_required" | null;
|
|
3663
3737
|
} | null;
|
|
3664
3738
|
};
|
|
3665
3739
|
meta: ResponseMeta;
|
|
@@ -3949,7 +4023,9 @@ export interface OperationData {
|
|
|
3949
4023
|
/** queued: accepted, not started. running: the worker is streaming rows. reconcile_required: the upload finished but the storage completion answer was lost; the hourly reconciler reads the object back and moves the job to ready or failed, and expires_at bounds the wait. ready: downloadable until expires_at. failed: terminal; error says why; submit a new export. expired: the retention window passed; the file is retired, the download route answers 410, submit a new export. cancel_requested: the owner cancelled a running job (POST /api/v1/trader/{address}/export/cancel); the worker stops at its next safe point and the job reads cancelled. cancelled: terminal; the owner cancelled the job and no file was published; submit a new export. A job that has not reached ready by expires_at reads failed with error 'export expired before completion'. failed, cancelled and expired rows stay readable for 48 hours, then the job answers 404. */
|
|
3950
4024
|
status: "queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled";
|
|
3951
4025
|
format: "json" | "ndjson" | "csv";
|
|
4026
|
+
/** Trade rows the file holds: trades in the wallet's sports and esports markets, counted in the file's own read snapshot. Null until the worker has read the snapshot (queued, and early in running); a job accepted before 2026-10-22 can carry the earlier all-markets estimate until its file is read. */
|
|
3952
4027
|
total_trades: number | null;
|
|
4028
|
+
/** Trade rows written so far; equals total_trades once the file is read. */
|
|
3953
4029
|
processed_trades: number | null;
|
|
3954
4030
|
file_size: number | null;
|
|
3955
4031
|
error: string | null;
|
|
@@ -4131,7 +4207,9 @@ export interface OperationData {
|
|
|
4131
4207
|
/** queued: accepted, not started. running: the worker is streaming rows. reconcile_required: the upload finished but the storage completion answer was lost; the hourly reconciler reads the object back and moves the job to ready or failed, and expires_at bounds the wait. ready: downloadable until expires_at. failed: terminal; error says why; submit a new export. expired: the retention window passed; the file is retired, the download route answers 410, submit a new export. cancel_requested: the owner cancelled a running job (POST /api/v1/trader/{address}/export/cancel); the worker stops at its next safe point and the job reads cancelled. cancelled: terminal; the owner cancelled the job and no file was published; submit a new export. A job that has not reached ready by expires_at reads failed with error 'export expired before completion'. failed, cancelled and expired rows stay readable for 48 hours, then the job answers 404. */
|
|
4132
4208
|
status: "queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled";
|
|
4133
4209
|
format: "json" | "ndjson" | "csv";
|
|
4210
|
+
/** Trade rows the file holds: trades in the wallet's sports and esports markets, counted in the file's own read snapshot. Null until the worker has read the snapshot (queued, and early in running); a job accepted before 2026-10-22 can carry the earlier all-markets estimate until its file is read. */
|
|
4134
4211
|
total_trades: number | null;
|
|
4212
|
+
/** Trade rows written so far; equals total_trades once the file is read. */
|
|
4135
4213
|
processed_trades: number | null;
|
|
4136
4214
|
file_size: number | null;
|
|
4137
4215
|
error: string | null;
|
|
@@ -4180,6 +4258,7 @@ export interface OperationData {
|
|
|
4180
4258
|
getUsage: {
|
|
4181
4259
|
rate_limit: {
|
|
4182
4260
|
used: number;
|
|
4261
|
+
/** The per-minute window's limit for the caller's plan: 100 requests on Pro, 200 on Max. The same number RateLimit-Limit reports on a counted request. */
|
|
4183
4262
|
limit: number;
|
|
4184
4263
|
remaining: number;
|
|
4185
4264
|
reset_at: number;
|
|
@@ -4210,6 +4289,8 @@ export interface OperationData {
|
|
|
4210
4289
|
pay_as_you_go: boolean;
|
|
4211
4290
|
/** The most requests this account is admitted in a UTC calendar month once enforcement has begun: limit, or four times limit with pay as you go on (2,000,000 for Pro). null for an admin account, which no number stops. Additive since 2026-09-22. */
|
|
4212
4291
|
ceiling: number | null;
|
|
4292
|
+
/** Why pay as you go is unavailable, or null. usage_price_reconciliation_required: the account's usage subscription carries a historical price whose included requests differ from its plan's, so pay as you go stays off (pay_as_you_go false) until billing reconciles it. Always sent since 2026-10-17. */
|
|
4293
|
+
unavailable_reason: "usage_price_reconciliation_required" | null;
|
|
4213
4294
|
} | null;
|
|
4214
4295
|
};
|
|
4215
4296
|
getWebhook: WebhookEndpoint;
|
|
@@ -4299,7 +4380,9 @@ export interface OperationData {
|
|
|
4299
4380
|
/** queued: accepted, not started. running: the worker is streaming rows. reconcile_required: the upload finished but the storage completion answer was lost; the hourly reconciler reads the object back and moves the job to ready or failed, and expires_at bounds the wait. ready: downloadable until expires_at. failed: terminal; error says why; submit a new export. expired: the retention window passed; the file is retired, the download route answers 410, submit a new export. cancel_requested: the owner cancelled a running job (POST /api/v1/trader/{address}/export/cancel); the worker stops at its next safe point and the job reads cancelled. cancelled: terminal; the owner cancelled the job and no file was published; submit a new export. A job that has not reached ready by expires_at reads failed with error 'export expired before completion'. failed, cancelled and expired rows stay readable for 48 hours, then the job answers 404. */
|
|
4300
4381
|
status: "queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled";
|
|
4301
4382
|
format: "json" | "ndjson" | "csv";
|
|
4383
|
+
/** Trade rows the file holds: trades in the wallet's sports and esports markets, counted in the file's own read snapshot. Null until the worker has read the snapshot (queued, and early in running); a job accepted before 2026-10-22 can carry the earlier all-markets estimate until its file is read. */
|
|
4302
4384
|
total_trades: number | null;
|
|
4385
|
+
/** Trade rows written so far; equals total_trades once the file is read. */
|
|
4303
4386
|
processed_trades: number | null;
|
|
4304
4387
|
file_size: number | null;
|
|
4305
4388
|
error: string | null;
|
|
@@ -4412,7 +4495,7 @@ export interface OperationQuery {
|
|
|
4412
4495
|
createWebhookVerificationAttempt: Record<string, never>;
|
|
4413
4496
|
deleteWebhook: Record<string, never>;
|
|
4414
4497
|
exploreMarkets: {
|
|
4415
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Facet values are returned as the canonical bucket. */
|
|
4498
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Facet values are returned as the canonical bucket. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4416
4499
|
category?: string;
|
|
4417
4500
|
/** Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both. */
|
|
4418
4501
|
status?: "active" | "closed" | "all";
|
|
@@ -4441,13 +4524,15 @@ export interface OperationQuery {
|
|
|
4441
4524
|
view?: "board" | "signals" | "observations";
|
|
4442
4525
|
/** Legacy canonical bucket alias, now accepted in every view. Provider aliases canonicalize: NFL reaches Football and EPL reaches Soccer. Use leagues for a league-specific selection. An unmappable non-sport category returns an empty result and echoes category non_sport. Combines with other selection axes using AND. */
|
|
4443
4526
|
category?: string;
|
|
4444
|
-
/** Required for view=observations; wider_holder, in_play or emerging_pile. Rejected for board and signals. Emerging pile is a wider-holder projection with sharp_pct in [0.75,0.85), complete holder scans and future kickoff, not an independent population or arrival history. */
|
|
4527
|
+
/** Required for view=observations; wider_holder, in_play or emerging_pile. Rejected for board and signals. wider_holder covers pregame markets outside the funded slate. A market that enters the slate leaves wider_holder; view=signals lists it only while its holder pile leans to one side, its backed side has a holder at or above min_grade and its kickoff is within horizon_hours, and otherwise neither view lists it. Each refresh evaluates at most 8 markets per sport and cohort, wider_holder by soonest kickoff (most graded holders first among equal kickoffs) and in_play by most graded holders, so a market among a sport's 8 soonest stays evaluated until its game starts. wider_holder also evaluates up to 8 more markets per sport that kick off within 24 hours, most graded holders first, so the most-held markets appear up to a day before kickoff. Each of these keeps its place in later refreshes until its game starts while its holder page still shows a card or could not be read, so a more-held market waits for a free place instead of displacing it. Each row's admitted_by names its place, most_held or soonest_kickoff. The rest count in coverage.capacity_limited_markets. Emerging pile is a wider-holder projection with sharp_pct in [0.75,0.85), complete holder scans and future kickoff, not an independent population or arrival history. */
|
|
4445
4528
|
cohort?: "wider_holder" | "in_play" | "emerging_pile";
|
|
4529
|
+
/** Opt-in admission rule for view=observations with cohort=wider_holder; rejected for every other view and cohort. most_held_48h returns the most-held selection instead of the default one: per sport, up to 8 wider_holder markets kicking off within 48 hours, most graded holders first, then most volume, then soonest kickoff, at most 4 per event. It is recomputed every refresh and keeps no place, so a more-held market displaces a less-held one; funded-slate markets stay excluded. Every row carries admitted_by most_held_48h, including a market the default selection also evaluates, and the response echoes admission. funnel, coverage, degraded and degradation_reasons describe this selection: a wider_holder candidate it did not take counts as capacity_limited. Its markets that no default place covers are read after every default market, at most once per 10 minutes, so a row can rest on a holder page up to 15 minutes old (holder_snapshot_at). Omit for the default selection. Cursors and ETags bind it. */
|
|
4530
|
+
admission?: "most_held_48h";
|
|
4446
4531
|
/** Board and signals: S, A or B, default B. Requires a piled-side holder at the selected grade floor or better, without removing other holders. Rejected for observations. */
|
|
4447
4532
|
min_grade?: "S" | "A" | "B";
|
|
4448
4533
|
/** Board row cap defaults to 30 and clamps integer values to 1..30; total counts selected admitted rows before the cap. Signals and observations page size defaults to 20 and clamps to 1..100. */
|
|
4449
4534
|
limit?: number;
|
|
4450
|
-
/** Opaque canonical Edge Hunter cursor from next_cursor. Bound to view, every normalized selection axis, grade/horizon where applicable, source snapshot and ordering; observations also bind cohort and emerging cutoff. Changed selections or replaced snapshots return cursor_expired. Rejected in board. */
|
|
4535
|
+
/** Opaque canonical Edge Hunter cursor from next_cursor. Bound to view, every normalized selection axis, grade/horizon where applicable, source snapshot and ordering; observations also bind cohort, admission and emerging cutoff. Changed selections or replaced snapshots return cursor_expired. Rejected in board. */
|
|
4451
4536
|
cursor?: string;
|
|
4452
4537
|
/** Kickoff window for board (default 48) or signals (default 12). Integer values clamp to 1..48. Rejected for observations, whose pre-game universe is fixed at 48 hours with a 12-hour in-play kickoff lookback. */
|
|
4453
4538
|
horizon_hours?: number;
|
|
@@ -4578,7 +4663,7 @@ export interface OperationQuery {
|
|
|
4578
4663
|
max_age_s?: number;
|
|
4579
4664
|
};
|
|
4580
4665
|
getTraderCategoryRecords: {
|
|
4581
|
-
/** Filter to one canonical category, matched through the same rollup every other category surface uses: soccer, EPL and champions league all reach Soccer, every esports label folds into Esports, and football is AMERICAN football and reaches Football. A filter that reaches Esports returns the Esports record with all of its games; a game is not a filter of its own, so ask for esports and read games. A
|
|
4666
|
+
/** Filter to one canonical category, matched through the same rollup every other category surface uses: soccer, EPL and champions league all reach Soccer, every esports label folds into Esports, and football is AMERICAN football and reaches Football. A filter that reaches Esports returns the Esports record with all of its games; a game is not a filter of its own, so ask for esports and read games. A sports or esports category the wallet has no record in answers 200 with an empty records array, never 404. Sports and esports only (#27311): a category outside them, or a value that reaches no category, returns 400 bad_request with param category and names the accepted buckets. */
|
|
4582
4667
|
category?: string;
|
|
4583
4668
|
};
|
|
4584
4669
|
getTraderContext: Record<string, never>;
|
|
@@ -4674,11 +4759,11 @@ export interface OperationQuery {
|
|
|
4674
4759
|
cursor?: string;
|
|
4675
4760
|
/** Minimum position value in USD. Raises the feed's own floor of 50,000 USD; a smaller value does not lower it. */
|
|
4676
4761
|
min_size?: number;
|
|
4677
|
-
/** One RFC 4180 CSV record of exact current provider-backed market_canonical.category values. Legacy unquoted lists such as NBA,WNBA remain valid; values containing commas, quotes, or newlines are CSV-quoted. Matching is case-insensitive. Malformed quoted input fails closed as one unknown exact category. */
|
|
4762
|
+
/** One RFC 4180 CSV record of exact current provider-backed market_canonical.category values. Legacy unquoted lists such as NBA,WNBA remain valid; values containing commas, quotes, or newlines are CSV-quoted. Matching is case-insensitive. Malformed quoted input fails closed as one unknown exact category. A value outside sports and esports returns 400 bad_request with param=category (#27305), as on GET /api/v1/markets/explore. */
|
|
4678
4763
|
category?: string;
|
|
4679
4764
|
/** Minimum trader grade. */
|
|
4680
4765
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
4681
|
-
/** Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id (round-trips a value from a list response). Must be 0x followed by 64 hexadecimal characters after any mkt_ prefix is stripped; any other value returns 400. Polymarket-only; an unknown but well-formed id returns []. */
|
|
4766
|
+
/** Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id (round-trips a value from a list response). Must be 0x followed by 64 hexadecimal characters after any mkt_ prefix is stripped; any other value returns 400. Polymarket-only; an unknown but well-formed id returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305). */
|
|
4682
4767
|
condition_id?: string;
|
|
4683
4768
|
};
|
|
4684
4769
|
listLargeTradeCounterpartyExecutions: {
|
|
@@ -4708,7 +4793,7 @@ export interface OperationQuery {
|
|
|
4708
4793
|
condition_id?: string;
|
|
4709
4794
|
/** Trader wallet address, timestamp-suffixed wallet alias, username, or trd_-prefixed trader ID, resolved against the traders table. Unknown traders return an empty list. */
|
|
4710
4795
|
trader?: string;
|
|
4711
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4796
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4712
4797
|
category?: string;
|
|
4713
4798
|
/** Minimum trader grade as of today (trader.grade), not at trade time. On a historical window it selects wallets by a grade they may have earned after the trade; for a point-in-time rule filter on trader.grade_at_trade instead. A means S or A, B means S, A or B. */
|
|
4714
4799
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
@@ -4732,7 +4817,7 @@ export interface OperationQuery {
|
|
|
4732
4817
|
cursor?: string;
|
|
4733
4818
|
/** Minimum trade size in USD. */
|
|
4734
4819
|
min_size?: number;
|
|
4735
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4820
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4736
4821
|
category?: string;
|
|
4737
4822
|
/** Minimum trader grade. */
|
|
4738
4823
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
@@ -4750,9 +4835,9 @@ export interface OperationQuery {
|
|
|
4750
4835
|
limit?: number;
|
|
4751
4836
|
/** Opaque lbv1_ pagination cursor from a prior response. It binds the finite score/address boundary to the committed leaderboard generation and the effective category/strategy filters; legacy, malformed, non-finite, and unsupported-version cursors are rejected. */
|
|
4752
4837
|
cursor?: string;
|
|
4753
|
-
/** Filter by category. Values are matched to canonical category buckets:
|
|
4838
|
+
/** Filter by category: a sport or esports bucket. Values are matched to canonical category buckets: league values fold into their sport (NBA and NCAAB into Basketball, NFL into Football). Mapped buckets are case-insensitive; passthrough buckets (Cricket, Sports) match case-sensitively against the provider-native bucket key, so use exact casing. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4754
4839
|
category?: string;
|
|
4755
|
-
/** Filter by observed trading style. Current styles: two_sided, category_focused, high_activity, diversified, mixed, unclassified. The original ten archetype identifiers remain accepted for historical rows until normal reclassification. Style describes recorded behavior; grade measures performance. */
|
|
4840
|
+
/** Filter by observed trading style. Current styles: two_sided, category_focused, high_activity, diversified, mixed, unclassified. Current styles count the wallet's sports and esports markets only. The original ten archetype identifiers remain accepted for historical rows until normal reclassification. Style describes recorded behavior; grade measures performance. */
|
|
4756
4841
|
strategy?: "accumulator" | "algo_trader" | "arbitrageur" | "category_focused" | "directional" | "diversified" | "event_driven" | "high_activity" | "market_maker" | "mixed" | "momentum" | "scalper" | "speculator" | "swing_trader" | "two_sided" | "unclassified";
|
|
4757
4842
|
};
|
|
4758
4843
|
listPositions: {
|
|
@@ -4764,9 +4849,9 @@ export interface OperationQuery {
|
|
|
4764
4849
|
consistency?: "live" | "snapshot";
|
|
4765
4850
|
/** Minimum current position value in USD. Defaults to 100 when omitted, or to 0 when wallet is present; send 0 to include every reconciled position. */
|
|
4766
4851
|
min_size?: number;
|
|
4767
|
-
/** Exact match against provider-backed market_canonical.category. */
|
|
4852
|
+
/** Exact match against provider-backed market_canonical.category. Sports and esports only (#27311): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4768
4853
|
category?: string;
|
|
4769
|
-
/** Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id emitted by V1 responses. Combine with min_size=0 for every reconciled position in that market; an unknown id or a resolved market returns []. */
|
|
4854
|
+
/** Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id emitted by V1 responses. Combine with min_size=0 for every reconciled position in that market; an unknown id or a resolved market returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27311). Without condition_id the board and wallet reads list sports and esports markets only. */
|
|
4770
4855
|
condition_id?: string;
|
|
4771
4856
|
/** Scope to one wallet or a book of wallets (repeatable, up to 25 per request; comma-separated values inside one occurrence also work). Each value is a wallet address, a known username, or a trd_-prefixed trader id, resolved like /api/v1/trader/{address}. The response keeps the board's order and cursor, so pages of a book interleave wallets by current_value_usd. An address this API has never tracked returns its mirror rows or an empty list; a username or trader id that resolves to nothing is a 404 naming wallet; more than 25 values is a 400. min_size defaults to 0 when wallet is present. */
|
|
4772
4857
|
wallet?: string[];
|
|
@@ -4784,7 +4869,7 @@ export interface OperationQuery {
|
|
|
4784
4869
|
limit?: number;
|
|
4785
4870
|
/** Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again. */
|
|
4786
4871
|
cursor?: string;
|
|
4787
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4872
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4788
4873
|
category?: string;
|
|
4789
4874
|
/** Filter by source platform. all is a request-side no-op. */
|
|
4790
4875
|
platform?: "polymarket" | "all";
|
|
@@ -4800,7 +4885,7 @@ export interface OperationQuery {
|
|
|
4800
4885
|
limit?: number;
|
|
4801
4886
|
/** Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again. */
|
|
4802
4887
|
cursor?: string;
|
|
4803
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4888
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4804
4889
|
category?: string;
|
|
4805
4890
|
/** Filter by source platform. all is a request-side no-op. */
|
|
4806
4891
|
platform?: "polymarket" | "all";
|
|
@@ -4864,7 +4949,7 @@ export interface OperationQuery {
|
|
|
4864
4949
|
condition_id?: string;
|
|
4865
4950
|
/** Trader wallet address, timestamp-suffixed wallet alias, or username resolved against the traders table. Unknown traders return an empty list. */
|
|
4866
4951
|
trader?: string;
|
|
4867
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4952
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4868
4953
|
category?: string;
|
|
4869
4954
|
/** Minimum trader grade. */
|
|
4870
4955
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
@@ -4888,7 +4973,7 @@ export interface OperationQuery {
|
|
|
4888
4973
|
cursor?: string;
|
|
4889
4974
|
/** Minimum trade size in USD. */
|
|
4890
4975
|
min_size?: number;
|
|
4891
|
-
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. */
|
|
4976
|
+
/** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4892
4977
|
category?: string;
|
|
4893
4978
|
/** Minimum trader grade as of today (trader.grade). A means S or A, B means S, A or B. */
|
|
4894
4979
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
@@ -4921,7 +5006,7 @@ export interface OperationQuery {
|
|
|
4921
5006
|
cursor?: string;
|
|
4922
5007
|
/** Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both. */
|
|
4923
5008
|
status?: "active" | "closed" | "all";
|
|
4924
|
-
/** Filter by category. */
|
|
5009
|
+
/** Filter by category. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets. */
|
|
4925
5010
|
category?: string;
|
|
4926
5011
|
};
|
|
4927
5012
|
submitTraderExport: {
|