// Code generated by cargo codegen from the 0xinsider OpenAPI document. DO NOT EDIT.
//! The operation table, and one `Client` method per operation in the OpenAPI document.
#![allow(rustdoc::bare_urls, rustdoc::broken_intra_doc_links, rustdoc::invalid_html_tags)]
#![allow(clippy::doc_lazy_continuation, clippy::too_many_arguments)]
use crate::client::{Call, encode_path_segment};
use crate::models::*;
use crate::pagination::{CursorParams, ListPage};
use crate::{Client, Download, Operation, Result, RetryClass};
impl Operation {
/// `GET /api/v1`
pub const GET_API_DISCOVERY: Operation = Operation {
id: "getApiDiscovery",
method: "GET",
path: "/api/v1",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `GET /api/v1/openapi.json`
pub const REDIRECT_API_OPENAPI_SPEC: Operation = Operation {
id: "redirectApiOpenapiSpec",
method: "GET",
path: "/api/v1/openapi.json",
accept: "*/*",
retry: RetryClass::Read,
requires_credential: false,
};
/// `POST /api/v1/agents/register`
pub const REGISTER_AGENT: Operation = Operation {
id: "registerAgent",
method: "POST",
path: "/api/v1/agents/register",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: false,
};
/// `GET /api/v1/trader/{address}`
pub const GET_TRADER: Operation = Operation {
id: "getTrader",
method: "GET",
path: "/api/v1/trader/{address}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/context.md`
pub const GET_TRADER_CONTEXT_MARKDOWN: Operation = Operation {
id: "getTraderContextMarkdown",
method: "GET",
path: "/api/v1/trader/{address}/context.md",
accept: "text/markdown",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/grade-at`
pub const GET_TRADER_GRADE_AT: Operation = Operation {
id: "getTraderGradeAt",
method: "GET",
path: "/api/v1/trader/{address}/grade-at",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/context`
pub const GET_TRADER_CONTEXT: Operation = Operation {
id: "getTraderContext",
method: "GET",
path: "/api/v1/trader/{address}/context",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/traders/batch`
pub const BATCH_GET_TRADERS: Operation = Operation {
id: "batchGetTraders",
method: "POST",
path: "/api/v1/traders/batch",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/position-timeline`
pub const GET_POSITION_TIMELINE: Operation = Operation {
id: "getPositionTimeline",
method: "GET",
path: "/api/v1/trader/{address}/position-timeline",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/categories`
pub const GET_TRADER_CATEGORY_RECORDS: Operation = Operation {
id: "getTraderCategoryRecords",
method: "GET",
path: "/api/v1/trader/{address}/categories",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/pnl`
pub const GET_TRADER_PNL: Operation = Operation {
id: "getTraderPnl",
method: "GET",
path: "/api/v1/trader/{address}/pnl",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/traders/{trader}/position-timeline`
pub const GET_POSITION_TIMELINE_BY_ID: Operation = Operation {
id: "getPositionTimelineById",
method: "GET",
path: "/api/v1/traders/{trader}/position-timeline",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/positions`
pub const LIST_POSITIONS: Operation = Operation {
id: "listPositions",
method: "GET",
path: "/api/v1/positions",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-positions`
pub const LIST_LARGE_POSITIONS: Operation = Operation {
id: "listLargePositions",
method: "GET",
path: "/api/v1/large-positions",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-trades`
pub const LIST_LARGE_TRADES: Operation = Operation {
id: "listLargeTrades",
method: "GET",
path: "/api/v1/large-trades",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/whale-trades`
pub const LIST_WHALE_TRADES: Operation = Operation {
id: "listWhaleTrades",
method: "GET",
path: "/api/v1/whale-trades",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-trades/history`
pub const LIST_LARGE_TRADE_HISTORY: Operation = Operation {
id: "listLargeTradeHistory",
method: "GET",
path: "/api/v1/large-trades/history",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/whale-trades/history`
pub const LIST_WHALE_TRADE_HISTORY: Operation = Operation {
id: "listWhaleTradeHistory",
method: "GET",
path: "/api/v1/whale-trades/history",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-trades/{id}`
pub const GET_LARGE_TRADE: Operation = Operation {
id: "getLargeTrade",
method: "GET",
path: "/api/v1/large-trades/{id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/whale-trades/{id}`
pub const GET_WHALE_TRADE: Operation = Operation {
id: "getWhaleTrade",
method: "GET",
path: "/api/v1/whale-trades/{id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-trades/{id}/counterparties/executions`
pub const LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS: Operation = Operation {
id: "listLargeTradeCounterpartyExecutions",
method: "GET",
path: "/api/v1/large-trades/{id}/counterparties/executions",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/whale-trades/{id}/counterparties/executions`
pub const LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS: Operation = Operation {
id: "listWhaleTradeCounterpartyExecutions",
method: "GET",
path: "/api/v1/whale-trades/{id}/counterparties/executions",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`
pub const LIST_LARGE_TRADE_COUNTERPARTY_MAKERS: Operation = Operation {
id: "listLargeTradeCounterpartyMakers",
method: "GET",
path: "/api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`
pub const LIST_WHALE_TRADE_COUNTERPARTY_MAKERS: Operation = Operation {
id: "listWhaleTradeCounterpartyMakers",
method: "GET",
path: "/api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/leaderboard`
pub const LIST_LEADERBOARD: Operation = Operation {
id: "listLeaderboard",
method: "GET",
path: "/api/v1/leaderboard",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/pick-of-the-day`
pub const GET_PICK_OF_THE_DAY: Operation = Operation {
id: "getPickOfTheDay",
method: "GET",
path: "/api/v1/pick-of-the-day",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/pick-of-the-day/archive`
pub const GET_PICK_OF_THE_DAY_ARCHIVE: Operation = Operation {
id: "getPickOfTheDayArchive",
method: "GET",
path: "/api/v1/pick-of-the-day/archive",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/pick-of-the-day/ledger`
pub const GET_PICK_OF_THE_DAY_LEDGER: Operation = Operation {
id: "getPickOfTheDayLedger",
method: "GET",
path: "/api/v1/pick-of-the-day/ledger",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `GET /api/v1/leaderboard/trending`
pub const LIST_TRENDING_WALLETS: Operation = Operation {
id: "listTrendingWallets",
method: "GET",
path: "/api/v1/leaderboard/trending",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/markets/search`
pub const SEARCH_MARKETS: Operation = Operation {
id: "searchMarkets",
method: "GET",
path: "/api/v1/markets/search",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/content/search`
pub const SEARCH_CONTENT: Operation = Operation {
id: "searchContent",
method: "GET",
path: "/api/v1/content/search",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/markets/explore`
pub const EXPLORE_MARKETS: Operation = Operation {
id: "exploreMarkets",
method: "GET",
path: "/api/v1/markets/explore",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/markets/smart-money-flows`
pub const LIST_SMART_MONEY_FLOWS: Operation = Operation {
id: "listSmartMoneyFlows",
method: "GET",
path: "/api/v1/markets/smart-money-flows",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/markets/sharp-money-flows`
pub const LIST_SHARP_MONEY_FLOWS: Operation = Operation {
id: "listSharpMoneyFlows",
method: "GET",
path: "/api/v1/markets/sharp-money-flows",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/sports/pre-game-sides`
pub const LIST_PRE_GAME_SIDES: Operation = Operation {
id: "listPreGameSides",
method: "GET",
path: "/api/v1/sports/pre-game-sides",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/sports/pre-game-side-observations`
pub const LIST_PRE_GAME_SIDE_OBSERVATIONS: Operation = Operation {
id: "listPreGameSideObservations",
method: "GET",
path: "/api/v1/sports/pre-game-side-observations",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/sports-edge-signals`
pub const LIST_SPORTS_EDGE_SIGNALS: Operation = Operation {
id: "listSportsEdgeSignals",
method: "GET",
path: "/api/v1/sports-edge-signals",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/sports-edge-observations`
pub const LIST_SPORTS_EDGE_OBSERVATIONS: Operation = Operation {
id: "listSportsEdgeObservations",
method: "GET",
path: "/api/v1/sports-edge-observations",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/coverage`
pub const GET_COVERAGE: Operation = Operation {
id: "getCoverage",
method: "GET",
path: "/api/v1/coverage",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `GET /api/v1/platforms`
pub const GET_PLATFORMS: Operation = Operation {
id: "getPlatforms",
method: "GET",
path: "/api/v1/platforms",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `GET /api/v1/market/{condition_id}/holders`
pub const GET_MARKET_HOLDERS: Operation = Operation {
id: "getMarketHolders",
method: "GET",
path: "/api/v1/market/{condition_id}/holders",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/market/{condition_id}/flow`
pub const GET_MARKET_FLOW: Operation = Operation {
id: "getMarketFlow",
method: "GET",
path: "/api/v1/market/{condition_id}/flow",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/market/{condition_id}/intel`
pub const GET_MARKET_INTEL: Operation = Operation {
id: "getMarketIntel",
method: "GET",
path: "/api/v1/market/{condition_id}/intel",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/markets/flow/batch`
pub const BATCH_GET_MARKET_FLOW: Operation = Operation {
id: "batchGetMarketFlow",
method: "POST",
path: "/api/v1/markets/flow/batch",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `POST /api/v1/markets/intel/batch`
pub const BATCH_GET_MARKET_INTEL: Operation = Operation {
id: "batchGetMarketIntel",
method: "POST",
path: "/api/v1/markets/intel/batch",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/market/{condition_id}/snapshot`
pub const GET_MARKET_SNAPSHOT: Operation = Operation {
id: "getMarketSnapshot",
method: "GET",
path: "/api/v1/market/{condition_id}/snapshot",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/market/{condition_id}/candles`
pub const GET_MARKET_CANDLES: Operation = Operation {
id: "getMarketCandles",
method: "GET",
path: "/api/v1/market/{condition_id}/candles",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/suspicious-trades`
pub const LIST_SUSPICIOUS_TRADES: Operation = Operation {
id: "listSuspiciousTrades",
method: "GET",
path: "/api/v1/suspicious-trades",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/suspicious-trades/{id}`
pub const GET_SUSPICIOUS_TRADE: Operation = Operation {
id: "getSuspiciousTrade",
method: "GET",
path: "/api/v1/suspicious-trades/{id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/games`
pub const LIST_GAMES: Operation = Operation {
id: "listGames",
method: "GET",
path: "/api/v1/games",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/games/{event_slug}`
pub const GET_GAME: Operation = Operation {
id: "getGame",
method: "GET",
path: "/api/v1/games/{event_slug}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/insider-radar`
pub const LIST_INSIDER_RADAR: Operation = Operation {
id: "listInsiderRadar",
method: "GET",
path: "/api/v1/insider-radar",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/insider-radar/{id}`
pub const GET_INSIDER_RADAR_FLAG: Operation = Operation {
id: "getInsiderRadarFlag",
method: "GET",
path: "/api/v1/insider-radar/{id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/stream`
pub const GET_STREAM: Operation = Operation {
id: "getStream",
method: "GET",
path: "/api/v1/stream",
accept: "text/event-stream",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/events/feed/since`
pub const GET_EVENT_REPLAY_SINCE: Operation = Operation {
id: "getEventReplaySince",
method: "GET",
path: "/api/v1/events/feed/since",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/webhooks`
pub const LIST_WEBHOOKS: Operation = Operation {
id: "listWebhooks",
method: "GET",
path: "/api/v1/webhooks",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/webhooks`
pub const CREATE_WEBHOOK: Operation = Operation {
id: "createWebhook",
method: "POST",
path: "/api/v1/webhooks",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `GET /api/v1/webhooks/events`
pub const LIST_WEBHOOK_EVENTS: Operation = Operation {
id: "listWebhookEvents",
method: "GET",
path: "/api/v1/webhooks/events",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/webhooks/{id}/deliveries`
pub const LIST_WEBHOOK_DELIVERIES: Operation = Operation {
id: "listWebhookDeliveries",
method: "GET",
path: "/api/v1/webhooks/{id}/deliveries",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`
pub const REDELIVER_WEBHOOK_DELIVERY: Operation = Operation {
id: "redeliverWebhookDelivery",
method: "POST",
path: "/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `GET /api/v1/webhooks/{id}`
pub const GET_WEBHOOK: Operation = Operation {
id: "getWebhook",
method: "GET",
path: "/api/v1/webhooks/{id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `PATCH /api/v1/webhooks/{id}`
pub const UPDATE_WEBHOOK: Operation = Operation {
id: "updateWebhook",
method: "PATCH",
path: "/api/v1/webhooks/{id}",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `DELETE /api/v1/webhooks/{id}`
pub const DELETE_WEBHOOK: Operation = Operation {
id: "deleteWebhook",
method: "DELETE",
path: "/api/v1/webhooks/{id}",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/verify`
pub const VERIFY_WEBHOOK: Operation = Operation {
id: "verifyWebhook",
method: "POST",
path: "/api/v1/webhooks/{id}/verify",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/rotate-secret/prepare`
pub const PREPARE_WEBHOOK_SECRET: Operation = Operation {
id: "prepareWebhookSecret",
method: "POST",
path: "/api/v1/webhooks/{id}/rotate-secret/prepare",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/rotate-secret/activate`
pub const ACTIVATE_WEBHOOK_SECRET: Operation = Operation {
id: "activateWebhookSecret",
method: "POST",
path: "/api/v1/webhooks/{id}/rotate-secret/activate",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/rotate-secret/retire`
pub const RETIRE_WEBHOOK_SECRET: Operation = Operation {
id: "retireWebhookSecret",
method: "POST",
path: "/api/v1/webhooks/{id}/rotate-secret/retire",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `POST /api/v1/webhooks/{id}/rotate-secret`
pub const ROTATE_WEBHOOK_SECRET: Operation = Operation {
id: "rotateWebhookSecret",
method: "POST",
path: "/api/v1/webhooks/{id}/rotate-secret",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `GET /api/v1/health`
pub const GET_HEALTH: Operation = Operation {
id: "getHealth",
method: "GET",
path: "/api/v1/health",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `GET /api/v1/mcp`
pub const OPEN_MCP_EVENT_STREAM: Operation = Operation {
id: "openMcpEventStream",
method: "GET",
path: "/api/v1/mcp",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/mcp`
pub const CREATE_MCP_JSON_RPC_RESPONSE: Operation = Operation {
id: "createMcpJsonRpcResponse",
method: "POST",
path: "/api/v1/mcp",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `GET /api/v1/reports`
pub const GET_REPORTS: Operation = Operation {
id: "getReports",
method: "GET",
path: "/api/v1/reports",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/reports/daily`
pub const GET_DAILY_REPORT_SNAPSHOT: Operation = Operation {
id: "getDailyReportSnapshot",
method: "GET",
path: "/api/v1/reports/daily",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/reports/weekly`
pub const GET_WEEKLY_REPORT_SNAPSHOT: Operation = Operation {
id: "getWeeklyReportSnapshot",
method: "GET",
path: "/api/v1/reports/weekly",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/reports/monthly`
pub const GET_MONTHLY_REPORT_SNAPSHOT: Operation = Operation {
id: "getMonthlyReportSnapshot",
method: "GET",
path: "/api/v1/reports/monthly",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/export`
pub const GET_TRADER_EXPORT_SNAPSHOT: Operation = Operation {
id: "getTraderExportSnapshot",
method: "GET",
path: "/api/v1/trader/{address}/export",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/trader/{address}/export`
pub const SUBMIT_TRADER_EXPORT: Operation = Operation {
id: "submitTraderExport",
method: "POST",
path: "/api/v1/trader/{address}/export",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/export/status`
pub const GET_TRADER_EXPORT_STATUS: Operation = Operation {
id: "getTraderExportStatus",
method: "GET",
path: "/api/v1/trader/{address}/export/status",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/trader/{address}/export/cancel`
pub const CANCEL_TRADER_EXPORT: Operation = Operation {
id: "cancelTraderExport",
method: "POST",
path: "/api/v1/trader/{address}/export/cancel",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `GET /api/v1/trader/{address}/export/download`
pub const DOWNLOAD_TRADER_EXPORT: Operation = Operation {
id: "downloadTraderExport",
method: "GET",
path: "/api/v1/trader/{address}/export/download",
accept: "*/*",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/usage`
pub const GET_USAGE: Operation = Operation {
id: "getUsage",
method: "GET",
path: "/api/v1/usage",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/market/{condition_id}/context.md`
pub const GET_MARKET_CONTEXT_MARKDOWN: Operation = Operation {
id: "getMarketContextMarkdown",
method: "GET",
path: "/api/v1/market/{condition_id}/context.md",
accept: "text/markdown",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/me`
pub const GET_ACCOUNT_IDENTITY: Operation = Operation {
id: "getAccountIdentity",
method: "GET",
path: "/api/v1/me",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/datasets/whale-trades`
pub const SUBMIT_WHALE_DATASET: Operation = Operation {
id: "submitWhaleDataset",
method: "POST",
path: "/api/v1/datasets/whale-trades",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `GET /api/v1/datasets/whale-trades/{job_id}`
pub const GET_WHALE_DATASET_STATUS: Operation = Operation {
id: "getWhaleDatasetStatus",
method: "GET",
path: "/api/v1/datasets/whale-trades/{job_id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/datasets/whale-trades/{job_id}/download`
pub const DOWNLOAD_WHALE_DATASET: Operation = Operation {
id: "downloadWhaleDataset",
method: "GET",
path: "/api/v1/datasets/whale-trades/{job_id}/download",
accept: "*/*",
retry: RetryClass::Read,
requires_credential: true,
};
/// `POST /api/v1/datasets/whale-trades/{job_id}/cancel`
pub const CANCEL_WHALE_DATASET: Operation = Operation {
id: "cancelWhaleDataset",
method: "POST",
path: "/api/v1/datasets/whale-trades/{job_id}/cancel",
accept: "application/json",
retry: RetryClass::Never,
requires_credential: true,
};
/// `GET /api/v1/pick-of-the-day/ledger/{pick_id}`
pub const GET_PICK_OF_THE_DAY_LEDGER_ENTRY: Operation = Operation {
id: "getPickOfTheDayLedgerEntry",
method: "GET",
path: "/api/v1/pick-of-the-day/ledger/{pick_id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: false,
};
/// `POST /api/v1/webhooks/{id}/verification-attempts`
pub const CREATE_WEBHOOK_VERIFICATION_ATTEMPT: Operation = Operation {
id: "createWebhookVerificationAttempt",
method: "POST",
path: "/api/v1/webhooks/{id}/verification-attempts",
accept: "application/json",
retry: RetryClass::Keyed,
requires_credential: true,
};
/// `GET /api/v1/webhooks/{id}/verification-attempts/{attempt_id}`
pub const GET_WEBHOOK_VERIFICATION_ATTEMPT: Operation = Operation {
id: "getWebhookVerificationAttempt",
method: "GET",
path: "/api/v1/webhooks/{id}/verification-attempts/{attempt_id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/combos/fills`
pub const LIST_COMBO_FILLS: Operation = Operation {
id: "listComboFills",
method: "GET",
path: "/api/v1/combos/fills",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/combos/summary`
pub const GET_COMBOS_SUMMARY: Operation = Operation {
id: "getCombosSummary",
method: "GET",
path: "/api/v1/combos/summary",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/combos/{condition_id}`
pub const GET_COMBO: Operation = Operation {
id: "getCombo",
method: "GET",
path: "/api/v1/combos/{condition_id}",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
/// `GET /api/v1/edge-hunter`
pub const GET_EDGE_HUNTER: Operation = Operation {
id: "getEdgeHunter",
method: "GET",
path: "/api/v1/edge-hunter",
accept: "application/json",
retry: RetryClass::Read,
requires_credential: true,
};
}
/// Every operation in the OpenAPI document, in document order.
pub const OPERATIONS: &[Operation] = &[
Operation::GET_API_DISCOVERY,
Operation::REDIRECT_API_OPENAPI_SPEC,
Operation::REGISTER_AGENT,
Operation::GET_TRADER,
Operation::GET_TRADER_CONTEXT_MARKDOWN,
Operation::GET_TRADER_GRADE_AT,
Operation::GET_TRADER_CONTEXT,
Operation::BATCH_GET_TRADERS,
Operation::GET_POSITION_TIMELINE,
Operation::GET_TRADER_CATEGORY_RECORDS,
Operation::GET_TRADER_PNL,
Operation::GET_POSITION_TIMELINE_BY_ID,
Operation::LIST_POSITIONS,
Operation::LIST_LARGE_POSITIONS,
Operation::LIST_LARGE_TRADES,
Operation::LIST_WHALE_TRADES,
Operation::LIST_LARGE_TRADE_HISTORY,
Operation::LIST_WHALE_TRADE_HISTORY,
Operation::GET_LARGE_TRADE,
Operation::GET_WHALE_TRADE,
Operation::LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS,
Operation::LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS,
Operation::LIST_LARGE_TRADE_COUNTERPARTY_MAKERS,
Operation::LIST_WHALE_TRADE_COUNTERPARTY_MAKERS,
Operation::LIST_LEADERBOARD,
Operation::GET_PICK_OF_THE_DAY,
Operation::GET_PICK_OF_THE_DAY_ARCHIVE,
Operation::GET_PICK_OF_THE_DAY_LEDGER,
Operation::LIST_TRENDING_WALLETS,
Operation::SEARCH_MARKETS,
Operation::SEARCH_CONTENT,
Operation::EXPLORE_MARKETS,
Operation::LIST_SMART_MONEY_FLOWS,
Operation::LIST_SHARP_MONEY_FLOWS,
Operation::LIST_PRE_GAME_SIDES,
Operation::LIST_PRE_GAME_SIDE_OBSERVATIONS,
Operation::LIST_SPORTS_EDGE_SIGNALS,
Operation::LIST_SPORTS_EDGE_OBSERVATIONS,
Operation::GET_COVERAGE,
Operation::GET_PLATFORMS,
Operation::GET_MARKET_HOLDERS,
Operation::GET_MARKET_FLOW,
Operation::GET_MARKET_INTEL,
Operation::BATCH_GET_MARKET_FLOW,
Operation::BATCH_GET_MARKET_INTEL,
Operation::GET_MARKET_SNAPSHOT,
Operation::GET_MARKET_CANDLES,
Operation::LIST_SUSPICIOUS_TRADES,
Operation::GET_SUSPICIOUS_TRADE,
Operation::LIST_GAMES,
Operation::GET_GAME,
Operation::LIST_INSIDER_RADAR,
Operation::GET_INSIDER_RADAR_FLAG,
Operation::GET_STREAM,
Operation::GET_EVENT_REPLAY_SINCE,
Operation::LIST_WEBHOOKS,
Operation::CREATE_WEBHOOK,
Operation::LIST_WEBHOOK_EVENTS,
Operation::LIST_WEBHOOK_DELIVERIES,
Operation::REDELIVER_WEBHOOK_DELIVERY,
Operation::GET_WEBHOOK,
Operation::UPDATE_WEBHOOK,
Operation::DELETE_WEBHOOK,
Operation::VERIFY_WEBHOOK,
Operation::PREPARE_WEBHOOK_SECRET,
Operation::ACTIVATE_WEBHOOK_SECRET,
Operation::RETIRE_WEBHOOK_SECRET,
Operation::ROTATE_WEBHOOK_SECRET,
Operation::GET_HEALTH,
Operation::OPEN_MCP_EVENT_STREAM,
Operation::CREATE_MCP_JSON_RPC_RESPONSE,
Operation::GET_REPORTS,
Operation::GET_DAILY_REPORT_SNAPSHOT,
Operation::GET_WEEKLY_REPORT_SNAPSHOT,
Operation::GET_MONTHLY_REPORT_SNAPSHOT,
Operation::GET_TRADER_EXPORT_SNAPSHOT,
Operation::SUBMIT_TRADER_EXPORT,
Operation::GET_TRADER_EXPORT_STATUS,
Operation::CANCEL_TRADER_EXPORT,
Operation::DOWNLOAD_TRADER_EXPORT,
Operation::GET_USAGE,
Operation::GET_MARKET_CONTEXT_MARKDOWN,
Operation::GET_ACCOUNT_IDENTITY,
Operation::SUBMIT_WHALE_DATASET,
Operation::GET_WHALE_DATASET_STATUS,
Operation::DOWNLOAD_WHALE_DATASET,
Operation::CANCEL_WHALE_DATASET,
Operation::GET_PICK_OF_THE_DAY_LEDGER_ENTRY,
Operation::CREATE_WEBHOOK_VERIFICATION_ATTEMPT,
Operation::GET_WEBHOOK_VERIFICATION_ATTEMPT,
Operation::LIST_COMBO_FILLS,
Operation::GET_COMBOS_SUMMARY,
Operation::GET_COMBO,
Operation::GET_EDGE_HUNTER,
];
/// Optional parameters for [`Client::get_trader`] (`GET /api/v1/trader/{address}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderParams {
/// Include heavy fields and trust metadata. Repeatable: strategy, categories, quant_metrics, trust.
pub expand: Vec<Expand>,
/// 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.
pub max_age_s: Option<i64>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetTraderParams {
/// Sets `expand`.
#[must_use]
pub fn expand<I: IntoIterator<Item = Expand>>(mut self, values: I) -> Self {
self.expand = values.into_iter().collect();
self
}
/// Sets `max_age_s`.
#[must_use]
pub fn max_age_s(mut self, value: i64) -> Self {
self.max_age_s = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_trader_grade_at`] (`GET /api/v1/trader/{address}/grade-at`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderGradeAtParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetTraderGradeAtParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_trader_context`] (`GET /api/v1/trader/{address}/context`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderContextParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetTraderContextParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_position_timeline`] (`GET /api/v1/trader/{address}/position-timeline`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPositionTimelineParams {
/// Maximum number of timeline events to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPositionTimelineParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_trader_category_records`] (`GET /api/v1/trader/{address}/categories`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderCategoryRecordsParams {
/// Filter to one canonical category, matched through the same rollup every other category surface uses: soccer, EPL and champions league all reach Soccer, every esports label folds into Esports, and football is AMERICAN football and reaches Football. A filter that reaches Esports returns the Esports record with all of its games; a game is not a filter of its own, so ask for esports and read games. A sports or esports category the wallet has no record in answers 200 with an empty records array, never 404. Sports and esports only (#27311): a category outside them, or a value that reaches no category, returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetTraderCategoryRecordsParams {
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_trader_pnl`] (`GET /api/v1/trader/{address}/pnl`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderPnlParams {
/// 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.
pub from: Option<String>,
/// Inclusive UTC calendar-date upper 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 returns 400 bad_request with error.param to. Does not change stats, monthly or year_totals.
pub to: Option<String>,
/// Which sections of the object to return. Repeatable and comma-separated: entries, stats, monthly, year_totals, drawdown. Omit it, or send it empty, for all five. A section left out is absent from data. An unrecognized name returns 400 bad_request with error.param sections rather than being ignored, so a typo cannot look like a successful request that silently dropped the section you came for.
pub sections: Vec<Sections>,
}
impl GetTraderPnlParams {
/// Sets `from`.
#[must_use]
pub fn from(mut self, value: impl Into<String>) -> Self {
self.from = Some(value.into());
self
}
/// Sets `to`.
#[must_use]
pub fn to(mut self, value: impl Into<String>) -> Self {
self.to = Some(value.into());
self
}
/// Sets `sections`.
#[must_use]
pub fn sections<I: IntoIterator<Item = Sections>>(mut self, values: I) -> Self {
self.sections = values.into_iter().collect();
self
}
}
/// Optional parameters for [`Client::get_position_timeline_by_id`] (`GET /api/v1/traders/{trader}/position-timeline`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPositionTimelineByIdParams {
/// Maximum number of timeline events to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPositionTimelineByIdParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_positions`] (`GET /api/v1/positions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPositionsParams {
/// Maximum number of current positions to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// 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.
pub consistency: Option<Consistency>,
/// 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.
pub min_size: Option<f64>,
/// Exact match against provider-backed market_canonical.category. Sports and esports only (#27311): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id emitted by V1 responses. Combine with min_size=0 for every reconciled position in that market; an unknown id or a resolved market returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27311). Without condition_id the board and wallet reads list sports and esports markets only.
pub condition_id: Option<String>,
/// Scope to one wallet or a book of wallets (repeatable, up to 25 per request; comma-separated values inside one occurrence also work). Each value is a wallet address, a known username, or a trd_-prefixed trader id, resolved like /api/v1/trader/{address}. The response keeps the board's order and cursor, so pages of a book interleave wallets by current_value_usd. An address this API has never tracked returns its mirror rows or an empty list; a username or trader id that resolves to nothing is a 404 naming wallet; more than 25 values is a 400. min_size defaults to 0 when wallet is present.
pub wallet: Vec<String>,
/// Minimum trader grade allowlist. `A` matches S and A; `B` matches S, A, B; etc.
pub min_grade: Option<Grade>,
/// Filter by the binary outcome side. `yes` maps to outcome_index=0, `no` to outcome_index=1.
pub side: Option<Side>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListPositionsParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `consistency`.
#[must_use]
pub fn consistency(mut self, value: Consistency) -> Self {
self.consistency = Some(value);
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `condition_id`.
#[must_use]
pub fn condition_id(mut self, value: impl Into<String>) -> Self {
self.condition_id = Some(value.into());
self
}
/// Sets `wallet`.
#[must_use]
pub fn wallet<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.wallet = values.into_iter().map(Into::into).collect();
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `side`.
#[must_use]
pub fn side(mut self, value: Side) -> Self {
self.side = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_large_positions`] (`GET /api/v1/large-positions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargePositionsParams {
/// Maximum number of large positions to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque pagination cursor from a previous response.
pub cursor: Option<String>,
/// Minimum position value in USD. Raises the feed's own floor of 50,000 USD; a smaller value does not lower it.
pub min_size: Option<f64>,
/// One RFC 4180 CSV record of exact current provider-backed market_canonical.category values. Legacy unquoted lists such as NBA,WNBA remain valid; values containing commas, quotes, or newlines are CSV-quoted. Matching is case-insensitive. Malformed quoted input fails closed as one unknown exact category. A value outside sports and esports returns 400 bad_request with param=category (#27305), as on GET /api/v1/markets/explore.
pub category: Option<String>,
/// Minimum trader grade.
pub min_grade: Option<Grade>,
/// Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id (round-trips a value from a list response). Must be 0x followed by 64 hexadecimal characters after any mkt_ prefix is stripped; any other value returns 400. Polymarket-only; an unknown but well-formed id returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305).
pub condition_id: Option<String>,
}
impl ListLargePositionsParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `condition_id`.
#[must_use]
pub fn condition_id(mut self, value: impl Into<String>) -> Self {
self.condition_id = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_large_trades`] (`GET /api/v1/large-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradesParams {
/// Maximum number of recent large trades to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// Minimum trade size in USD.
pub min_size: Option<f64>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Minimum trader grade.
pub min_grade: Option<Grade>,
/// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
pub suspicious_only: Option<bool>,
/// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
pub min_market_volume_share: Option<f64>,
/// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads the last 30 days, because the share is computed for each request and an unbounded ranking cannot be served inside the documented latency budget. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
pub sort: Option<Sort>,
/// Return only the trades recorded after this one. Pass the id of a large trade this API returned (wt_<n>, or the bare integer). The answer keeps the list shape and newest-first order, and next_cursor pages within it. After means commit order: a trade recorded late with an earlier traded_at is still returned, and a trade whose write has not committed yet is returned on a later poll, never skipped. To poll, send the id of the first trade on the first page of your last answer that had trades, with If-None-Match set to the ETag you last received; when nothing new was recorded the answer is 304 with an empty body. A late trade can come back once, so deduplicate on id. Only with sort=recent. An id that names no trade, or one more than 10000 trades behind the newest, answers 400 with error.param since; request the list without since and continue from its first trade.
pub since: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListLargeTradesParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `suspicious_only`.
#[must_use]
pub fn suspicious_only(mut self, value: bool) -> Self {
self.suspicious_only = Some(value);
self
}
/// Sets `min_market_volume_share`.
#[must_use]
pub fn min_market_volume_share(mut self, value: f64) -> Self {
self.min_market_volume_share = Some(value);
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: Sort) -> Self {
self.sort = Some(value);
self
}
/// Sets `since`.
#[must_use]
pub fn since(mut self, value: impl Into<String>) -> Self {
self.since = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_whale_trades`] (`GET /api/v1/whale-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradesParams {
/// Maximum number of recent large trades to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// Minimum trade size in USD.
pub min_size: Option<f64>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Minimum trader grade as of today (trader.grade). A means S or A, B means S, A or B.
pub min_grade: Option<Grade>,
/// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
pub suspicious_only: Option<bool>,
/// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
pub min_market_volume_share: Option<f64>,
/// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads the last 30 days, because the share is computed for each request and an unbounded ranking cannot be served inside the documented latency budget. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
pub sort: Option<Sort>,
/// Return only the trades recorded after this one. Pass the id of a large trade this API returned (wt_<n>, or the bare integer). The answer keeps the list shape and newest-first order, and next_cursor pages within it. After means commit order: a trade recorded late with an earlier traded_at is still returned, and a trade whose write has not committed yet is returned on a later poll, never skipped. To poll, send the id of the first trade on the first page of your last answer that had trades, with If-None-Match set to the ETag you last received; when nothing new was recorded the answer is 304 with an empty body. A late trade can come back once, so deduplicate on id. Only with sort=recent. An id that names no trade, or one more than 10000 trades behind the newest, answers 400 with error.param since; request the list without since and continue from its first trade.
pub since: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListWhaleTradesParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `suspicious_only`.
#[must_use]
pub fn suspicious_only(mut self, value: bool) -> Self {
self.suspicious_only = Some(value);
self
}
/// Sets `min_market_volume_share`.
#[must_use]
pub fn min_market_volume_share(mut self, value: f64) -> Self {
self.min_market_volume_share = Some(value);
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: Sort) -> Self {
self.sort = Some(value);
self
}
/// Sets `since`.
#[must_use]
pub fn since(mut self, value: impl Into<String>) -> Self {
self.since = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_large_trade_history`] (`GET /api/v1/large-trades/history`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeHistoryParams {
/// Maximum number of historical large trades to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor. Prefix: wth_. URL-encode when replaying as a query parameter.
pub cursor: Option<String>,
/// Minimum trade size in USD. The capture floor was 3,000 USD before 2026-07-06 and 10,000 USD from then (1,000 USD in earnings markets), so 10000 gives one size rule across the whole archive. From 2026-09-23 a fill must also be at least 0.1% of its market's recorded traded volume (Polymarket's own share count); rows written before that date were not re-filtered.
pub min_size: Option<f64>,
/// Exact raw provider condition_id. Unknown markets return an empty list.
pub condition_id: Option<String>,
/// Trader wallet address, timestamp-suffixed wallet alias, username, or trd_-prefixed trader ID, resolved against the traders table. Unknown traders return an empty list.
pub trader: Option<String>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Minimum trader grade as of today (trader.grade), not at trade time. On a historical window it selects wallets by a grade they may have earned after the trade; for a point-in-time rule filter on trader.grade_at_trade instead. A means S or A, B means S, A or B.
pub min_grade: Option<Grade>,
/// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
pub suspicious_only: Option<bool>,
/// Filter by whale_alerts.platform. all is equivalent to omitted.
pub platform: Option<Platform>,
/// Inclusive RFC3339 lower bound on whale_alerts.traded_at.
pub from: Option<String>,
/// Exclusive RFC3339 upper bound on whale_alerts.traded_at. Must be after from when both are present.
pub to: Option<String>,
/// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
pub min_market_volume_share: Option<f64>,
/// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads from, or the last 30 days when from is omitted, for the same reason. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
pub sort: Option<Sort>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListLargeTradeHistoryParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `condition_id`.
#[must_use]
pub fn condition_id(mut self, value: impl Into<String>) -> Self {
self.condition_id = Some(value.into());
self
}
/// Sets `trader`.
#[must_use]
pub fn trader(mut self, value: impl Into<String>) -> Self {
self.trader = Some(value.into());
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `suspicious_only`.
#[must_use]
pub fn suspicious_only(mut self, value: bool) -> Self {
self.suspicious_only = Some(value);
self
}
/// Sets `platform`.
#[must_use]
pub fn platform(mut self, value: Platform) -> Self {
self.platform = Some(value);
self
}
/// Sets `from`.
#[must_use]
pub fn from(mut self, value: impl Into<String>) -> Self {
self.from = Some(value.into());
self
}
/// Sets `to`.
#[must_use]
pub fn to(mut self, value: impl Into<String>) -> Self {
self.to = Some(value.into());
self
}
/// Sets `min_market_volume_share`.
#[must_use]
pub fn min_market_volume_share(mut self, value: f64) -> Self {
self.min_market_volume_share = Some(value);
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: Sort) -> Self {
self.sort = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_whale_trade_history`] (`GET /api/v1/whale-trades/history`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeHistoryParams {
/// Maximum number of historical large trades to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor. Prefix: wth_. URL-encode when replaying as a query parameter.
pub cursor: Option<String>,
/// Minimum trade size in USD.
pub min_size: Option<f64>,
/// Exact raw provider condition_id. Unknown markets return an empty list.
pub condition_id: Option<String>,
/// Trader wallet address, timestamp-suffixed wallet alias, or username resolved against the traders table. Unknown traders return an empty list.
pub trader: Option<String>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Minimum trader grade.
pub min_grade: Option<Grade>,
/// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
pub suspicious_only: Option<bool>,
/// Filter by whale_alerts.platform. all is equivalent to omitted.
pub platform: Option<Platform>,
/// Inclusive RFC3339 lower bound on whale_alerts.traded_at.
pub from: Option<String>,
/// Exclusive RFC3339 upper bound on whale_alerts.traded_at. Must be after from when both are present.
pub to: Option<String>,
/// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
pub min_market_volume_share: Option<f64>,
/// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads from, or the last 30 days when from is omitted, for the same reason. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
pub sort: Option<Sort>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListWhaleTradeHistoryParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: f64) -> Self {
self.min_size = Some(value);
self
}
/// Sets `condition_id`.
#[must_use]
pub fn condition_id(mut self, value: impl Into<String>) -> Self {
self.condition_id = Some(value.into());
self
}
/// Sets `trader`.
#[must_use]
pub fn trader(mut self, value: impl Into<String>) -> Self {
self.trader = Some(value.into());
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `suspicious_only`.
#[must_use]
pub fn suspicious_only(mut self, value: bool) -> Self {
self.suspicious_only = Some(value);
self
}
/// Sets `platform`.
#[must_use]
pub fn platform(mut self, value: Platform) -> Self {
self.platform = Some(value);
self
}
/// Sets `from`.
#[must_use]
pub fn from(mut self, value: impl Into<String>) -> Self {
self.from = Some(value.into());
self
}
/// Sets `to`.
#[must_use]
pub fn to(mut self, value: impl Into<String>) -> Self {
self.to = Some(value.into());
self
}
/// Sets `min_market_volume_share`.
#[must_use]
pub fn min_market_volume_share(mut self, value: f64) -> Self {
self.min_market_volume_share = Some(value);
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: Sort) -> Self {
self.sort = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_large_trade`] (`GET /api/v1/large-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetLargeTradeParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetLargeTradeParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_whale_trade`] (`GET /api/v1/whale-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetWhaleTradeParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetWhaleTradeParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_large_trade_counterparty_executions`] (`GET /api/v1/large-trades/{id}/counterparties/executions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeCounterpartyExecutionsParams {
/// Opaque cursor from the previous response's next_cursor.
pub cursor: Option<String>,
/// Maximum number of counterparty execution rows to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
}
impl ListLargeTradeCounterpartyExecutionsParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::list_whale_trade_counterparty_executions`] (`GET /api/v1/whale-trades/{id}/counterparties/executions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeCounterpartyExecutionsParams {
/// Opaque cursor from the previous response's next_cursor.
pub cursor: Option<String>,
/// Maximum number of counterparty execution rows to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
}
impl ListWhaleTradeCounterpartyExecutionsParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::list_large_trade_counterparty_makers`] (`GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeCounterpartyMakersParams {
/// Opaque cursor from the previous response's next_cursor.
pub cursor: Option<String>,
/// Maximum number of maker rows to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
}
impl ListLargeTradeCounterpartyMakersParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::list_whale_trade_counterparty_makers`] (`GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeCounterpartyMakersParams {
/// Opaque cursor from the previous response's next_cursor.
pub cursor: Option<String>,
/// Maximum number of maker rows to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
}
impl ListWhaleTradeCounterpartyMakersParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::list_leaderboard`] (`GET /api/v1/leaderboard`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLeaderboardParams {
/// Maximum number of ranked traders to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque lbv1_ pagination cursor from a prior response. It binds the finite score/address boundary to the committed leaderboard generation and the effective category/strategy filters; legacy, malformed, non-finite, and unsupported-version cursors are rejected.
pub cursor: Option<String>,
/// Filter by category: a sport or esports bucket. Values are matched to canonical category buckets: league values fold into their sport (NBA and NCAAB into Basketball, NFL into Football). Mapped buckets are case-insensitive; passthrough buckets (Cricket, Sports) match case-sensitively against the provider-native bucket key, so use exact casing. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Filter by observed trading style. Current styles: two_sided, category_focused, high_activity, diversified, mixed, unclassified. Current styles count the wallet's sports and esports markets only. The original ten archetype identifiers remain accepted for historical rows until normal reclassification. Style describes recorded behavior; grade measures performance.
pub strategy: Option<Strategy>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListLeaderboardParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `strategy`.
#[must_use]
pub fn strategy(mut self, value: Strategy) -> Self {
self.strategy = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_pick_of_the_day`] (`GET /api/v1/pick-of-the-day`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPickOfTheDayParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_pick_of_the_day_archive`] (`GET /api/v1/pick-of-the-day/archive`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayArchiveParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPickOfTheDayArchiveParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_pick_of_the_day_ledger`] (`GET /api/v1/pick-of-the-day/ledger`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayLedgerParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPickOfTheDayLedgerParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_trending_wallets`] (`GET /api/v1/leaderboard/trending`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListTrendingWalletsParams {
/// Polymarket's weekly leaderboard caps the ranked set at 50 wallets; requests above 50 still return at most 50. Out-of-range values are clamped to 1..50.
pub limit: Option<i64>,
/// Opaque pagination cursor from a previous response, bound to its effective limit, window and ranked-board generation. A changed board or request scope returns error.reason=cursor_expired; legacy page-only cursors must restart from page one.
pub cursor: Option<String>,
/// Trailing window.
pub window: Option<ListTrendingWalletsWindow>,
}
impl ListTrendingWalletsParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `window`.
#[must_use]
pub fn window(mut self, value: ListTrendingWalletsWindow) -> Self {
self.window = Some(value);
self
}
}
/// Optional parameters for [`Client::search_markets`] (`GET /api/v1/markets/search`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SearchMarketsParams {
/// Maximum number of matching markets to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response's next_cursor.
pub cursor: Option<String>,
/// Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both.
pub status: Option<SearchMarketsStatus>,
/// Filter by category. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
}
impl SearchMarketsParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `status`.
#[must_use]
pub fn status(mut self, value: SearchMarketsStatus) -> Self {
self.status = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
}
/// Optional parameters for [`Client::search_content`] (`GET /api/v1/content/search`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SearchContentParams {
/// Maximum content items to return. Out-of-range values are clamped to 1..50.
pub limit: Option<i64>,
}
impl SearchContentParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::explore_markets`] (`GET /api/v1/markets/explore`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExploreMarketsParams {
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Facet values are returned as the canonical bucket. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both.
pub status: Option<SearchMarketsStatus>,
/// Filter by source platform. Explore is Polymarket-only; polymarket is the only supported value and the parameter is accepted for backward-compatibility but does not change the result set.
pub platform: Option<String>,
/// Sort order for the discovery feed. `large_trades` ranks by large-trade activity; `whales` is its deprecated spelling and selects the same order.
pub sort: Option<ExploreMarketsSort>,
/// Opaque pagination cursor from the previous response.
pub cursor: Option<String>,
/// Page size. Out-of-range values are clamped to 1..48.
pub limit: Option<i64>,
/// Keyword search against market titles. At most 64 characters before whitespace trimming.
pub q: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ExploreMarketsParams {
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `status`.
#[must_use]
pub fn status(mut self, value: SearchMarketsStatus) -> Self {
self.status = Some(value);
self
}
/// Sets `platform`.
#[must_use]
pub fn platform(mut self, value: impl Into<String>) -> Self {
self.platform = Some(value.into());
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: ExploreMarketsSort) -> Self {
self.sort = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `q`.
#[must_use]
pub fn q(mut self, value: impl Into<String>) -> Self {
self.q = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_smart_money_flows`] (`GET /api/v1/markets/smart-money-flows`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSmartMoneyFlowsParams {
/// Lookback window for grade-filtered whale flow aggregation.
pub timeframe: Option<Timeframe>,
/// Page size. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again.
pub cursor: Option<String>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Filter by source platform. all is a request-side no-op.
pub platform: Option<Platform>,
/// Minimum latest trader grade included in the flow. Default B means S/A/B only; unranked traders are excluded.
pub min_grade: Option<Grade>,
/// Optional post-aggregate flow direction filter.
pub direction: Option<Direction>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListSmartMoneyFlowsParams {
/// Sets `timeframe`.
#[must_use]
pub fn timeframe(mut self, value: Timeframe) -> Self {
self.timeframe = Some(value);
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `platform`.
#[must_use]
pub fn platform(mut self, value: Platform) -> Self {
self.platform = Some(value);
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `direction`.
#[must_use]
pub fn direction(mut self, value: Direction) -> Self {
self.direction = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_sharp_money_flows`] (`GET /api/v1/markets/sharp-money-flows`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSharpMoneyFlowsParams {
/// Lookback window for grade-filtered whale flow aggregation.
pub timeframe: Option<Timeframe>,
/// Page size. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again.
pub cursor: Option<String>,
/// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
pub category: Option<String>,
/// Filter by source platform. all is a request-side no-op.
pub platform: Option<Platform>,
/// Minimum latest trader grade included in the flow. Default B means S/A/B only; unranked traders are excluded.
pub min_grade: Option<Grade>,
/// Optional post-aggregate flow direction filter.
pub direction: Option<Direction>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListSharpMoneyFlowsParams {
/// Sets `timeframe`.
#[must_use]
pub fn timeframe(mut self, value: Timeframe) -> Self {
self.timeframe = Some(value);
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `platform`.
#[must_use]
pub fn platform(mut self, value: Platform) -> Self {
self.platform = Some(value);
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `direction`.
#[must_use]
pub fn direction(mut self, value: Direction) -> Self {
self.direction = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_market_holders`] (`GET /api/v1/market/{condition_id}/holders`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketHoldersParams {
/// Keep holders netting one side. `all` (default) lists both.
pub outcome: Option<GetMarketHoldersOutcome>,
/// Narrow within the graded cohort: `S` keeps S, `A` keeps S and A, `B` (default) keeps S, A and B. `C`, `D` and `F` are rejected with 400: the route lists the S/A/B cohort only. The cohort is the wallet's current grade (`traders.latest_grade`), so no value here reaches a C, D, F or ungraded holder; those are counted only in `scan.wallet_count`. `min_grade=D` on GET /api/v1/positions does return C and D, which is one of the three reasons the two routes' counts differ for the same market.
pub min_grade: Option<MarketHolderGrade>,
/// Maximum holders per page. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque pagination cursor from the previous response's next_cursor. New cursors carry an absolute next offset bound to normalized condition_id, outcome and effective min_grade, so limit can change without skipping or repeating rows on the same roster. Different market/filter bindings return 400 bad_request with param=cursor; omitted filters match all/B and mkt_-prefixed IDs match their raw condition_id. Legacy page-only cursors remain accepted without scheduled retirement and require their original limit; their next response emits the new format. A cursor remains valid across roster refreshes, which can still repeat or skip holders as the live roster changes.
pub cursor: Option<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetMarketHoldersParams {
/// Sets `outcome`.
#[must_use]
pub fn outcome(mut self, value: GetMarketHoldersOutcome) -> Self {
self.outcome = Some(value);
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: MarketHolderGrade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_market_flow`] (`GET /api/v1/market/{condition_id}/flow`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketFlowParams {
/// Lookback window for whale flow aggregation.
pub timeframe: Option<Timeframe>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetMarketFlowParams {
/// Sets `timeframe`.
#[must_use]
pub fn timeframe(mut self, value: Timeframe) -> Self {
self.timeframe = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_market_intel`] (`GET /api/v1/market/{condition_id}/intel`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketIntelParams {
/// Lookback window for whale flow aggregation.
pub timeframe: Option<Timeframe>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetMarketIntelParams {
/// Sets `timeframe`.
#[must_use]
pub fn timeframe(mut self, value: Timeframe) -> Self {
self.timeframe = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_market_snapshot`] (`GET /api/v1/market/{condition_id}/snapshot`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketSnapshotParams {
/// Include trust metadata for current_price and spread_bps. Repeatable: trust.
pub expand: Vec<String>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetMarketSnapshotParams {
/// Sets `expand`.
#[must_use]
pub fn expand<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.expand = values.into_iter().map(Into::into).collect();
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_market_candles`] (`GET /api/v1/market/{condition_id}/candles`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketCandlesParams {
/// Bucketing granularity. 1d aggregates by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d.
pub resolution: Option<Resolution>,
/// Exclusive lower bound as a URL-decoded unix timestamp in seconds; points at or before this timestamp are omitted (the underlying daily snapshot read filters bucket_start > from). If to is also present, from must be less than or equal to to. Note: for resolution=1w a surviving mid-week point can yield a weekly candle whose t (Monday 00:00 UTC) precedes from.
pub from: Option<i64>,
/// Inclusive upper bound as a URL-decoded unix timestamp in seconds; points after this timestamp are omitted. If from is also present, from must be less than or equal to to.
pub to: Option<i64>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetMarketCandlesParams {
/// Sets `resolution`.
#[must_use]
pub fn resolution(mut self, value: Resolution) -> Self {
self.resolution = Some(value);
self
}
/// Sets `from`.
#[must_use]
pub fn from(mut self, value: i64) -> Self {
self.from = Some(value);
self
}
/// Sets `to`.
#[must_use]
pub fn to(mut self, value: i64) -> Self {
self.to = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_suspicious_trades`] (`GET /api/v1/suspicious-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSuspiciousTradesParams {
/// Maximum number of suspicious trades to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response.
pub cursor: Option<String>,
/// Minimum suspicion score (0-100). The live flag floor of 60 also applies.
pub min_suspicion: Option<f64>,
/// Compatible filter. flag selects live threshold crossings. watch returns no rows because no live watch policy exists.
pub severity: Option<Severity>,
/// Pagination mode. live (default) keeps the 120-second response cache; stable pins the walk to one published scoring generation and binds the cursor to the limit and filters.
pub mode: Option<Mode>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListSuspiciousTradesParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_suspicion`.
#[must_use]
pub fn min_suspicion(mut self, value: f64) -> Self {
self.min_suspicion = Some(value);
self
}
/// Sets `severity`.
#[must_use]
pub fn severity(mut self, value: Severity) -> Self {
self.severity = Some(value);
self
}
/// Sets `mode`.
#[must_use]
pub fn mode(mut self, value: Mode) -> Self {
self.mode = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_suspicious_trade`] (`GET /api/v1/suspicious-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetSuspiciousTradeParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetSuspiciousTradeParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_games`] (`GET /api/v1/games`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListGamesParams {
/// Canonical sport bucket, case-insensitive, with - and _ read as a space: table-tennis and Table Tennis are the same bucket. Omit for every covered sport. A bucket this deployment does not serve returns an empty page.
pub sport: Option<String>,
/// League tag, case-insensitive, as coverage.leagues spells it: nfl, epl, cs2, euroleague. EuroLeague games use sport=Basketball and league=euroleague. Omit for every league inside the selected sports.
pub league: Option<String>,
/// Keep only games in this state. A value outside the enum returns an empty page.
pub status: Option<State>,
/// RFC 3339 instant. Keep only games whose kickoff is at or after it. Games with no published kickoff are excluded whenever either bound is set.
pub starts_after: Option<String>,
/// RFC 3339 instant. Keep only games whose kickoff is at or before it. Must be at or after starts_after.
pub starts_before: Option<String>,
/// Page size. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Opaque gms_v1_ cursor from next_cursor. It pins the page position (kickoff and event_slug), not a snapshot: the catalog is live, so a game added or removed between pages moves with it. A cursor this endpoint did not issue returns 400 with error.param=cursor.
pub cursor: Option<String>,
/// Conditional GET using a weak semantic ETag from an earlier response. A matching payload returns 304 with an empty body; request_id, cost and as_of are excluded from the validator, so a rebuilt but unchanged catalog still revalidates.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListGamesParams {
/// Sets `sport`.
#[must_use]
pub fn sport(mut self, value: impl Into<String>) -> Self {
self.sport = Some(value.into());
self
}
/// Sets `league`.
#[must_use]
pub fn league(mut self, value: impl Into<String>) -> Self {
self.league = Some(value.into());
self
}
/// Sets `status`.
#[must_use]
pub fn status(mut self, value: State) -> Self {
self.status = Some(value);
self
}
/// Sets `starts_after`.
#[must_use]
pub fn starts_after(mut self, value: impl Into<String>) -> Self {
self.starts_after = Some(value.into());
self
}
/// Sets `starts_before`.
#[must_use]
pub fn starts_before(mut self, value: impl Into<String>) -> Self {
self.starts_before = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_game`] (`GET /api/v1/games/{event_slug}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetGameParams {
/// Conditional GET using a weak semantic ETag from an earlier response. A matching payload returns 304 with an empty body; request_id, cost and as_of are excluded from the validator, so a rebuilt but unchanged catalog still revalidates.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetGameParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_insider_radar`] (`GET /api/v1/insider-radar`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListInsiderRadarParams {
/// Maximum number of radar flags to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Pagination cursor from previous response.
pub cursor: Option<String>,
/// Minimum suspicion score (0-100). The live flag floor of 60 also applies.
pub min_suspicion: Option<f64>,
/// Compatible filter. flag selects live threshold crossings. watch returns no rows because no live watch policy exists.
pub severity: Option<Severity>,
/// Pagination mode. live (default) keeps the 120-second response cache; stable pins the walk to one published scoring generation and binds the cursor to the limit and filters.
pub mode: Option<Mode>,
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListInsiderRadarParams {
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `min_suspicion`.
#[must_use]
pub fn min_suspicion(mut self, value: f64) -> Self {
self.min_suspicion = Some(value);
self
}
/// Sets `severity`.
#[must_use]
pub fn severity(mut self, value: Severity) -> Self {
self.severity = Some(value);
self
}
/// Sets `mode`.
#[must_use]
pub fn mode(mut self, value: Mode) -> Self {
self.mode = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_insider_radar_flag`] (`GET /api/v1/insider-radar/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetInsiderRadarFlagParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetInsiderRadarFlagParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_event_replay_since`] (`GET /api/v1/events/feed/since`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetEventReplaySinceParams {
/// 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.
pub cursor: Option<String>,
/// Maximum durable public whale-trade events to return. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
/// Only this wallet's trades: a wallet address, trd_-prefixed trader id or username resolved against the traders table. Bound to the cursor: a cursor issued under other filters answers 400 with error.reason cursor_expired. An unknown trader matches nothing and the walk still advances.
pub trader: Option<String>,
/// Only trades on this market: the raw provider condition_id or its mkt_-prefixed id. Bound to the cursor.
pub condition_id: Option<String>,
/// Only trades by wallets at this grade or better (S best), read from the wallet's newest ranking at request time; a wallet with no grade never passes. Bound to the cursor.
pub min_grade: Option<Grade>,
/// Only trades of at least this USD amount. Decimal and scientific query spellings normalize exactly to cents, rounding half away from zero; maximum 1e15 USD. Pass the dataset continuation decimal string unchanged to preserve the bound. Bound to the cursor.
pub min_size: Option<GetEventReplaySinceMinSize>,
/// Repeatable. trade adds the public trade read to every event (the object GET /api/v1/whale-trades/{id} returns for it), from one query per page, so a page of 100 events needs no per-event detail request. Not bound to the cursor: switch it on or off mid-walk.
pub expand: Vec<String>,
}
impl GetEventReplaySinceParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `trader`.
#[must_use]
pub fn trader(mut self, value: impl Into<String>) -> Self {
self.trader = Some(value.into());
self
}
/// Sets `condition_id`.
#[must_use]
pub fn condition_id(mut self, value: impl Into<String>) -> Self {
self.condition_id = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: Grade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `min_size`.
#[must_use]
pub fn min_size(mut self, value: impl Into<GetEventReplaySinceMinSize>) -> Self {
self.min_size = Some(value.into());
self
}
/// Sets `expand`.
#[must_use]
pub fn expand<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.expand = values.into_iter().map(Into::into).collect();
self
}
}
/// Optional parameters for [`Client::create_webhook`] (`POST /api/v1/webhooks`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateWebhookParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl CreateWebhookParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_webhook_deliveries`] (`GET /api/v1/webhooks/{id}/deliveries`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWebhookDeliveriesParams {
/// Opaque pagination cursor returned as next_cursor by a prior response. Omit to fetch the newest page.
pub cursor: Option<String>,
/// Maximum delivery rows to return per page. Out-of-range values are clamped to 1..100.
pub limit: Option<i64>,
}
impl ListWebhookDeliveriesParams {
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
/// Optional parameters for [`Client::redeliver_webhook_delivery`] (`POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RedeliverWebhookDeliveryParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl RedeliverWebhookDeliveryParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::update_webhook`] (`PATCH /api/v1/webhooks/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateWebhookParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl UpdateWebhookParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::delete_webhook`] (`DELETE /api/v1/webhooks/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteWebhookParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl DeleteWebhookParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::prepare_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/prepare`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PrepareWebhookSecretParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl PrepareWebhookSecretParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::activate_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/activate`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ActivateWebhookSecretParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl ActivateWebhookSecretParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::retire_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/retire`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RetireWebhookSecretParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl RetireWebhookSecretParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::rotate_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RotateWebhookSecretParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl RotateWebhookSecretParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_health`] (`GET /api/v1/health`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetHealthParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetHealthParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::create_mcp_json_rpc_response`] (`POST /api/v1/mcp`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateMcpJsonRpcResponseParams {
/// Session ID minted by the server on initialize; echoed on every subsequent request.
///
/// Sent as the `Mcp-Session-Id` header.
pub mcp_session_id: Option<String>,
/// The negotiated MCP protocol revision, sent on every request after initialize (MCP Streamable HTTP transport). Accepted values: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. Any other value answers HTTP 400 with JSON-RPC error -32600. Absent, the request is served as 2025-03-26.
///
/// Sent as the `MCP-Protocol-Version` header.
pub mcp_protocol_version: Option<String>,
}
impl CreateMcpJsonRpcResponseParams {
/// Sets `Mcp-Session-Id`.
#[must_use]
pub fn mcp_session_id(mut self, value: impl Into<String>) -> Self {
self.mcp_session_id = Some(value.into());
self
}
/// Sets `MCP-Protocol-Version`.
#[must_use]
pub fn mcp_protocol_version(mut self, value: impl Into<String>) -> Self {
self.mcp_protocol_version = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_weekly_report_snapshot`] (`GET /api/v1/reports/weekly`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetWeeklyReportSnapshotParams {
/// UTC source-range start in YYYY-MM-DD format; required with to. Together with to, selects an exact ephemeral range of at most 31 inclusive UTC days. A start after tomorrow UTC returns 400 bad_request with error.param=from.
pub from: Option<String>,
/// UTC source-range end in YYYY-MM-DD format; required with from. Together with from, selects an exact ephemeral range of at most 31 inclusive UTC days. An end before 2024-03-01, the first day report data covers, returns 400 bad_request with error.param=to.
pub to: Option<String>,
/// ISO week selector in YYYY-WW format; alternative to from/to. Selects a durable canonical snapshot. A week that ends before 2024-03-01, the first day report data covers, or starts after tomorrow UTC returns 400 bad_request with error.param=week.
pub week: Option<String>,
}
impl GetWeeklyReportSnapshotParams {
/// Sets `from`.
#[must_use]
pub fn from(mut self, value: impl Into<String>) -> Self {
self.from = Some(value.into());
self
}
/// Sets `to`.
#[must_use]
pub fn to(mut self, value: impl Into<String>) -> Self {
self.to = Some(value.into());
self
}
/// Sets `week`.
#[must_use]
pub fn week(mut self, value: impl Into<String>) -> Self {
self.week = Some(value.into());
self
}
}
/// Optional parameters for [`Client::submit_trader_export`] (`POST /api/v1/trader/{address}/export`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SubmitTraderExportParams {
/// Output serialization. json = full envelope document (default); ndjson = full envelope as line 1 then one trade object per line; csv = flat trades rows only.
pub format: Option<Format>,
/// true: do not reuse a finished, running or reconciling job; only a queued job is reused, so the file is a snapshot read after this submit. Consumes quota when nothing is queued. Default false.
pub fresh: Option<bool>,
}
impl SubmitTraderExportParams {
/// Sets `format`.
#[must_use]
pub fn format(mut self, value: Format) -> Self {
self.format = Some(value);
self
}
/// Sets `fresh`.
#[must_use]
pub fn fresh(mut self, value: bool) -> Self {
self.fresh = Some(value);
self
}
}
/// Optional parameters for [`Client::get_pick_of_the_day_ledger_entry`] (`GET /api/v1/pick-of-the-day/ledger/{pick_id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayLedgerEntryParams {
/// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetPickOfTheDayLedgerEntryParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::create_webhook_verification_attempt`] (`POST /api/v1/webhooks/{id}/verification-attempts`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateWebhookVerificationAttemptParams {
/// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
///
/// Sent as the `Idempotency-Key` header.
pub idempotency_key: Option<String>,
}
impl CreateWebhookVerificationAttemptParams {
/// Sets `Idempotency-Key`.
#[must_use]
pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
self.idempotency_key = Some(value.into());
self
}
}
/// Optional parameters for [`Client::list_combo_fills`] (`GET /api/v1/combos/fills`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListComboFillsParams {
/// CSV of pending, won, or lost; all clears the filter. Unknown results appear only in unfiltered lists.
pub result: Option<String>,
/// CSV of 2, 3, 4, or 5+; all clears the filter. A combo matches any named pick count.
pub legs: Option<String>,
/// Minimum collateral in whole USDC.
pub min_stake: Option<i64>,
/// 0 disables the filter; otherwise use 2..1000000. Minimum shares per dollar at execution.
pub min_multiplier: Option<i64>,
/// CSV of S, A, B, C, D, F; all clears the filter. Ungraded wallets do not match.
pub grades: Option<String>,
/// CSV of nfl, ncaaf, nba, wnba, baseball, hockey, soccer, tennis, table-tennis, esports, mma, boxing, golf, cricket, f1, pickleball; all clears the filter. Matches when any leg belongs to a selected sport.
pub sports: Option<String>,
/// Recent is newest first; largest ranks collateral; payout ranks buy-fill shares and excludes sells.
pub sort: Option<ComboFillsResponseSort>,
/// Defaults to all for recent and 24h for largest or payout.
pub window: Option<Window>,
/// Page size. Integer values outside the range are clamped to 1..200.
pub limit: Option<i64>,
/// Exclusive block_number:log_index cursor for recent only; send the returned next_cursor unchanged.
pub cursor: Option<String>,
/// Offset for ranked largest or payout ordering; use returned next_offset.
pub offset: Option<i64>,
/// ETag from a prior response; a matching representation returns 304.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl ListComboFillsParams {
/// Sets `result`.
#[must_use]
pub fn result(mut self, value: impl Into<String>) -> Self {
self.result = Some(value.into());
self
}
/// Sets `legs`.
#[must_use]
pub fn legs(mut self, value: impl Into<String>) -> Self {
self.legs = Some(value.into());
self
}
/// Sets `min_stake`.
#[must_use]
pub fn min_stake(mut self, value: i64) -> Self {
self.min_stake = Some(value);
self
}
/// Sets `min_multiplier`.
#[must_use]
pub fn min_multiplier(mut self, value: i64) -> Self {
self.min_multiplier = Some(value);
self
}
/// Sets `grades`.
#[must_use]
pub fn grades(mut self, value: impl Into<String>) -> Self {
self.grades = Some(value.into());
self
}
/// Sets `sports`.
#[must_use]
pub fn sports(mut self, value: impl Into<String>) -> Self {
self.sports = Some(value.into());
self
}
/// Sets `sort`.
#[must_use]
pub fn sort(mut self, value: ComboFillsResponseSort) -> Self {
self.sort = Some(value);
self
}
/// Sets `window`.
#[must_use]
pub fn window(mut self, value: Window) -> Self {
self.window = Some(value);
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `offset`.
#[must_use]
pub fn offset(mut self, value: i64) -> Self {
self.offset = Some(value);
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_combos_summary`] (`GET /api/v1/combos/summary`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetCombosSummaryParams {
/// ETag from a prior response; a matching representation returns 304.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetCombosSummaryParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_combo`] (`GET /api/v1/combos/{condition_id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetComboParams {
/// ETag from a prior response; a matching representation returns 304.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetComboParams {
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
/// Optional parameters for [`Client::get_edge_hunter`] (`GET /api/v1/edge-hunter`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetEdgeHunterParams {
/// Response mode. board preserves the full quoted board; signals exposes ranked records and category evidence; observations exposes cohort measurements and accountable funnel evidence. Defaults to board.
pub view: Option<View>,
/// Legacy canonical bucket alias, now accepted in every view. Provider aliases canonicalize: NFL reaches Football and EPL reaches Soccer. Use leagues for a league-specific selection. An unmappable non-sport category returns an empty result and echoes category non_sport. Combines with other selection axes using AND.
pub category: Option<String>,
/// Required for view=observations; wider_holder, in_play or emerging_pile. Rejected for board and signals. wider_holder covers pregame markets outside the funded slate. A market that enters the slate leaves wider_holder; view=signals lists it only while its holder pile leans to one side, its backed side has a holder at or above min_grade and its kickoff is within horizon_hours, and otherwise neither view lists it. Each refresh evaluates at most 8 markets per sport and cohort, wider_holder by soonest kickoff (most graded holders first among equal kickoffs) and in_play by most graded holders, so a market among a sport's 8 soonest stays evaluated until its game starts. wider_holder also evaluates up to 8 more markets per sport that kick off within 24 hours, most graded holders first, so the most-held markets appear up to a day before kickoff. Each of these keeps its place in later refreshes until its game starts while its holder page still shows a card or could not be read, so a more-held market waits for a free place instead of displacing it. Each row's admitted_by names its place, most_held or soonest_kickoff. The rest count in coverage.capacity_limited_markets. Emerging pile is a wider-holder projection with sharp_pct in [0.75,0.85), complete holder scans and future kickoff, not an independent population or arrival history.
pub cohort: Option<Cohort>,
/// Opt-in admission rule for view=observations with cohort=wider_holder; rejected for every other view and cohort. most_held_48h returns the most-held selection instead of the default one: per sport, up to 8 wider_holder markets kicking off within 48 hours, most graded holders first, then most volume, then soonest kickoff, at most 4 per event. It is recomputed every refresh and keeps no place, so a more-held market displaces a less-held one; funded-slate markets stay excluded. Every row carries admitted_by most_held_48h, including a market the default selection also evaluates, and the response echoes admission. funnel, coverage, degraded and degradation_reasons describe this selection: a wider_holder candidate it did not take counts as capacity_limited. Its markets that no default place covers are read after every default market, at most once per 10 minutes, so a row can rest on a holder page up to 15 minutes old (holder_snapshot_at). Omit for the default selection. Cursors and ETags bind it.
pub admission: Option<String>,
/// Board and signals: S, A or B, default B. Requires a piled-side holder at the selected grade floor or better, without removing other holders. Rejected for observations.
pub min_grade: Option<MarketHolderGrade>,
/// Board row cap defaults to 30 and clamps integer values to 1..30; total counts selected admitted rows before the cap. Signals and observations page size defaults to 20 and clamps to 1..100.
pub limit: Option<i64>,
/// Opaque canonical Edge Hunter cursor from next_cursor. Bound to view, every normalized selection axis, grade/horizon where applicable, source snapshot and ordering; observations also bind cohort, admission and emerging cutoff. Changed selections or replaced snapshots return cursor_expired. Rejected in board.
pub cursor: Option<String>,
/// Kickoff window for board (default 48) or signals (default 12). Integer values clamp to 1..48. Rejected for observations, whose pre-game universe is fixed at 48 hours with a 12-hour in-play kickoff lookback.
pub horizon_hours: Option<i64>,
/// All views: sports excludes the Esports bucket; esports selects only Esports. Omit for both. Combines with other selections using AND. Selected reads echo normalized selection and require frozen metadata readiness.
pub kind: Option<Kind>,
/// Canonical sport buckets, including Esports and Table Tennis, matched case-insensitively. Unknown names and league aliases such as NFL are rejected in sports; use category for legacy bucket aliases or leagues for exact league selection. Omission covers every sport admitted by the selected view. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub sports: Vec<String>,
/// Normalized machine/provider league identities, such as nfl, cfb, nba, epl, cs2, lol, dota2 or valorant. Known wire/tag aliases normalize; other provider keys match exact lowercase identity. This is separate from category: category=NFL selects Football, while leagues=nfl selects NFL only. Read market_context.league for authoritative values. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub leagues: Vec<String>,
/// Exact provider sports_market_type values. This is an open provider taxonomy, distinct from exact market IDs. Read market_context.market_type; missing selected metadata excludes the row. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub market_types: Vec<String>,
/// Exact market selections. Raw provider condition IDs and the existing mkt_-prefixed aliases normalize to raw IDs. Unknown well-formed IDs return an empty result. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub condition_ids: Vec<String>,
/// Exact provider event slugs. Use event_slug returned on the row; no title or slug-prefix guessing. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub event_slugs: Vec<String>,
/// Exact provider series slugs. Read market_context.series_slug; a missing selected series excludes the row. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
pub series_slugs: Vec<String>,
/// Conditional validator for view=signals or view=observations only. A semantic match returns 304 with no body. The default board does not emit ETag or return 304.
///
/// Sent as the `If-None-Match` header.
pub if_none_match: Option<String>,
}
impl GetEdgeHunterParams {
/// Sets `view`.
#[must_use]
pub fn view(mut self, value: View) -> Self {
self.view = Some(value);
self
}
/// Sets `category`.
#[must_use]
pub fn category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
/// Sets `cohort`.
#[must_use]
pub fn cohort(mut self, value: Cohort) -> Self {
self.cohort = Some(value);
self
}
/// Sets `admission`.
#[must_use]
pub fn admission(mut self, value: impl Into<String>) -> Self {
self.admission = Some(value.into());
self
}
/// Sets `min_grade`.
#[must_use]
pub fn min_grade(mut self, value: MarketHolderGrade) -> Self {
self.min_grade = Some(value);
self
}
/// Sets `limit`.
#[must_use]
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
/// Sets `cursor`.
#[must_use]
pub fn cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
/// Sets `horizon_hours`.
#[must_use]
pub fn horizon_hours(mut self, value: i64) -> Self {
self.horizon_hours = Some(value);
self
}
/// Sets `kind`.
#[must_use]
pub fn kind(mut self, value: Kind) -> Self {
self.kind = Some(value);
self
}
/// Sets `sports`.
#[must_use]
pub fn sports<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.sports = values.into_iter().map(Into::into).collect();
self
}
/// Sets `leagues`.
#[must_use]
pub fn leagues<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.leagues = values.into_iter().map(Into::into).collect();
self
}
/// Sets `market_types`.
#[must_use]
pub fn market_types<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.market_types = values.into_iter().map(Into::into).collect();
self
}
/// Sets `condition_ids`.
#[must_use]
pub fn condition_ids<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.condition_ids = values.into_iter().map(Into::into).collect();
self
}
/// Sets `event_slugs`.
#[must_use]
pub fn event_slugs<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.event_slugs = values.into_iter().map(Into::into).collect();
self
}
/// Sets `series_slugs`.
#[must_use]
pub fn series_slugs<I, S>(mut self, values: I) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
self.series_slugs = values.into_iter().map(Into::into).collect();
self
}
/// Sets `If-None-Match`.
#[must_use]
pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
self.if_none_match = Some(value.into());
self
}
}
impl Client {
/// API discovery
///
/// `GET /api/v1`
///
/// Unauthenticated API-origin discovery document pointing agents to the canonical API base URL, full docs, web-origin OpenAPI spec, health check, and the COMPLETE index of authenticated data routes. data.authenticated_routes is the whole authenticated route surface, not a sample: it carries every authenticated route this spec documents, so an agent that starts here never has to guess a path. The index is a hand-maintained const in backend/src/api_v1/discovery.rs kept in step with this spec by review; no automated check compares the two, so treat this spec as authoritative if they ever disagree.
pub async fn get_api_discovery(&self) -> Result<GetApiDiscoveryResponse> {
let path = String::from("/api/v1");
let call = Call::new(&Operation::GET_API_DISCOVERY, path);
self.send_json(call).await
}
/// Redirect to the canonical OpenAPI spec
///
/// `GET /api/v1/openapi.json`
///
/// Unauthenticated API-origin compatibility redirect to the canonical web-origin OpenAPI JSON document at https://0xinsider.com/api/v1/openapi.json.
///
/// The API answers with a redirect to the file. It is followed once, by a fresh
/// request that carries no credential, and the file comes back as a streaming
/// [`Download`].
pub async fn redirect_api_openapi_spec(&self) -> Result<Download> {
let path = String::from("/api/v1/openapi.json");
let call = Call::new(&Operation::REDIRECT_API_OPENAPI_SPEC, path);
self.send_download(call).await
}
/// Register an agent for a sandbox key
///
/// `POST /api/v1/agents/register`
///
/// Self-serve agent onboarding: no account, no request body, no human step. Returns a sandbox API key (oxi_sk_test_...) and the path to live access. The key works only on the sandbox server (https://0xinsider.com/sandbox/api/v1), where it is optional: send it as Authorization: Bearer to exercise the credential path, and the sandbox answers a malformed key with the production 401. Nothing is stored, so the key cannot be listed or revoked and does not expire; register again for a new one. The live API answers a sandbox key with 401 invalid_api_key and error.reason sandbox_api_key. Live data needs an account with an active Pro subscription, and either an oxi_sk_live_ key from https://0xinsider.com/developers or an OAuth access token (https://0xinsider.com/auth.md). The request body is not read.
pub async fn register_agent(&self) -> Result<RegisterAgentResponse> {
let path = String::from("/api/v1/agents/register");
let call = Call::new(&Operation::REGISTER_AGENT, path);
self.send_json(call).await
}
/// Get trader
///
/// `GET /api/v1/trader/{address}`
///
/// Returns a trader's grade (S through F), P&L, win rate, and optional strategy/category data. The path accepts either an Ethereum wallet address, a known trader username, or a trd_-prefixed trader ID emitted by this API. A wallet address this API does not track yet returns 200 with sync_status "unknown" instead of 404, so it can be polled. A value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address; it is never echoed back as a trader address. The additive `pnl.exact.realized` and `stats.exact.total_volume` fields carry decimal strings from verified source atoms with unit, scale and basis metadata; parse them with decimal-safe arithmetic and keep the existing numeric twins for display. The additive `pnl.in_scope` object (#27311) is the wallet's sports and esports record, the P&L the 0xinsider profile headlines; the other pnl fields stay Polymarket's wallet-wide figures.
pub async fn get_trader(&self, address: &str, params: &GetTraderParams) -> Result<GetTraderResponse> {
let path = format!("/api/v1/trader/{address}", address = encode_path_segment(address));
let mut call = Call::new(&Operation::GET_TRADER, path);
for value in ¶ms.expand {
call.query("expand", value.as_str().to_owned());
}
if let Some(value) = ¶ms.max_age_s {
call.query("max_age_s", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get trader context (Markdown)
///
/// `GET /api/v1/trader/{address}/context.md`
///
/// Returns a single human- and LLM-readable Markdown briefing for one trader: identity, grade, P&L, position coverage, and freshness. The path accepts an Ethereum wallet address (0x...), a known trader username, or a trd_-prefixed trader ID emitted by this API. A wallet address this API does not track yet still returns 200 with a degraded 'not yet synced' document (no 404). A value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address, as the JSON error envelope. The Markdown variant does not emit an ETag and does not support conditional requests; use the JSON variant (drop the .md suffix) for ETag/If-None-Match handling.
pub async fn get_trader_context_markdown(&self, address: &str) -> Result<String> {
let path = format!(
"/api/v1/trader/{address}/context.md",
address = encode_path_segment(address)
);
let call = Call::new(&Operation::GET_TRADER_CONTEXT_MARKDOWN, path);
self.send_text(call).await
}
/// Get a trader grade proven visible at a past instant
///
/// `GET /api/v1/trader/{address}/grade-at`
///
/// Reads one trader's recorded grade at as_of from prospective visibility evidence. Before the first recorded observation, after deletion, or during a grade-transition gap, status is unknown and grade is null; a recorded ungraded trader instead has status ungraded. available_from is the first proven observation for this trader, not a claim that earlier grades can be reconstructed. observed_at is when the grade writer began the transition and published_by is the later confirmation that the row was committed, not an exact commit time. Older observations have null model_version, model_build_sha and source_observed_by; do not substitute a current grade or a dated ranking row. The requested event time, publication bounds and model provenance are separate. Use a grade only when status is graded. This is additive; the current-grade trader and leaderboard operations do not change.
pub async fn get_trader_grade_at(
&self,
address: &str,
as_of: &str,
params: &GetTraderGradeAtParams,
) -> Result<GetTraderGradeAtResponse> {
let path = format!(
"/api/v1/trader/{address}/grade-at",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::GET_TRADER_GRADE_AT, path);
call.query("as_of", as_of.to_string());
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get trader context (JSON)
///
/// `GET /api/v1/trader/{address}/context`
///
/// Returns a single structured context object for one trader: the full trader profile (same shape as GET /api/v1/trader/{address}) plus a position_summary (sync coverage and realized/unrealized P&L rollups, with an as_of open-position freshness clock), the data_as_of freshness timestamp (the open-position data's latest /positions snapshot, else last completed sync; the snapshot advances only open positions, so resolved counts and win rate still date to the last full sync; native realized P&L follows its accounting snapshot), and a freshness_note describing the point-in-time snapshot semantics. The path accepts an Ethereum wallet address (0x...), a known trader username, or a trd_-prefixed trader ID emitted by this API. position_summary is omitted when the trader is not in the local database or native net economics is unavailable; realized fields remain numeric when present; a wallet address this API does not track yet returns 200 with sync_status 'unknown' on the nested trader (no 404), while a value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address. Append .md to the path for the Markdown rendering.
pub async fn get_trader_context(
&self,
address: &str,
params: &GetTraderContextParams,
) -> Result<GetTraderContextResponse> {
let path = format!(
"/api/v1/trader/{address}/context",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::GET_TRADER_CONTEXT, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Batch traders
///
/// `POST /api/v1/traders/batch`
///
/// Returns traders for 1-25 wallet addresses or known usernames. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. A wallet address this API does not track yet returns data with sync_status "unknown", matching the single trader endpoint. A username, trd_ id or numeric trader id that resolves to no trader is a per-item not_found error with error.param "traders", never an ok row keyed on the input.
pub async fn batch_get_traders(&self, body: &BatchGetTradersBody) -> Result<BatchGetTradersResponse> {
let path = String::from("/api/v1/traders/batch");
let mut call = Call::new(&Operation::BATCH_GET_TRADERS, path);
call.json(body)?;
self.send_json(call).await
}
/// Get a trader's position timeline for one market
///
/// `GET /api/v1/trader/{address}/position-timeline`
///
/// Returns stored Polymarket fills for one tracked trader in one market, newest first, with outcome-specific running_amount and running_avg_price including earlier stored fills before pagination. Stored fills start 2026-07-17; the timeline returns no fill before that date. The {address} segment accepts the same identity shapes as the plural alias: wallet, username, trd_-prefixed trader id, bare integer traders.id, or @username, resolved with precedence @username -> wallet -> trd_ -> integer -> username. A leading @ resolves the rest as a username only, which is how to reach an all-digit username that the integer rule reads as an id. Only warm-tier traders, the wallets we sync most often, are served; others return 404. The cumulative buy-weighted fill average is unchanged by sells. Split, merge, redemption and neg-risk activity are excluded; totals are not complete holdings or provider current-position avgPrice. Cursor-paginated; values stay stable across page sizes/cursors for unchanged source history.
pub async fn get_position_timeline(
&self,
address: &str,
condition_id: &str,
params: &GetPositionTimelineParams,
) -> Result<GetPositionTimelineResponse> {
let path = format!(
"/api/v1/trader/{address}/position-timeline",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::GET_POSITION_TIMELINE, path);
call.query("condition_id", condition_id.to_string());
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get trader category win records
///
/// `GET /api/v1/trader/{address}/categories`
///
/// Returns one wallet's win record in every canonical category it has a settled market in: wins, decided (wins plus losses) and the rate, per category, busiest category first. These are the same counts the Pick of the Day holder chips carry. The Esports record also carries games: the wallet's record in each esports title it has a settled market in (LoL, CS2, Dota 2, Valorant, ...), the same per-game record the holder chips and GET /api/v1/market/{condition_id}/holders name in category_win_rate_game, with the same counts, floor and status rule; the Esports row itself stays the whole bucket, which is what a chip falls back to when a game record is thin. The basis is every settled market at any position size, which is NOT the basis of category_strengths on GET /api/v1/trader/{address}?expand=categories: that breakdown keeps the 20 USD notional floor and the entry-price rule its ranks depend on, so the two legitimately differ, in both directions. Measured on production 2026-09-22 over the 122,497 wallet-category pairs with at least 20 decided markets on both bases: the floored rate was higher in 56.5% of pairs, lower in 34.5% and equal in 9.0%, median +0.6 points, p10 -4.6, p90 +9.8, and 14.0% of pairs differ by 10 points or more. Neither rate corrects the other. The difference is not only small positions: on a 1-in-250 wallet sample the same day, admitted markets won 56.6% while markets dropped by the notional floor alone won 45.2% and markets dropped by the entry-price rule alone won 48.7%. The two tables also run on different clocks, this one rebuilt daily and that breakdown updated incrementally, so a same-day read can differ on timing alone. A category or game with fewer than min_decided_for_win_rate decided markets keeps its counts and returns win_rate null with status not_enough_data, so a caller can apply its own sample rule. A category the wallet has no settled market in is omitted entirely, and so is a game: an absent entry means no record, never a 0% record. A resolved trader with no settled market returns an empty records array (HTTP 200); an unknown address returns 404. Sports and esports only (#27311): records cover sports and esports categories only, so a wallet whose settled markets are all elsewhere returns an empty records array.
pub async fn get_trader_category_records(
&self,
address: &str,
params: &GetTraderCategoryRecordsParams,
) -> Result<GetTraderCategoryRecordsResponse> {
let path = format!(
"/api/v1/trader/{address}/categories",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::GET_TRADER_CATEGORY_RECORDS, path);
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get trader P&L time series
///
/// `GET /api/v1/trader/{address}/pnl`
///
/// Returns a trader's daily P&L time series and pre-derived stats from the precomputed daily_pnl read model: entries (daily cumulative P&L), period stats (all/90d/30d/7d), monthly aggregation, per-year totals, and the drawdown series. Reads the refreshed read model, not a per-request equity replay. A resolved trader with no daily P&L returns an empty structured object (HTTP 200); an unknown address returns 404. Covers all Polymarket markets, not only sports and esports: daily_change is Polymarket's own wallet-wide P&L figure, which cannot be split per market. Optional from/to and sections bound what comes back: from/to clip the two daily series (entries, drawdown) to an inclusive UTC date window, and sections names which of the five sections the body carries. A request that sends none of the three receives the whole object exactly as before, down to the ETag. A body built with any of them carries data.view, which names the bounds, the sections applied, the size of the full series and the last daily point before the window; a section the request excluded is absent from data, not null or empty. stats, monthly and year_totals keep their full-period definitions whatever the window says, so an economic value never changes meaning because a chart asked for seven days.
pub async fn get_trader_pnl(&self, address: &str, params: &GetTraderPnlParams) -> Result<GetTraderPnlResponse> {
let path = format!("/api/v1/trader/{address}/pnl", address = encode_path_segment(address));
let mut call = Call::new(&Operation::GET_TRADER_PNL, path);
if let Some(value) = ¶ms.from {
call.query("from", value.to_string());
}
if let Some(value) = ¶ms.to {
call.query("to", value.to_string());
}
for value in ¶ms.sections {
call.query("sections", value.as_str().to_owned());
}
self.send_json(call).await
}
/// Get a trader's position timeline (unified identity resolver)
///
/// `GET /api/v1/traders/{trader}/position-timeline`
///
/// Unified trader-timeline route (#4975). {trader} accepts all five identity shapes - 0x... wallet, username, trd_-prefixed trader id, bare integer id, and @username (a username lookup only, for all-digit usernames) - resolved by the single shared trader-identity resolver. Returns stored Polymarket fills for one tracked trader in one market, newest first, with server-computed running_amount and running_avg_price. Stored fills start 2026-07-17; the timeline returns no fill before that date. Only warm-tier traders, the wallets we sync most often, are tracked; other traders return 404. Response payload matches the singular GET /api/v1/trader/{address}/position-timeline route for the same (trader, market), except for the per-request meta.request_id. The prior integer-id-only variant is preserved: the same path now accepts every identity shape.
pub async fn get_position_timeline_by_id(
&self,
trader: &str,
condition_id: &str,
params: &GetPositionTimelineByIdParams,
) -> Result<GetPositionTimelineByIdResponse> {
let path = format!(
"/api/v1/traders/{trader}/position-timeline",
trader = encode_path_segment(trader)
);
let mut call = Call::new(&Operation::GET_POSITION_TIMELINE_BY_ID, path);
call.query("condition_id", condition_id.to_string());
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List current positions (positions-board feed)
///
/// `GET /api/v1/positions`
///
/// Returns the current positions-board feed backed by the wallet_positions mirror. Ordered by current_value_usd DESC with deterministic (wallet, condition_id, outcome_index) tiebreakers. Pre-reconcile rows (current_value_usd IS NULL) are excluded. Positions on resolved markets are excluded: a position leaves the feed when its market resolves, so a condition_id read of a resolved market returns no rows. Positions on markets outside sports and esports are excluded on every read, the board and wallet reads included. Cursor-paginated. Every filter pushes into SQL. Deep cursor pages cost the same as the first page: the value bounds and the cursor are index conditions, so a page never rescans the feed from the top. With wallet, the same feed is read for one wallet or a book of up to 25 wallets from each wallet's own ordered index range, so the pages are that wallet's complete reconciled binary open positions on sports and esports markets and the cost is the page, never the board. min_size defaults to 100 on the board read, so a request with no wallet and no min_size drops positions valued under 100 USD; with wallet it defaults to 0 instead. Send min_size=0 to include every reconciled position. What a wallet read does not return: positions with shares at 0 (closed), positions on resolved markets (redeemable or already redeemed), positions on markets outside sports and esports, rows the reconciler has not valued yet (current_value_usd IS NULL), and non-binary outcomes; per-row last_reconciled_at and freshness say how old each valuation is. Each row also carries additive `exact` source atoms as decimal strings with unit, scale and basis metadata; parse those values with decimal-safe arithmetic and do not reconstruct them from the display-safe numeric fields. The response adds a top-level `data_quality` object beside `data`, with positions, trader, and market groups owned by `wallet_positions.last_reconciled_at|updated_at`, `traders.last_synced`, and `market_canonical.last_refreshed_at`. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
pub async fn list_positions(&self, params: &ListPositionsParams) -> Result<ListPositionsResponse> {
let path = String::from("/api/v1/positions");
let mut call = Call::new(&Operation::LIST_POSITIONS, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.consistency {
call.query("consistency", value.as_str().to_owned());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.condition_id {
call.query("condition_id", value.to_string());
}
for value in ¶ms.wallet {
call.query("wallet", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.side {
call.query("side", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List large positions
///
/// `GET /api/v1/large-positions`
///
/// Returns the largest current open positions from graded traders, value-descending, with opaque cursor pagination. This is a change-detection feed, not a holder list: a row needs a current value of at least 50,000 USD and a live detection in the last 24 hours, so a wallet that holds a market without moving is not listed. For every graded holder of one market use GET /api/v1/market/{condition_id}/holders. Polymarket-only by design: the large-positions scanner filters platform = 'polymarket' (backend/crates/large-positions/src/scanner.rs), so only Polymarket rows are scanned and an unknown condition_id filter returns an empty list (never fabricated rows). Sports and esports markets only (#27305): a position on a market outside product scope is not listed; a condition_id naming one returns 404 not_found with error.reason=market_out_of_scope, and a category outside sports and esports returns 400 bad_request with param=category. The teaser cap that the internal product UI applies to anonymous viewers does not apply here: the API key already proves an active Pro subscription (wire tier `insider`), so authed API callers get full access.
pub async fn list_large_positions(&self, params: &ListLargePositionsParams) -> Result<ListLargePositionsResponse> {
let path = String::from("/api/v1/large-positions");
let mut call = Call::new(&Operation::LIST_LARGE_POSITIONS, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.condition_id {
call.query("condition_id", value.to_string());
}
self.send_json(call).await
}
/// List large trades
///
/// `GET /api/v1/large-trades`
///
/// Returns recent large trades with signal scoring and persisted suspicion facts. Filter by size, category, trader grade, or persisted suspicion. Filters are applied before pagination, and every request uses SQL-backed limit + 1 pagination so has_more and next_cursor reflect the filtered result set. Cursor-paginated, newest first. Market categories come from provider-backed market_canonical identity. Returns trades on sports and esports markets only (#27430): a trade on any other market is not listed, not counted toward has_more, and not returned by since. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts. Pass since to poll for new trades: the answer holds only the trades recorded after the one you name, and with If-None-Match a poll that finds none is 304 with an empty body.
pub async fn list_large_trades(&self, params: &ListLargeTradesParams) -> Result<ListLargeTradesResponse> {
let path = String::from("/api/v1/large-trades");
let mut call = Call::new(&Operation::LIST_LARGE_TRADES, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.suspicious_only {
call.query("suspicious_only", value.to_string());
}
if let Some(value) = ¶ms.min_market_volume_share {
call.query("min_market_volume_share", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
if let Some(value) = ¶ms.since {
call.query("since", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List whale trades
///
/// `GET /api/v1/whale-trades`
///
/// Returns recent large trades with signal scoring and persisted suspicion facts. Filter by size, category, trader grade, or persisted suspicion. Filters are applied before pagination, and every request uses SQL-backed limit + 1 pagination so has_more and next_cursor reflect the filtered result set. Cursor-paginated, newest first. Market categories come from provider-backed market_canonical identity. Returns trades on sports and esports markets only (#27430): a trade on any other market is not listed, not counted toward has_more, and not returned by since. Deprecated alias of GET /api/v1/large-trades, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts. Pass since to poll for new trades: the answer holds only the trades recorded after the one you name, and with If-None-Match a poll that finds none is 304 with an empty body.
pub async fn list_whale_trades(&self, params: &ListWhaleTradesParams) -> Result<ListWhaleTradesResponse> {
let path = String::from("/api/v1/whale-trades");
let mut call = Call::new(&Operation::LIST_WHALE_TRADES, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.suspicious_only {
call.query("suspicious_only", value.to_string());
}
if let Some(value) = ¶ms.min_market_volume_share {
call.query("min_market_volume_share", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
if let Some(value) = ¶ms.since {
call.query("since", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Replay historical large trades
///
/// `GET /api/v1/large-trades/history`
///
/// Returns historical large trades from local whale_alerts rows, not request-time provider fetches. Filter by condition_id, trader, category, minimum grade, persisted suspicion, platform, and RFC3339 from/to windows. All filters are pushed into SQL before LIMIT, every request uses SQL-backed limit + 1 pagination, and results are ordered newest first by traded_at desc, id desc. Metadata exposes local_replay source and best_effort completeness. Returns trades on sports and esports markets only (#27430), across the whole archive: a stored trade on any other market is left out before LIMIT. POINT IN TIME: signal_score, trader.grade and the min_grade filter carry today's values on every row however old, so a backtest that selects by them selects wallets on what they did after the trade. The point-in-time fields are recorded_signal_score (from 2026-08-03T11:59Z; null before, and never backfilled, because the trader statistics it reads at insert were not kept for older rows) and trader.grade_at_trade with trader.grade_at_trade_status (from 2026-09-19T23:00Z; unknown before). CAPTURE RULES changed over the archive's life: rows before 2026-02-02 are sparse (at most a few hundred a month); from 2026-02-02 the floor was 3,000 USD (1.4% of rows through 2026-07-05 are smaller) and trades at any price were kept; from 2026-07-06 a trade is kept at 10,000 USD or more (1,000 USD in earnings markets) and only when priced below 0.97 (0.99 in earnings markets). Pass min_size=10000 for one size rule across the whole range; monthly row counts still follow the sports calendar. Until 2026-07-17 one match could be stored twice, once per wallet: from 2026-05-01 to 2026-07-17, 27.7% of rows at 10,000 USD or more share a transaction and market with another stored wallet, almost always a Yes buyer and a No buyer filled against each other. From 2026-07-18 a row is the taker's side only. Before 2026-05 the transaction hash is mostly absent, so the share cannot be measured there. From 2026-09-23 a fill must ALSO be at least 0.1% of its market's recorded traded volume, Polymarket's own share count, so a $10,000 print that lands in a market which has already traded tens of millions of shares is no longer kept; rows written before that date were not re-filtered. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
pub async fn list_large_trade_history(
&self,
params: &ListLargeTradeHistoryParams,
) -> Result<ListLargeTradeHistoryResponse> {
let path = String::from("/api/v1/large-trades/history");
let mut call = Call::new(&Operation::LIST_LARGE_TRADE_HISTORY, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.condition_id {
call.query("condition_id", value.to_string());
}
if let Some(value) = ¶ms.trader {
call.query("trader", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.suspicious_only {
call.query("suspicious_only", value.to_string());
}
if let Some(value) = ¶ms.platform {
call.query("platform", value.as_str().to_owned());
}
if let Some(value) = ¶ms.from {
call.query("from", value.to_string());
}
if let Some(value) = ¶ms.to {
call.query("to", value.to_string());
}
if let Some(value) = ¶ms.min_market_volume_share {
call.query("min_market_volume_share", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Replay historical whale trades
///
/// `GET /api/v1/whale-trades/history`
///
/// Returns historical whale trades from local whale_alerts rows, not request-time provider fetches. Filter by condition_id, trader, category, minimum grade, persisted suspicion, platform, and RFC3339 from/to windows. All filters are pushed into SQL before LIMIT, every request uses SQL-backed limit + 1 pagination, and results are ordered newest first by traded_at desc, id desc. Metadata exposes local_replay source and best_effort completeness. Returns trades on sports and esports markets only (#27430), across the whole archive: a stored trade on any other market is left out before LIMIT. Deprecated alias of GET /api/v1/large-trades/history, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
pub async fn list_whale_trade_history(
&self,
params: &ListWhaleTradeHistoryParams,
) -> Result<ListWhaleTradeHistoryResponse> {
let path = String::from("/api/v1/whale-trades/history");
let mut call = Call::new(&Operation::LIST_WHALE_TRADE_HISTORY, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
if let Some(value) = ¶ms.condition_id {
call.query("condition_id", value.to_string());
}
if let Some(value) = ¶ms.trader {
call.query("trader", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.suspicious_only {
call.query("suspicious_only", value.to_string());
}
if let Some(value) = ¶ms.platform {
call.query("platform", value.as_str().to_owned());
}
if let Some(value) = ¶ms.from {
call.query("from", value.to_string());
}
if let Some(value) = ¶ms.to {
call.query("to", value.to_string());
}
if let Some(value) = ¶ms.min_market_volume_share {
call.query("min_market_volume_share", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get large trade by ID
///
/// `GET /api/v1/large-trades/{id}`
///
/// Returns one large trade by raw whale_alerts.id or the wt_-prefixed id emitted by list and history responses.
pub async fn get_large_trade(&self, id: &str, params: &GetLargeTradeParams) -> Result<GetLargeTradeResponse> {
let path = format!("/api/v1/large-trades/{id}", id = encode_path_segment(id));
let mut call = Call::new(&Operation::GET_LARGE_TRADE, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get whale trade by ID
///
/// `GET /api/v1/whale-trades/{id}`
///
/// Returns one whale trade by raw whale_alerts.id or the wt_-prefixed id emitted by list and history responses. Deprecated alias of GET /api/v1/large-trades/{id}, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
pub async fn get_whale_trade(&self, id: &str, params: &GetWhaleTradeParams) -> Result<GetWhaleTradeResponse> {
let path = format!("/api/v1/whale-trades/{id}", id = encode_path_segment(id));
let mut call = Call::new(&Operation::GET_WHALE_TRADE, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Page counterparty executions
///
/// `GET /api/v1/large-trades/{id}/counterparties/executions`
///
/// Returns a bounded execution page from the immutable snapshot emitted by large-trade detail. A stale or changed snapshot returns a cursor-expired error so clients restart from detail.
pub async fn list_large_trade_counterparty_executions(
&self,
id: &str,
snapshot_id: &str,
params: &ListLargeTradeCounterpartyExecutionsParams,
) -> Result<ListLargeTradeCounterpartyExecutionsResponse> {
let path = format!(
"/api/v1/large-trades/{id}/counterparties/executions",
id = encode_path_segment(id)
);
let mut call = Call::new(&Operation::LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS, path);
call.query("snapshot_id", snapshot_id.to_string());
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Page counterparty executions
///
/// `GET /api/v1/whale-trades/{id}/counterparties/executions`
///
/// Returns a bounded execution page from the immutable snapshot emitted by whale-trade detail. A stale or changed snapshot returns a cursor-expired error so clients restart from detail. Deprecated alias of GET /api/v1/large-trades/{id}/counterparties/executions, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
pub async fn list_whale_trade_counterparty_executions(
&self,
id: &str,
snapshot_id: &str,
params: &ListWhaleTradeCounterpartyExecutionsParams,
) -> Result<ListWhaleTradeCounterpartyExecutionsResponse> {
let path = format!(
"/api/v1/whale-trades/{id}/counterparties/executions",
id = encode_path_segment(id)
);
let mut call = Call::new(&Operation::LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS, path);
call.query("snapshot_id", snapshot_id.to_string());
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Page maker counterparties
///
/// `GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`
///
/// Returns a bounded maker-wallet page for one exact execution. Percentages keep the complete execution denominator across pages.
pub async fn list_large_trade_counterparty_makers(
&self,
id: &str,
execution_id: &str,
snapshot_id: &str,
params: &ListLargeTradeCounterpartyMakersParams,
) -> Result<ListLargeTradeCounterpartyMakersResponse> {
let path = format!(
"/api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers",
id = encode_path_segment(id),
execution_id = encode_path_segment(execution_id)
);
let mut call = Call::new(&Operation::LIST_LARGE_TRADE_COUNTERPARTY_MAKERS, path);
call.query("snapshot_id", snapshot_id.to_string());
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Page maker counterparties
///
/// `GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`
///
/// Returns a bounded maker-wallet page for one exact execution. Percentages keep the complete execution denominator across pages. Deprecated alias of GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
pub async fn list_whale_trade_counterparty_makers(
&self,
id: &str,
execution_id: &str,
snapshot_id: &str,
params: &ListWhaleTradeCounterpartyMakersParams,
) -> Result<ListWhaleTradeCounterpartyMakersResponse> {
let path = format!(
"/api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers",
id = encode_path_segment(id),
execution_id = encode_path_segment(execution_id)
);
let mut call = Call::new(&Operation::LIST_WHALE_TRADE_COUNTERPARTY_MAKERS, path);
call.query("snapshot_id", snapshot_id.to_string());
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Get trader leaderboard
///
/// `GET /api/v1/leaderboard`
///
/// Returns ranked traders (grades S/A/B) sorted by score descending. Supports cursor pagination and optional category/strategy filters.
pub async fn list_leaderboard(&self, params: &ListLeaderboardParams) -> Result<ListLeaderboardResponse> {
let path = String::from("/api/v1/leaderboard");
let mut call = Call::new(&Operation::LIST_LEADERBOARD, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.strategy {
call.query("strategy", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get today's Pick of the Day
///
/// `GET /api/v1/pick-of-the-day`
///
/// Returns entitled published picks for the current product day. Pro includes five selections in total: the designated free selection and the first four non-free selections in publication order. Max opens every available selection, up to twenty. A day can include multiple selections from the same game. Same-game picks share exposure and need not be independent; retain each `pick_id` instead of deduplicating by game. Both read resolved picks. Publication prices and backing are frozen; a prior day never appears here, so use the archive.
///
/// Stable `pick_id` values identify selections. `publication_order` describes presentation and `is_free_selection` describes access; neither is a quality rating. Standing selections retain their identity, slot, and release schedule. Later additions fill available slots. Historical IDs, order, and proof bytes remain unchanged.
///
/// Unauthorized unresolved selections appear only as identity-free `locked_picks` containing `pick_rank` and `required_tier`. When only locked selections are published, HTTP 200 carries `state=none`, `picks=[]`, `pick_count=0`, and an Upgrade to Max message. Proof warming applies only to entitled picks.
///
/// `scheduled_picks` contains only entitled slots and retains required `release_at` and `kickoff`. Unauthorized scheduled selections expose no game identity or release time.
///
/// When no active pick is available, including after cancelled recommendations are withdrawn, HTTP 404 carries `error.code="not_found"` and `error.reason="pick_not_released"`. Branch on the reason and schedule one request using `Retry-After` or `error.retry_at` instead of polling. This advisory retry does not reveal an unauthorized game's release time.
///
/// Final sporting scores are retained for resolved picks after the event is confirmed ended and both sides have verified scores. A result without a verified final stays unavailable; a win/loss outcome alone does not establish a sporting score. Existing sports_context fields and return calculations are unchanged.
///
/// Withdrawn picks are excluded from current and dated recommendations, the archive, and its statistics, even after market settlement. The public ledger retains every published commitment under its original identity and proof bytes. Provider settlement still determines the recorded result. Request and response fields are unchanged.
pub async fn get_pick_of_the_day(&self, params: &GetPickOfTheDayParams) -> Result<GetPickOfTheDayResponse> {
let path = String::from("/api/v1/pick-of-the-day");
let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get the Pick of the Day track record
///
/// `GET /api/v1/pick-of-the-day/archive`
///
/// Returns published picks that have not been withdrawn, with their outcome, modeled return, unit score, closing-line value, and cumulative record. Resolved game details and results are public. For unauthorized unresolved selections, game identity, category, image, publication time, and backed facts are omitted; `required_tier` and `backed_side_locked` provide an upgrade action. Pro includes the designated free selection and the first four non-free selections in publication order, five in total. Max opens every available selection, up to twenty.
///
/// Stable `pick_id` values identify selections. Historical picks retain their original IDs, order, and proof bytes. `publication_order` describes presentation and `is_free_selection` records access designation; neither is a quality rating. New selections use a neutral presentation order, while standing selections retain their identity, slot, and release schedule.
///
/// Each row carries measured CLV or the reason it was not measured. Coverage is the share of resolved picks published before kickoff that have measured CLV. A post-kickoff publication is `not_applicable`.
///
/// Withdrawn recommendations are excluded from archive rows, daily counts, and all track-record statistics, including CLV, financial aggregates, and the cumulative series. Later market settlement does not restore them to the archive. The public ledger retains every published commitment under its original pick_id and proof bytes. Request and response fields are unchanged.
pub async fn get_pick_of_the_day_archive(
&self,
params: &GetPickOfTheDayArchiveParams,
) -> Result<GetPickOfTheDayArchiveResponse> {
let path = String::from("/api/v1/pick-of-the-day/archive");
let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_ARCHIVE, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get the Pick of the Day commitment ledger
///
/// `GET /api/v1/pick-of-the-day/ledger`
///
/// Returns the pre-game commitment for every published pick, so the public track record can be checked by someone who was not watching when the pick dropped.
///
/// One entry per (pick_date, pick_rank), ascending by pick_date then pick_rank, in one of three states. `sealed` is an unresolved pick: the hash, the algorithm, the seal instant, and nothing that states a side or a price. `opened` is a settled pick: the nonce and the exact canonical payload the hash was taken over. `uncommitted` is a pick with no commitment -- published before the scheme existed, or one that reached kickoff unsealed -- named rather than omitted.
///
/// To verify an opened entry: serialize nothing. Take the bytes of the `payload` object exactly as received, append the `commitment_nonce` decoded from hex, and sha256 the result; it equals `commitment_hash`. The payload is canonical JSON -- keys sorted by UTF-8 byte value, no insignificant whitespace, decimals as strings at full stored precision, timestamps whole-second UTC with a literal Z -- and it is served byte for byte as it was hashed.
///
/// This is a proof contract, not the archive's display contract: nothing here is formatted for rendering, so an entry changes only when the pick does. Unresolved ledger entries omit game identity and kickoff; sealed_at remains public commitment provenance. A commitment is never written after kickoff and never rewritten by an outcome correction; `resolved_at` moving under an unchanged `commitment_hash` is a corrected market re-mapping an already-settled pick.
///
/// Withdrawal from current recommendations or the product archive does not remove a published ledger entry. The ledger retains every published commitment under its original identity and proof bytes; canonical market settlement still determines the recorded result.
pub async fn get_pick_of_the_day_ledger(
&self,
params: &GetPickOfTheDayLedgerParams,
) -> Result<GetPickOfTheDayLedgerResponse> {
let path = String::from("/api/v1/pick-of-the-day/ledger");
let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_LEDGER, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List trending wallets
///
/// `GET /api/v1/leaderboard/trending`
///
/// Returns wallets ranked by Polymarket weekly/monthly P&L (Polymarket-only discovery), with opaque page-cursor pagination. trending_pnl_usd and the by-PNL row order come from Polymarket's canonical leaderboard (data-api.polymarket.com/v2/leaderboard?time_period=week|month&sort_by=PNL), not a locally summed realized-leaf total. Each row also carries window volume, distinct markets, grade, hot-streak tier, and a shape-only daily P&L sparkline derived from the Polymarket user-pnl cumulative curve (per-day deltas; not guaranteed to sum to trending_pnl_usd). The response comes from a retained Redis board: meta.cached is true, and meta.cache_age_s reports the original board age when known (omitted when unknown). A backend read of a board at least 120 seconds old attempts a detached refresh; after a quiet spell a product board may be up to a day old. HTTP freshness ends at 120 seconds; max-age plus stale-while-revalidate cannot exceed the remaining original retention. Unknown age grants no cache window. A true cold read returns 503 (warming, retry-after), never a fabricated ranking. Polymarket-only: the read model filters platform = 'polymarket'. Cursors are bound to the effective limit, window and ranked-board generation; a changed board or request scope returns 400 with error.reason=cursor_expired, and legacy page-only cursors must restart from page one.
pub async fn list_trending_wallets(
&self,
params: &ListTrendingWalletsParams,
) -> Result<ListTrendingWalletsResponse> {
let path = String::from("/api/v1/leaderboard/trending");
let mut call = Call::new(&Operation::LIST_TRENDING_WALLETS, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.window {
call.query("window", value.as_str().to_owned());
}
self.send_json(call).await
}
/// Search markets
///
/// `GET /api/v1/markets/search`
///
/// Search prediction markets by keyword. Returns representative market matches with status, category, and platform metadata. Cursor pagination advances over grouped market results rather than raw sub-market rows. Returns sports and esports markets only (#27411).
pub async fn search_markets(&self, q: &str, params: &SearchMarketsParams) -> Result<SearchMarketsResponse> {
let path = String::from("/api/v1/markets/search");
let mut call = Call::new(&Operation::SEARCH_MARKETS, path);
call.query("q", q.to_string());
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.status {
call.query("status", value.as_str().to_owned());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
self.send_json(call).await
}
/// Search editorial content
///
/// `GET /api/v1/content/search`
///
/// Search 0xinsider editorial content by keyword. Returns backend-owned learn, glossary, comparison, research, and trading-strategy items with canonical URLs. Opaque ranking scores are not exposed.
pub async fn search_content(&self, q: &str, params: &SearchContentParams) -> Result<SearchContentResponse> {
let path = String::from("/api/v1/content/search");
let mut call = Call::new(&Operation::SEARCH_CONTENT, path);
call.query("q", q.to_string());
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Explore markets
///
/// `GET /api/v1/markets/explore`
///
/// Browse whale-active titled markets with category, platform, status, and keyword filters. Explore is Polymarket-only: the platform parameter is accepted for backward-compatibility but every request returns Polymarket markets. Paginates visible discovery entries rather than raw market rows, returns live category/platform facets alongside grouped event clusters or standalone markets, and includes total on the first page only. Each grouped event contains at most 12 markets, retaining the selected representative within that cap. Categories come straight from provider metadata (Polymarket Gamma) and facets are flat value/label/count rows. Returns sports and esports markets only (#27411).
pub async fn explore_markets(&self, params: &ExploreMarketsParams) -> Result<ExploreMarketsResponse> {
let path = String::from("/api/v1/markets/explore");
let mut call = Call::new(&Operation::EXPLORE_MARKETS, path);
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.status {
call.query("status", value.as_str().to_owned());
}
if let Some(value) = ¶ms.platform {
call.query("platform", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.q {
call.query("q", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List ranked sharp-money flows (deprecated alias)
///
/// `GET /api/v1/markets/smart-money-flows`
///
/// Ranks sports and esports markets (#27306) by absolute net S/A/B-grade whale flow over a requested timeframe. Use this discovery endpoint to answer where sharp money is flowing before drilling into a specific market with /api/v1/market/{condition_id}/flow. Pagination is anchored by an opaque cursor carrying the first-page as_of timestamp, normalized effective filters, ranking revision and aggregate collection revision; a changed filter or collection returns `cursor_expired` so callers request the first page again. Deprecated alias of GET /api/v1/markets/sharp-money-flows, kept live and never removed; every response carries `Deprecation: @1783276950` (RFC 9745, 2026-07-05T18:42:30Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
pub async fn list_smart_money_flows(
&self,
params: &ListSmartMoneyFlowsParams,
) -> Result<ListSmartMoneyFlowsResponse> {
let path = String::from("/api/v1/markets/smart-money-flows");
let mut call = Call::new(&Operation::LIST_SMART_MONEY_FLOWS, path);
if let Some(value) = ¶ms.timeframe {
call.query("timeframe", value.as_str().to_owned());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.platform {
call.query("platform", value.as_str().to_owned());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.direction {
call.query("direction", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List ranked sharp-money flows
///
/// `GET /api/v1/markets/sharp-money-flows`
///
/// Canonical path for ranked sharp-money flows; /api/v1/markets/smart-money-flows remains live as a deprecated byte-identical alias of it. Ranks sports and esports markets (#27306) by absolute net S/A/B-grade whale flow over a requested timeframe. Use this discovery endpoint to answer where sharp money is flowing before drilling into a specific market with /api/v1/market/{condition_id}/flow. Pagination is anchored by an opaque cursor carrying the first-page as_of timestamp, normalized effective filters, ranking revision and aggregate collection revision; a changed filter or collection returns `cursor_expired` so callers request the first page again.
pub async fn list_sharp_money_flows(
&self,
params: &ListSharpMoneyFlowsParams,
) -> Result<ListSharpMoneyFlowsResponse> {
let path = String::from("/api/v1/markets/sharp-money-flows");
let mut call = Call::new(&Operation::LIST_SHARP_MONEY_FLOWS, path);
if let Some(value) = ¶ms.timeframe {
call.query("timeframe", value.as_str().to_owned());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.platform {
call.query("platform", value.as_str().to_owned());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.direction {
call.query("direction", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Which reads the API serves for Polymarket
///
/// `GET /api/v1/coverage`
///
/// Unauthenticated discovery endpoint that declares which V1 data surfaces the API serves for Polymarket, the one venue it covers. Every capability reports supported. Coverage is sports and esports markets only (#27299): a market outside them answers 404 not_found with error.reason market_out_of_scope, and a category filter outside them answers 400 bad_request with param category on the reads that filter by it: large trades and their history, large positions, the leaderboard, market search and explore, and sharp-money flows. GET /api/v1/positions and GET /api/v1/trader/{address}/categories do not refuse a category value (#27581). Canonical since #16315; GET /api/v1/platforms is its deprecated alias with the same body.
pub async fn get_coverage(&self) -> Result<GetCoverageResponse> {
let path = String::from("/api/v1/coverage");
let call = Call::new(&Operation::GET_COVERAGE, path);
self.send_json(call).await
}
/// Get platform capability matrix
///
/// `GET /api/v1/platforms`
///
/// Deprecated since #16315: use GET /api/v1/coverage, which serves the same body. This path stays live and answers with Deprecation and successor Link headers. Unauthenticated discovery endpoint that declares which V1 data surfaces the API serves for Polymarket, the one venue it covers. Every capability reports supported. Coverage is sports and esports markets only (#27299): a market outside them answers 404 not_found with error.reason market_out_of_scope, and a category filter outside them answers 400 bad_request with param category on the reads that filter by it: large trades and their history, large positions, the leaderboard, market search and explore, and sharp-money flows. GET /api/v1/positions and GET /api/v1/trader/{address}/categories do not refuse a category value (#27581).
pub async fn get_platforms(&self) -> Result<GetPlatformsResponse> {
let path = String::from("/api/v1/platforms");
let call = Call::new(&Operation::GET_PLATFORMS, path);
self.send_json(call).await
}
/// List a market's graded holders
///
/// `GET /api/v1/market/{condition_id}/holders`
///
/// The graded holder roster of one market, the list a Pick of the Day shows for its market, for any Polymarket market: every S/A/B wallet with open shares on either outcome, from a complete provider holder scan, each with its shares, Polymarket's own currentValue for the leg, its grade, its win record in the market's category, and its badges. Both outcomes are listed; a wallet holding both is listed once on its net side. Ordered by current_value_usd DESC, then shares DESC, then address. The roster is computed at most once a minute per market and shared by every caller; a page is cut from that roster, so paging is cheap and `total` is exact. An answer whose scan saw no wallet at all (`scan.wallet_count` 0), on an open market before its end date, is kept for up to an hour while no trade in that market is seen after the scan; `meta.cache_age_s` gives its age. The route never widens past the graded cohort: `scan.wallet_count` reports every wallet the walk saw, graded or not. An incomplete, unstable or failed scan is a 503 with Retry-After, never a shorter list. A complete scan in which no S, A or B wallet holds either outcome is a 200 with an empty holders list and zero totals; retrying cannot change it. The cohort is S, A and B by the wallet's current grade (`traders.latest_grade`); a C, D, F or ungraded wallet is never listed here and appears only inside `scan.wallet_count`. A count here will not match GET /api/v1/positions for the same market, and the cohort is only one of three reasons: /positions reads the `wallet_positions` mirror rather than this live provider scan, and without a `wallet` its `min_size` defaults to 100 USD, so it drops the smaller legs this route keeps. Read a difference as all three, never as a grade count. This is current state and takes no as-of parameter: the roster is at most 60 s old over a provider walk at most 180 s old (an answer with no wallet at all, at most an hour), and `scan.fetched_at` is the only timestamp on it. For a point-in-time roster, snapshot this route yourself on your own schedule; the one frozen roster the API serves is `display_holders` on GET /api/v1/pick-of-the-day, for that pick's market and backed side at publication.
pub async fn get_market_holders(
&self,
condition_id: &str,
params: &GetMarketHoldersParams,
) -> Result<GetMarketHoldersResponse> {
let path = format!(
"/api/v1/market/{condition_id}/holders",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_MARKET_HOLDERS, path);
if let Some(value) = ¶ms.outcome {
call.query("outcome", value.as_str().to_owned());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get a market's flow and top positions
///
/// `GET /api/v1/market/{condition_id}/flow`
///
/// Canonical since #16312; GET /api/v1/market/{condition_id}/intel is its deprecated alias and serves the same body under object market_intel. One market's flow and top positions: the signed flow of every tracked large trade in the window (net_flow_usd and its YES or NO direction), the large-trade count, gross buy and sell volumes, and the top five graded trader positions.
pub async fn get_market_flow(
&self,
condition_id: &str,
params: &GetMarketFlowParams,
) -> Result<GetMarketFlowResponse> {
let path = format!(
"/api/v1/market/{condition_id}/flow",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_MARKET_FLOW, path);
if let Some(value) = ¶ms.timeframe {
call.query("timeframe", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get market intelligence
///
/// `GET /api/v1/market/{condition_id}/intel`
///
/// Deprecated since #16312: use GET /api/v1/market/{condition_id}/flow, which serves the same body under object market_flow. This path stays live, keeps object market_intel, and answers with Deprecation and successor Link headers. One market's flow and top positions: the signed flow of every tracked large trade in the window (net_flow_usd and its YES or NO direction), the large-trade count, gross buy and sell volumes, and the top five graded trader positions.
pub async fn get_market_intel(
&self,
condition_id: &str,
params: &GetMarketIntelParams,
) -> Result<GetMarketIntelResponse> {
let path = format!(
"/api/v1/market/{condition_id}/intel",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_MARKET_INTEL, path);
if let Some(value) = ¶ms.timeframe {
call.query("timeframe", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Batch market flow
///
/// `POST /api/v1/markets/flow/batch`
///
/// Returns each market's flow and top positions for 1-25 raw provider condition_id values. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. Do not pass prefixed mkt_ IDs; use market.condition_id from search or explore. A market outside sports and esports is that item's own error, 404 not_found with error.reason market_out_of_scope (stop asking for it); the rest of the batch is served.
pub async fn batch_get_market_flow(&self, body: &BatchGetMarketFlowBody) -> Result<BatchGetMarketFlowResponse> {
let path = String::from("/api/v1/markets/flow/batch");
let mut call = Call::new(&Operation::BATCH_GET_MARKET_FLOW, path);
call.json(body)?;
self.send_json(call).await
}
/// Batch market intelligence
///
/// `POST /api/v1/markets/intel/batch`
///
/// Deprecated since #16312: use POST /api/v1/markets/flow/batch, which returns the same items under object market_flow_batch. This path stays live, keeps object market_intel_batch, and answers with Deprecation and successor Link headers. Returns each market's flow and top positions for 1-25 raw provider condition_id values. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. Do not pass prefixed mkt_ IDs; use market.condition_id from search or explore. A market outside sports and esports is that item's own error, 404 not_found with error.reason market_out_of_scope (stop asking for it); the rest of the batch is served.
pub async fn batch_get_market_intel(&self, body: &BatchGetMarketIntelBody) -> Result<BatchGetMarketIntelResponse> {
let path = String::from("/api/v1/markets/intel/batch");
let mut call = Call::new(&Operation::BATCH_GET_MARKET_INTEL, path);
call.json(body)?;
self.send_json(call).await
}
/// Get market live snapshot
///
/// `GET /api/v1/market/{condition_id}/snapshot`
///
/// Provider-first market card snapshot with canonical identity, outcome labels, cached top-of-book when available, liquidity, live sports context, and explicit freshness/unavailable states.
pub async fn get_market_snapshot(
&self,
condition_id: &str,
params: &GetMarketSnapshotParams,
) -> Result<GetMarketSnapshotResponse> {
let path = format!(
"/api/v1/market/{condition_id}/snapshot",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_MARKET_SNAPSHOT, path);
for value in ¶ms.expand {
call.query("expand", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get market OHLC price candles
///
/// `GET /api/v1/market/{condition_id}/candles`
///
/// Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from our stored copy of the Polymarket CLOB prices-history series (the same series the market-detail chart renders; covers open and resolved markets). Because the stored data is daily, a 1d bucket typically carries one point so its open/high/low/close all equal that day's close; 1w aggregates real OHLC across the observed daily closes. No intraday fidelity is fabricated. Query field names and recognized values are URL-decoded; duplicate recognized fields use the last value and unknown fields are ignored. When both bounds are present, from must be less than or equal to to; malformed or inverted bounds answer 400.
pub async fn get_market_candles(
&self,
condition_id: &str,
params: &GetMarketCandlesParams,
) -> Result<GetMarketCandlesResponse> {
let path = format!(
"/api/v1/market/{condition_id}/candles",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_MARKET_CANDLES, path);
if let Some(value) = ¶ms.resolution {
call.query("resolution", value.as_str().to_owned());
}
if let Some(value) = ¶ms.from {
call.query("from", value.to_string());
}
if let Some(value) = ¶ms.to {
call.query("to", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get suspicious trades
///
/// `GET /api/v1/suspicious-trades`
///
/// Stored trades whose recorded suspicion score meets the live flag threshold. Evidence contains the scorer's stored signals. Cursor-paginated by suspicion score. mode=live (default) uses fresh cached pages; mode=stable pins pagination to one published scoring generation and returns cursor_expired when scores or filters change. Sports and esports markets only (#27305): a flag on a market outside product scope is not listed, and the detail route answers it 404 not_found with error.reason=market_out_of_scope. Canonical since 2026-09-23; GET /api/v1/insider-radar is its deprecated alias.
pub async fn list_suspicious_trades(
&self,
params: &ListSuspiciousTradesParams,
) -> Result<ListSuspiciousTradesResponse> {
let path = String::from("/api/v1/suspicious-trades");
let mut call = Call::new(&Operation::LIST_SUSPICIOUS_TRADES, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_suspicion {
call.query("min_suspicion", value.to_string());
}
if let Some(value) = ¶ms.severity {
call.query("severity", value.as_str().to_owned());
}
if let Some(value) = ¶ms.mode {
call.query("mode", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get suspicious trade by ID
///
/// `GET /api/v1/suspicious-trades/{id}`
///
/// Returns one suspicious trade by raw whale_alerts.id or the rf_-prefixed id emitted by list responses. A flag on a market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305); stop requesting it. Canonical since 2026-09-23; GET /api/v1/insider-radar/{id} is its deprecated alias and keeps answering object: radar_flag.
pub async fn get_suspicious_trade(
&self,
id: &str,
params: &GetSuspiciousTradeParams,
) -> Result<GetSuspiciousTradeResponse> {
let path = format!("/api/v1/suspicious-trades/{id}", id = encode_path_segment(id));
let mut call = Call::new(&Operation::GET_SUSPICIOUS_TRADE, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// List covered games
///
/// `GET /api/v1/games`
///
/// One coherent game view per row: both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and every linked Polymarket market with its condition id and outcome token ids. Built from the same provider-first live and upcoming projections the site's sports boards use, so a request pays no provider fan-out of its own. Ordered by kickoff, then by event_slug; games whose kickoff the provider has not published sort last. coverage names the sports and leagues this deployment serves and any scope whose source was unavailable for the read, so an empty page is never ambiguous. A sport or status outside the published vocabulary returns an empty page rather than a 400. Carries the board's existing competitor-bound provider moneyline price state by default, with an observation clock and explicit incomplete or invalid state. It does not fetch another provider endpoint. Soccer 1X2 moneylines retain independent YES legs classified as home, draw and away; draw_offered is true when a classified draw leg is included. Sharp-money splits and holder identities remain on their own gated routes.
pub async fn list_games(&self, params: &ListGamesParams) -> Result<ListGamesResponse> {
let path = String::from("/api/v1/games");
let mut call = Call::new(&Operation::LIST_GAMES, path);
if let Some(value) = ¶ms.sport {
call.query("sport", value.to_string());
}
if let Some(value) = ¶ms.league {
call.query("league", value.to_string());
}
if let Some(value) = ¶ms.status {
call.query("status", value.as_str().to_owned());
}
if let Some(value) = ¶ms.starts_after {
call.query("starts_after", value.to_string());
}
if let Some(value) = ¶ms.starts_before {
call.query("starts_before", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get one game
///
/// `GET /api/v1/games/{event_slug}`
///
/// The same game object GET /api/v1/games returns, for one event_slug, including soccer 1X2 home, draw and away market sides and draw_offered. The slug is the identity the live_sports_updated webhook pulse carries, so a receiver can read the full game straight from a pulse. A slug outside the published coverage returns 404, including a real Polymarket event in a sport this deployment does not serve; GET /api/v1/games names what is covered.
pub async fn get_game(&self, event_slug: &str, params: &GetGameParams) -> Result<GetGameResponse> {
let path = format!(
"/api/v1/games/{event_slug}",
event_slug = encode_path_segment(event_slug)
);
let mut call = Call::new(&Operation::GET_GAME, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get insider radar flags
///
/// `GET /api/v1/insider-radar`
///
/// Deprecated alias of GET /api/v1/suspicious-trades (2026-09-23), kept live with no retirement date; responses carry Deprecation and a Link rel="successor-version" to it. Stored trades whose recorded suspicion score meets the live flag threshold. Evidence contains the scorer's stored signals. Cursor-paginated by suspicion score. mode=live (default) uses fresh cached pages; mode=stable pins pagination to one published scoring generation and returns cursor_expired when scores or filters change. Sports and esports markets only (#27305): a flag on a market outside product scope is not listed, and the detail route answers it 404 not_found with error.reason=market_out_of_scope.
pub async fn list_insider_radar(&self, params: &ListInsiderRadarParams) -> Result<ListInsiderRadarResponse> {
let path = String::from("/api/v1/insider-radar");
let mut call = Call::new(&Operation::LIST_INSIDER_RADAR, path);
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.min_suspicion {
call.query("min_suspicion", value.to_string());
}
if let Some(value) = ¶ms.severity {
call.query("severity", value.as_str().to_owned());
}
if let Some(value) = ¶ms.mode {
call.query("mode", value.as_str().to_owned());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get insider radar flag by ID
///
/// `GET /api/v1/insider-radar/{id}`
///
/// Deprecated alias of GET /api/v1/suspicious-trades/{id} (2026-09-23), kept live with no retirement date; responses carry Deprecation and a Link rel="successor-version" to it. The envelope keeps object: radar_flag, so an integration that branches on it keeps working here. Returns one suspicious-trading radar flag by raw whale_alerts.id or the rf_-prefixed id emitted by list responses. A flag on a market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305); stop requesting it.
pub async fn get_insider_radar_flag(
&self,
id: &str,
params: &GetInsiderRadarFlagParams,
) -> Result<GetInsiderRadarFlagResponse> {
let path = format!("/api/v1/insider-radar/{id}", id = encode_path_segment(id));
let mut call = Call::new(&Operation::GET_INSIDER_RADAR_FLAG, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Replay public large-trade events
///
/// `GET /api/v1/events/feed/since`
///
/// Returns durable public large-trade events strictly after an opaque cursor, in commit order: events are ordered by the position at which their write became visible to every reader (whale_alerts.inserted_xid), then by whale_alerts.id, and a page never reaches past the oldest write transaction still open when it was read. A trade whose id is lower than one already delivered but whose write finished later is therefore delivered on a later request instead of being skipped (#16180). This is a separate API-key contract from the browser/session /api/events/feed stream: browser-only and private alert, following, radar, and position patch events are excluded until they have a durable public outbox. Carries large trades on sports and esports markets only (#27430).
pub async fn get_event_replay_since(
&self,
params: &GetEventReplaySinceParams,
) -> Result<GetEventReplaySinceResponse> {
let path = String::from("/api/v1/events/feed/since");
let mut call = Call::new(&Operation::GET_EVENT_REPLAY_SINCE, path);
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.trader {
call.query("trader", value.to_string());
}
if let Some(value) = ¶ms.condition_id {
call.query("condition_id", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.min_size {
call.query("min_size", value.to_string());
}
for value in ¶ms.expand {
call.query("expand", value.to_string());
}
self.send_json(call).await
}
/// List builder webhook destinations
///
/// `GET /api/v1/webhooks`
///
/// Returns webhook destinations owned by the authenticated API key user. Deleted endpoints are omitted; an endpoint paused with PATCH or disabled after consecutive failures is listed with status disabled. Subscribable event_types and their payload shapes are described by GET /api/v1/webhooks/events. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are delivered only to the API-key account that created the export and contain no download URL; use the authorized export status and download routes. Four subscribable event types are Pro-only and only deliver to API keys on an active Pro subscription. whale_trades_inserted is one of them, gated by the same SubscriberScope::InsiderOnly mechanism as the other three (each type carries its own LiveEventContract entry; they share the scope value). The other three: wallet_grade_changed (data: wallet, trader_id, old_grade, new_grade, direction (upgrade|downgrade), skill_index, final_score, date) fires on a Pass-2 grade transition; insider_radar_flag_raised (data: trade_id, wallet, trader_id, condition_id, suspicion_score, track, side (yes|no), size, price) fires the first time a trade's suspicion score crosses the radar flag threshold; sharp_money_flow_detected (data: condition_id, net_flow_usd, abs_net_flow_usd, dominant_side (yes|no), grade_floor (S|A|B|C|D|F), whale_trade_count, window) fires when a scheduled scanner detects ranked-trader net flow crossing a threshold (up or down) on a market, and smart_money_flow_detected is its deprecated spelling of the same event. live_sports_updated (data: event_slug, game_id, league, version, changed, observed_at, published_at, status, period, clock, live, ended, scores, series_format, snapshot_url) is ungated and fires as a bounded per-game pulse when a live game's scores, status, period or live/ended state moves: at most one delivery per game per 20 seconds, with a live or ended transition exempt from that interval, and the game clock alone never firing one. version is a durable per-game ordinal, changed lists the material fields that moved since that game's previous delivered pulse, and snapshot_url is where to re-read the whole game after a gap.
pub async fn list_webhooks(&self) -> Result<ListWebhooksResponse> {
let path = String::from("/api/v1/webhooks");
let call = Call::new(&Operation::LIST_WEBHOOKS, path);
self.send_json(call).await
}
/// Create a builder webhook destination
///
/// `POST /api/v1/webhooks`
///
/// Creates a pending HTTPS webhook destination. The response includes one-time signing_secret and verification.token values. Deliveries are not sent until the endpoint is verified, and verification requires the destination to answer 2xx to a signed webhook.verification challenge (see POST /api/v1/webhooks/{id}/verify). The subscribable event_types and their data payload shapes are described by GET /api/v1/webhooks/events; the per-endpoint delivery log is GET /api/v1/webhooks/{id}/deliveries. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are delivered only to the API-key account that created the export and contain no download URL; use the authorized export status and download routes. Four subscribable event types are Pro-only and only deliver to API keys on an active Pro subscription. whale_trades_inserted is one of them, gated by the same SubscriberScope::InsiderOnly mechanism as the other three (each type carries its own LiveEventContract entry; they share the scope value). The other three: wallet_grade_changed (data: wallet, trader_id, old_grade, new_grade, direction (upgrade|downgrade), skill_index, final_score, date) fires on a Pass-2 grade transition; insider_radar_flag_raised (data: trade_id, wallet, trader_id, condition_id, suspicion_score, track, side (yes|no), size, price) fires the first time a trade's suspicion score crosses the radar flag threshold; sharp_money_flow_detected (data: condition_id, net_flow_usd, abs_net_flow_usd, dominant_side (yes|no), grade_floor (S|A|B|C|D|F), whale_trade_count, window) fires when a scheduled scanner detects ranked-trader net flow crossing a threshold (up or down) on a market, and smart_money_flow_detected is its deprecated spelling of the same event. live_sports_updated (data: event_slug, game_id, league, version, changed, observed_at, published_at, status, period, clock, live, ended, scores, series_format, snapshot_url) is ungated and fires as a bounded per-game pulse when a live game's scores, status, period or live/ended state moves: at most one delivery per game per 20 seconds, with a live or ended transition exempt from that interval, and the game clock alone never firing one. version is a durable per-game ordinal, changed lists the material fields that moved since that game's previous delivered pulse, and snapshot_url is where to re-read the whole game after a gap. Delivery signing: each delivery request carries one or more HMAC-SHA256 signatures in the x-0xinsider-signature header as comma-separated v1=<hex> candidates. During staged rotation, the current and previous signing secrets are both signed for one hour; while 0xinsider rotates the key every signing secret is derived from, each also signs under the previous key, so the secret you hold keeps verifying. Up to four candidates; accept any valid candidate. Each candidate is HMAC-SHA256(signing_secret, "<timestamp>.<raw_request_body>"). The signed <timestamp> is sent separately as x-0xinsider-timestamp (unix seconds). To verify a delivery: read x-0xinsider-timestamp, reject it if it differs from the current time by more than 300 seconds, recompute each candidate over "<timestamp>.<raw_body>" with the active secrets, and compare using a constant-time comparison. Each delivery also carries x-0xinsider-event-id, x-0xinsider-event-type, x-0xinsider-delivery-id, and x-0xinsider-delivery-attempt headers. Retries and disabling: ordinary transient delivery failures use stable jitter between half and the existing 60, 120, 240, 480, 960, 1920 and 3600-second upper bounds (retry_policy.retry_horizon_seconds = 7380); on 408, 429, or 5xx, a valid Retry-After delta-seconds or HTTP-date replaces that one wait and is clamped to 60–3600 seconds, while missing, malformed, past, or non-retryable-response hints use the ordinary schedule. The delivery still has eight attempts (retry_policy.max_attempts), and an eighth failure becomes dead_letter. The delivery log exposes retry_schedule_reason and next_attempt_at so a receiver can see the active schedule. Separately, an endpoint is disabled after 8 consecutive failed attempts across all of its deliveries (retry_policy.disable_after_consecutive_failures); any successful attempt resets that count, so a busy endpoint that goes down can be disabled in minutes, well before any single delivery exhausts its retries. Disabling dead-letters every delivery still queued for the endpoint and emails the account owner, within about an hour, with each disabled endpoint and its last failed response. Re-enable it with PATCH /api/v1/webhooks/{id} {"enabled": true}; re-enabling does not resend dead-lettered deliveries. Resend each one with POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver, or catch up with GET /api/v1/events/feed/since from the last event you processed. GET /api/v1/webhooks/{id}/deliveries shows next_attempt_at and retry_schedule_reason for a delivery still waiting to retry.
pub async fn create_webhook(
&self,
body: &CreateWebhookRequest,
params: &CreateWebhookParams,
) -> Result<CreateWebhookResponse> {
let path = String::from("/api/v1/webhooks");
let mut call = Call::new(&Operation::CREATE_WEBHOOK, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
call.json(body)?;
self.send_json(call).await
}
/// List webhook event catalog
///
/// `GET /api/v1/webhooks/events`
///
/// Self-describing catalog of every webhook event type: its description, data payload shape, and whether it is active (has a firing producer) or dormant (subscribable but not yet delivered; no event type is dormant today). The catalog is identical for every authenticated key and exposes no owner-scoped data. Pro-only event types (large_trades_inserted, whale_trades_inserted, wallet_grade_changed, suspicious_trade_flagged, insider_radar_flag_raised, sharp_money_flow_detected, smart_money_flow_detected) appear in the catalog but only deliver to API keys on an active Pro subscription. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are owner-scoped to the API-key account that created the export and contain no download URL; use the authorized export status and download routes.
pub async fn list_webhook_events(&self) -> Result<ListWebhookEventsResponse> {
let path = String::from("/api/v1/webhooks/events");
let call = Call::new(&Operation::LIST_WEBHOOK_EVENTS, path);
self.send_json(call).await
}
/// List webhook delivery log
///
/// `GET /api/v1/webhooks/{id}/deliveries`
///
/// Recent delivery attempts for one webhook destination owned by the authenticated API key user, newest first, with opaque cursor pagination. Returns 404 (identical to an unknown id) when the endpoint is not owned by the caller, so a non-owner cannot tell an owned-but-empty log apart from someone else's endpoint. Delivery rows omit the request body and signing secret. next_attempt_at is when a pending or retry delivery is next attempted; retry_schedule_reason says whether the queue is following receiver_retry_after, transient_failure, permanent_or_auth_failure, manual_redelivery, or configuration_changed; both are null while an attempt is in flight and once the delivery is delivered or dead_letter. A delivery keeps the existing eight-attempt budget, endpoint failure budget, fairness limits, and ordinary 7380-second upper-bound schedule; see POST /api/v1/webhooks for the bounded Retry-After policy. Resend a dead_letter delivery with POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver.
pub async fn list_webhook_deliveries(
&self,
id: i64,
params: &ListWebhookDeliveriesParams,
) -> Result<ListWebhookDeliveriesResponse> {
let path = format!("/api/v1/webhooks/{id}/deliveries", id = id);
let mut call = Call::new(&Operation::LIST_WEBHOOK_DELIVERIES, path);
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
self.send_json(call).await
}
/// Redeliver a dead-lettered webhook delivery
///
/// `POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`
///
/// Returns one dead_letter delivery to the delivery queue with a fresh attempt budget: status becomes pending, attempt_count resets to 0, and next_attempt_at is now, so the delivery worker claims it like any queued delivery, under the same per-owner and per-origin concurrency limits. Use it after a failed delivery exhausts its retries, or after re-enabling an endpoint whose queued deliveries were dead-lettered when it was disabled: PATCH /api/v1/webhooks/{id} {"enabled": true} resends nothing by itself. The resend is signed with the endpoint's current signing secret and sent to its current URL, and keeps the delivery's event_id and idempotency-key header, so a receiver that already processed the event can deduplicate it; x-0xinsider-delivery-attempt starts again at 1. last_response_status and last_error keep the previous failure until the next attempt records its own. Returns 409 when the delivery is already delivered or still queued (pending, retry, or processing), or when the endpoint would not receive it (disabled, not verified, or no longer subscribed to the delivery's event_type); error.message names the step that lets the same request succeed. Returns 404 for an endpoint or delivery the caller does not own, including a delivery removed by the seven-day retention of delivered and dead_letter history.
pub async fn redeliver_webhook_delivery(
&self,
id: i64,
delivery_id: i64,
params: &RedeliverWebhookDeliveryParams,
) -> Result<RedeliverWebhookDeliveryResponse> {
let path = format!(
"/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver",
id = id,
delivery_id = delivery_id
);
let mut call = Call::new(&Operation::REDELIVER_WEBHOOK_DELIVERY, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Get one builder webhook destination
///
/// `GET /api/v1/webhooks/{id}`
///
/// Returns one webhook destination owned by the authenticated API key user.
pub async fn get_webhook(&self, id: i64) -> Result<GetWebhookResponse> {
let path = format!("/api/v1/webhooks/{id}", id = id);
let call = Call::new(&Operation::GET_WEBHOOK, path);
self.send_json(call).await
}
/// Update a builder webhook destination
///
/// `PATCH /api/v1/webhooks/{id}`
///
/// Updates name, HTTPS URL, event types, or enabled state. URL changes force pending_verification and return a new verification token; the new destination must answer 2xx to the signed webhook.verification challenge before deliveries resume. A URL change returns 409 with error.reason=webhook_delivery_in_progress while this destination has an active delivery; retry the same mutation after that request completes.
pub async fn update_webhook(
&self,
id: i64,
body: &UpdateWebhookRequest,
params: &UpdateWebhookParams,
) -> Result<UpdateWebhookResponse> {
let path = format!("/api/v1/webhooks/{id}", id = id);
let mut call = Call::new(&Operation::UPDATE_WEBHOOK, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
call.json(body)?;
self.send_json(call).await
}
/// Disable a builder webhook destination
///
/// `DELETE /api/v1/webhooks/{id}`
///
/// Soft-deletes a webhook destination owned by the authenticated API key user. Existing delivery audit rows remain retained.
pub async fn delete_webhook(&self, id: i64, params: &DeleteWebhookParams) -> Result<DeleteWebhookResponse> {
let path = format!("/api/v1/webhooks/{id}", id = id);
let mut call = Call::new(&Operation::DELETE_WEBHOOK, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Verify a builder webhook destination
///
/// `POST /api/v1/webhooks/{id}/verify`
///
/// Activates a pending webhook destination. Two conditions must both hold: the one-time verification token matches and has not expired, AND the destination answers 2xx to a signed challenge this operation POSTs to the endpoint's stored url. The challenge body is {"type":"webhook.verification","token":"<verification_token>","webhook_id":<id>}. It carries x-0xinsider-event-type: webhook.verification plus the same x-0xinsider-timestamp and x-0xinsider-signature headers a delivery carries, signed with that endpoint's signing_secret, so verify it exactly as you verify a delivery. Answer any 2xx within 10 seconds; the challenge response body is never read, and the challenge follows no redirects. A status outside 2xx, no answer within 10 seconds, or a url that does not resolve to a publicly routable address leaves status at pending_verification and returns 422. The token alone never activates an endpoint.
pub async fn verify_webhook(&self, id: i64, body: &VerifyWebhookRequest) -> Result<VerifyWebhookResponse> {
let path = format!("/api/v1/webhooks/{id}/verify", id = id);
let mut call = Call::new(&Operation::VERIFY_WEBHOOK, path);
call.json(body)?;
self.send_json(call).await
}
/// Prepare a staged builder webhook signing secret
///
/// `POST /api/v1/webhooks/{id}/rotate-secret/prepare`
///
/// Creates a pending signing secret while the current secret remains active. Deploy the returned one-time signing_secret to the receiver before calling activate. The response exposes secret_rotation.status=pending; an existing pending secret is returned again so a lost response can be recovered safely.
pub async fn prepare_webhook_secret(
&self,
id: i64,
params: &PrepareWebhookSecretParams,
) -> Result<PrepareWebhookSecretResponse> {
let path = format!("/api/v1/webhooks/{id}/rotate-secret/prepare", id = id);
let mut call = Call::new(&Operation::PREPARE_WEBHOOK_SECRET, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Activate a staged builder webhook signing secret
///
/// `POST /api/v1/webhooks/{id}/rotate-secret/activate`
///
/// Promotes the prepared signing secret to current, returns it once, and signs every delivery with both the new and previous secrets for one hour. Call retire after the receiver has completed its rollout. The current secret remains available through the existing immediate rotate-secret route for emergency replacement.
pub async fn activate_webhook_secret(
&self,
id: i64,
params: &ActivateWebhookSecretParams,
) -> Result<ActivateWebhookSecretResponse> {
let path = format!("/api/v1/webhooks/{id}/rotate-secret/activate", id = id);
let mut call = Call::new(&Operation::ACTIVATE_WEBHOOK_SECRET, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Retire the previous builder webhook signing secret
///
/// `POST /api/v1/webhooks/{id}/rotate-secret/retire`
///
/// Ends the one-hour dual-signature overlap and removes the previous signing secret from future delivery authorization. Call this after the receiver accepts the activated secret. The operation is idempotent and does not return signing_secret.
pub async fn retire_webhook_secret(
&self,
id: i64,
params: &RetireWebhookSecretParams,
) -> Result<RetireWebhookSecretResponse> {
let path = format!("/api/v1/webhooks/{id}/rotate-secret/retire", id = id);
let mut call = Call::new(&Operation::RETIRE_WEBHOOK_SECRET, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Rotate a builder webhook signing secret
///
/// `POST /api/v1/webhooks/{id}/rotate-secret`
///
/// Rotates the endpoint signing secret and returns the new signing_secret once in the response. Returns 409 with error.reason=webhook_delivery_in_progress while a live delivery freezes the current signing nonce; retry after it completes.
pub async fn rotate_webhook_secret(
&self,
id: i64,
params: &RotateWebhookSecretParams,
) -> Result<RotateWebhookSecretResponse> {
let path = format!("/api/v1/webhooks/{id}/rotate-secret", id = id);
let mut call = Call::new(&Operation::ROTATE_WEBHOOK_SECRET, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
self.send_json(call).await
}
/// Health check
///
/// `GET /api/v1/health`
///
/// Returns API health status. No authentication required. Limited to 120 requests per minute per IP.
pub async fn get_health(&self, params: &GetHealthParams) -> Result<GetHealthResponse> {
let path = String::from("/api/v1/health");
let mut call = Call::new(&Operation::GET_HEALTH, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Remote MCP endpoint (JSON-RPC)
///
/// `POST /api/v1/mcp`
///
/// Model Context Protocol (MCP) Streamable HTTP transport. Accepts one JSON-RPC 2.0 request or notification. ID-bearing initialize, ping, tools/list, and tools/call requests receive one same-ID JSON-RPC response. ID-less ping, notifications/initialized, and notifications/cancelled receive HTTP 202 with no body; other ID-less methods and unsolicited response messages receive HTTP 400 with no body. Unknown cancellation IDs are ignored; cancellation does not stop running tool work. Only tools/call is counted against the per-minute request budget, the monthly quota and pay-as-you-go usage; every other message, with or without a key, spends none of them and reports the per-IP budget in RateLimit-* (since 2026-10-18). Remote MCP exposes 55 read-only tools for public V1 read operations: get_leaderboard, get_trader, batch_get_traders, get_large_trades, get_large_trade, get_large_trades_history, get_whale_trades, get_whale_trade, get_whale_trades_history, get_edge_hunter, list_games, get_game, get_market_flow, batch_get_market_flow, get_market_intel, batch_get_market_intel, get_sharp_money_flows, get_smart_money_flows, get_market_snapshot, get_suspicious_trades, get_suspicious_trade, get_insider_radar, get_insider_radar_flag, get_positions, get_position_timeline, get_position_timeline_by_id, search_markets, search_content, explore_markets, get_event_replay_since, list_webhooks, get_webhook, get_daily_report_snapshot, get_weekly_report_snapshot, get_monthly_report_snapshot, get_report, get_trader_export_snapshot, get_coverage, get_platforms, get_large_positions, get_trending_wallets, get_trader_pnl, get_pick_of_the_day, get_pick_of_the_day_ledger_entry, get_pick_of_the_day_archive, get_trader_context, get_trader_categories, get_trader_grade_at, get_market_holders, get_market_candles, get_combo_fills, get_combos_summary, get_combo, get_large_trade_counterparty_executions, get_large_trade_counterparty_makers. Webhook create/update/delete/verify/rotate operations are intentionally not exposed as remote MCP tools. The remote endpoint advertises tools only; it does not implement resources/list, resources/read, prompts/list, or prompts/get. Each tool dispatches to the matching /api/v1/* handler in-process so auth, rate limits, and payload shape match. initialize, notifications/initialized, ping and tools/list answer without a credential; tools/call (and any GET) need Authorization: Bearer <token> with an OAuth 2.1 access token (see the oauth2 security scheme; a tool outside the token's scopes returns isError) or an API key, and without one answer HTTP 401 with a WWW-Authenticate challenge whose resource_metadata names the RFC 9728 document at /.well-known/oauth-protected-resource/api/v1/mcp. A key in a ?token= query parameter is rejected on every authenticated route (the public routes ignore it) with 401 invalid_api_key and error.reason api_key_in_query, because URLs land in shell history, browser history, and logs; a client that can only take a URL can run the @0xinsider/mcp stdio package. Mcp-Session-Id is minted on initialize and echoed on every response. Origin header, when present, is validated against the 0xinsider + localhost allowlist. tools/call arguments are validated against the tool's advertised inputSchema before anything runs: a non-object, an unknown key, a wrong type, an out-of-range number, a value outside an enum or an argument combination outside a oneOf answers a tool result with isError true whose text names the field, never a query built from the arguments that fit. Every tools/call result carries the REST envelope's meta verbatim (request_id, cached, cache_age_s, cost, and the route's provenance such as source and completeness on get_whale_trades_history or ranking_source and directional_source on get_edge_hunter) as structuredContent.meta beside the payload's own keys, and a tool failure carries structuredContent.error with the REST error fields verbatim (code, reason, param, doc_url, retry_at) plus retry_after_seconds, request_id and status, beside its text. The MCP-Protocol-Version request header is checked on every POST and GET: a value outside 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05 answers HTTP 400 with JSON-RPC error -32600 before the body is read; an absent header is served as 2025-03-26, the transport specification's compatibility default. Browser preflight allows the header.
///
/// Returns `None` when the API answers with an empty success body.
pub async fn create_mcp_json_rpc_response(
&self,
body: &CreateMcpJsonRpcResponseBody,
params: &CreateMcpJsonRpcResponseParams,
) -> Result<Option<CreateMcpJsonRpcResponseResponse>> {
let path = String::from("/api/v1/mcp");
let mut call = Call::new(&Operation::CREATE_MCP_JSON_RPC_RESPONSE, path);
call.header("Mcp-Session-Id", params.mcp_session_id.as_deref());
call.header("MCP-Protocol-Version", params.mcp_protocol_version.as_deref());
call.json(body)?;
self.send_json_optional(call).await
}
/// Unified report snapshot (granularity selector)
///
/// `GET /api/v1/reports`
///
/// Unified convenience route (#4975) that consolidates the three singular report routes. Dispatches to the exact per-granularity cap (daily 50, weekly 100, monthly 200) and date window the legacy /api/v1/reports/{daily,weekly,monthly} routes use, so the response body is byte-identical to the matching legacy route for the same period. An ISO weekly period is a durable canonical snapshot; an explicit weekly from,to pair is an exact ephemeral range limited to 31 inclusive UTC days and never creates a persisted snapshot identity. A wider explicit range returns 400 invalid_query. The three legacy routes stay live. Also reachable via the MCP get_report selector.
pub async fn get_reports(&self, granularity: Granularity, period: &str) -> Result<GetReportsResponse> {
let path = String::from("/api/v1/reports");
let mut call = Call::new(&Operation::GET_REPORTS, path);
call.query("granularity", granularity.as_str().to_owned());
call.query("period", period.to_string());
self.send_json(call).await
}
/// Daily report snapshot
///
/// `GET /api/v1/reports/daily`
///
/// Returns a dated daily whale-activity report snapshot with source_range, snapshot.status, completeness, and reconciliation metadata. Report whale volume is local whale-alert activity volume, not provider lifetime trader volume.
pub async fn get_daily_report_snapshot(&self, date: &str) -> Result<GetDailyReportSnapshotResponse> {
let path = String::from("/api/v1/reports/daily");
let mut call = Call::new(&Operation::GET_DAILY_REPORT_SNAPSHOT, path);
call.query("date", date.to_string());
self.send_json(call).await
}
/// Weekly report snapshot
///
/// `GET /api/v1/reports/weekly`
///
/// Returns a weekly whale-activity report snapshot. Pass an ISO YYYY-WW token for a durable canonical snapshot, or an exact from/to UTC range of at most 31 inclusive days for an ephemeral response. The response identifies closed ranges as final and current ranges as rolling.
pub async fn get_weekly_report_snapshot(
&self,
params: &GetWeeklyReportSnapshotParams,
) -> Result<GetWeeklyReportSnapshotResponse> {
let path = String::from("/api/v1/reports/weekly");
let mut call = Call::new(&Operation::GET_WEEKLY_REPORT_SNAPSHOT, path);
if let Some(value) = ¶ms.from {
call.query("from", value.to_string());
}
if let Some(value) = ¶ms.to {
call.query("to", value.to_string());
}
if let Some(value) = ¶ms.week {
call.query("week", value.to_string());
}
self.send_json(call).await
}
/// Monthly report snapshot
///
/// `GET /api/v1/reports/monthly`
///
/// Returns a UTC monthly whale-activity report snapshot with source_range, completeness, and reconciliation metadata.
pub async fn get_monthly_report_snapshot(&self, month: &str) -> Result<GetMonthlyReportSnapshotResponse> {
let path = String::from("/api/v1/reports/monthly");
let mut call = Call::new(&Operation::GET_MONTHLY_REPORT_SNAPSHOT, path);
call.query("month", month.to_string());
self.send_json(call).await
}
/// Trader export snapshot metadata
///
/// `GET /api/v1/trader/{address}/export`
///
/// Returns export source-range, completeness, volume reconciliation, row-count estimate, and large-export policy for one trader. To download the full dataset programmatically, POST to this same path to submit an async export job (json | ndjson | csv), then poll the status route and follow the download route once ready.
pub async fn get_trader_export_snapshot(&self, address: &str) -> Result<GetTraderExportSnapshotResponse> {
let path = format!(
"/api/v1/trader/{address}/export",
address = encode_path_segment(address)
);
let call = Call::new(&Operation::GET_TRADER_EXPORT_SNAPSHOT, path);
self.send_json(call).await
}
/// Submit a trader dataset export job
///
/// `POST /api/v1/trader/{address}/export`
///
/// Queues an async export of the trader's full dataset in the requested format (json default, ndjson, or csv) and returns the job resource. Poll the status route at poll_after_s until terminal is true, then follow the download route while status is 'ready' (until expires_at, 24 hours from submit). Reuse: without fresh=true, a live job for the same trader and format inside its retention window (queued, running, reconcile_required or ready) is returned with 200 instead of a new one, except a job its owner asked to cancel, which is never reused; its data_as_of says what its file is a snapshot of. With fresh=true only a queued job (which has not started reading) is reused; a running, reconciling or ready job is left alone and a new job is reserved, which consumes quota like any new job. Both decisions run under one per-account lock, so two concurrent submits cannot both reserve when one would have reused the other. Quotas are the per-user daily and per-address hourly export caps, keyed on the API key owner so an API key never widens its owner's quota. New full exports select one database read generation before delivery. JSON and NDJSON add export_metadata.generation (id, selected_at, consistency=repeatable_read, source_watermarks for positions, native P&L, categories and all matching trades), position_generation, provider_observations (provider values and observation/revision metadata), category_data_as_of, pnl_date_from/to, pnl_rows, pnl_row_limit (3650), markets_rows, markets_row_limit (50000), summary_basis and trades_basis. Summary counts cover all stored markets; the markets section retains its existing latest-activity 50000-row limit and P&L its earliest-3650-days limit. These are database consistency and section coverage facts, not a claim that providers observed every section simultaneously. CSV appends export_generation, export_selected_at and export_consistency columns. Downloaded objects also expose x-amz-meta-export-generation, x-amz-meta-export-selected-at, x-amz-meta-export-consistency, x-amz-meta-export-trades and x-amz-meta-export-provenance headers, including empty CSV files. Historical artifacts remain unchanged. Select CSV columns by name; JSON/NDJSON readers may ignore the additive fields. A read exceeding 600 seconds or an uncompressed artifact exceeding 2 GiB fails without publishing a partial file.
pub async fn submit_trader_export(
&self,
address: &str,
params: &SubmitTraderExportParams,
) -> Result<TraderExportJob> {
let path = format!(
"/api/v1/trader/{address}/export",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::SUBMIT_TRADER_EXPORT, path);
if let Some(value) = ¶ms.format {
call.query("format", value.as_str().to_owned());
}
if let Some(value) = ¶ms.fresh {
call.query("fresh", value.to_string());
}
self.send_json(call).await
}
/// Poll a trader export job
///
/// `GET /api/v1/trader/{address}/export/status`
///
/// Returns the job resource for a submitted export: status (queued | running | cancel_requested | reconcile_required | ready | failed | expired | cancelled), terminal, next_action and poll_after_s, the lifecycle timestamps, the retention window (expires_at) and, once the file is written, data_as_of and the artifact identity. A ready job past expires_at reads expired; a queued, running or reconciling job past expires_at reads failed. Work stops at retention safe points; completion and reconciliation cannot publish ready after expiry. The failure event carries failure_reason expired_before_completion and next_action resubmit; delivery never extends retention. A running job its owner cancelled reads cancel_requested until the worker stops, then cancelled. failed, cancelled and expired jobs stay readable for 48 hours, then 404.
pub async fn get_trader_export_status(&self, address: &str, job_id: i64) -> Result<TraderExportJob> {
let path = format!(
"/api/v1/trader/{address}/export/status",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::GET_TRADER_EXPORT_STATUS, path);
call.query("job_id", job_id.to_string());
self.send_json(call).await
}
/// Cancel a trader export job
///
/// `POST /api/v1/trader/{address}/export/cancel`
///
/// Cancels a submitted export and returns the job resource, the same shape the status route returns. A queued job reads cancelled at once and no worker will start it. A running job reads cancel_requested until the worker reaches its next safe point, then cancelled: the worker checks every 5 seconds while it reads the snapshot and between upload parts, and once more at the last point before the file is published; a storage request already in flight finishes first (each is bounded at 120 seconds), and a partial upload is discarded. If the worker itself stops first, the job reads cancelled after its 30-minute lease lapses, at the next hourly cleanup. A job a cancel can no longer reach is returned unchanged with 200: once its upload is being completed it finishes as ready (or reconcile_required, then ready or failed), and ready, failed, expired and cancelled jobs are terminal. A cancel never deletes a ready file; compare status before and after. Repeating the request is safe: it converges on the same state and never repeats a transition, so a client that lost the answer can send it again or read the status route. While terminal is false, poll the status route after poll_after_s. Quota is unchanged: the submit's reservation keeps counting toward the per-user daily and per-address hourly export caps for its full window, as a failed export's does, and a job its owner asked to cancel is never reused by a later submit, which reserves a new job. Webhook endpoints subscribed to export_job_cancelled receive it when the job reaches cancelled. An unknown job id, or a job owned by another account or submitted for another trader, answers 404 exactly as the status route does.
pub async fn cancel_trader_export(&self, address: &str, job_id: i64) -> Result<TraderExportJob> {
let path = format!(
"/api/v1/trader/{address}/export/cancel",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::CANCEL_TRADER_EXPORT, path);
call.query("job_id", job_id.to_string());
self.send_json(call).await
}
/// Download a finished trader export
///
/// `GET /api/v1/trader/{address}/export/download`
///
/// Redirects (302) to a presigned URL lasting at most one hour and no later than the job's expires_at for the finished export file while the job status is 'ready' and expires_at has not passed. The file is gzip-compressed and served with the format's Content-Type (application/json, application/x-ndjson, or text/csv). Returns 400 while the job is queued, running, cancel_requested or reconciling (poll the status route first) and for a failed or cancelled job (submit a new export); returns 410 with error.code not_found and error.reason export_expired once the retention window has passed, less than one whole second remains when signing, or the file has been retired, so the redirect never points at a file that is gone.
///
/// The API answers with a redirect to the file. It is followed once, by a fresh
/// request that carries no credential, and the file comes back as a streaming
/// [`Download`].
pub async fn download_trader_export(&self, address: &str, job_id: i64) -> Result<Download> {
let path = format!(
"/api/v1/trader/{address}/export/download",
address = encode_path_segment(address)
);
let mut call = Call::new(&Operation::DOWNLOAD_TRADER_EXPORT, path);
call.query("job_id", job_id.to_string());
self.send_download(call).await
}
/// Inspect current API usage without spending primary request quota
///
/// `GET /api/v1/usage`
///
/// Returns the authenticated caller sliding-window request budget, UTC-day usage and monthly quota. This control-plane endpoint remains available for a valid credential after paid data access lapses and does not increment the primary Redis rate-limit counter, monthly quota or API usage table; it shares a separate 100 reads/minute per-user inspection bucket with GET /api/v1/me. UTC-day totals use finalized quarter-hour rollups plus the disjoint raw interval through request time; unavailable rollup progress returns an error. Late accounting records retain their original UTC day when closed-period usage is read or the monthly budget is rebuilt. Current periods reflect persisted records and remain provisional; quota limits, prices and response fields are unchanged.
pub async fn get_usage(&self) -> Result<Usage> {
let path = String::from("/api/v1/usage");
let call = Call::new(&Operation::GET_USAGE, path);
self.send_json(call).await
}
/// Get market context (Markdown)
///
/// `GET /api/v1/market/{condition_id}/context.md`
///
/// Authenticated, self-contained Polymarket market evidence document. Renders the same typed data as the market snapshot with trust included: identity, outcome labels and tokens, cached quotes, liquidity, live sports, and per-source freshness or unavailable reasons. Provider text is encoded as indented JSON data. Accepts raw or mkt_-prefixed condition IDs. Unknown markets return 404. No ETag or conditional requests; use the snapshot JSON route for those.
pub async fn get_market_context_markdown(&self, condition_id: &str) -> Result<String> {
let path = format!(
"/api/v1/market/{condition_id}/context.md",
condition_id = encode_path_segment(condition_id)
);
let call = Call::new(&Operation::GET_MARKET_CONTEXT_MARKDOWN, path);
self.send_text(call).await
}
/// Identify the authenticated account and credential
///
/// `GET /api/v1/me`
///
/// Returns caller-owned account and credential IDs, credential validity, paid-data entitlement and approved scopes. Null scopes mean full legacy developer-key access. Valid credentials can use this control-plane diagnostic path after paid access lapses; data routes still require active paid access. OAuth grants and named integration keys need read scope. Does not return credentials, payment details or personal contact details.
pub async fn get_account_identity(&self) -> Result<AccountIdentity> {
let path = String::from("/api/v1/me");
let call = Call::new(&Operation::GET_ACCOUNT_IDENTITY, path);
self.send_json(call).await
}
/// Create an immutable whale dataset
///
/// `POST /api/v1/datasets/whale-trades`
///
/// Extract at most 1,000,000 rows and 256 MiB uncompressed; exceeding either bound fails the job and publishes no partial file. Window and filters freeze on admission; rows and source facts freeze on one worker database snapshot. NDJSON uses exact decimal strings, with no current grade or market enrichment. The manifest checkpoint includes already committed arrivals after to plus later/open writers, with intentional overlap. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills. Sports and esports markets only (#27430): trades on any other market are left out of the file, and a condition_id naming such a market returns 404 not_found with error.reason market_out_of_scope before any job is reserved.
pub async fn submit_whale_dataset(&self, body: &SubmitWhaleDatasetBody) -> Result<WhaleDatasetJob> {
let path = String::from("/api/v1/datasets/whale-trades");
let mut call = Call::new(&Operation::SUBMIT_WHALE_DATASET, path);
call.json(body)?;
self.send_json(call).await
}
/// Read a whale dataset job
///
/// `GET /api/v1/datasets/whale-trades/{job_id}`
///
/// Read queued, running, cancel_requested, ready, failed, reconcile_required, expired or cancelled. Poll only while next_action is poll, after poll_after_s. Ready manifests contain count, content and compressed SHA-256, schema, filters, source, horizon, expiry and replay continuation. Deltas do not retain the finite time filter and can repeat rows; deduplicate by wt_ ID (payload.whale_alert_id when not expanded). This is an insertion feed, not update/delete CDC. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
pub async fn get_whale_dataset_status(&self, job_id: i64) -> Result<WhaleDatasetJob> {
let path = format!("/api/v1/datasets/whale-trades/{job_id}", job_id = job_id);
let call = Call::new(&Operation::GET_WHALE_DATASET_STATUS, path);
self.send_json(call).await
}
/// Download an immutable whale dataset
///
/// `GET /api/v1/datasets/whale-trades/{job_id}/download`
///
/// Download only a ready artifact; status handles failure and cancellation. Retired artifacts return 410 at serving time. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
///
/// The API answers with a redirect to the file. It is followed once, by a fresh
/// request that carries no credential, and the file comes back as a streaming
/// [`Download`].
pub async fn download_whale_dataset(&self, job_id: i64) -> Result<Download> {
let path = format!("/api/v1/datasets/whale-trades/{job_id}/download", job_id = job_id);
let call = Call::new(&Operation::DOWNLOAD_WHALE_DATASET, path);
self.send_download(call).await
}
/// Cancel a whale dataset job
///
/// `POST /api/v1/datasets/whale-trades/{job_id}/cancel`
///
/// Cancel queued jobs immediately and request running jobs stop at their next safe point. Repeating cancel converges on the current state; cancellation after the completion fence leaves the artifact ready. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
pub async fn cancel_whale_dataset(&self, job_id: i64) -> Result<WhaleDatasetJob> {
let path = format!("/api/v1/datasets/whale-trades/{job_id}/cancel", job_id = job_id);
let call = Call::new(&Operation::CANCEL_WHALE_DATASET, path);
self.send_json(call).await
}
/// Read a pick proof by stable id
///
/// `GET /api/v1/pick-of-the-day/ledger/{pick_id}`
///
/// Public read of one published pick by its stable decimal-string pick_id. Same proof gating, canonical bytes, ETag and integrity failures as the ledger. Invalid ids return 400; absent or unpublished picks return 404. Withdrawal from recommendations or the archive does not remove a published ledger entry.
pub async fn get_pick_of_the_day_ledger_entry(
&self,
pick_id: &str,
params: &GetPickOfTheDayLedgerEntryParams,
) -> Result<GetPickOfTheDayLedgerEntryResponse> {
let path = format!(
"/api/v1/pick-of-the-day/ledger/{pick_id}",
pick_id = encode_path_segment(pick_id)
);
let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_LEDGER_ENTRY, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Admit asynchronous webhook verification
///
/// `POST /api/v1/webhooks/{id}/verification-attempts`
///
/// Additive asynchronous consent flow; the legacy POST /verify keeps its synchronous 200/422 behavior and retry policy. Commits one durable attempt and returns 202 without awaiting DNS or the receiver. Send the original verification_token. Optional Idempotency-Key replays the original admission response for the same endpoint/token identity; a changed request returns 422 and an in-flight matching key returns 409. Different keys for the same token revision recover the same attempt, including terminal attempts, without new receiver work. Poll status_url for current state; 202 is admission, not activation. A supervised worker sends the existing signed webhook.verification body with an additional verification_attempt_id and x-0xinsider-verification-attempt header, stable across at-least-once retries. Verify the timestamp/raw-body HMAC and answer 2xx. DNS is public-address-pinned; redirects and proxies are refused and response bodies are not read. Timeout/transport/429/5xx failures retry at most 4 attempts, with 5/15/45-second waits, until the earlier token deadline or 15-minute horizon. Other receiver statuses and URL/security refusals are terminal. Activation requires current owner eligibility, endpoint/token/URL/signing identity, unexpired attempt/token and valid lease. Configuration changes or disable/delete cancel obsolete work. Terminal ciphertext is erased; status exposes no token, signing secret, address or receiver body. History is available for 7 days.
pub async fn create_webhook_verification_attempt(
&self,
id: i64,
body: &CreateWebhookVerificationAttemptRequest,
params: &CreateWebhookVerificationAttemptParams,
) -> Result<CreateWebhookVerificationAttemptResponse> {
let path = format!("/api/v1/webhooks/{id}/verification-attempts", id = id);
let mut call = Call::new(&Operation::CREATE_WEBHOOK_VERIFICATION_ATTEMPT, path);
call.header("Idempotency-Key", params.idempotency_key.as_deref());
call.json(body)?;
self.send_json(call).await
}
/// Read webhook verification attempt status
///
/// `GET /api/v1/webhooks/{id}/verification-attempts/{attempt_id}`
///
/// Fresh primary-database status for one attempt owned by the authenticated account and webhook. queued/running means consent is pending; only verified activates the unchanged endpoint after receiver 2xx. failed/cancelled/expired are terminal. Polling never issues a challenge or restarts work. At expiry the read reports expired immediately, even before the worker persists expiry. A missing, deleted or cross-owner endpoint/attempt returns 404. Outcomes and actual HTTP status are sanitized; no token, ciphertext, signing secret, destination address or receiver response body is returned. Terminal history is retained for 7 days.
pub async fn get_webhook_verification_attempt(
&self,
id: i64,
attempt_id: &str,
) -> Result<GetWebhookVerificationAttemptResponse> {
let path = format!(
"/api/v1/webhooks/{id}/verification-attempts/{attempt_id}",
id = id,
attempt_id = encode_path_segment(attempt_id)
);
let call = Call::new(&Operation::GET_WEBHOOK_VERIFICATION_ATTEMPT, path);
self.send_json(call).await
}
/// List combo fills
///
/// `GET /api/v1/combos/fills`
///
/// Returns live Polymarket combo taker fills with exact decimal-string economics, wallet identities, grades, legs, conjunction results, and ingest coverage. Requires an active Pro or Max API key. Listing includes executions with price at most 0.95; use combo detail for complete history. Sports and esports only (#27449): a fill is listed only when every leg of its combo is a sports or esports market; a combo with a leg on any other market never appears, and filters, page sizes and continuations apply after that exclusion. Recent ordering uses an exclusive cursor; largest and payout use offsets. Continuations are based on page fullness and may lead to an empty final page.
pub async fn list_combo_fills(&self, params: &ListComboFillsParams) -> Result<ComboFillsResponse> {
let path = String::from("/api/v1/combos/fills");
let mut call = Call::new(&Operation::LIST_COMBO_FILLS, path);
if let Some(value) = ¶ms.result {
call.query("result", value.to_string());
}
if let Some(value) = ¶ms.legs {
call.query("legs", value.to_string());
}
if let Some(value) = ¶ms.min_stake {
call.query("min_stake", value.to_string());
}
if let Some(value) = ¶ms.min_multiplier {
call.query("min_multiplier", value.to_string());
}
if let Some(value) = ¶ms.grades {
call.query("grades", value.to_string());
}
if let Some(value) = ¶ms.sports {
call.query("sports", value.to_string());
}
if let Some(value) = ¶ms.sort {
call.query("sort", value.as_str().to_owned());
}
if let Some(value) = ¶ms.window {
call.query("window", value.as_str().to_owned());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.offset {
call.query("offset", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get live combo count
///
/// `GET /api/v1/combos/summary`
///
/// Returns the stored count of traded combos whose YES conjunction remains pending, with its computation timestamp. Sports and esports only (#27449): a combo with a leg outside them is not counted. Requires an active Pro or Max API key. The count is refreshed by the ingest owner at most every five minutes and cached for 60 seconds. A null live value is unknown, never zero.
pub async fn get_combos_summary(&self, params: &GetCombosSummaryParams) -> Result<CombosSummaryResponse> {
let path = String::from("/api/v1/combos/summary");
let mut call = Call::new(&Operation::GET_COMBOS_SUMMARY, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get combo detail
///
/// `GET /api/v1/combos/{condition_id}`
///
/// Returns one Polymarket combo with its legs, conjunction result, all-time trade totals, newest 100 taker fills, lifecycle totals, and ingest coverage. Requires an active Pro or Max API key. Detail retains execution history above the listing price cap. A malformed combo ID returns 400; an unknown well-formed ID returns 404. A combo with a leg outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27449). Null lifecycle or missing leg facts remain unknown.
pub async fn get_combo(&self, condition_id: &str, params: &GetComboParams) -> Result<ComboResponse> {
let path = format!(
"/api/v1/combos/{condition_id}",
condition_id = encode_path_segment(condition_id)
);
let mut call = Call::new(&Operation::GET_COMBO, path);
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
/// Get Edge Hunter
///
/// `GET /api/v1/edge-hunter`
///
/// Max-only canonical Edge Hunter API with board, signals and observations views. An active Pro credential receives 403 forbidden with reason max_plan_required. Default board admission and ordering remain compatible: B grade floor, 30-row cap, 48-hour kickoff horizon, full Max projection and both current outcome quotes. Board outcomes include nullable token_id; the full signal includes nullable backed token_id, ranked_at copied from the frozen signal_created_at, and the existing aggregate category_skill evidence. Quote ts/validated_at and metadata_updated_at retain their separate meanings; none is wallet entry cost. Board quotes read verified display-price and websocket caches only, with no inline provider request or request-triggered REST refresh. Uncached outcomes remain null; retained quotes keep their original observation clock and existing retention bound. Board category, min_grade and limit are configurable; horizon clamps 1..48 and cap clamps 1..30. total counts selected admitted rows before the cap.
///
/// Signals exposes full ranked records and category-skill/source evidence with default B grade floor, 12-hour horizon (clamp 1..48), page limit 20 (clamp 1..100) and cursor. Observations requires wider_holder, in_play or emerging_pile and retains full records, verified token IDs, midpoint price marks, holder/provider/directional clocks, snapshot_as_of, degraded, degradation_reasons, coverage and source-generation/category funnel evidence. Required degradation_reasons records each operational cause with canonical sport or null for generation-wide evidence, and is empty only for a healthy generation. For sports and esports reads, the first four coverage counts stay global across cohort/category/selectors; selected_observations counts matching rows before pagination and returned_observations equals data.length. An unmappable legacy category retains its zero-work empty generation with all coverage counts zero and no degradation reasons, without reading the all-sports cache. Intentional capacity_limited input, the one-page holder bound (holder_scan_complete=false, counted in coverage.incomplete_holder_markets) and board_upcoming_status=not_configured do not by themselves degrade a generation. Reconciled terminals prove accounting, not complete holder coverage. Observation horizon stays 48 hours with 12-hour in-play kickoff lookback and 30-second live snapshot ceiling. In-play additionally requires a coherent nonfuture original live-source clock no older than 30 seconds at publication and every served reuse; compute and missed-pass grace never renew that clock. Provider-confirmed live membership is observed independently of rendered scores, quotes and holder enrichment. UI refresh-marker expiry or score invalidation alone does not invalidate a separately observed provider membership. Explicit provider-source invalidation or an invalid, incomplete, future, expired or missing source remains unavailable. When one scheduled observation refresh misses its deadline, other cohorts may keep serving the last snapshot for up to 45 more seconds, with its age in meta.cache_age_s and its completion time in snapshot_as_of; a second missed refresh in a row returns 503 read_model_warming. An expired in-play source returns 503 read_model_warming even within generation grace. Funnel diagnostics describe the warmed generation/category accounting rather than the selected league/type/ID input census. admission=most_held_48h with cohort=wider_holder opts in to the most-held selection instead of the default one: per sport, up to 8 markets kicking off within 48 hours, most graded holders first, then volume, then soonest kickoff, at most 4 per event, recomputed every refresh; every row carries admitted_by most_held_48h, the response echoes admission, and funnel, coverage and degradation describe that selection. Both wider_holder selections add departures: the markets whose card left that selection before kickoff, each with departed_at, the departed card's last_observed_at and a reason from the funnel's terminal vocabulary, so a reader can tell a move to the funded slate (primary_slate_candidate) from a split holder pile.
///
/// Every view accepts kind, sports, leagues, market_types, condition_ids, event_slugs, series_slugs and legacy category. Repeat array query keys or supply comma-separated values inside a key; at most 100 supplied values per axis before deduplication. Values normalize, sort and deduplicate. Lists match OR and axes match AND. Sports and machine leagues normalize case-insensitively; market_types/event_slugs/series_slugs remain trimmed exact case-sensitive provider strings. category=NFL reaches Football, while leagues=nfl selects NFL only. Selection runs before cap/pagination, binds advanced cursors/ETags, and is echoed in optional top-level selection whenever a selector or nonblank category is requested. Missing selected metadata excludes a row. Unknown well-formed market IDs or provider identities return empty results.
///
/// Each row adds required nullable market_context for authoritative discovery. A frozen observed sidecar gives required nullable league, series_slug, market_type and metadata_updated_at; a pre-selector cached generation can yield context:null on an unselected read. metadata_updated_at is exactly local market_canonical.updated_at, never a provider observation clock or current-time fallback. A selected read without sidecar readiness returns 503 read_model_warming with Retry-After: 5, never silently wider results. SDK selected reads enforce strict query validation and require the echo.
///
/// All public views read warmed generations only; missing or stale readiness returns 503 read_model_warming with Retry-After: 5. Advanced views use private,no-cache with ETag/If-None-Match/304; no request holder/provider computation. Default board has no ETag/pagination and private,no-store. Invalid view-specific parameters return 400. Replaced snapshots or changed cursor-bound filters return cursor_expired. Price marks are market midpoints, not wallet entry cost; volume is provider taker shares. Nullable/omitted evidence and db_only/degraded provenance remain explicit. Analytics is not an execution instruction.
pub async fn get_edge_hunter(&self, params: &GetEdgeHunterParams) -> Result<serde_json::Value> {
let path = String::from("/api/v1/edge-hunter");
let mut call = Call::new(&Operation::GET_EDGE_HUNTER, path);
if let Some(value) = ¶ms.view {
call.query("view", value.as_str().to_owned());
}
if let Some(value) = ¶ms.category {
call.query("category", value.to_string());
}
if let Some(value) = ¶ms.cohort {
call.query("cohort", value.as_str().to_owned());
}
if let Some(value) = ¶ms.admission {
call.query("admission", value.to_string());
}
if let Some(value) = ¶ms.min_grade {
call.query("min_grade", value.as_str().to_owned());
}
if let Some(value) = ¶ms.limit {
call.query("limit", value.to_string());
}
if let Some(value) = ¶ms.cursor {
call.query("cursor", value.to_string());
}
if let Some(value) = ¶ms.horizon_hours {
call.query("horizon_hours", value.to_string());
}
if let Some(value) = ¶ms.kind {
call.query("kind", value.as_str().to_owned());
}
for value in ¶ms.sports {
call.query("sports", value.to_string());
}
for value in ¶ms.leagues {
call.query("leagues", value.to_string());
}
for value in ¶ms.market_types {
call.query("market_types", value.to_string());
}
for value in ¶ms.condition_ids {
call.query("condition_ids", value.to_string());
}
for value in ¶ms.event_slugs {
call.query("event_slugs", value.to_string());
}
for value in ¶ms.series_slugs {
call.query("series_slugs", value.to_string());
}
call.header("If-None-Match", params.if_none_match.as_deref());
self.send_json(call).await
}
}
impl ListPage for ComboFillsResponse {
type Item = ComboFill;
fn items(&self) -> &[ComboFill] {
&self.data
}
fn into_items(self) -> Vec<ComboFill> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ExploreMarketsResponse {
type Item = ExploreEntry;
fn items(&self) -> &[ExploreEntry] {
&self.data
}
fn into_items(self) -> Vec<ExploreEntry> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for GetEventReplaySinceResponse {
type Item = EventReplayEvent;
fn items(&self) -> &[EventReplayEvent] {
&self.data
}
fn into_items(self) -> Vec<EventReplayEvent> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
Some(&self.next_cursor)
}
}
impl ListPage for GetMarketHoldersResponse {
type Item = MarketHolder;
fn items(&self) -> &[MarketHolder] {
&self.data
}
fn into_items(self) -> Vec<MarketHolder> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for GetPositionTimelineByIdResponse {
type Item = PositionTimelineEvent;
fn items(&self) -> &[PositionTimelineEvent] {
&self.data
}
fn into_items(self) -> Vec<PositionTimelineEvent> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for GetPositionTimelineResponse {
type Item = PositionTimelineEvent;
fn items(&self) -> &[PositionTimelineEvent] {
&self.data
}
fn into_items(self) -> Vec<PositionTimelineEvent> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListGamesResponse {
type Item = Game;
fn items(&self) -> &[Game] {
&self.data
}
fn into_items(self) -> Vec<Game> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListInsiderRadarResponse {
type Item = SuspiciousTrade;
fn items(&self) -> &[SuspiciousTrade] {
&self.data
}
fn into_items(self) -> Vec<SuspiciousTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListLargePositionsResponse {
type Item = LargePosition;
fn items(&self) -> &[LargePosition] {
&self.data
}
fn into_items(self) -> Vec<LargePosition> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListLargeTradeHistoryResponse {
type Item = LargeTrade;
fn items(&self) -> &[LargeTrade] {
&self.data
}
fn into_items(self) -> Vec<LargeTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListLargeTradesResponse {
type Item = LargeTrade;
fn items(&self) -> &[LargeTrade] {
&self.data
}
fn into_items(self) -> Vec<LargeTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListLeaderboardResponse {
type Item = LeaderboardEntry;
fn items(&self) -> &[LeaderboardEntry] {
&self.data
}
fn into_items(self) -> Vec<LeaderboardEntry> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListPositionsResponse {
type Item = Position;
fn items(&self) -> &[Position] {
&self.data
}
fn into_items(self) -> Vec<Position> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListSharpMoneyFlowsResponse {
type Item = SmartMoneyFlowMarket;
fn items(&self) -> &[SmartMoneyFlowMarket] {
&self.data
}
fn into_items(self) -> Vec<SmartMoneyFlowMarket> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListSmartMoneyFlowsResponse {
type Item = SmartMoneyFlowMarket;
fn items(&self) -> &[SmartMoneyFlowMarket] {
&self.data
}
fn into_items(self) -> Vec<SmartMoneyFlowMarket> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListSuspiciousTradesResponse {
type Item = SuspiciousTrade;
fn items(&self) -> &[SuspiciousTrade] {
&self.data
}
fn into_items(self) -> Vec<SuspiciousTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListTrendingWalletsResponse {
type Item = TrendingWallet;
fn items(&self) -> &[TrendingWallet] {
&self.data
}
fn into_items(self) -> Vec<TrendingWallet> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListWebhookDeliveriesResponse {
type Item = WebhookDelivery;
fn items(&self) -> &[WebhookDelivery] {
&self.data
}
fn into_items(self) -> Vec<WebhookDelivery> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListWebhookEventsResponse {
type Item = WebhookEventDescriptor;
fn items(&self) -> &[WebhookEventDescriptor] {
&self.data
}
fn into_items(self) -> Vec<WebhookEventDescriptor> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListWebhooksResponse {
type Item = WebhookEndpoint;
fn items(&self) -> &[WebhookEndpoint] {
&self.data
}
fn into_items(self) -> Vec<WebhookEndpoint> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListWhaleTradeHistoryResponse {
type Item = LargeTrade;
fn items(&self) -> &[LargeTrade] {
&self.data
}
fn into_items(self) -> Vec<LargeTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for ListWhaleTradesResponse {
type Item = LargeTrade;
fn items(&self) -> &[LargeTrade] {
&self.data
}
fn into_items(self) -> Vec<LargeTrade> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for SearchContentResponse {
type Item = ContentSearchResult;
fn items(&self) -> &[ContentSearchResult] {
&self.data
}
fn into_items(self) -> Vec<ContentSearchResult> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl ListPage for SearchMarketsResponse {
type Item = MarketSearchResult;
fn items(&self) -> &[MarketSearchResult] {
&self.data
}
fn into_items(self) -> Vec<MarketSearchResult> {
self.data
}
fn has_more(&self) -> bool {
self.has_more
}
fn next_cursor(&self) -> Option<&str> {
self.next_cursor.as_deref()
}
}
impl CursorParams for ExploreMarketsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for GetEdgeHunterParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for GetEventReplaySinceParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for GetMarketHoldersParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for GetPositionTimelineByIdParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for GetPositionTimelineParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListComboFillsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListGamesParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListInsiderRadarParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLargePositionsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLargeTradeCounterpartyExecutionsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLargeTradeCounterpartyMakersParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLargeTradeHistoryParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLargeTradesParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListLeaderboardParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListPositionsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListSharpMoneyFlowsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListSmartMoneyFlowsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListSuspiciousTradesParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListTrendingWalletsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListWebhookDeliveriesParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListWhaleTradeCounterpartyExecutionsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListWhaleTradeCounterpartyMakersParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListWhaleTradeHistoryParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for ListWhaleTradesParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}
impl CursorParams for SearchMarketsParams {
fn set_cursor(&mut self, cursor: Option<String>) {
self.cursor = cursor;
}
}