@0xinsider/sdk 0.85.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -374,10 +374,9 @@ const checked = await client.listLeaderboard(
374
374
  );
375
375
  console.log(checked.meta?.effectiveQuery, checked.meta?.queryIgnored);
376
376
 
377
- // OHLC candles for a market (open or resolved):
378
- const candles = await client.getMarketCandles("0xabc...", {
379
- query: { resolution: "1d" },
380
- });
377
+ // OHLC candles for a market (open or resolved). SDK 0.87.0 types "5m" and "1h",
378
+ // Polymarket's five-minute and hourly buckets, beside "1d" and "1w":
379
+ const candles = await client.getMarketCandles("0xabc...", { resolution: "5m" });
381
380
 
382
381
  // Webhook event catalog (self-describing) and one endpoint's delivery log:
383
382
  const events = await client.listWebhookEvents();
package/dist/client.d.ts CHANGED
@@ -1955,10 +1955,10 @@ export declare class OxinsiderApiClient {
1955
1955
  getClv(params: OperationQuery["getClv"], options?: ConvenienceOptions): Promise<OperationResult<"getClv">>;
1956
1956
  /**
1957
1957
  * Fetch bucketed OHLC candles for a market's outcome tokens.
1958
- * Resolution defaults to the server default; pass `params.resolution` as
1959
- * `"1d"` or `"1w"` to override. `params.from` is exclusive and `params.to`
1960
- * is inclusive; when both are present, `from` must be less than or equal to
1961
- * `to`.
1958
+ * Resolution defaults to the server default (`"1d"`); pass `params.resolution`
1959
+ * as `"5m"` or `"1h"` for Polymarket's intraday buckets, or `"1w"`.
1960
+ * `params.from` is exclusive and `params.to` is inclusive; when both are
1961
+ * present, `from` must be less than or equal to `to`.
1962
1962
  */
1963
1963
  getMarketCandles(conditionId: OperationPath["getMarketCandles"]["condition_id"], params?: OperationQuery["getMarketCandles"], options?: ConvenienceOptions): Promise<OperationResult<"getMarketCandles">>;
1964
1964
  /**
package/dist/client.js CHANGED
@@ -2161,10 +2161,10 @@ export class OxinsiderApiClient {
2161
2161
  }
2162
2162
  /**
2163
2163
  * Fetch bucketed OHLC candles for a market's outcome tokens.
2164
- * Resolution defaults to the server default; pass `params.resolution` as
2165
- * `"1d"` or `"1w"` to override. `params.from` is exclusive and `params.to`
2166
- * is inclusive; when both are present, `from` must be less than or equal to
2167
- * `to`.
2164
+ * Resolution defaults to the server default (`"1d"`); pass `params.resolution`
2165
+ * as `"5m"` or `"1h"` for Polymarket's intraday buckets, or `"1w"`.
2166
+ * `params.from` is exclusive and `params.to` is inclusive; when both are
2167
+ * present, `from` must be less than or equal to `to`.
2168
2168
  */
2169
2169
  getMarketCandles(conditionId, params = {}, options = {}) {
2170
2170
  return this.call("getMarketCandles", {
@@ -1,5 +1,5 @@
1
- export declare const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
2
- export declare const OPENAPI_SHA256 = "b8bd522d857e44f8b30eccf27689d5e8ebfdff1fff61019042b2ac7fb4eed471";
1
+ export declare const OPENAPI_SOURCE = "https://0xinsider.com/api/v1/openapi.json";
2
+ export declare const OPENAPI_SHA256 = "cc38857fe0099785fff47e20de3098f2b404cb010bf4315c30abbf66aa1de52a";
3
3
  export declare const OPENAPI_VERSION = "1.0.0";
4
4
  export declare const OPERATION_COUNT = 118;
5
5
  export declare const APP_REPOSITORY = "0xinsider/0xinsider";
@@ -1 +1 @@
1
- {"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc,uDAAuD,CAAC;AACnF,eAAO,MAAM,cAAc,qEAAqE,CAAC;AACjG,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD,eAAO,MAAM,aAAa,mCAAmC,CAAC;AAC9D,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,IAAiD,CAAC"}
1
+ {"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc,8CAA8C,CAAC;AAC1E,eAAO,MAAM,cAAc,qEAAqE,CAAC;AACjG,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD,eAAO,MAAM,aAAa,mCAAmC,CAAC;AAC9D,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,IAAiD,CAAC"}
@@ -5,11 +5,11 @@
5
5
  // 0xinsider/0xinsider commit that last changed web/public/api/v1/openapi.json
6
6
  // when it could be resolved, else null. Compare OPENAPI_SHA256 with the live
7
7
  // document to see whether a release is behind the API.
8
- export const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
9
- export const OPENAPI_SHA256 = "b8bd522d857e44f8b30eccf27689d5e8ebfdff1fff61019042b2ac7fb4eed471";
8
+ export const OPENAPI_SOURCE = "https://0xinsider.com/api/v1/openapi.json";
9
+ export const OPENAPI_SHA256 = "cc38857fe0099785fff47e20de3098f2b404cb010bf4315c30abbf66aa1de52a";
10
10
  export const OPENAPI_VERSION = "1.0.0";
11
11
  export const OPERATION_COUNT = 118;
12
12
  export const APP_REPOSITORY = "0xinsider/0xinsider";
13
13
  export const APP_SPEC_PATH = "web/public/api/v1/openapi.json";
14
- export const APP_COMMIT = "b523faf300dbdfa14657ad99c11b1f1ded962802";
14
+ export const APP_COMMIT = "8095c7095126ed1339ba6ee526b143a40767666a";
15
15
  //# sourceMappingURL=provenance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provenance.js","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,kEAAkE;AAClE,8EAA8E;AAC9E,6EAA6E;AAC7E,uDAAuD;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAG,oDAAoD,CAAC;AACnF,MAAM,CAAC,MAAM,cAAc,GAAG,kEAAkE,CAAC;AACjG,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,gCAAgC,CAAC;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAkB,0CAA0C,CAAC"}
1
+ {"version":3,"file":"provenance.js","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,kEAAkE;AAClE,8EAA8E;AAC9E,6EAA6E;AAC7E,uDAAuD;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAG,2CAA2C,CAAC;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,kEAAkE,CAAC;AACjG,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,gCAAgC,CAAC;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAkB,0CAA0C,CAAC"}
package/dist/schema.d.ts CHANGED
@@ -96,7 +96,7 @@ export type ApiError = {
96
96
  freshness?: FreshnessFailure;
97
97
  /** Where a person clears this 402 (#32592): pays the overdue invoice (reason payment_overdue) or reactivates the plan (reason subscription_inactive). Present on every 402 subscription_required, omitted on every other error. The message names the same URL; link this field instead of parsing the message. */
98
98
  billing_url?: string;
99
- /** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. fill_history_too_large (404 not_found, #33245): the wallet and market are tracked, but the position timeline sums every earlier fill into its running totals and this wallet has more than 20,000 fills on the market before the requested page -- stop asking for this pair; neither a retry nor another page can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. payment_overdue (402 subscription_required, #32592): the key is valid and the account still has its plan, but its latest subscription invoice is unpaid (Stripe past_due or unpaid), so paid access is paused; permanent until a person pays at billing_url (https://0xinsider.com/billing) -- stop retrying on a schedule and surface the link. The key works again the moment the invoice is paid. GET /api/v1/me and GET /api/v1/usage keep answering. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. cold_read_limited (429 rate_limited, #28752): the account has used its share of cold reads on GET /api/v1/market/{condition_id}/holders, requests for a market whose roster is not cached, each of which walks Polymarket (6 a minute, in bursts of up to 400); not the per-minute window, so a cached market still answers, and the next cold read is admitted at Retry-After. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
99
+ /** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. fill_history_too_large (404 not_found, #33245): the wallet and market are tracked, but the position timeline sums every earlier fill into its running totals and this wallet has more than 20,000 fills on the market before the requested page -- stop asking for this pair; neither a retry nor another page can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. payment_overdue (402 subscription_required, #32592): the key is valid and the account still has its plan, but its latest subscription invoice is unpaid (Stripe past_due or unpaid), so paid access is paused; permanent until a person pays at billing_url (https://0xinsider.com/billing) -- stop retrying on a schedule and surface the link. The key works again the moment the invoice is paid. GET /api/v1/me and GET /api/v1/usage keep answering. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. cold_read_limited (429 rate_limited, #28752, #34815): the account has used its share of cold reads on a route, requests whose answer is not cached, each of which reads Polymarket: GET /api/v1/market/{condition_id}/holders for a market whose roster is not cached (6 a minute, in bursts of up to 400), and GET /api/v1/market/{condition_id}/candles at 5m or 1h for a window not cached (6 a minute, in bursts of up to 30); not the per-minute window, so a cached answer still answers, and the next cold read is admitted at Retry-After. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
100
100
  reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "market_out_of_scope" | "fill_history_too_large" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "payment_overdue" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "cold_read_limited" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
101
101
  };
102
102
  meta: ResponseMeta;
@@ -112,7 +112,7 @@ export type ApiErrorBody = {
112
112
  freshness?: FreshnessFailure;
113
113
  /** Where a person clears this 402 (#32592): pays the overdue invoice (reason payment_overdue) or reactivates the plan (reason subscription_inactive). Present on every 402 subscription_required, omitted on every other error. The message names the same URL; link this field instead of parsing the message. */
114
114
  billing_url?: string;
115
- /** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. fill_history_too_large (404 not_found, #33245): the wallet and market are tracked, but the position timeline sums every earlier fill into its running totals and this wallet has more than 20,000 fills on the market before the requested page -- stop asking for this pair; neither a retry nor another page can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. payment_overdue (402 subscription_required, #32592): the key is valid and the account still has its plan, but its latest subscription invoice is unpaid (Stripe past_due or unpaid), so paid access is paused; permanent until a person pays at billing_url (https://0xinsider.com/billing) -- stop retrying on a schedule and surface the link. The key works again the moment the invoice is paid. GET /api/v1/me and GET /api/v1/usage keep answering. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. cold_read_limited (429 rate_limited, #28752): the account has used its share of cold reads on GET /api/v1/market/{condition_id}/holders, requests for a market whose roster is not cached, each of which walks Polymarket (6 a minute, in bursts of up to 400); not the per-minute window, so a cached market still answers, and the next cold read is admitted at Retry-After. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
115
+ /** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. market_out_of_scope (404 not_found, #27303): the market or event is real and the URL is right, but 0xinsider serves sports and esports markets only -- stop asking for this market; neither a retry nor another URL for it can succeed. fill_history_too_large (404 not_found, #33245): the wallet and market are tracked, but the position timeline sums every earlier fill into its running totals and this wallet has more than 20,000 fills on the market before the requested page -- stop asking for this pair; neither a retry nor another page can succeed. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. payment_overdue (402 subscription_required, #32592): the key is valid and the account still has its plan, but its latest subscription invoice is unpaid (Stripe past_due or unpaid), so paid access is paused; permanent until a person pays at billing_url (https://0xinsider.com/billing) -- stop retrying on a schedule and surface the link. The key works again the moment the invoice is paid. GET /api/v1/me and GET /api/v1/usage keep answering. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. cold_read_limited (429 rate_limited, #28752, #34815): the account has used its share of cold reads on a route, requests whose answer is not cached, each of which reads Polymarket: GET /api/v1/market/{condition_id}/holders for a market whose roster is not cached (6 a minute, in bursts of up to 400), and GET /api/v1/market/{condition_id}/candles at 5m or 1h for a window not cached (6 a minute, in bursts of up to 30); not the per-minute window, so a cached answer still answers, and the next cold read is admitted at Retry-After. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
116
116
  reason?: "cursor_expired" | "unknown_endpoint" | "pick_not_released" | "trader_not_tracked" | "market_out_of_scope" | "fill_history_too_large" | "read_model_warming" | "database_unavailable" | "request_accounting_unavailable" | "idempotency_in_progress" | "webhook_delivery_in_progress" | "webhook_secret_rotation_not_prepared" | "webhook_secret_rotation_overlap_active" | "sandbox_api_key" | "api_key_in_query" | "subscription_inactive" | "payment_overdue" | "monthly_quota_exceeded" | "invalid_query" | "unknown_query_parameter" | "invalid_path" | "invalid_body" | "unsupported_media_type" | "payload_too_large" | "method_not_allowed" | "ip_rate_limited" | "ip_throttled" | "cold_read_limited" | "export_expired" | "freshness_ceiling_unsatisfied" | "max_plan_required" | "endpoint_retired";
117
117
  };
118
118
  export type BatchGameHoldersItem = {
@@ -166,9 +166,9 @@ export type BatchTraderItem = {
166
166
  data?: Trader;
167
167
  error?: ApiErrorBody;
168
168
  };
169
- /** One bucketed OHLC price candle. Prices are in provider [0, 1] units, truncated to 4 decimals at the rendering edge. */
169
+ /** One bucketed OHLC price candle. Prices are in provider [0, 1] units: truncated to 4 decimals at 1d and 1w, Polymarket's own bucket price unrounded at 5m and 1h, where open, high, low and close are equal. */
170
170
  export type Candle = {
171
- /** Bucket-start unix epoch (seconds): UTC midnight for 1d, the ISO-week Monday's UTC midnight for 1w. */
171
+ /** Bucket-start unix epoch (seconds): the five-minute or hour boundary for 5m and 1h, UTC midnight for 1d, the ISO-week Monday's UTC midnight for 1w. */
172
172
  t: number;
173
173
  /** Open price in provider [0, 1] units (first observed point in the bucket). */
174
174
  o: number;
@@ -2312,12 +2312,18 @@ export type LiveSportsUpdatedData = {
2312
2312
  /** Public game page. Re-read it after a gap instead of replaying pulses. */
2313
2313
  snapshot_url: string;
2314
2314
  };
2315
- /** Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from our stored copy of the Polymarket CLOB prices-history series (covers open and resolved markets). */
2315
+ /** Provider-first bucketed OHLC price candles for a market's outcome tokens (open and resolved markets): 5m and 1h from Polymarket's /v2/prices-history buckets, 1d and 1w from our stored copy of its price history. */
2316
2316
  export type MarketCandles = {
2317
2317
  /** Market condition id the candles were read for. */
2318
2318
  condition_id: string;
2319
2319
  /** Bucketing granularity that produced these candles. */
2320
- resolution: "1d" | "1w";
2320
+ resolution: "5m" | "1h" | "1d" | "1w";
2321
+ /** 5m and 1h only: the first bucket start the read covers, unix seconds. Every candle has t at or after it. */
2322
+ window_start?: number;
2323
+ /** 5m and 1h only: the end of the covered window, unix seconds, exclusive. Every candle has t before it. A bucket inside the window with no candle had no Polymarket price; nothing is filled in. */
2324
+ window_end?: number;
2325
+ /** 5m and 1h only: when Polymarket's series was read. A window that reaches the present is re-read after at most 60 seconds. */
2326
+ observed_at?: string;
2321
2327
  /** One entry per present provider token (YES first, then NO); empty when no tokens have been fetched yet. */
2322
2328
  outcomes: OutcomeCandles[];
2323
2329
  };
@@ -3347,6 +3353,8 @@ export type PickOfTheDay = {
3347
3353
  records_as_of?: string;
3348
3354
  /** When the commitment was sealed (RFC3339 UTC), the sealed_at its ledger entry carries; always before committed_kickoff. Sent with commitment_hash. Additive and optional. */
3349
3355
  sealed_at?: string;
3356
+ /** The backed market's Polymarket sports market type as recorded with the pick: moneyline, spreads, totals, map_handicap and others, the value the archive row returns for the pick. Omitted when the market states none. Additive and optional. */
3357
+ sports_market_type?: string;
3350
3358
  };
3351
3359
  export type PickOfTheDayArchive = {
3352
3360
  /** Published Pick of the Day selections that have not been withdrawn, newest first by pick_date and then pick_rank within each product day. Withdrawn rows stay excluded after settlement. */
@@ -6490,6 +6498,8 @@ export interface OperationData {
6490
6498
  backed_side_share?: number;
6491
6499
  /** The full pick's sharp_positioned_usd: the Sharp positioned value the pick's page shows, the dollars the pick's counted graded wallets held on the backed side, in USD, recorded for the pick and not updated after. */
6492
6500
  sharp_positioned_usd?: number;
6501
+ /** The full pick's sports_market_type. */
6502
+ sports_market_type?: string;
6493
6503
  }[];
6494
6504
  proof_pending_picks?: ({
6495
6505
  is_free_selection: boolean;
@@ -7144,9 +7154,9 @@ export interface OperationQuery {
7144
7154
  getInsiderRadarFlag: Record<string, never>;
7145
7155
  getLargeTrade: Record<string, never>;
7146
7156
  getMarketCandles: {
7147
- /** Bucketing granularity. 1d aggregates by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d. */
7148
- resolution?: "1d" | "1w";
7149
- /** 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. */
7157
+ /** Bucketing granularity. 5m and 1h are Polymarket's own five-minute and hourly price buckets; 1d aggregates the stored series by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d. */
7158
+ resolution?: "5m" | "1h" | "1d" | "1w";
7159
+ /** 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; at 5m and 1h the window starts at the first bucket after 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. */
7150
7160
  from?: number;
7151
7161
  /** 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. */
7152
7162
  to?: number;