@0xinsider/mcp 2.6.0 → 2.9.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 (57) hide show
  1. package/README.md +16 -10
  2. package/dist/catalog.generated.d.ts +14 -2
  3. package/dist/catalog.generated.d.ts.map +1 -1
  4. package/dist/catalog.generated.js +17 -2
  5. package/dist/catalog.generated.js.map +1 -1
  6. package/dist/constants.d.ts +1 -1
  7. package/dist/constants.js +1 -1
  8. package/dist/product-cli/index.d.ts.map +1 -1
  9. package/dist/product-cli/index.js +5 -1
  10. package/dist/product-cli/index.js.map +1 -1
  11. package/dist/prompts/index.js +2 -2
  12. package/dist/sdk/client.d.ts +50 -5
  13. package/dist/sdk/client.d.ts.map +1 -1
  14. package/dist/sdk/client.js +69 -4
  15. package/dist/sdk/client.js.map +1 -1
  16. package/dist/sdk/data-quality.d.ts +74 -0
  17. package/dist/sdk/data-quality.d.ts.map +1 -0
  18. package/dist/sdk/data-quality.js +68 -0
  19. package/dist/sdk/data-quality.js.map +1 -0
  20. package/dist/sdk/errors.d.ts +21 -1
  21. package/dist/sdk/errors.d.ts.map +1 -1
  22. package/dist/sdk/errors.js +25 -0
  23. package/dist/sdk/errors.js.map +1 -1
  24. package/dist/sdk/index.d.ts +11 -4
  25. package/dist/sdk/index.d.ts.map +1 -1
  26. package/dist/sdk/index.js +4 -2
  27. package/dist/sdk/index.js.map +1 -1
  28. package/dist/sdk/schema.d.ts +264 -73
  29. package/dist/sdk/schema.d.ts.map +1 -1
  30. package/dist/server.d.ts.map +1 -1
  31. package/dist/server.js +5 -2
  32. package/dist/server.js.map +1 -1
  33. package/dist/tools/{get-market-intel.d.ts → get-market-flow.d.ts} +3 -1
  34. package/dist/tools/get-market-flow.d.ts.map +1 -0
  35. package/dist/tools/get-market-flow.js +57 -0
  36. package/dist/tools/get-market-flow.js.map +1 -0
  37. package/dist/tools/get-positions.d.ts +6 -0
  38. package/dist/tools/get-positions.d.ts.map +1 -1
  39. package/dist/tools/get-positions.js +14 -4
  40. package/dist/tools/get-positions.js.map +1 -1
  41. package/dist/tools/get-trader.js +2 -2
  42. package/dist/tools/get-trader.js.map +1 -1
  43. package/dist/tools/get-whale-trades.js +1 -1
  44. package/dist/tools/get-whale-trades.js.map +1 -1
  45. package/dist/tools/read-parity.d.ts +3 -0
  46. package/dist/tools/read-parity.d.ts.map +1 -1
  47. package/dist/tools/read-parity.js +48 -11
  48. package/dist/tools/read-parity.js.map +1 -1
  49. package/dist/tools/result.d.ts +2 -0
  50. package/dist/tools/result.d.ts.map +1 -1
  51. package/dist/tools/result.js +2 -0
  52. package/dist/tools/result.js.map +1 -1
  53. package/dist/tools/search-markets.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/tools/get-market-intel.d.ts.map +0 -1
  56. package/dist/tools/get-market-intel.js +0 -39
  57. package/dist/tools/get-market-intel.js.map +0 -1
@@ -59,7 +59,7 @@ export type ApiDiscovery = {
59
59
  openapi_url: string;
60
60
  /** Unauthenticated API health endpoint. */
61
61
  health_url: string;
62
- authentication: "Bearer API key required for data endpoints; discovery (/api/v1), health, /api/v1/platforms, the Pick of the Day commitment ledger (/api/v1/pick-of-the-day/ledger), and the MCP handshake (initialize, ping, tools/list on /api/v1/mcp) are public. A 401 carries WWW-Authenticate with the resource_metadata URL.";
62
+ authentication: "Bearer API key required for data endpoints; discovery (/api/v1), health, coverage (/api/v1/coverage, and its deprecated alias /api/v1/platforms), the Pick of the Day commitment ledger (/api/v1/pick-of-the-day/ledger), and the MCP handshake (initialize, ping, tools/list on /api/v1/mcp) are public. A 401 carries WWW-Authenticate with the resource_metadata URL.";
63
63
  /** RFC 9728 protected-resource metadata for the API origin: the document every V1 401 names in its WWW-Authenticate challenge (resource, bearer_methods_supported, resource_documentation). The remote MCP server has its own document at /.well-known/oauth-protected-resource/api/v1/mcp. */
64
64
  protected_resource_metadata_url: string;
65
65
  /** The complete authenticated route index: one entry per authenticated route this spec documents, in "<METHOD> <path>" form, not a representative subset. GET /api/v1 is the unauthenticated entrypoint an agent hits first, so it hands back the whole authenticated surface rather than a sample the caller would have to guess around. The example on GET /api/v1 is abridged for readability -- the live response returns all of them. Kept in lockstep with this spec by review: it is a hand-maintained const in backend/src/api_v1/discovery.rs and no automated check compares the two, so treat this spec as authoritative if they ever disagree. */
@@ -75,8 +75,9 @@ export type ApiError = {
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
+ freshness?: FreshnessFailure;
78
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 Pro 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. */
79
- 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";
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";
80
81
  };
81
82
  meta: ResponseMeta;
82
83
  };
