@0xinsider/mcp 2.14.5 → 3.0.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.
Files changed (42) hide show
  1. package/README.md +6 -5
  2. package/dist/catalog.generated.d.ts +2 -14
  3. package/dist/catalog.generated.d.ts.map +1 -1
  4. package/dist/catalog.generated.js +2 -17
  5. package/dist/catalog.generated.js.map +1 -1
  6. package/dist/cli.js +1 -1
  7. package/dist/client.d.ts +2 -3
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +27 -0
  10. package/dist/client.js.map +1 -1
  11. package/dist/constants.d.ts +1 -1
  12. package/dist/constants.d.ts.map +1 -1
  13. package/dist/constants.js +1 -1
  14. package/dist/constants.js.map +1 -1
  15. package/dist/sdk/client.d.ts +28 -99
  16. package/dist/sdk/client.d.ts.map +1 -1
  17. package/dist/sdk/client.js +30 -134
  18. package/dist/sdk/client.js.map +1 -1
  19. package/dist/sdk/errors.d.ts +23 -4
  20. package/dist/sdk/errors.d.ts.map +1 -1
  21. package/dist/sdk/errors.js +39 -2
  22. package/dist/sdk/errors.js.map +1 -1
  23. package/dist/sdk/index.d.ts +3 -16
  24. package/dist/sdk/index.d.ts.map +1 -1
  25. package/dist/sdk/index.js +1 -1
  26. package/dist/sdk/index.js.map +1 -1
  27. package/dist/sdk/schema.d.ts +113 -319
  28. package/dist/sdk/schema.d.ts.map +1 -1
  29. package/dist/server.d.ts.map +1 -1
  30. package/dist/server.js +2 -5
  31. package/dist/server.js.map +1 -1
  32. package/dist/tools/games.js +1 -1
  33. package/dist/tools/games.js.map +1 -1
  34. package/dist/tools/get-position-timeline.js +1 -1
  35. package/dist/tools/read-parity.d.ts +1 -6
  36. package/dist/tools/read-parity.d.ts.map +1 -1
  37. package/dist/tools/read-parity.js +13 -87
  38. package/dist/tools/read-parity.js.map +1 -1
  39. package/dist/tools/result.d.ts.map +1 -1
  40. package/dist/tools/result.js +22 -2
  41. package/dist/tools/result.js.map +1 -1
  42. package/package.json +1 -1
@@ -69,15 +69,15 @@ export type ApiError = {
69
69
  object: "error";
70
70
  error: {
71
71
  /** FROZEN: an existing value never changes meaning. request_timeout (408, #16146) was added the way insufficient_scope was: the handler did not answer inside the server's 30-second timeout. Retry-After and retry_at ride on it only for a safe method (GET, HEAD); a timed-out mutation may have completed, so check its state and reuse its Idempotency-Key. */
72
- code: "bad_request" | "invalid_api_key" | "subscription_required" | "forbidden" | "insufficient_scope" | "not_found" | "account_locked" | "rate_limited" | "rate_limit_unavailable" | "internal_error" | "request_timeout";
72
+ code: "bad_request" | "invalid_api_key" | "subscription_required" | "forbidden" | "insufficient_scope" | "not_found" | "account_locked" | "rate_limited" | "rate_limit_unavailable" | "internal_error" | "request_timeout" | "endpoint_retired";
73
73
  message: string;
74
74
  doc_url?: string;
75
75
  param?: string;
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 outside the HOT/WARM sync tiers -- 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. */
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";
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";
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: before the 03:00 America/New_York operating-window start, before a selected pick's stored release, or after a skipped day, it names the automatic system's next boundary. While no candidate exists in the live window it normally names the persisted next automatic selector attempt. Every value is advisory and can change before release. When the automatic schedule is absent/due or a pick is overdue it degrades to ~60s. Schedule one request and do not poll. 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 outside the HOT/WARM sync tiers -- 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. */
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";
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/sports/pre-game-sides, GET /api/v1/sports/pre-game-side-observations and their deprecated aliases); 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. */
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";
95
95
  };