@@ -88,15 +89,16 @@ export type ApiErrorBody = {
88
89
  param?: string;
89
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 11:00 UTC 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 under supported operator actions: manual publication, release-time override, or admin generation can make a pick available first. 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. */
90
91
  retry_at?: string;
92
+ freshness?: FreshnessFailure;
91
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 Pro 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. */
92
- 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";
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
95
  };
94
- export type BatchMarketIntelItem = {
96
+ export type BatchMarketFlowItem = {
95
97
  /** Zero-based request index. Duplicate inputs keep separate result rows. */
96
98
  index: number;
97
99
  input: string;
98
100
  status: "ok" | "error";
99
- data?: MarketIntel;
101
+ data?: MarketFlow;
100
102
  error?: ApiErrorBody;
101
103
  };
102
104
  export type BatchRateLimitMeta = {
@@ -250,6 +252,7 @@ export type CreateWebhookRequest = {
250
252
  /** Public HTTPS callback URL on the default port 443. Local, private, and internal targets are rejected, as is any explicit port other than 443 and any URL carrying credentials. Each user's URLs are unique after normalizing HTTPS scheme/host case, trailing DNS dots and port 443; path/query case is preserved. Pending verification and PATCH-disabled endpoints still reserve their stored URL. The destination must answer the signed webhook.verification challenge with a 2xx before POST /api/v1/webhooks/{id}/verify can activate the endpoint. */
251
253
  url: string;
252
254
  event_types: WebhookEventType[];
255
+ trade_filters?: LargeTradeSubscriptionFilters;
253
256
  };
254
257
  /** Compact data age and coverage for a response body, always present on the operations that publish it. Read status and as_of to decide whether to use the body at all, and field_groups to see which part is weak. Everything here comes from stored observation clocks, so a cached body reports the same ages a freshly computed one does: meta.cached and meta.cache_age_s stay the only transport-time facts and neither makes this block newer. The per-field audit object is still available through expand=trust; this is the default summary of the same question. */
255
258
  export type DataQuality = {
@@ -497,7 +500,17 @@ export type ExportVolumeReconciliation = {
497
500
  provider_activity_volume_gap: number | null;
498
501
  activity_volume_coverage: number | null;
499
502
  };
500
- /** One sports or esports game: both sides, its schedule, its provider status and the Polymarket markets linked to it. Assembled from the same provider-first live and upcoming projections the site's boards use, with no request-time provider fan-out. */
503
+ export type FreshnessFailure = {
504
+ /** The caller's requested whole-response freshness ceiling in seconds. */
505
+ max_age_s: number;
506
+ /** Age in seconds of the oldest stored data_quality.as_of clock, when one is available. */
507
+ actual_age_s?: number;
508
+ /** The oldest stored data-quality clock used to calculate actual_age_s, when one is available. */
509
+ as_of?: string;
510
+ /** The trader body's whole-response data-quality status. Only fresh can satisfy max_age_s. */
511
+ data_quality_status: "fresh" | "partial" | "unknown" | "untracked" | "unavailable";
512
+ };
513
+ /** One sports or esports game: both sides, its schedule, provider status, linked Polymarket markets and their available provider moneyline price states. Assembled from the same provider-first live and upcoming projections the site's boards use, with no request-time provider fan-out. */
501
514
  export type Game = {
502
515
  object: "game";
503
516
  /** The game's identity, for example mlb-mil-cin-2026-06-22. The same key the live_sports_updated webhook pulse carries and the same key /api/v1/games/{event_slug} takes. */
@@ -589,7 +602,64 @@ export type GameMarket = {
589
602
  outcome_no?: string;
590
603
  /** Polymarket CLOB token ids in the provider's own outcome-index order. Omitted when the provider has published none for this market. */
591
604
  outcome_token_ids?: string[];
605
+ /** Default provider moneyline state. Omitted when this market has no classified moneyline projection; incomplete and invalid projections remain explicit. */
606
+ prices?: GameMarketPrices;
607
+ };
608
+ /** How the existing sports-board writer bound prices to competitors. */
609
+ export type GameMarketPriceBindingProvenance = "provider_ids" | "exact_labels" | "containment_labels" | "elimination";
610
+ /** One competitor-bound provider moneyline price. No YES/NO inference is required. */
611
+ export type GameMarketPriceCompetitor = {
612
+ /** The provider competitor id when identity is available. */
613
+ provider_id?: number;
614
+ /** The provider competitor label. */
615
+ label: string;
616
+ /** Unrounded provider price in [0, 1]. */
617
+ price: number;
618
+ /** Which provider price observation supplies this leg. */
619
+ price_provenance: "gamma_outcome_prices" | "clob_display";
620
+ };
621
+ /** The provider moneyline pair is incomplete; no numeric pair is invented. */
622
+ export type GameMarketPriceIncomplete = {
623
+ state: "incomplete";
624
+ reason: "outcome_prices_missing" | "outcome_price_leg_missing" | "zero_price_sentinel" | "display_price_pair_unavailable" | "outcome_identity_unavailable" | "final_score_unavailable";
625
+ /** Whether competitor A is the provider YES leg. */
626
+ competitor_a_is_yes?: boolean;
627
+ /** The provider competitor id when identity is available. */
628
+ competitor_a_provider_id?: number;
629
+ /** The provider competitor id when identity is available. */
630
+ competitor_b_provider_id?: number;
631
+ binding_provenance?: GameMarketPriceBindingProvenance;
632
+ };
633
+ /** The provider moneyline pair is invalid; no numeric pair is invented. */
634
+ export type GameMarketPriceInvalid = {
635
+ state: "invalid";
636
+ reason: "team_cardinality" | "outcome_cardinality" | "price_cardinality" | "non_finite_price" | "out_of_range_price" | "non_complementary_prices" | "ambiguous_identity" | "final_identity_mismatch";
637
+ /** Whether competitor A is the provider YES leg. */
638
+ competitor_a_is_yes?: boolean;
639
+ /** The provider competitor id when identity is available. */
640
+ competitor_a_provider_id?: number;
641
+ /** The provider competitor id when identity is available. */
642
+ competitor_b_provider_id?: number;
643
+ binding_provenance?: GameMarketPriceBindingProvenance;
644
+ };
645
+ /** A validated provider moneyline pair bound to the two competitors. */
646
+ export type GameMarketPricePaired = {
647
+ state: "paired";
648
+ competitor_a: GameMarketPriceCompetitor;
649
+ competitor_b: GameMarketPriceCompetitor;
650
+ /** Whether competitor A is the provider YES leg. */
651
+ competitor_a_is_yes: boolean;
652
+ binding_provenance: GameMarketPriceBindingProvenance;
653
+ };
654
+ /** Provider-owned moneyline state with the observation clock that can be compared with game freshness. */
655
+ export type GameMarketPrices = {
656
+ provider: GameMarketProviderPrices;
657
+ /** Board cache vintage for Gamma or the older CLOB leg clock. Null when no reliable clock is available; never a Gamma-authored timestamp. */
658
+ observed_at: string | null;
659
+ /** The clock used for observed_at. board_snapshot is this service’s cache observation, not a provider source timestamp. */
660
+ observation_source: "board_snapshot" | "clob_display";
592
661
  };
662
+ export type GameMarketProviderPrices = GameMarketPricePaired | GameMarketPriceIncomplete | GameMarketPriceInvalid;
593
663
  /** What this deployment covers, published with every page so a client never has to guess whether an empty list means no games or no coverage. */
594
664
  export type GamesCoverage = {
595
665
  /** Canonical sport buckets served, sorted. */
@@ -788,6 +858,17 @@ export type LargeTradeHistoryMeta = {
788
858
  reason: string;
789
859
  };
790
860
  };
861
+ /** All present fields narrow large_trade_inserted_v2 delivery. Grade is observed at publication; ungraded trades do not match min_grade. An empty object matches every large trade. */
862
+ export type LargeTradeSubscriptionFilters = {
863
+ /** Raw provider condition ID or mkt_-prefixed market ID. */
864
+ condition_id?: string;
865
+ /** Polymarket wallet address; matching is case-insensitive. */
866
+ wallet?: string;
867
+ /** S is best; ungraded trades do not match. */
868
+ min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
869
+ /** Positive USD notional as an exact decimal string. */
870
+ min_size_usd?: string;
871
+ };
791
872
  export type LeaderboardEntry = {
792
873
  id: string;
793
874
  address: string;
@@ -818,6 +899,68 @@ export type MarketCandles = {
818
899
  /** One entry per present provider token (YES first, then NO); empty when no tokens have been fetched yet. */
819
900
  outcomes: OutcomeCandles[];
820
901
  };
902
+ export type MarketFlow = {
903
+ market: {
904
+ id: string;
905
+ condition_id: string;
906
+ title: string;
907
+ slug: string | null;
908
+ category: string | null;
909
+ platform: string | null;
910
+ };
911
+ /** Outcome-aware flow from all tracked whale trades in the window, without a grade filter. BUY YES and SELL NO add net exposure; BUY NO and SELL YES subtract it. Gross buy/sell volumes count both outcomes. Top positions are separately graded. Direction uses unrounded net: negative is NO, otherwise YES; the zero tie-break is not conviction. Canonical; smart_money is a deprecated byte-identical alias. */
912
+ sharp_money: {
913
+ net_flow_usd: number;
914
+ direction: "YES" | "NO";
915
+ /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
916
+ token_id: string | null;
917
+ /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
918
+ large_trade_count?: number;
919
+ whale_trade_count: number;
920
+ buy_volume_usd: number;
921
+ sell_volume_usd: number;
922
+ top_positions: ({
923
+ id: string;
924
+ address: string;
925
+ username: string | null;
926
+ grade: string | null;
927
+ side: "YES" | "NO";
928
+ /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for this outcome; null when unavailable (e.g. unsynced markets). */
929
+ token_id: string | null;
930
+ size_usd: number;
931
+ })[];
932
+ /** Age of the oldest stored position snapshot behind top_positions: the minimum wallet sync clock over the positions this body publishes. The roster is a stored read rather than a live one, and graded wallets sit on different sync tiers, so this names how current the whole roster is; the response is no fresher than this timestamp. Null when the roster is empty or no published position carries a sync clock. It does not date net_flow_usd, the volumes or the trade counts, which come from large-trade event times. */
933
+ oldest_snapshot_as_of: string | null;
934
+ };
935
+ /**
936
+ * Deprecated alias of sharp_money; byte-identical and retained for backward compatibility.
937
+ * @deprecated
938
+ */
939
+ smart_money: {
940
+ net_flow_usd: number;
941
+ direction: "YES" | "NO";
942
+ /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
943
+ token_id: string | null;
944
+ /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
945
+ large_trade_count?: number;
946
+ whale_trade_count: number;
947
+ buy_volume_usd: number;
948
+ sell_volume_usd: number;
949
+ top_positions: ({
950
+ id: string;
951
+ address: string;
952
+ username: string | null;
953
+ grade: string | null;
954
+ side: "YES" | "NO";
955
+ /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for this outcome; null when unavailable (e.g. unsynced markets). */
956
+ token_id: string | null;
957
+ size_usd: number;
958
+ })[];
959
+ /** Age of the oldest stored position snapshot behind top_positions: the minimum wallet sync clock over the positions this body publishes. The roster is a stored read rather than a live one, and graded wallets sit on different sync tiers, so this names how current the whole roster is; the response is no fresher than this timestamp. Null when the roster is empty or no published position carries a sync clock. It does not date net_flow_usd, the volumes or the trade counts, which come from large-trade event times. */
960
+ oldest_snapshot_as_of: string | null;
961
+ };
962
+ timeframe: string;
963
+ };
821
964
  export type MarketHolder = {
822
965
  /** Composite `pos_<wallet>:<condition_id>:<outcome_index>`, the same id `GET /api/v1/positions` gives this leg. */
823
966
  id: string;
@@ -913,68 +1056,6 @@ export type MarketHoldersTotals = {
913
1056
  yes_grades: MarketHoldersSideGrades;
914
1057
  no_grades: MarketHoldersSideGrades;
915
1058
  };
916
- export type MarketIntel = {
917
- market: {
918
- id: string;
919
- condition_id: string;
920
- title: string;
921
- slug: string | null;
922
- category: string | null;
923
- platform: string | null;
924
- };
925
- /** Outcome-aware flow from all tracked whale trades in the window, without a grade filter. BUY YES and SELL NO add net exposure; BUY NO and SELL YES subtract it. Gross buy/sell volumes count both outcomes. Top positions are separately graded. Direction uses unrounded net: negative is NO, otherwise YES; the zero tie-break is not conviction. Canonical; smart_money is a deprecated byte-identical alias. */
926
- sharp_money: {
927
- net_flow_usd: number;
928
- direction: "YES" | "NO";
929
- /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
930
- token_id: string | null;
931
- /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
932
- large_trade_count?: number;
933
- whale_trade_count: number;
934
- buy_volume_usd: number;
935
- sell_volume_usd: number;
936
- top_positions: ({
937
- id: string;
938
- address: string;
939
- username: string | null;
940
- grade: string | null;
941
- side: "YES" | "NO";
942
- /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for this outcome; null when unavailable (e.g. unsynced markets). */
943
- token_id: string | null;
944
- size_usd: number;
945
- })[];
946
- /** Age of the oldest stored position snapshot behind top_positions: the minimum wallet sync clock over the positions this body publishes. The roster is a stored read rather than a live one, and graded wallets sit on different sync tiers, so this names how current the whole roster is; the response is no fresher than this timestamp. Null when the roster is empty or no published position carries a sync clock. It does not date net_flow_usd, the volumes or the trade counts, which come from large-trade event times. */
947
- oldest_snapshot_as_of: string | null;
948
- };
949
- /**
950
- * Deprecated alias of sharp_money; byte-identical and retained for backward compatibility.
951
- * @deprecated
952
- */
953
- smart_money: {
954
- net_flow_usd: number;
955
- direction: "YES" | "NO";
956
- /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
957
- token_id: string | null;
958
- /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
959
- large_trade_count?: number;
960
- whale_trade_count: number;
961
- buy_volume_usd: number;
962
- sell_volume_usd: number;
963
- top_positions: ({
964
- id: string;
965
- address: string;
966
- username: string | null;
967
- grade: string | null;
968
- side: "YES" | "NO";
969
- /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for this outcome; null when unavailable (e.g. unsynced markets). */
970
- token_id: string | null;
971
- size_usd: number;
972
- })[];
973
- /** Age of the oldest stored position snapshot behind top_positions: the minimum wallet sync clock over the positions this body publishes. The roster is a stored read rather than a live one, and graded wallets sit on different sync tiers, so this names how current the whole roster is; the response is no fresher than this timestamp. Null when the roster is empty or no published position carries a sync clock. It does not date net_flow_usd, the volumes or the trade counts, which come from large-trade event times. */
974
- oldest_snapshot_as_of: string | null;
975
- };
976
- timeframe: string;
977
- };
978
1059
  export type MarketSearchResult = {
979
1060
  id: string;
980
1061
  condition_id: string;
@@ -2273,7 +2354,7 @@ export type Trader = {
2273
2354
  synced_at?: string;
2274
2355
  /** synced, unknown, or pending. */
2275
2356
  sync_status?: string;
2276
- /** Data age and coverage for this trader body. Always present. Its five groups are sync (traders.last_synced, covering pnl.total, pnl.realized, stats.markets_traded, stats.win_rate, stats.daily_win_rate, last_active, synced_at and sync_status), ranking (trader_rankings.computed_at, covering grade, score, streak_tier, forecast_score and forecast_evidence), leaderboard_rank (traders.leaderboard_rank, which stores no write timestamp, so its status is unknown rather than dated by another clock), volume (trader_usd_volume.observed_at, covering stats.total_volume) and positions (trader_markets, covering pnl.unrealized, whose own write times this read does not carry). For an unknown wallet every group is unavailable. */
2357
+ /** Data age and coverage for this trader body. Always present. Its five groups are sync (traders.last_synced, covering pnl.total, pnl.realized, stats.markets_traded, stats.win_rate, stats.daily_win_rate, last_active, synced_at and sync_status), ranking (trader_rankings.computed_at, covering grade, score, streak_tier, forecast_score and forecast_evidence), leaderboard_rank (leaderboard_rank_refresh_state.completed_at, the completion time of the latest fully completed global rank refresh, covering rank), volume (trader_usd_volume.observed_at, covering stats.total_volume) and positions (trader_position_snapshots.last_refreshed_at with traders.last_synced as fallback, covering pnl.unrealized, the open-position aggregate). The positions clock is the latest successful /positions snapshot when one exists, otherwise the last completed trader sync; it does not date closed or native accounting values. A rank or position value remains unknown or unavailable when its clock or value is absent. For an unknown wallet every group is unavailable. */
2277
2358
  data_quality: DataQuality;
2278
2359
  /** Field-level trust metadata. Present only when expand=trust or expand[]=trust is requested. */
2279
2360
  trust?: TraderTrust;
@@ -2479,6 +2560,37 @@ export type TraderExportTradeWatermark = {
2479
2560
  rows: number;
2480
2561
  first_activity_date: string | null;
2481
2562
  };
2563
+ export type TraderGradeAt = {
2564
+ /** Prefixed trader id (trd_<wallet>). */
2565
+ id: string;
2566
+ /** Resolved wallet address, lowercased. */
2567
+ address: string;
2568
+ /** Requested event or decision time. */
2569
+ as_of: string;
2570
+ /** graded has a proven grade; ungraded is a proven null grade; unknown has no valid historical observation. */
2571
+ status: "graded" | "ungraded" | "unknown";
2572
+ /** Grade only when status is graded; null otherwise. */
2573
+ grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
2574
+ /** First proven visibility instant for this trader. Null when no observation exists. Earlier times remain unknown. */
2575
+ available_from: string | null;
2576
+ /** Proof row when status is graded or ungraded. Null when history is unknown. */
2577
+ observation: {
2578
+ /** Immutable grade_forward_history observation id. */
2579
+ id: number;
2580
+ /** Previous immutable observation id when retained. A later grade change supersedes that observation but never erases it; this link does not assert why the grade changed. */
2581
+ previous_observation_id: number | null;
2582
+ /** Lower bound: the grade writer had started the transition at this instant. */
2583
+ observed_at: string;
2584
+ /** Upper bound: a later snapshot confirmed the observation was committed. This is not an exact commit timestamp. */
2585
+ published_by: string;
2586
+ /** Writer-proven model family, such as grading-v4. Null when unknown. */
2587
+ model_version: string | null;
2588
+ /** Exact writer build SHA when recorded. Null on old and non-model observations. */
2589
+ model_build_sha: string | null;
2590
+ /** Database-clock upper bound on when the grading pass read its cohort inputs. Not the event time or source freshness of every input; null when unknown. */
2591
+ source_observed_by: string | null;
2592
+ } | null;
2593
+ };
2482
2594
  /** A trader's daily P&L object. `id` is always present. The five sections -- `entries`, `stats`, `monthly`, `year_totals`, `drawdown` -- are present unless the request's `sections` parameter excluded them, so a request that sends no `sections` always carries all five. An excluded section is absent from the object, never null and never an empty array. */
2483
2595
  export type TraderPnl = {
2484
2596
  /** Prefixed trader ID (`trd_...`). */
@@ -2694,6 +2806,7 @@ export type UpdateWebhookRequest = {
2694
2806
  /** Replacement public HTTPS callback URL on the default port 443, validated and checked for uniqueness exactly like the create url. HTTPS scheme/host case, trailing DNS dots and port 443 normalize; path/query case is preserved. Changing it resets status to pending_verification and returns a new verification token; the new destination must pass the verification challenge before deliveries resume. */
2695
2807
  url?: string;
2696
2808
  event_types?: WebhookEventType[];
2809
+ trade_filters?: LargeTradeSubscriptionFilters;
2697
2810
  enabled?: boolean;
2698
2811
  };
2699
2812
  export type Usage = {
@@ -2768,6 +2881,7 @@ export type WebhookEndpoint = {
2768
2881
  name: string;
2769
2882
  url: string;
2770
2883
  event_types: WebhookEventType[];
2884
+ trade_filters: LargeTradeSubscriptionFilters;
2771
2885
  status: WebhookStatus;
2772
2886
  verified_at: string | null;
2773
2887
  verification_token_expires_at: string;
@@ -2790,7 +2904,7 @@ export type WebhookEventDescriptor = {
2790
2904
  /** active: the event has a firing producer callsite. dormant: advertised and subscribable, but does not yet enqueue any delivery. */
2791
2905
  status: "active" | "dormant";
2792
2906
  };
2793
- export type WebhookEventType = "large_trades_inserted" | "whale_trades_inserted" | "live_sports_updated" | "trader_synced" | "whale_trader_synced" | "large_positions_updated" | "wallet_grade_changed" | "suspicious_trade_flagged" | "insider_radar_flag_raised" | "sharp_money_flow_detected" | "smart_money_flow_detected" | "export_job_ready" | "export_job_failed" | "export_job_expired" | "export_job_cancelled";
2907
+ export type WebhookEventType = "large_trade_inserted_v2" | "large_trades_inserted" | "whale_trades_inserted" | "live_sports_updated" | "trader_synced" | "whale_trader_synced" | "large_positions_updated" | "wallet_grade_changed" | "suspicious_trade_flagged" | "insider_radar_flag_raised" | "sharp_money_flow_detected" | "smart_money_flow_detected" | "export_job_ready" | "export_job_failed" | "export_job_expired" | "export_job_cancelled";
2794
2908
  export type WebhookRetryPolicy = {
2795
2909
  max_attempts: 8;
2796
2910
  terminal_status: "dead_letter";
@@ -2818,7 +2932,8 @@ export type WebhookVerification = {
2818
2932
  */
2819
2933
  export interface OperationData {
2820
2934
  activateWebhookSecret: WebhookEndpoint;
2821
- batchGetMarketIntel: BatchMarketIntelItem[];
2935
+ batchGetMarketFlow: BatchMarketFlowItem[];
2936
+ batchGetMarketIntel: BatchMarketFlowItem[];
2822
2937
  batchGetTraders: BatchTraderItem[];
2823
2938
  cancelTraderExport: {
2824
2939
  job_id: number;
@@ -2896,6 +3011,7 @@ export interface OperationData {
2896
3011
  scopes: string[] | null;
2897
3012
  };
2898
3013
  getApiDiscovery: ApiDiscovery;
3014
+ getCoverage: Platforms;
2899
3015
  getDailyReportSnapshot: ReportSnapshot;
2900
3016
  getEventReplaySince: EventReplayEvent[];
2901
3017
  getGame: Game;
@@ -2925,8 +3041,9 @@ export interface OperationData {
2925
3041
  getLargeTrade: LargeTradeDetail;
2926
3042
  getMarketCandles: MarketCandles;
2927
3043
  getMarketContextMarkdown: string;
3044
+ getMarketFlow: MarketFlow;
2928
3045
  getMarketHolders: MarketHolder[];
2929
- getMarketIntel: MarketIntel;
3046
+ getMarketIntel: MarketFlow;
2930
3047
  getMarketSnapshot: MarketSnapshot;
2931
3048
  getMonthlyReportSnapshot: ReportSnapshot;
2932
3049
  getPickOfTheDay: PickOfTheDay;
@@ -2992,6 +3109,7 @@ export interface OperationData {
2992
3109
  manifest: TraderExportArtifactManifest | null;
2993
3110
  };
2994
3111
  };
3112
+ getTraderGradeAt: TraderGradeAt;
2995
3113
  getTraderPnl: TraderPnl;
2996
3114
  getUsage: {
2997
3115
  rate_limit: {
@@ -3117,6 +3235,7 @@ export interface OperationData {
3117
3235
  /** Each operation's documented query parameters. */
3118
3236
  export interface OperationQuery {
3119
3237
  activateWebhookSecret: Record<string, never>;
3238
+ batchGetMarketFlow: Record<string, never>;
3120
3239
  batchGetMarketIntel: Record<string, never>;
3121
3240
  batchGetTraders: Record<string, never>;
3122
3241
  cancelTraderExport: {
@@ -3144,6 +3263,7 @@ export interface OperationQuery {
3144
3263
  };
3145
3264
  getAccountIdentity: Record<string, never>;
3146
3265
  getApiDiscovery: Record<string, never>;
3266
+ getCoverage: Record<string, never>;
3147
3267
  getDailyReportSnapshot: {
3148
3268
  /** UTC report date in YYYY-MM-DD format. */
3149
3269
  date: string;
@@ -3177,6 +3297,10 @@ export interface OperationQuery {
3177
3297
  to?: number;
3178
3298
  };
3179
3299
  getMarketContextMarkdown: Record<string, never>;
3300
+ getMarketFlow: {
3301
+ /** Lookback window for whale flow aggregation. */
3302
+ timeframe?: "1h" | "4h" | "24h" | "7d";
3303
+ };
3180
3304
  getMarketHolders: {
3181
3305
  /** Keep holders netting one side. `all` (default) lists both. */
3182
3306
  outcome?: "yes" | "no" | "all";
@@ -3236,8 +3360,12 @@ export interface OperationQuery {
3236
3360
  event?: string;
3237
3361
  /** Optional per-connection subscribe-time filter. Raw provider condition_id or mkt_-prefixed market id (normalized the same way the other v1 market endpoints normalize). A frame passes only when it carries a matching condition_id field; frames that carry no condition_id (e.g. whale-pulse events) are EXCLUDED while this is set. An empty value after normalization returns HTTP 400. Combines with event and min_grade as a logical AND; an absent param adds no constraint. */
3238
3362
  condition_id?: string;
3239
- /** Optional per-connection subscribe-time filter. A frame passes only when it carries a grade field whose grade is better-or-equal to this minimum (S is best). Frames that carry no grade field (every frame except wallet_grade_changed) are EXCLUDED while this is set. An invalid grade returns HTTP 400. Combines with event and condition_id as a logical AND; an absent param adds no constraint. */
3363
+ /** Optional per-connection subscribe-time filter. A frame passes only when it carries a grade field whose grade is better-or-equal to this minimum (S is best). Frames without a grade (every frame except wallet_grade_changed and LargeTradeInsertedV2) are excluded. An invalid grade returns HTTP 400. Combines with the other filters as a logical AND. */
3240
3364
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
3365
+ /** Filter LargeTradeInsertedV2 frames to this Polymarket wallet. Other event types have no wallet and are excluded when set. Applied to live and retained Redis frames after privacy checks. */
3366
+ wallet?: string;
3367
+ /** Filter LargeTradeInsertedV2 frames to trades at or above this USD notional. Positive decimal with at most six places; other event types are excluded when set. */
3368
+ min_size?: string;
3241
3369
  };
3242
3370
  getSuspiciousTrade: Record<string, never>;
3243
3371
  getTrader: {
@@ -3245,6 +3373,8 @@ export interface OperationQuery {
3245
3373
  "expand[]"?: ("strategy" | "categories" | "quant_metrics" | "trust")[];
3246
3374
  /** Include heavy fields and trust metadata. Repeatable: strategy, categories, quant_metrics, trust. */
3247
3375
  expand?: ("strategy" | "categories" | "quant_metrics" | "trust")[];
3376
+ /** Opt into a whole-response freshness ceiling in seconds. The server returns 200 only when data_quality.status is fresh and data_quality.as_of is no older than this value; otherwise it returns 409 with error.reason=freshness_ceiling_unsatisfied. No refresh or alternate read is attempted. */
3377
+ max_age_s?: number;
3248
3378
  };
3249
3379
  getTraderCategoryRecords: {
3250
3380
  /** 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 value that matches no record answers 200 with an empty records array, never 404. */
@@ -3257,6 +3387,10 @@ export interface OperationQuery {
3257
3387
  /** Export job id returned by the submit route. */
3258
3388
  job_id: number;
3259
3389
  };
3390
+ getTraderGradeAt: {
3391
+ /** RFC3339 instant whose historically visible grade is requested. Future instants are refused. Send the trade or decision time, not the ranking date. */
3392
+ as_of: string;
3393
+ };
3260
3394
  getTraderPnl: {
3261
3395
  /** Inclusive UTC calendar-date lower bound in YYYY-MM-DD form for the daily series (entries and drawdown). Omit for the whole stored history. A value that is not a calendar date, or a from later than to, returns 400 bad_request with error.param from. Does not change stats, monthly or year_totals, which stay defined over the full history. */
3262
3396
  from?: string;
@@ -3397,6 +3531,8 @@ export interface OperationQuery {
3397
3531
  limit?: number;
3398
3532
  /** Pagination cursor from previous response's next_cursor. */
3399
3533
  cursor?: string;
3534
+ /** live (default) reads the current value-ordered board. snapshot requires wallet and freezes up to 500 matching rows and 2 MB for up to five minutes. Keep consistency=snapshot and the same effective filters on every page; changing filters returns 400. A new first page from the same API key replaces its prior snapshot; replacement or expiry returns cursor_expired. */
3535
+ consistency?: "live" | "snapshot";
3400
3536
  /** 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. */
3401
3537
  min_size?: number;
3402
3538
  /** Exact match against provider-backed market_canonical.category. */
@@ -3616,6 +3752,7 @@ export interface OperationPath {
3616
3752
  /** Webhook endpoint id owned by the authenticated API key user. */
3617
3753
  id: number;
3618
3754
  };
3755
+ batchGetMarketFlow: Record<string, never>;
3619
3756
  batchGetMarketIntel: Record<string, never>;
3620
3757
  batchGetTraders: Record<string, never>;
3621
3758
  cancelTraderExport: {
@@ -3631,6 +3768,7 @@ export interface OperationPath {
3631
3768
  exploreMarkets: Record<string, never>;
3632
3769
  getAccountIdentity: Record<string, never>;
3633
3770
  getApiDiscovery: Record<string, never>;
3771
+ getCoverage: Record<string, never>;
3634
3772
  getDailyReportSnapshot: Record<string, never>;
3635
3773
  getEventReplaySince: Record<string, never>;
3636
3774
  getGame: {
@@ -3654,6 +3792,10 @@ export interface OperationPath {
3654
3792
  /** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses. */
3655
3793
  condition_id: string;
3656
3794
  };
3795
+ getMarketFlow: {
3796
+ /** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or the mkt_-prefixed market.id emitted by V1 responses. */
3797
+ condition_id: string;
3798
+ };
3657
3799
  getMarketHolders: {
3658
3800
  /** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or the mkt_-prefixed market.id emitted by V1 responses. */
3659
3801
  condition_id: string;
@@ -3709,6 +3851,10 @@ export interface OperationPath {
3709
3851
  /** Trader wallet address (0x...), known trader username-style lookup, or trd_-prefixed trader ID emitted by this API. */
3710
3852
  address: string;
3711
3853
  };
3854
+ getTraderGradeAt: {
3855
+ /** Wallet address (0x...), username, or trd_-prefixed trader id. */
3856
+ address: string;
3857
+ };
3712
3858
  getTraderPnl: {
3713
3859
  /** Wallet address (0x...), username, or trd_-prefixed trader id. */
3714
3860
  address: string;
@@ -3803,6 +3949,12 @@ export interface OperationPath {
3803
3949
  /** Each operation's JSON request body; `never` when it takes none. */
3804
3950
  export interface OperationBody {
3805
3951
  activateWebhookSecret: never;
3952
+ batchGetMarketFlow: {
3953
+ /** Market condition IDs to resolve in input order. */
3954
+ condition_ids: string[];
3955
+ /** Lookback window used for flow and trade-count context. */
3956
+ timeframe?: "1h" | "4h" | "24h" | "7d";
3957
+ };
3806
3958
  batchGetMarketIntel: {
3807
3959
  /** Market condition IDs to resolve in input order. */
3808
3960
  condition_ids: string[];
@@ -3831,6 +3983,7 @@ export interface OperationBody {
3831
3983
  exploreMarkets: never;
3832
3984
  getAccountIdentity: never;
3833
3985
  getApiDiscovery: never;
3986
+ getCoverage: never;
3834
3987
  getDailyReportSnapshot: never;
3835
3988
  getEventReplaySince: never;
3836
3989
  getGame: never;
@@ -3839,6 +3992,7 @@ export interface OperationBody {
3839
3992
  getLargeTrade: never;
3840
3993
  getMarketCandles: never;
3841
3994
  getMarketContextMarkdown: never;
3995
+ getMarketFlow: never;
3842
3996
  getMarketHolders: never;
3843
3997
  getMarketIntel: never;
3844
3998
  getMarketSnapshot: never;
@@ -3858,6 +4012,7 @@ export interface OperationBody {
3858
4012
  getTraderContextMarkdown: never;
3859
4013
  getTraderExportSnapshot: never;
3860
4014
  getTraderExportStatus: never;
4015
+ getTraderGradeAt: never;
3861
4016
  getTraderPnl: never;
3862
4017
  getUsage: never;
3863
4018
  getWebhook: never;
@@ -3909,6 +4064,11 @@ export interface OperationResponse {
3909
4064
  data: OperationData["activateWebhookSecret"];
3910
4065
  meta: ResponseMeta;
3911
4066
  };
4067
+ batchGetMarketFlow: {
4068
+ object: "market_flow_batch";
4069
+ data: OperationData["batchGetMarketFlow"];
4070
+ meta: BatchResponseMeta;
4071
+ };
3912
4072
  batchGetMarketIntel: {
3913
4073
  object: "market_intel_batch";
3914
4074
  data: OperationData["batchGetMarketIntel"];
@@ -3959,6 +4119,11 @@ export interface OperationResponse {
3959
4119
  data: OperationData["getApiDiscovery"];
3960
4120
  meta: ResponseMeta;
3961
4121
  };
4122
+ getCoverage: {
4123
+ object: "platforms";
4124
+ data: OperationData["getCoverage"];
4125
+ meta: ResponseMeta;
4126
+ };
3962
4127
  getDailyReportSnapshot: {
3963
4128
  object: "report_snapshot";
3964
4129
  data: OperationData["getDailyReportSnapshot"];
@@ -3999,6 +4164,11 @@ export interface OperationResponse {
3999
4164
  meta: ResponseMeta;
4000
4165
  };
4001
4166
  getMarketContextMarkdown: string;
4167
+ getMarketFlow: {
4168
+ object: "market_flow";
4169
+ data: OperationData["getMarketFlow"];
4170
+ meta: ResponseMeta;
4171
+ };
4002
4172
  getMarketHolders: {
4003
4173
  object: "list";
4004
4174
  data: OperationData["getMarketHolders"];
@@ -4098,6 +4268,11 @@ export interface OperationResponse {
4098
4268
  meta: ResponseMeta;
4099
4269
  };
4100
4270
  getTraderExportStatus: TraderExportJob;
4271
+ getTraderGradeAt: {
4272
+ object: "trader_grade_at";
4273
+ data: OperationData["getTraderGradeAt"];
4274
+ meta: ResponseMeta;
4275
+ };
4101
4276
  getTraderPnl: {
4102
4277
  object: "trader_pnl";
4103
4278
  data: OperationData["getTraderPnl"];
@@ -4162,6 +4337,8 @@ export interface OperationResponse {
4162
4337
  listLargeTradeHistory: {
4163
4338
  object: "list";
4164
4339
  data: OperationData["listLargeTradeHistory"];
4340
+ /** Writer-backed age and coverage for this page; it is part of the representation and the ETag, while transport cache facts remain in meta. */
4341
+ data_quality: DataQuality;
4165
4342
  has_more: boolean;
4166
4343
  next_cursor?: string;
4167
4344
  /** Total matching rows when the read model exposes a count; the key is absent when it does not. */
@@ -4171,6 +4348,8 @@ export interface OperationResponse {
4171
4348
  listLargeTrades: {
4172
4349
  object: "list";
4173
4350
  data: OperationData["listLargeTrades"];
4351
+ /** Writer-backed age and coverage for this page; it is part of the representation and the ETag, while transport cache facts remain in meta. */
4352
+ data_quality: DataQuality;
4174
4353
  has_more: boolean;
4175
4354
  next_cursor?: string;
4176
4355
  /** Total matching rows when the read model exposes a count; absent (or null) when it does not. */
@@ -4189,10 +4368,18 @@ export interface OperationResponse {
4189
4368
  listPositions: {
4190
4369
  object: "list";
4191
4370
  data: OperationData["listPositions"];
4371
+ /** Writer-backed age and coverage for this page; it is part of the representation and the ETag, while transport cache facts remain in meta. */
4372
+ data_quality: DataQuality;
4192
4373
  has_more: boolean;
4193
4374
  next_cursor?: string;
4194
4375
  /** Total matching rows when the read model exposes a count; the key is absent when it does not. */
4195
4376
  total?: number;
4377
+ /** Present only with consistency=snapshot. Dates the frozen response rows, not the provider's underlying observations. */
4378
+ snapshot?: {
4379
+ as_of: string;
4380
+ expires_at: string;
4381
+ row_count: number;
4382
+ };
4196
4383
  meta: ResponseMeta;
4197
4384
  };
4198
4385
  listPreGameSideObservations: {
@@ -4307,6 +4494,8 @@ export interface OperationResponse {
4307
4494
  listWhaleTradeHistory: {
4308
4495
  object: "list";
4309
4496
  data: OperationData["listWhaleTradeHistory"];
4497
+ /** Writer-backed age and coverage for this page; it is part of the representation and the ETag, while transport cache facts remain in meta. */
4498
+ data_quality: DataQuality;
4310
4499
  has_more: boolean;
4311
4500
  next_cursor?: string;
4312
4501
  /** Total matching rows when the read model exposes a count; absent (or null) when it does not. */
@@ -4316,6 +4505,8 @@ export interface OperationResponse {
4316
4505
  listWhaleTrades: {
4317
4506
  object: "list";
4318
4507
  data: OperationData["listWhaleTrades"];
4508
+ /** Writer-backed age and coverage for this page; it is part of the representation and the ETag, while transport cache facts remain in meta. */
4509
+ data_quality: DataQuality;
4319
4510
  has_more: boolean;
4320
4511
  next_cursor?: string;
4321
4512
  /** Total matching rows when the read model exposes a count; the key is absent when it does not. */