96
96
  export type BatchMarketFlowItem = {
97
97
  /** Zero-based request index. Duplicate inputs keep separate result rows. */
@@ -470,6 +470,90 @@ export type DataQualityGroup = {
470
470
  /** Why the status is not fresh. Omitted when it is. */
471
471
  reason?: string;
472
472
  };
473
+ /** The full Edge Hunter board shown at https://0xinsider.com/sports/edge, for Max credentials. It covers all sports and esports with a fixed B grade floor and returns the first 30 ranked rows. No cursor or observation cohorts are exposed. */
474
+ export type EdgeHunterBoard = {
475
+ /** When the ranked snapshot was computed. Date current quotes with their own ts values. */
476
+ as_of: string;
477
+ horizon_hours: number;
478
+ min_grade: "B";
479
+ /** live uses the current graded holder pile; db_only is a weaker stored-data fallback. */
480
+ ranking_source: "live" | "db_only";
481
+ /** degraded means directional enrichment was unavailable. */
482
+ directional_source: "live" | "degraded";
483
+ cached_age_seconds: number | null;
484
+ viewer: "max";
485
+ /** Always null: Edge Hunter has no free signal slot. */
486
+ free_rank: number | null;
487
+ /** Ranked rows in this window before the 30-row cap. */
488
+ total: number;
489
+ rows: EdgeHunterRow[];
490
+ };
491
+ /** One provider outcome in YES/NO order. Null current_price means no verified current quote is available. */
492
+ export type EdgeHunterOutcome = {
493
+ index: 0 | 1;
494
+ label: string | null;
495
+ provider_id: number | null;
496
+ current_price: EdgeHunterPrice;
497
+ };
498
+ export type EdgeHunterParticipant = {
499
+ provider_id?: number;
500
+ logo?: string;
501
+ logo_mark_dark?: boolean;
502
+ color?: string;
503
+ headshot?: string;
504
+ headshot_revision?: number;
505
+ tour?: string;
506
+ name: string;
507
+ };
508
+ export type EdgeHunterPrice = {
509
+ /** Provider probability as a decimal string. Keep its precision until display. */
510
+ price: string;
511
+ basis: "midpoint" | "last_trade";
512
+ /** Source observation clock in epoch milliseconds, represented as a string. */
513
+ ts: string;
514
+ /** Backend validation clock in epoch milliseconds. Omitted when no current-source validation is available. */
515
+ validated_at?: string;
516
+ };
517
+ /** One full Max row from Edge Hunter. signal is populated on every row this endpoint returns. Identity and quotes preserve provider values; unknown values stay null. */
518
+ export type EdgeHunterRow = {
519
+ rank: number;
520
+ state: "full";
521
+ free: false;
522
+ condition_id: string;
523
+ event_slug: string | null;
524
+ title: string | null;
525
+ category: "Basketball" | "Football" | "Baseball" | "Hockey" | "MMA" | "Boxing" | "Soccer" | "Cricket" | "Golf" | "Tennis" | "Esports" | "Racing" | "Table Tennis" | "Pickleball" | null;
526
+ raw_category: string | null;
527
+ game_start_time: string | null;
528
+ /** Cumulative provider taker volume in shares, not cash in USD. Null when unavailable. */
529
+ volume: number | null;
530
+ participants: EdgeHunterParticipant[];
531
+ image: string | null;
532
+ outcomes: EdgeHunterOutcome[];
533
+ signal: EdgeHunterSignal;
534
+ };
535
+ /** Backed-side analytics from the ranked snapshot, plus a separately dated current quote. Scores rank attention; they are not probabilities or order instructions. */
536
+ export type EdgeHunterSignal = {
537
+ piled_side: string | null;
538
+ piled_outcome_index: 0 | 1;
539
+ /** Fraction of graded money on the backed side, not a percentage from 0 to 100. */
540
+ sharp_pct: number | null;
541
+ backed_sharp_usd: number;
542
+ s_count: number;
543
+ a_count: number;
544
+ b_count: number;
545
+ graded_holders: number;
546
+ top_grade: "S" | "A" | "B" | null;
547
+ smart_score: number | null;
548
+ net_side: string | null;
549
+ conviction_score: number;
550
+ one_way_holder_count: number | null;
551
+ hedged_holder_count: number | null;
552
+ one_way_graded_usd: number | null;
553
+ directional_confidence: number | null;
554
+ directional_rank_score: number;
555
+ current_price: EdgeHunterPrice;
556
+ };
473
557
  export type EventReplayEvent = {
474
558
  /** Opaque event identity: the ef_-encoded whale_alerts.id, stable across cursor formats. Deduplicate on this, never on cursor or sequence. */
475
559
  id: string;
@@ -695,9 +779,12 @@ export type ExportSourceRange = {
695
779
  export type ExportVolumeReconciliation = {
696
780
  /** Verified full-history both-sides USD cash volume. Null without coverage; the local activity numerator may cover only a subset of history. */
697
781
  provider_lifetime_volume: number | null;
782
+ /** 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. */
698
783
  exported_activity_volume: number;
699
784
  exported_market_cost_basis: number;
785
+ /** provider_lifetime_volume minus exported_activity_volume, in USD, rounded to cents. Null when provider_lifetime_volume is null. */
700
786
  provider_activity_volume_gap: number | null;
787
+ /** exported_activity_volume divided by provider_lifetime_volume, a fraction of the cash, not a percent. Null when provider_lifetime_volume is null or zero. */
701
788
  activity_volume_coverage: number | null;
702
789
  };
703
790
  export type FreshnessFailure = {
@@ -1079,7 +1166,7 @@ export type LeaderboardEntry = {
1079
1166
  score?: number;
1080
1167
  /** Polymarket's all-time leaderboard P&L in USD, from Polymarket's latest observation of this wallet on its all-time leaderboard (dated by the leaderboard_pnl data_quality group). Omitted when that leaderboard has no current observation ranking the wallet; 0xinsider requests one, and never serves an older stored figure in its place. Includes unrealized open positions. Kept for back-compat. Not the profile's Total P&L, which GET /api/v1/trader/{address} serves as pnl.net_total; the two can differ by a wide margin. Prefer realized_pnl for the banked figure. */
1081
1168
  pnl?: number;
1082
- /** Native realized P&L plus credited maker and taker rebates in USD, with fees already included. The exact numeric value is truncated toward zero to cents before JSON conversion. Wallets without a native snapshot retain their historical stored realized P&L. Omitted when the native snapshot has no net realized value. */
1169
+ /** Native realized P&L plus credited maker and taker rebates in USD, with fees already included. The exact numeric value is truncated toward zero to cents before JSON conversion. Omitted when the wallet has no native snapshot or the snapshot has no net realized value; never filled from another P&L basis. */
1083
1170
  realized_pnl?: number;
1084
1171
  /** Full-history both-sides USD cash volume from a verified Polymarket user-volume observation. Omitted without coverage. */
1085
1172
  volume?: number;
@@ -1092,7 +1179,7 @@ export type LeaderboardEntry = {
1092
1179
  platform: "polymarket";
1093
1180
  last_active?: string;
1094
1181
  };
1095
- /** Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from the stored token_price_snapshots series (covers open and resolved markets). */
1182
+ /** Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from our stored copy of the Polymarket CLOB prices-history series (covers open and resolved markets). */
1096
1183
  export type MarketCandles = {
1097
1184
  /** Market condition id the candles were read for. */
1098
1185
  condition_id: string;
@@ -2165,214 +2252,6 @@ export type PotdEntryAuthorization = {
2165
2252
  /** Original authorization expiry at the earlier requested or provider kickoff; never extended. An expired authorization cannot authorize a new automated entry. */
2166
2253
  expires_at: string;
2167
2254
  };
2168
- /** One ranked pre-game sports market where graded sharp money is piled on one side, with required-status category evidence from partial forward-observed Polymarket fills. */
2169
- export type PreGameSide = {
2170
- /** The side profitable wallets hold, as a provider-backed display label. Canonical spelling of piled_side (#16310), same value: when provider group context is unavailable it may remain a bare Yes/No/Over/Under, so do not use it alone as participant identity. */
2171
- side: string | null;
2172
- /** UTC time at which the snapshot that ranked this row was computed. Canonical spelling of signal_created_at (#16310), same value. */
2173
- ranked_at: string;
2174
- /** Recorded side backing score; higher values indicate stronger backing. */
2175
- backing_score: number;
2176
- /** Signed share of graded money on the side, (yes_usd - no_usd)/(yes_usd + no_usd) in [-1, 1] (side-yes positive, side-no negative). Canonical spelling of smart_score (#16309, #16310), same value. */
2177
- side_share: number | null;
2178
- /** Polymarket condition id. */
2179
- condition_id: string;
2180
- /**
2181
- * UTC time at which the immutable signal snapshot was computed. Every row from one snapshot shares this value; it is not provider market creation time and is not rewritten at request time. Deprecated (#16310): `ranked_at` is the canonical spelling and carries the same value; this key stays on the wire.
2182
- * @deprecated
2183
- */
2184
- signal_created_at: string;
2185
- /** Polymarket CLOB token id (ERC1155 asset id, decimal string) for the PILED outcome; null when unavailable. */
2186
- token_id: string | null;
2187
- /** Canonical sport bucket (e.g. Basketball, Tennis); null when the raw category has no canonical mapping. */
2188
- category: string | null;
2189
- /** Raw provider category as stored (e.g. NBA, EPL). */
2190
- raw_category: string | null;
2191
- title: string | null;
2192
- event_slug: string | null;
2193
- /** Kickoff (UTC). In the future at SNAPSHOT time and within the requested horizon; because the response is served from a shared snapshot cached up to the ~180s TTL, a served kickoff can be up to ~180s in the past relative to the response time. Not a live guarantee that the game has not yet started. */
2194
- game_start_time: string | null;
2195
- /**
2196
- * Nullable provider-backed piled-outcome display label. When provider group context is unavailable, it may remain a bare Yes/No/Over/Under; do not use it alone as participant identity. Deprecated (#16310): `side` is the canonical spelling and carries the same value; this key stays on the wire.
2197
- * @deprecated
2198
- */
2199
- piled_side: string | null;
2200
- /** Provider binary-column selector: 0 selects outcome_yes/token_id_yes; 1 selects outcome_no/token_id_no. It does not identify home/away or a participant. Use piled_side together with title/event context for display. */
2201
- piled_outcome_index: number;
2202
- /** Piled-side dollar concentration backed_usd / (yes_usd + no_usd), in (0.5, 1] for a real pile; null when there is no sharp USD. */
2203
- sharp_pct: number | null;
2204
- /** Raw piled-side sharp-money USD. */
2205
- backed_sharp_usd: number;
2206
- /** S-grade graded holders on the piled side. */
2207
- s_count: number;
2208
- /** A-grade graded holders on the piled side. */
2209
- a_count: number;
2210
- /** B-grade graded holders on the piled side. */
2211
- b_count: number;
2212
- /** Piled-side graded holder count (s_count + a_count + b_count). */
2213
- graded_holders: number;
2214
- /** Best grade present on the piled side; null when none. */
2215
- top_grade: "S" | "A" | "B" | null;
2216
- /**
2217
- * Canonical sharp-money score (yes_usd - no_usd)/(yes_usd + no_usd) in [-1, 1] (piled-yes positive, piled-no negative). Deprecated (#16310): `side_share` is the canonical spelling and carries the same value; this key stays on the wire.
2218
- * @deprecated
2219
- */
2220
- smart_score: number | null;
2221
- /** Polymarket's traded-volume figure for the market: cumulative taker volume in shares, the number Polymarket's market pages print with a dollar sign. Each share counts at its $1 settlement value, so this is not the cash that changed hands: 100 shares bought at $0.40 add 100, not 40. Null when unavailable. */
2222
- volume: number | null;
2223
- /** Aggregate recent flow direction on the market; null when unavailable. */
2224
- net_side: "BUY" | "SELL" | null;
2225
- /**
2226
- * Recorded conviction score; higher values indicate stronger conviction.
2227
- * @deprecated
2228
- */
2229
- conviction_score: number;
2230
- /** Piled-side graded holders read one-way: their fresh open legs across the signal game's markets (cross-market within the one game; moneyline+spread family only) all back the same team, or, when the market's holder scan was complete, Polymarket's currentValue shows no opposite leg on this market worth 10% of the backed leg and no fresh leg opposes it. Null when the directional read was not computed (no groupable game, no holder-level data on this ranking path, or the enrichment read failed) or classified nobody. */
2231
- one_way_holder_count: number | null;
2232
- /** Piled-side graded holders classified HEDGED across the game by fresh legs (they back two or more distinct teams). A wallet long both outcomes of this market is not one-way and not counted here. Null when the directional read was not computed or classified nobody. */
2233
- hedged_holder_count: number | null;
2234
- /** Piled-side graded USD held by one-way wallets (share-weighted allocation of backed_sharp_usd). Null when the directional read was not computed or classified nobody. */
2235
- one_way_graded_usd: number | null;
2236
- /** One-way fraction of the piled graded dollars, in [0, 1] -- the metric orthogonal to sharp_pct. Stale, unknown, hedged, and two-sided dollars dilute it toward zero (conservative). Null when the directional read was not computed or classified nobody. */
2237
- directional_confidence: number | null;
2238
- /** Recorded side ordering score; higher values sort first. */
2239
- directional_rank_score: number;
2240
- category_skill: PreGameSideCategorySkill;
2241
- /** 1-based rank within the (min_grade-filtered) ranked result. */
2242
- rank: number;
2243
- };
2244
- /** Category evidence over the full uncapped piled-side S/A/B holder allocation. It never changes signal membership, ordering, routing, or sizing. */
2245
- export type PreGameSideCategorySkill = {
2246
- status: "live" | "insufficient" | "stale" | "unknown" | "degraded";
2247
- model_version: string;
2248
- taxonomy_version: string | null;
2249
- platform: "polymarket";
2250
- scope: "observed_goldsky_primary_taker_fill";
2251
- source_coverage: "partial_whale_threshold_fills" | "graded_wallet_fills";
2252
- observation_started_at: string;
2253
- as_of: string;
2254
- canonical_category: string | null;
2255
- eligible_holders: number;
2256
- covered_holders: number;
2257
- backed_sharp_usd: number | null;
2258
- covered_backed_usd: number | null;
2259
- coverage_pct: number | null;
2260
- weighted_edge_mean: number | null;
2261
- weighted_holder_lower_mean: number | null;
2262
- specialist_backed_usd: number | null;
2263
- specialist_backed_usd_pct: number | null;
2264
- largest_holder_backed_usd_pct: number | null;
2265
- minimum_holder_event_count: number | null;
2266
- };
2267
- /** Per-sport accountable funnel for the full observation snapshot, returned on every page. */
2268
- export type PreGameSideFunnelReport = {
2269
- sports: PreGameSideSportFunnelReport[];
2270
- };
2271
- /** One explicitly observation-only holder-pile measurement. It is evidence for cohort evaluation, not an execution instruction, and is isolated from the funded sports-edge-signals route. */
2272
- export type PreGameSideObservation = {
2273
- /** The side profitable wallets hold, as a provider-backed display label. Canonical spelling of piled_side (#16310), same value: when provider group context is unavailable it may remain a bare Yes/No/Over/Under, so do not use it alone as participant identity. */
2274
- side: string | null;
2275
- /** Recorded side backing score; higher values indicate stronger backing. */
2276
- backing_score: number;
2277
- /** Signed share of graded money on the side, in [-1, 1]. Canonical spelling of smart_score (#16309, #16310), same value. */
2278
- side_share: number;
2279
- /** Raw Polymarket condition id. */
2280
- condition_id: string;
2281
- /** Provider-backed Polymarket CLOB token id for the piled outcome. Rows without a verified token terminate before emission. */
2282
- token_id: string;
2283
- /** Canonical sport bucket. */
2284
- category: "Basketball" | "Football" | "Baseball" | "Hockey" | "MMA" | "Boxing" | "Soccer" | "Cricket" | "Golf" | "Tennis" | "Esports" | "Racing" | "Table Tennis" | "Pickleball";
2285
- /** Raw provider category as stored. */
2286
- raw_category: string | null;
2287
- /** Provider-backed market title. */
2288
- title: string;
2289
- event_slug: string | null;
2290
- /** Provider event id when available. */
2291
- event_id: string | null;
2292
- /** Provider parent-event id used as the first event-cap identity when available. */
2293
- parent_event_id: string | null;
2294
- /** Provider-backed kickoff time in UTC. */
2295
- game_start_time: string;
2296
- /** UTC instant when this row finished provider/holder evaluation. */
2297
- observed_at: string;
2298
- /** 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. */
2299
- cohort: "wider_holder" | "in_play" | "emerging_pile";
2300
- /** Always true. This row must not be routed to an order executor. */
2301
- observation_only: true;
2302
- /**
2303
- * Nullable provider-backed piled-outcome display label. When provider group context is unavailable, it may remain a bare Yes/No/Over/Under; do not use it alone as participant identity. Deprecated (#16310): `side` is the canonical spelling and carries the same value; this key stays on the wire.
2304
- * @deprecated
2305
- */
2306
- piled_side: string | null;
2307
- /** Provider binary-column selector: 0 selects outcome_yes/token_id_yes; 1 selects outcome_no/token_id_no. It does not identify home/away or a participant. Use piled_side together with title/event context for display. */
2308
- piled_outcome_index: 0 | 1;
2309
- /** Provider-backed implied price for the piled outcome at observation time. */
2310
- backed_price: number;
2311
- /** Piled-side graded-holder dollar concentration. */
2312
- sharp_pct: number;
2313
- /** Raw graded-holder USD on the piled outcome. */
2314
- backed_sharp_usd: number;
2315
- s_count: number;
2316
- a_count: number;
2317
- b_count: number;
2318
- /** Piled-side S/A/B holder count. */
2319
- graded_holders: number;
2320
- top_grade: "S" | "A" | "B";
2321
- /**
2322
- * Canonical signed holder-pile score. Deprecated (#16310): `side_share` is the canonical spelling and carries the same value; this key stays on the wire.
2323
- * @deprecated
2324
- */
2325
- smart_score: number;
2326
- /** Strictly positive stored market volume: Polymarket's cumulative taker volume in shares, each counted at its $1 settlement value rather than the cash that changed hands (the same figure as volume on GET /api/v1/sports/pre-game-sides). Missing, zero, or non-finite volume terminates as invalid_market and is never emitted as an observation. */
2327
- volume: number;
2328
- /**
2329
- * Recorded conviction score; higher values indicate stronger conviction.
2330
- * @deprecated
2331
- */
2332
- conviction_score: number;
2333
- /** Whether the provider holder page came from the shared cache or a live provider read. */
2334
- provider_read_source: "cached" | "live";
2335
- /** True only when neither provider outcome holder page hit the top-100 scan bound. False means the pile is a positive lower bound and cannot satisfy a future capital-promotion gate. */
2336
- holder_scan_complete: boolean;
2337
- /** 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. */
2338
- holder_snapshot_at: string | null;
2339
- /** 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. */
2340
- directional_status: "available" | "unknown_ungrouped" | "unknown_stale" | "unavailable";
2341
- one_way_holder_count: number | null;
2342
- hedged_holder_count: number | null;
2343
- one_way_graded_usd: number | null;
2344
- directional_confidence: number | null;
2345
- /** Recorded side ordering score; higher values sort first. */
2346
- directional_rank_score: number;
2347
- /** 1-based rank within this observation cohort and snapshot. */
2348
- rank: number;
2349
- };
2350
- /** Closed 25-value terminal-reason vocabulary for the accountable sports-edge 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. */
2351
- export type PreGameSideObservationTerminalReason = "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";
2352
- /** Independent sports-board supply plus stored-universe terminal accounting for one canonical sport. */
2353
- export type PreGameSideSportFunnelReport = {
2354
- sport: "Basketball" | "Football" | "Baseball" | "Hockey" | "MMA" | "Boxing" | "Soccer" | "Cricket" | "Golf" | "Tennis" | "Esports" | "Racing" | "Table Tennis" | "Pickleball";
2355
- /** Unique condition ids independently visible on the provider-first sports board. */
2356
- board_input: number;
2357
- /** Whether the always-applicable live-board source completed as available. False can mean a completed source failure (board_source_unavailable) or live-board work missing an internal configured-scope deadline or the outer fair-wave deadline (board_deadline_unavailable); inspect terminals to distinguish them. */
2358
- board_live_available: boolean;
2359
- /** Whether a provider-backed upcoming-board source is configured and applicable for this sport. False means not applicable, not provider failure. */
2360
- board_upcoming_configured: boolean;
2361
- /** 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. */
2362
- board_upcoming_available: boolean;
2363
- /** 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 3,000 rows or 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. */
2364
- board_upcoming_status: "unknown" | "not_configured" | "available" | "capacity_limited" | "source_unavailable" | "cold_unavailable" | "deadline_unavailable";
2365
- /** 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. */
2366
- 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")[];
2367
- /** Stored-universe rows plus provider-board rows missing from storage. */
2368
- input: number;
2369
- /** Sparse counts over the closed 25-value terminal vocabulary: 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, or internal_unclassified. primary_slate_candidate means exact admission by the funded route's raw shared signals query before provider/holder enrichment; recent-flow rows rejected by its event, bucket, or total caps remain eligible for wider_holder measurement. capacity_limited is intentional bounded provider-work admission, is fully accounted here, and does not itself set degraded=true. board_source_unavailable means a completed board source was unavailable; board_deadline_unavailable means live-board work missed either an internal configured-scope deadline or the outer fair-wave deadline; provider_unavailable means an attempted holder-provider read failed; holder_deadline_unavailable means holder cache/provider work missed the absolute request deadline; holder_computation_unavailable means post-holder provider or DB-backed price/metadata evaluation was unavailable. */
2370
- terminals: Record<string, number>;
2371
- /** Sum of every sparse terminal count. */
2372
- terminal_total: number;
2373
- /** True exactly when input equals terminal_total. */
2374
- reconciled: boolean;
2375
- };
2376
2255
  /** One PUBLISHED same-day pick whose holder proof is not readable yet: its stable slot rank, the release and kickoff instants, and the instant before which a retry cannot succeed. Every item in `picks` carries its full required shape, so a pick that cannot meet it is listed here instead of being served with missing fields or a synthetic zero. */
2377
2256
  export type ProofPendingPickSlot = {
2378
2257
  /**
@@ -2497,9 +2376,9 @@ export type ResponseMeta = {
2497
2376
  ranking_generation?: number;
2498
2377
  /** Authoritative RFC3339 timestamp from cache_generations.updated_at for ranking_generation. It is read in the same repeatable-read snapshot as the leaderboard rows and is not request time, cache write time, or row insertion order. */
2499
2378
  ranking_as_of?: string;
2500
- /** Which path produced the team-directional read on this response. Only present on endpoints that compute one (today: GET /api/v1/sports-edge-signals). "live" means the read RAN. "degraded" means it FAILED, so nothing was measured and the ranking fell back to raw conviction. The flag describes the READ, not its consequence: a read that ran and found nothing groupable also leaves the directional fields null, and that is honestly "live" -- the per-signal nulls already say "nothing to enrich here", so this snapshot-level flag carries only what they cannot, namely whether the read ran at all. A degraded response is cached on the shorter degraded TTL so it self-heals. Reported SEPARATELY from ranking_source because the two degradations are independent -- a sharp-money DB miss weakens the ranking DATA, a directional failure removes a ranking WEIGHT -- and a consumer down-weighting a degraded response needs to know which input it lost. Omitted on endpoints that compute no directional read. */
2379
+ /** Which path produced the team-directional read on this response. Only present on endpoints that compute one (today: GET /api/v1/edge-hunter). "live" means the read RAN. "degraded" means it FAILED, so nothing was measured and the ranking fell back to raw conviction. The flag describes the READ, not its consequence: a read that ran and found nothing groupable also leaves the directional fields null, and that is honestly "live" -- the per-signal nulls already say "nothing to enrich here", so this snapshot-level flag carries only what they cannot, namely whether the read ran at all. A degraded response is cached on the shorter degraded TTL so it self-heals. Reported SEPARATELY from ranking_source because the two degradations are independent -- a sharp-money DB miss weakens the ranking DATA, a directional failure removes a ranking WEIGHT -- and a consumer down-weighting a degraded response needs to know which input it lost. Omitted on endpoints that compute no directional read. */
2501
2380
  directional_source?: "live" | "degraded";
2502
- /** Which ranking-data path produced this response. Only present on endpoints that can degrade a ranking (today: GET /api/v1/sports-edge-signals). "live" is the normal path (the current holder pile from the provider batch); "db_only" is the degraded fallback (a truthful but weaker trader_markets ranking) served when the live sharp-money ranking batch is unavailable (a sharp-money DB read failure, not a Polymarket outage) and cached on a shorter TTL, so a consumer can down-weight or skip it. Omitted on endpoints that never degrade. */
2381
+ /** Which ranking-data path produced this response. Only present on endpoints that can degrade a ranking (today: GET /api/v1/edge-hunter). "live" is the normal path (the current holder pile from the provider batch); "db_only" is the degraded fallback (a truthful but weaker trader_markets ranking) served when the live sharp-money ranking batch is unavailable (a sharp-money DB read failure, not a Polymarket outage) and cached on a shorter TTL, so a consumer can down-weight or skip it. Omitted on endpoints that never degrade. */
2503
2382
  ranking_source?: "live" | "db_only";
2504
2383
  /** Whole filtered snapshot category-evidence status before pagination. Operational live always remains partial source coverage. */
2505
2384
  category_skill_source?: "live" | "partial" | "degraded" | "unavailable";
@@ -2509,7 +2388,7 @@ export type ResponseMeta = {
2509
2388
  category_skill_scope?: "observed_goldsky_primary_taker_fill";
2510
2389
  category_skill_source_coverage?: "partial_whale_threshold_fills" | "graded_wallet_fills";
2511
2390
  category_skill_observation_started_at?: string;
2512
- /** Whole-model operational readiness captured with the category model snapshot. Present on category-enriched responses even when the filtered signal list is empty. When true, category_skill_source is degraded and sports-edge-signals uses the shorter degraded cache TTL. */
2391
+ /** Whole-model operational readiness captured with the category model snapshot. Present on category-enriched responses even when the filtered signal list is empty. When true, category_skill_source is degraded and the ranked sports snapshot uses the shorter degraded cache TTL. */
2513
2392
  category_skill_model_operationally_degraded?: boolean;
2514
2393
  category_skill_status_counts?: {
2515
2394
  live: number;
@@ -2814,7 +2693,7 @@ export type TraderContext = {
2814
2693
  unrealized_mtm: number;
2815
2694
  /** Cost basis (USD) currently tied up in open positions. */
2816
2695
  cost_basis_locked: number;
2817
- /** Win rate as a percentage (0-100): resolved_wins over resolved_decided. A resolved market that settled at exactly zero realized P&L (a void, a refund, a fully hedged position) is neither a win nor a loss and is not in the denominator, the same rule the leaderboard applies; null when no resolved market was decided. */
2696
+ /** Win rate as a percentage (0-100): resolved_wins over resolved_decided. A resolved market that settled at exactly zero realized P&L (a void, a refund, a fully hedged position) is neither a win nor a loss and is not in the denominator, the same rule the leaderboard applies; null when no resolved market was decided. It is the rule of trader.stats.win_rate, read from the synced rows at request time; stats.win_rate is the stored figure the profile shows, refreshed by each sync and a few minutes after a closed-history write. context.md prints one Market win rate: this one when position_summary is present, else stats.win_rate. */
2818
2697
  resolved_win_rate: number | null;
2819
2698
  /** Resolved markets that settled at positive realized P&L: the win-rate numerator. Additive; null only on a summary cached before the field existed. */
2820
2699
  resolved_wins: number | null;
@@ -2825,7 +2704,7 @@ export type TraderContext = {
2825
2704
  };
2826
2705
  /** RFC3339 freshness of the OPEN-position-level data: when a position_summary is present this mirrors its as_of byte-for-byte (latest /positions snapshot, else last completed sync) -- the open-position freshness clock, since the snapshot advances only open positions; otherwise the trader's last completed sync, even if an unserved position snapshot exists. Null when the selected clock is unavailable; a missing breakdown does not establish position or accounting freshness. */
2827
2706
  data_as_of: string | null;
2828
- /** Human-readable statement of the point-in-time snapshot semantics (data_as_of is the open-position clock -- the latest /positions snapshot, else the last completed sync; the snapshot advances only open positions, so resolved counts and win rate date to the last full sync; native realized P&L follows its accounting snapshot -- not a live feed; re-fetch for fresher data). */
2707
+ /** Human-readable statement of the point-in-time snapshot semantics (data_as_of is the open-position clock -- the latest /positions snapshot, else the last completed sync; the snapshot advances only open positions, so resolved counts and win rate can include settled markets recorded after the last full sync; native realized P&L follows its accounting snapshot -- not a live feed; re-fetch for fresher data). */
2829
2708
  freshness_note: string;
2830
2709
  };
2831
2710
  export type TraderEsportsGameRecord = {
@@ -3026,6 +2905,7 @@ export type TraderPnl = {
3026
2905
  entries?: {
3027
2906
  date: string;
3028
2907
  markets_traded?: number;
2908
+ /** Cash in USD this wallet traded on this UTC day, buys and sells, summed from the fills 0xinsider has stored for it. Not Polymarket's share count, and not the full-history stats.total_volume on GET /api/v1/trader/{address}. Omitted, with markets_traded, on a day above 20 times the wallet's median day. */
3029
2909
  total_volume?: number;
3030
2910
  cumulative_profit?: number;
3031
2911
  total_pnl?: number;
@@ -3112,7 +2992,7 @@ export type TraderPnlExact = {
3112
2992
  };
3113
2993
  /** Lossless counterparts for trader statistics. The object is omitted when the verified provider observation is unavailable. */
3114
2994
  export type TraderStatsExact = {
3115
- /** Full-history both-sides Polymarket user-volume atom from the verified `trader_usd_volume` observation. */
2995
+ /** 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. */
3116
2996
  total_volume: ExactDecimal;
3117
2997
  };
3118
2998
  /** Field-level trust metadata returned only when GET /api/v1/trader/{address} includes expand=trust. */
@@ -3625,6 +3505,7 @@ export interface OperationData {
3625
3505
  getCombosSummary: CombosSummary;
3626
3506
  getCoverage: Platforms;
3627
3507
  getDailyReportSnapshot: ReportSnapshot;
3508
+ getEdgeHunter: EdgeHunterBoard;
3628
3509
  getEventReplaySince: EventReplayEvent[];
3629
3510
  getGame: Game;
3630
3511
  getHealth: {
@@ -3825,12 +3706,8 @@ export interface OperationData {
3825
3706
  listLargeTrades: LargeTrade[];
3826
3707
  listLeaderboard: LeaderboardEntry[];
3827
3708
  listPositions: Position[];
3828
- listPreGameSideObservations: PreGameSideObservation[];
3829
- listPreGameSides: PreGameSide[];
3830
3709
  listSharpMoneyFlows: SmartMoneyFlowMarket[];
3831
3710
  listSmartMoneyFlows: SmartMoneyFlowMarket[];
3832
- listSportsEdgeObservations: PreGameSideObservation[];
3833
- listSportsEdgeSignals: PreGameSide[];
3834
3711
  listSuspiciousTrades: SuspiciousTrade[];
3835
3712
  listTrendingWallets: TrendingWallet[];
3836
3713
  listWebhookDeliveries: WebhookDelivery[];
@@ -3989,6 +3866,10 @@ export interface OperationQuery {
3989
3866
  /** UTC report date in YYYY-MM-DD format, from 2024-03-01 (the first day report data covers) through tomorrow UTC. Any other date returns 400 bad_request with error.param=date. */
3990
3867
  date: string;
3991
3868
  };
3869
+ getEdgeHunter: {
3870
+ /** Kickoff window in hours from the snapshot anchor. Defaults to 48; integer values below 1 or above 48 are clamped to 1 or 48. */
3871
+ horizon_hours?: number;
3872
+ };
3992
3873
  getEventReplaySince: {
3993
3874
  /** Opaque event replay cursor returned as next_cursor by a prior response. The cursor maps to the global (whale_alerts.inserted_xid, whale_alerts.id) commit-order position, is valid across backend replicas, and is bound to the filter set the walk ran with (trader, condition_id, min_grade, min_size): presenting it under different filters answers 400 bad_request with error.reason cursor_expired, and the walk restarts without a cursor. Cursors issued before 2026-09-22 (id-only) stay accepted and are bound to no filters. Omit to fetch the latest durable public suffix. */
3994
3875
  cursor?: string;
@@ -4300,28 +4181,6 @@ export interface OperationQuery {
4300
4181
  /** Filter by the binary outcome side. `yes` maps to outcome_index=0, `no` to outcome_index=1. */
4301
4182
  side?: "yes" | "no";
4302
4183
  };
4303
- listPreGameSideObservations: {
4304
- /** Observation cohort. wider_holder measures pre-game holder piles outside the funded route's exact raw signals admission. in_play admits only provider-confirmed live games and excludes stale or unavailable provider live-board, holder, or directional evidence. emerging_pile is a post-compute wider_holder projection for finite sharp_pct in [0.75, 0.85) with holder_scan_complete=true and a kickoff after its pinned projection cutoff; it overlaps wider_holder, is not an independent denominator, and is not arrival history. */
4305
- cohort: "wider_holder" | "in_play" | "emerging_pile";
4306
- /** Optional canonical sport bucket. Omitted or blank selects all registered sports. Raw provider categories resolve through the canonical taxonomy, including table-tennis or table tennis to Table Tennis and pickleball to Pickleball; a non-sport category returns an empty list. */
4307
- category?: string;
4308
- /** Page size. Out-of-range values are clamped to 1..100. */
4309
- limit?: number;
4310
- /** Server-authenticated opaque seo_v2_ cursor from next_cursor. Pins snapshot_as_of, cohort, rank, and condition_id; pre-deploy unsigned seo_ cursors are rejected, so clients must request the first page after this contract ships; emerging_pile cursors also pin the first-page projection_now cutoff so kickoff filtering cannot renumber continuation pages. Client edits fail closed; it cannot cross cohorts; a refreshed snapshot invalidates it with 400. */
4311
- cursor?: string;
4312
- };
4313
- listPreGameSides: {
4314
- /** Optional canonical sport bucket filter (e.g. Basketball, Tennis, Soccer). A raw provider value (NBA) resolves to its canonical bucket. A non-sport category returns an empty list. */
4315
- category?: string;
4316
- /** Page size. Out-of-range values are clamped to 1..100. */
4317
- limit?: number;
4318
- /** Opaque cursor from a previous response's next_cursor. Encodes the snapshot anchor plus the last row's directional_rank_score, conviction_score, smart_score and condition_id. A cursor from an expired snapshot returns 400. */
4319
- cursor?: string;
4320
- /** Kickoff ceiling in hours from now; the floor is now (only games not yet started). Clamped to 1..48. */
4321
- horizon_hours?: number;
4322
- /** Minimum trader grade required on the piled side. Only S, A, B are accepted (the piled-side grade distribution is S/A/B only; C, D, F return 400). Default B means at least one S/A/B holder is piled; S requires an S holder, A requires an S or A holder. */
4323
- min_grade?: "S" | "A" | "B";
4324
- };
4325
4184
  listSharpMoneyFlows: {
4326
4185
  /** Lookback window for grade-filtered whale flow aggregation. */
4327
4186
  timeframe?: "1h" | "4h" | "24h" | "7d";
@@ -4354,28 +4213,6 @@ export interface OperationQuery {
4354
4213
  /** Optional post-aggregate flow direction filter. */
4355
4214
  direction?: "YES" | "NO";
4356
4215
  };
4357
- listSportsEdgeObservations: {
4358
- /** Observation cohort. wider_holder measures pre-game holder piles outside the funded route's exact raw signals admission. in_play admits only provider-confirmed live games and excludes stale or unavailable provider live-board, holder, or directional evidence. emerging_pile is a post-compute wider_holder projection for finite sharp_pct in [0.75, 0.85) with holder_scan_complete=true and a kickoff after its pinned projection cutoff; it overlaps wider_holder, is not an independent denominator, and is not arrival history. */
4359
- cohort: "wider_holder" | "in_play" | "emerging_pile";
4360
- /** Optional canonical sport bucket. Omitted or blank selects all registered sports. Raw provider categories resolve through the canonical taxonomy, including table-tennis or table tennis to Table Tennis and pickleball to Pickleball; a non-sport category returns an empty list. */
4361
- category?: string;
4362
- /** Page size. Out-of-range values are clamped to 1..100. */
4363
- limit?: number;
4364
- /** Server-authenticated opaque seo_v2_ cursor from next_cursor. Pins snapshot_as_of, cohort, rank, and condition_id; pre-deploy unsigned seo_ cursors are rejected, so clients must request the first page after this contract ships; emerging_pile cursors also pin the first-page projection_now cutoff so kickoff filtering cannot renumber continuation pages. Client edits fail closed; it cannot cross cohorts; a refreshed snapshot invalidates it with 400. */
4365
- cursor?: string;
4366
- };
4367
- listSportsEdgeSignals: {
4368
- /** Optional canonical sport bucket filter (e.g. Basketball, Tennis, Soccer). A raw provider value (NBA) resolves to its canonical bucket. A non-sport category returns an empty list. */
4369
- category?: string;
4370
- /** Page size. Out-of-range values are clamped to 1..100. */
4371
- limit?: number;
4372
- /** Opaque cursor from a previous response's next_cursor. Encodes the snapshot anchor plus the last row's directional_rank_score, conviction_score, smart_score and condition_id. A cursor from an expired snapshot returns 400. */
4373
- cursor?: string;
4374
- /** Kickoff ceiling in hours from now; the floor is now (only games not yet started). Clamped to 1..48. */
4375
- horizon_hours?: number;
4376
- /** Minimum trader grade required on the piled side. Only S, A, B are accepted (the piled-side grade distribution is S/A/B only; C, D, F return 400). Default B means at least one S/A/B holder is piled; S requires an S holder, A requires an S or A holder. */
4377
- min_grade?: "S" | "A" | "B";
4378
- };
4379
4216
  listSuspiciousTrades: {
4380
4217
  /** Maximum number of suspicious trades to return. Out-of-range values are clamped to 1..100. */
4381
4218
  limit?: number;
@@ -4538,6 +4375,7 @@ export interface OperationPath {
4538
4375
  getCombosSummary: Record<string, never>;
4539
4376
  getCoverage: Record<string, never>;
4540
4377
  getDailyReportSnapshot: Record<string, never>;
4378
+ getEdgeHunter: Record<string, never>;
4541
4379
  getEventReplaySince: Record<string, never>;
4542
4380
  getGame: {
4543
4381
  /** The game's event slug, for example nfl-buf-nyj-2026-09-22. Matched case-insensitively. */
@@ -4669,12 +4507,8 @@ export interface OperationPath {
4669
4507
  listLargeTrades: Record<string, never>;
4670
4508
  listLeaderboard: Record<string, never>;
4671
4509
  listPositions: Record<string, never>;
4672
- listPreGameSideObservations: Record<string, never>;
4673
- listPreGameSides: Record<string, never>;
4674
4510
  listSharpMoneyFlows: Record<string, never>;
4675
4511
  listSmartMoneyFlows: Record<string, never>;
4676
- listSportsEdgeObservations: Record<string, never>;
4677
- listSportsEdgeSignals: Record<string, never>;
4678
4512
  listSuspiciousTrades: Record<string, never>;
4679
4513
  listTrendingWallets: Record<string, never>;
4680
4514
  listWebhookDeliveries: {
@@ -4773,6 +4607,7 @@ export interface OperationBody {
4773
4607
  getCombosSummary: never;
4774
4608
  getCoverage: never;
4775
4609
  getDailyReportSnapshot: never;
4610
+ getEdgeHunter: never;
4776
4611
  getEventReplaySince: never;
4777
4612
  getGame: never;
4778
4613
  getHealth: never;
@@ -4819,12 +4654,8 @@ export interface OperationBody {
4819
4654
  listLargeTrades: never;
4820
4655
  listLeaderboard: never;
4821
4656
  listPositions: never;
4822
- listPreGameSideObservations: never;
4823
- listPreGameSides: never;
4824
4657
  listSharpMoneyFlows: never;
4825
4658
  listSmartMoneyFlows: never;
4826
- listSportsEdgeObservations: never;
4827
- listSportsEdgeSignals: never;
4828
4659
  listSuspiciousTrades: never;
4829
4660
  listTrendingWallets: never;
4830
4661
  listWebhookDeliveries: never;
@@ -4937,6 +4768,11 @@ export interface OperationResponse {
4937
4768
  data: OperationData["getDailyReportSnapshot"];
4938
4769
  meta: ResponseMeta;
4939
4770
  };
4771
+ getEdgeHunter: {
4772
+ object: "edge_hunter";
4773
+ data: OperationData["getEdgeHunter"];
4774
+ meta: ResponseMeta;
4775
+ };
4940
4776
  getEventReplaySince: {
4941
4777
  object: "event_replay";
4942
4778
  data: OperationData["getEventReplaySince"];
@@ -5202,27 +5038,6 @@ export interface OperationResponse {
5202
5038
  };
5203
5039
  meta: ResponseMeta;
5204
5040
  };
5205
- listPreGameSideObservations: {
5206
- object: "list";
5207
- data: OperationData["listPreGameSideObservations"];
5208
- has_more: boolean;
5209
- /** Pass as cursor for the next page. Always sent; null on the last page. */
5210
- next_cursor: string | null;
5211
- /** Completion time of the shared observation snapshot pinned by the cursor. */
5212
- snapshot_as_of: string;
5213
- /** 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. Intentional bounded capacity_limited rows remain fully accounted in the funnel and do not by themselves set this field. */
5214
- degraded: boolean;
5215
- funnel: PreGameSideFunnelReport;
5216
- meta: ResponseMeta;
5217
- };
5218
- listPreGameSides: {
5219
- object: "list";
5220
- data: OperationData["listPreGameSides"];
5221
- has_more: boolean;
5222
- next_cursor?: string;
5223
- total?: number;
5224
- meta: ResponseMeta;
5225
- };
5226
5041
  listSharpMoneyFlows: {
5227
5042
  object: "list";
5228
5043
  data: OperationData["listSharpMoneyFlows"];
@@ -5239,27 +5054,6 @@ export interface OperationResponse {
5239
5054
  total?: number;
5240
5055
  meta: ResponseMeta;
5241
5056
  };
5242
- listSportsEdgeObservations: {
5243
- object: "list";
5244
- data: OperationData["listSportsEdgeObservations"];
5245
- has_more: boolean;
5246
- /** Pass as cursor for the next page. Always sent; null on the last page. */
5247
- next_cursor: string | null;
5248
- /** Completion time of the shared observation snapshot pinned by the cursor. */
5249
- snapshot_as_of: string;
5250
- /** 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. Intentional bounded capacity_limited rows remain fully accounted in the funnel and do not by themselves set this field. */
5251
- degraded: boolean;
5252
- funnel: PreGameSideFunnelReport;
5253
- meta: ResponseMeta;
5254
- };
5255
- listSportsEdgeSignals: {
5256
- object: "list";
5257
- data: OperationData["listSportsEdgeSignals"];
5258
- has_more: boolean;
5259
- next_cursor?: string;
5260
- total?: number;
5261
- meta: ResponseMeta;
5262
- };
5263
5057
  listSuspiciousTrades: {
5264
5058
  object: "list";
5265
5059
  data: OperationData["listSuspiciousTrades"];