@skinpricer/sdk 0.3.0 → 0.5.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/dist/index.d.cts CHANGED
@@ -131,6 +131,8 @@ type QueryValue = QueryScalar | QueryScalar[] | Date | null | undefined;
131
131
  type QueryParams = Record<string, QueryValue>;
132
132
 
133
133
  interface BuildRequestInput {
134
+ authenticated?: boolean;
135
+ ifNoneMatch?: string;
134
136
  method: HttpMethod;
135
137
  path: string;
136
138
  query?: QueryParams;
@@ -150,20 +152,15 @@ declare class HttpClient {
150
152
  constructor(config: ResolvedConfig);
151
153
  /** Base URL for keyless public-service endpoints (see {@link ResolvedConfig.publicBaseUrl}). */
152
154
  get publicBaseUrl(): string;
155
+ /** Selects an API version while retaining a configured gateway prefix. */
156
+ versionedBaseUrl(version: "v2", baseUrl?: string): string;
153
157
  request<T>(input: BuildRequestInput, options?: RequestOptions): Promise<HttpResponse<T>>;
154
158
  private recordRateLimit;
155
159
  private awaitThrottle;
156
160
  }
157
161
 
158
- /**
159
- * Market ids the API integrates — the canonical join keys returned by
160
- * `GET /v1/markets/health` and used across pricing / nbbo / aggregation
161
- * responses. Kept in sync with that registry (18 integrated markets as of
162
- * 2026-06). A market id appears here once the backend integrates it, regardless
163
- * of live/degraded/stale status; ids prepared but not yet ingesting (e.g.
164
- * bitskins, skinbaron) are intentionally excluded until they show in health.
165
- */
166
- declare const KNOWN_MARKETS: readonly ["skinport", "skindeck", "buff163", "csfloat", "csdeals", "marketcsgo", "cstrade", "dmarket", "itrade", "lis-skins", "swapgg", "whitemarket", "waxpeer", "lootfarm", "avanmarket", "tradeit-store", "tradeit-trade", "steamcommunity"];
162
+ /** Market identifiers used in pricing responses. Availability differs by game. */
163
+ declare const KNOWN_MARKETS: readonly ["skinport", "skindeck", "buff163", "csfloat", "csdeals", "marketcsgo", "cstrade", "dmarket", "itrade", "lis-skins", "swapgg", "whitemarket", "waxpeer", "lootfarm", "rapidskins", "avanmarket", "tradeit-store", "tradeit-trade", "steamcommunity", "youpin", "mannco-store", "rusttm", "rustskins"];
167
164
  /** A known market id, or any other string. */
168
165
  type KnownMarket = (typeof KNOWN_MARKETS)[number] | (string & Record<never, never>);
169
166
  /** Markets that expose attribute (float/fade/tag) bucket pricing. */
@@ -184,14 +181,33 @@ interface MarketHealthRow {
184
181
  id: string;
185
182
  status: MarketRegistryStatus;
186
183
  /** ISO timestamp of the latest ingest event from this marketplace. */
187
- lastEventAt: string;
188
- listingsCount: number;
184
+ lastEventAt: string | null;
185
+ /** Null when the source does not establish an inventory count. */
186
+ listingsCount: number | null;
187
+ /** Percentage (0-100) of the market's quotes that are fresh. Null when it has none. */
188
+ freshnessCoveragePct: number | null;
189
+ listingsCountBasis?: "observed-listings" | "observed-units" | "observed-listings-subset" | "observed-empty" | null;
190
+ freshnessCoverageBasis?: {
191
+ kind: "observed-active-quote-identities";
192
+ activeWindowHours: number;
193
+ freshWindowMinutes: number;
194
+ activeQuotes: number;
195
+ freshQuotes: number;
196
+ collectionMode: "rolling-catalogue" | "snapshot-feed" | "unspecified";
197
+ };
198
+ /** CS2 coverage of the market's known item catalog. Absent without a reference. */
199
+ catalogCompleteness?: {
200
+ basis: "known-market-catalog";
201
+ referenceItems: number;
202
+ coveredItems: number;
203
+ percentage: number;
204
+ measuredAt: string;
205
+ };
189
206
  /**
190
- * Optional 48 × 5-min uptime tiers covering the trailing 4h. Each entry is
191
- * 0 (down) / 1 (degraded) / 2 (live), oldest first. Absent when the backend
192
- * doesn't yet emit per-bucket health.
207
+ * 48 half-hour bars covering the trailing 24 hours, oldest first. Values are
208
+ * 0 (stale), 1 (degraded), 2 (fresh), or null (unknown). Not provider uptime.
193
209
  */
194
- healthBars?: readonly number[];
210
+ healthBars: readonly (number | null)[];
195
211
  }
196
212
  /** `GET /v1/markets/health` — a plain array of per-market health rows. */
197
213
  type MarketHealthResponse = MarketHealthRow[];
@@ -200,16 +216,48 @@ type MarketHealthResponse = MarketHealthRow[];
200
216
  type IsoDateString = string;
201
217
  /** A monetary value in integer USD cents. */
202
218
  type Cents = number;
219
+ /** Evidence for a source time: the payload's own timestamp, a `Last-Modified` header, or CDN cache age. */
220
+ type SourceTimeKind = "payload" | "last_modified" | "cdn_age" | "none";
221
+ /** `ask` is a market's lowest sell price, `bid` its highest buy order. */
222
+ type QuotePriceKind = "ask" | "bid";
223
+ /** What a seller receives when a bid fills: withdrawable cash, Steam Wallet funds, or credit at the venue's own rate. */
224
+ type ValueKind = "cash" | "wallet" | "bot_rate" | "unknown";
225
+ /** Whether a sell average and maximum come from the market's own listing statistics or from observed lowest asks. */
226
+ type SellBasis = "listing_statistic" | "lowest_ask";
203
227
  interface MarketPricePoint {
204
228
  market: string;
205
229
  price: Cents;
206
230
  currency: string;
231
+ /** Source price in minor units of `originalCurrency`, before conversion and fees. */
232
+ originalPriceCents?: number | null;
233
+ originalCurrency?: string | null;
234
+ /** When the price was last read or confirmed still current. Not the age of the data. */
207
235
  fetchedAt: IsoDateString;
208
236
  ingestedAt?: IsoDateString;
209
- quoteSize?: number;
210
- totalQuantity?: number;
237
+ /** Count the source reports for this quote. Null when unknown, which is not zero. */
238
+ quoteSize?: number | null;
239
+ /** Quantity across bid price levels. Null when unknown. */
240
+ totalQuantity?: number | null;
241
+ /** Order count across bid price levels, where the source reports one. */
242
+ totalOrdersCount?: number | null;
243
+ /** False when the source's book was read only in part, so quantities are lower bounds. */
244
+ orderBookComplete?: boolean | null;
211
245
  ingestLatencyMs?: number;
212
246
  isStale?: boolean;
247
+ /** When the source produced this data. Absent or null when unknown. */
248
+ sourceUpdatedAt?: IsoDateString | null;
249
+ sourceTimeKind?: SourceTimeKind;
250
+ /** Age of the source's data when it was read, in seconds. */
251
+ sourceAgeSeconds?: number | null;
252
+ /** Whether the source's data is older than 30 minutes. Absent when its age is unknown. */
253
+ isSourceStale?: boolean;
254
+ /** True for a placeholder ask left out of the aggregate's average, median and deviation. It is still a real listing. */
255
+ outlier?: boolean;
256
+ priceKind?: QuotePriceKind;
257
+ /** True only for an ask you can buy at now. Always false on a bid. */
258
+ purchasable?: boolean;
259
+ /** Bids only. */
260
+ valueKind?: ValueKind;
213
261
  }
214
262
  interface AggregatePriceData {
215
263
  minPrice: Cents | null;
@@ -217,22 +265,35 @@ interface AggregatePriceData {
217
265
  avgPrice: Cents | null;
218
266
  medianPrice: Cents | null;
219
267
  stdDev: number | null;
268
+ /** `corroborated_low_cluster` when placeholder asks were left out of the average, median and deviation. */
269
+ basis?: "all_venues" | "corroborated_low_cluster";
220
270
  marketCount?: number;
221
271
  freshMarketCount?: number;
222
272
  listingCount?: number;
223
273
  updatedAt: IsoDateString;
274
+ priceKind?: "ask_statistic";
224
275
  }
225
276
  interface NbboBestPrice {
226
277
  market: string;
227
278
  price: Cents;
228
279
  updatedAt: IsoDateString;
229
280
  isStale: boolean;
281
+ priceKind?: QuotePriceKind;
282
+ /** True only for an ask you can buy at now. Always false on a bid. */
283
+ purchasable?: boolean;
230
284
  }
231
285
  interface BestPrice {
232
286
  market: string;
233
287
  price: Cents;
288
+ updatedAt: IsoDateString;
289
+ isStale: boolean;
290
+ /** @deprecated Use `updatedAt`. The API stops sending it on 2027-01-15. */
234
291
  updated_at: IsoDateString;
292
+ /** @deprecated Use `isStale`. The API stops sending it on 2027-01-15. */
235
293
  is_stale: boolean;
294
+ priceKind?: QuotePriceKind;
295
+ /** True only for an ask you can buy at now. Always false on a bid. */
296
+ purchasable?: boolean;
236
297
  }
237
298
  interface PaginationMeta {
238
299
  perPage: number;
@@ -245,602 +306,959 @@ interface PaginationMeta {
245
306
  nextPage: number | null;
246
307
  }
247
308
 
248
- interface AggregationsParams {
249
- /** Canonical item ids (1–100). Provide this or {@link AggregationsParams.marketHashNames}. */
250
- ids?: string[];
251
- /** Market hash names (1–100). Provide this or {@link AggregationsParams.ids}. */
252
- marketHashNames?: string[];
309
+ /** History values are statistics over asks, bids or sales, never a single quote. */
310
+ type HistoryPriceKind = "ask_statistic" | "bid_statistic" | "sale_statistic";
311
+ type HistoryListingType = "SELL_OFFER" | "BUY_ORDER" | "SALE_HISTORY";
312
+ /** Accepted on input; the backend also normalizes `SELL`/`BUY`/`SALES`. */
313
+ type HistoryListingTypeInput = HistoryListingType | "SELL" | "BUY" | "SALES";
314
+ type SalesHistoryWindow = "24h" | "7d" | "30d" | "90d";
315
+ type PriceHistoryInterval = "MINUTE_5" | "MINUTE_15" | "HOUR_1" | "HOUR_6" | "DAY_1";
316
+ interface PriceHistoryParams {
317
+ /** Start of the range (Date or ISO string). */
318
+ from?: Date | string;
319
+ /** End of the range (Date or ISO string). */
320
+ to?: Date | string;
321
+ /** Markets to include; when set, `byMarket` returns per-market series. */
253
322
  markets?: KnownMarket[];
323
+ listingType?: HistoryListingTypeInput;
324
+ salesWindow?: SalesHistoryWindow;
325
+ interval?: PriceHistoryInterval;
254
326
  }
255
- /** Per-market minimum sell price (snake_case). */
256
- interface MarketMinPrice {
257
- market_name: string;
258
- offers: number;
259
- price: Cents;
260
- updated_at: IsoDateString;
261
- is_stale?: boolean;
262
- ingested_at?: IsoDateString;
263
- ingest_latency_ms?: number;
264
- }
265
- interface ItemMinPrices {
266
- canonical_item_id: string;
267
- market_hash_name: string;
268
- prices: MarketMinPrice[];
269
- }
270
- /** `GET /v1/aggregations/min-prices` (snake_case). */
271
- interface MinPricesResponse {
272
- items: ItemMinPrices[];
327
+ interface PriceHistoryPoint {
328
+ timestamp: IsoDateString;
329
+ avgPrice: Cents | null;
330
+ medianPrice: Cents | null;
331
+ minPrice: Cents | null;
332
+ maxPrice: Cents | null;
333
+ listingCount: number | null;
334
+ totalQuantity: number | null;
335
+ volume: number | null;
336
+ bestBidCents: Cents | null;
337
+ bestAskCents: Cents | null;
338
+ spreadBps: number | null;
273
339
  }
274
- /** Per-market maximum buy order (snake_case). */
275
- interface MarketMaxOrder {
276
- market_name: string;
277
- offers: number;
278
- price: Cents;
279
- updated_at: IsoDateString;
280
- is_stale: boolean;
281
- total_quantity?: number;
282
- ingested_at?: IsoDateString;
283
- ingest_latency_ms?: number;
340
+ /** `GET /v1/pricing/:marketHashName/history` (camelCase). */
341
+ interface PriceHistoryResponse {
342
+ canonicalItemId: string;
343
+ name: string;
344
+ history: PriceHistoryPoint[];
345
+ listingType: HistoryListingType;
346
+ priceKind?: HistoryPriceKind;
347
+ salesWindow: SalesHistoryWindow | null;
348
+ /** Actual returned bucket width, which may differ from the requested interval. */
349
+ effectiveInterval: "10m" | "1h" | "1d";
284
350
  }
285
- interface ItemMaxOrders {
286
- canonical_item_id: string;
287
- market_hash_name: string;
288
- orders: MarketMaxOrder[];
351
+ interface MarketSeries {
352
+ market: string;
353
+ history: PriceHistoryPoint[];
354
+ /** `SELL_OFFER` series only. */
355
+ sellBasis?: SellBasis;
356
+ /** `BUY_ORDER` series only. */
357
+ valueKind?: ValueKind;
289
358
  }
290
- /** `GET /v1/aggregations/max-orders` (snake_case). */
291
- interface MaxOrdersResponse {
292
- items: ItemMaxOrders[];
359
+ /** `GET /v1/pricing/:marketHashName/history/markets` (camelCase). */
360
+ interface PriceHistoryByMarketResponse {
361
+ canonicalItemId: string;
362
+ name: string;
363
+ series: MarketSeries[];
364
+ listingType: HistoryListingType;
365
+ priceKind?: HistoryPriceKind;
366
+ salesWindow: SalesHistoryWindow | null;
367
+ /** Actual returned bucket width, which may differ from the requested interval. */
368
+ effectiveInterval: "10m" | "1h" | "1d";
293
369
  }
294
370
 
371
+ /** Games supported by the v2 pricing API. */
372
+ type Game = "cs2" | "rust";
373
+
295
374
  /** Shared base for resource namespaces. Holds the {@link HttpClient}. */
296
375
  declare abstract class BaseResource {
297
376
  protected readonly http: HttpClient;
298
- constructor(http: HttpClient);
377
+ private readonly game?;
378
+ constructor(http: HttpClient, game?: Game | undefined);
299
379
  /** Performs a request and returns the data with {@link ResponseMeta} attached. */
300
380
  protected call<T>(input: BuildRequestInput, options?: RequestOptions): Promise<T>;
301
381
  }
302
382
 
303
- interface AggregationsBatchParams {
383
+ /** Historical price series for an item. */
384
+ declare class HistoryResource extends BaseResource {
385
+ /** `GET /v1/pricing/:marketHashName/history` — aggregated time series. */
386
+ get(marketHashName: string, params?: PriceHistoryParams, options?: RequestOptions): Promise<PriceHistoryResponse>;
387
+ /** `GET /v1/pricing/:marketHashName/history/markets` — per-market series. */
388
+ byMarket(marketHashName: string, params?: PriceHistoryParams, options?: RequestOptions): Promise<PriceHistoryByMarketResponse>;
389
+ }
390
+
391
+ interface CurrentPriceParams {
392
+ /** Restrict the response to these market ids. */
304
393
  markets?: KnownMarket[];
305
- concurrency?: number;
306
394
  }
307
- declare class AggregationsResource extends BaseResource {
308
- /** GET /v1/aggregations/min-prices — minimum sell price per market. Pass up to 100 `ids` or `marketHashNames`. */
309
- minPrices(params: AggregationsParams, options?: RequestOptions): Promise<MinPricesResponse>;
310
- /** GET /v1/aggregations/max-orders — maximum buy order per market. Pass up to 100 `ids` or `marketHashNames`. */
311
- maxOrders(params: AggregationsParams, options?: RequestOptions): Promise<MaxOrdersResponse>;
312
- /** Like `minPrices` but splits more than 100 ids into batches and merges them. */
313
- minPricesAll(ids: string[], params?: AggregationsBatchParams, options?: RequestOptions): Promise<MinPricesResponse>;
314
- /** Like `maxOrders` but splits more than 100 ids into batches and merges them. */
315
- maxOrdersAll(ids: string[], params?: AggregationsBatchParams, options?: RequestOptions): Promise<MaxOrdersResponse>;
316
- private runBatched;
395
+ /** `GET /v1/pricing/:marketHashName` (camelCase). */
396
+ interface CurrentPriceResponse {
397
+ canonicalItemId: string;
398
+ name: string;
399
+ aggregate?: AggregatePriceData;
400
+ markets: MarketPricePoint[];
401
+ buyOrders?: MarketPricePoint[];
402
+ bestAsk?: NbboBestPrice | null;
403
+ bestBid?: NbboBestPrice | null;
404
+ spreadBps?: number | null;
405
+ marketCount?: number;
406
+ freshMarketCount?: number;
407
+ calculatedAt: IsoDateString;
317
408
  }
318
-
319
- type ArbitrageSort = "estimatedNetCents" | "spreadBps";
320
- interface ArbitrageParams {
321
- /** Max opportunities to return (1–100, default 50). */
409
+ interface PricingListingsParams {
410
+ /** Max listing samples to return (1–2000, default 500). */
322
411
  limit?: number;
323
- /** Minimum cross-market spread in basis points (default 200). */
324
- minSpreadBps?: number;
325
- /** Minimum estimated buy-side notional in integer USD cents (default 1000). */
326
- minNotionalCents?: number;
327
- /** @deprecated Alias for {@link ArbitrageParams.minNotionalCents}. */
328
- minNotional?: number;
329
- sort?: ArbitrageSort;
330
412
  markets?: KnownMarket[];
331
- /** Internal shortlist size (50–2000, default 500). */
332
- candidateLimit?: number;
333
413
  }
334
- interface ArbitrageQuote {
414
+ interface PricingListing {
415
+ listingId: string | null;
335
416
  market: string;
336
417
  price: Cents;
337
- quoteSize: number;
338
- updatedAt: IsoDateString;
339
- isStale: boolean;
418
+ currency: "USD";
419
+ floatValue: number | null;
420
+ paintSeed: number | null;
421
+ paintIndex: number | null;
422
+ inspectLink: string | null;
423
+ stickers: unknown[];
424
+ isStatTrak: boolean;
425
+ fetchedAt: IsoDateString;
426
+ /** `listing` for a single listing, `ask` for a market's lowest-ask row. */
427
+ priceKind?: "ask" | "listing";
428
+ purchasable?: boolean;
340
429
  }
341
- interface ArbitrageFreshness {
342
- buyAgeMs: number;
343
- sellAgeMs: number;
430
+ interface PricingListingFloatCoverage {
431
+ coverage: "none" | "partial" | "complete";
432
+ sampledListings: number;
433
+ listingsWithFloat: number;
434
+ marketsWithFloat: string[];
435
+ marketsWithoutFloat: string[];
344
436
  }
345
- interface ArbitrageOpportunity {
346
- canonicalItemId: string;
347
- marketHashName: string;
348
- slug: string;
349
- imageUrl: string | null;
350
- buy: ArbitrageQuote;
351
- sell: ArbitrageQuote;
352
- spreadBps: number;
353
- spreadCents: Cents;
354
- estimatedNetCents: Cents;
355
- maxTradableQuantity: number;
356
- estimatedNotionalCents: Cents;
357
- feeNotes: string;
358
- freshness: ArbitrageFreshness;
359
- calculatedAt: IsoDateString;
437
+ interface PricingListingObservedFloatSource {
438
+ market: string;
439
+ price: Cents;
440
+ fetchedAt: IsoDateString;
360
441
  }
361
- /** `GET /v1/arbitrage/opportunities` (camelCase). */
362
- interface ArbitrageOpportunitiesResponse {
363
- opportunities: ArbitrageOpportunity[];
364
- totalCandidates: number;
365
- calculatedAt: IsoDateString;
442
+ interface PricingListingFloatSummary {
443
+ observed: number;
444
+ itemMin: number | null;
445
+ itemMax: number | null;
446
+ observedSource: PricingListingObservedFloatSource;
366
447
  }
367
-
368
- /** Cross-market arbitrage opportunities. */
369
- declare class ArbitrageResource extends BaseResource {
370
- /** `GET /v1/arbitrage/opportunities` — ranked cross-market opportunities. */
371
- opportunities(params?: ArbitrageParams, options?: RequestOptions): Promise<ArbitrageOpportunitiesResponse>;
448
+ /** `GET /v1/pricing/:marketHashName/listings` (camelCase). */
449
+ interface PricingListingsResponse {
450
+ marketHashName: string;
451
+ canonicalItemId: string;
452
+ totalListings: number;
453
+ sampledListings: number;
454
+ floatCoverage: PricingListingFloatCoverage;
455
+ floatSummary: PricingListingFloatSummary | null;
456
+ listings: PricingListing[];
457
+ calculatedAt: IsoDateString;
372
458
  }
373
459
 
374
- type AttributeType = "float" | "fade" | "tag";
375
- type AttributeGranularity = "10m" | "1h" | "1d";
376
- interface AttributeRangeDimension {
377
- min: number;
378
- max: number;
379
- minInclusive: boolean;
380
- maxInclusive: boolean;
381
- }
382
- interface AttributeBucketDimensions {
383
- variant: string | null;
384
- float: AttributeRangeDimension | null;
385
- fade: AttributeRangeDimension | null;
386
- pattern: number | null;
387
- finishCatalog: number | null;
388
- paintSeed: number | null;
389
- charmTemplate: number | null;
390
- stickerScrape: number | null;
391
- sourceTagId: number | null;
392
- sourceTagName: string | null;
393
- nameTag: string | null;
460
+ interface ItemSearchParams {
461
+ /** Case-insensitive contains match on item name. */
462
+ search?: string;
463
+ markets?: KnownMarket[];
464
+ /** 1-based page number (default 1). */
465
+ page?: number;
466
+ /** Items per page (1–100, default 10). */
467
+ perPage?: number;
394
468
  }
395
- interface AttributePriceBucket {
396
- bucketId: string;
397
- bucketKey: string;
398
- sourceBucketId: string;
399
- bucketType: "attribute";
400
- attributeType: AttributeType;
401
- attributeTypes: AttributeType[];
402
- sourceItemId: string;
403
- dimensions: AttributeBucketDimensions;
404
- askCents: Cents | null;
405
- avgAskCents: Cents | null;
406
- medianAskCents: Cents | null;
407
- bidCents: Cents | null;
408
- askListingCount: number | null;
409
- bidOrderCount: number | null;
410
- sourceUpdatedAt: IsoDateString;
411
- collectedAt: IsoDateString;
469
+ /** `GET /v1/items` — paginated (camelCase). */
470
+ interface ItemPriceListResponse {
471
+ data: CurrentPriceResponse[];
472
+ pagination: PaginationMeta;
412
473
  }
413
- interface AttributePriceItem {
414
- canonicalItemId: string;
415
- marketHashName: string;
474
+ interface AllItemsLatestPrice {
416
475
  market: string;
417
- buckets: AttributePriceBucket[];
476
+ effectiveUsdCents: Cents;
477
+ fetchedAt: IsoDateString;
478
+ originalCurrency: string;
479
+ /** Present, and false, only when the ask cannot be bought now. */
480
+ purchasable?: false;
418
481
  }
419
- interface AttributeHistoryPoint {
420
- bucketStart: IsoDateString;
421
- openAskCents: Cents | null;
422
- highAskCents: Cents | null;
423
- lowAskCents: Cents | null;
424
- closeAskCents: Cents | null;
425
- avgAskCents: Cents | null;
426
- closeBidCents: Cents | null;
427
- askListingCount: number | null;
428
- bidOrderCount: number | null;
429
- firstObservedAt: IsoDateString;
430
- lastObservedAt: IsoDateString;
482
+ interface AllItemsPriceAggregates {
483
+ minPrice: Cents | null;
484
+ maxPrice: Cents | null;
485
+ avgPrice: Cents | null;
486
+ medianPrice: Cents | null;
487
+ stdDev: number | null;
488
+ updatedAt: IsoDateString;
431
489
  }
432
- interface AttributeHistoryBucket {
433
- bucketId: string;
434
- bucketKey: string;
435
- sourceBucketId: string;
436
- bucketType: "attribute";
437
- attributeType: AttributeType;
438
- attributeTypes: AttributeType[];
439
- sourceItemId: string;
440
- dimensions: AttributeBucketDimensions;
441
- points: AttributeHistoryPoint[];
490
+ interface AllItemsItem {
491
+ id: string;
492
+ name: string;
493
+ latestPrices: AllItemsLatestPrice[];
494
+ priceAggregates: AllItemsPriceAggregates | null;
442
495
  }
443
- interface AttributeHistoryItem {
444
- canonicalItemId: string;
445
- marketHashName: string;
496
+ /** `GET /v1/items/all` — a plain array (camelCase). */
497
+ type AllItemsResponse = AllItemsItem[];
498
+
499
+ /** Item discovery / search. */
500
+ declare class ItemSearchResource extends BaseResource {
501
+ /** GET /v1/items — paginated item search with current pricing. */
502
+ search(params?: ItemSearchParams, options?: RequestOptions): Promise<ItemPriceListResponse>;
503
+ /** Async iterator over every matching item, walking pages. */
504
+ searchEach(params?: ItemSearchParams, options?: RequestOptions): AsyncGenerator<CurrentPriceResponse>;
505
+ }
506
+ /** CS2 item discovery and full-catalog export. */
507
+ declare class ItemsResource extends ItemSearchResource {
508
+ /** GET /v1/items/all — every tracked item with latest prices (capped, unpaginated). */
509
+ all(options?: RequestOptions): Promise<AllItemsResponse>;
510
+ }
511
+
512
+ declare const LIQUIDITY_BADGES: readonly ["EXTREMELY_LIQUID", "VERY_LIQUID", "LIQUID", "ILLIQUID", "VERY_ILLIQUID", "EXTREMELY_ILLIQUID", "UNTRADED", "INSUFFICIENT_DATA"];
513
+ type LiquidityBadge = (typeof LIQUIDITY_BADGES)[number];
514
+ declare const LIQUIDITY_CONFIDENCE: readonly ["HIGH", "MEDIUM", "LOW", "CRITICAL"];
515
+ type LiquidityConfidence = (typeof LIQUIDITY_CONFIDENCE)[number];
516
+ type LiquidityCoverage = "full" | "partial" | "none";
517
+ /** What a market pays the seller: `cash` (withdrawable), `wallet` (Steam Wallet funds), `bot_rate` (credit at the venue's own rate) or `unknown`. */
518
+ type LiquidityPayout = "cash" | "wallet" | "bot_rate" | "unknown";
519
+ /** Lowercase label form of the badge; `UNTRADED` maps to `"unknown"`, no `"moderate"` tier. */
520
+ declare const LIQUIDITY_LABELS: readonly ["extremely_liquid", "very_liquid", "liquid", "illiquid", "very_illiquid", "extremely_illiquid", "unknown"];
521
+ type LiquidityLabel = (typeof LIQUIDITY_LABELS)[number];
522
+ declare const SUPPORTED_LIQUIDITY_MARKETS: readonly ["skinport", "marketcsgo", "dmarket", "steamcommunity", "csfloat"];
523
+ type SupportedLiquidityMarket = (typeof SUPPORTED_LIQUIDITY_MARKETS)[number];
524
+ declare const SUPPORTED_RUST_LIQUIDITY_MARKETS: readonly ["rusttm", "skinport"];
525
+ type SupportedRustLiquidityMarket = (typeof SUPPORTED_RUST_LIQUIDITY_MARKETS)[number];
526
+ type LiquidityMarketForGame<G extends Game> = G extends "rust" ? SupportedRustLiquidityMarket : SupportedLiquidityMarket;
527
+ interface LiquidityParams<Market extends string = SupportedLiquidityMarket> {
528
+ /** Hypothetical ask (USD cents) to estimate against; defaults to the best ask. */
529
+ askPrice?: Cents;
530
+ market?: Market;
531
+ }
532
+ /** Per-market row; every metric is null when that market has no data. */
533
+ interface LiquidityMarketMetric {
446
534
  market: string;
447
- buckets: AttributeHistoryBucket[];
535
+ salesPerDay: number | null;
536
+ activeListings: number | null;
537
+ bestAskUsdCents: Cents | null;
538
+ medianTimeToSellHours: number | null;
539
+ p90TimeToSellHours: number | null;
540
+ salesDataAgeMinutes: number | null;
541
+ listingsDataAgeMinutes: number | null;
448
542
  }
449
- interface AttributeLatestParams {
450
- canonicalItemId?: string;
451
- marketHashName?: string;
452
- attributes?: AttributeType[];
453
- /** Max attribute buckets to return (1–1000). */
454
- limit?: number;
455
- /** Opaque pagination cursor from a previous `nextCursor`. */
456
- cursor?: string;
457
- /** Supported markets to include. */
458
- markets?: KnownMarket[];
543
+ /** `GET /v1/liquidity/:marketHashName` — full liquidity model for one item. */
544
+ interface LiquidityResponse {
545
+ canonicalItemId: string;
546
+ marketHashName: string;
547
+ liquidityBadge: LiquidityBadge;
548
+ confidence: LiquidityConfidence;
549
+ coverage: LiquidityCoverage;
550
+ medianTimeToSellHours: number | null;
551
+ p90TimeToSellHours: number | null;
552
+ bestMarketToList: string | null;
553
+ /** What `bestMarketToList` pays; null exactly when it is null. Steam Community Market pays Steam Wallet funds, which cannot be withdrawn. */
554
+ bestMarketToListPayout?: LiquidityPayout | null;
555
+ salesPerDay: number | null;
556
+ activeListings: number | null;
557
+ referenceAskUsdCents: Cents | null;
558
+ marketWideSalesPerDay: number | null;
559
+ marketWideListings: number | null;
560
+ marketsWithSales: number;
561
+ marketsWithDepth: number;
562
+ /** Whole-market saturation (hours), NOT a per-listing estimate. */
563
+ marketWideMedianTimeToSellHours: number | null;
564
+ marketWideP90TimeToSellHours: number | null;
565
+ metrics: LiquidityMarketMetric[];
566
+ /** Data-quality flags, e.g. `sales_data_stale:marketcsgo`. */
567
+ notes: string[];
568
+ calculatedAt: IsoDateString;
459
569
  }
460
- interface AttributeLatestResponse {
461
- bucketSchemaVersion: 1;
462
- markets: string[];
463
- currency: "USD";
464
- asOf: IsoDateString;
465
- items: AttributePriceItem[];
466
- nextCursor: string | null;
467
- sourceGaps: string[];
570
+ /** `GET /v1/liquidity/summary/:marketHashName` — slim badge-only projection. */
571
+ interface LiquiditySummaryResponse {
572
+ marketHashName: string;
573
+ liquidityBadge: LiquidityBadge;
574
+ liquidity: LiquidityLabel;
575
+ /** Human time-to-sell, e.g. `"2 - 6 hours"` (`"Insufficient data"` when no estimate is available). */
576
+ estimatedSaleTime: string;
577
+ confidence: LiquidityConfidence;
578
+ /** 0-100, higher sells faster; null when untraded. */
579
+ score: number | null;
580
+ bestMarketToList: string | null;
581
+ /** What `bestMarketToList` pays; null exactly when it is null. Steam Community Market pays Steam Wallet funds, which cannot be withdrawn. */
582
+ bestMarketToListPayout?: LiquidityPayout | null;
583
+ calculatedAt: IsoDateString;
468
584
  }
469
- interface AttributeHistoryParams {
470
- canonicalItemId?: string;
471
- marketHashName?: string;
472
- bucketId?: string;
473
- bucketIds?: string[];
474
- attributes?: AttributeType[];
475
- from?: Date | string;
476
- to?: Date | string;
477
- granularity?: AttributeGranularity;
478
- /** Max history points across all buckets (1–10000). */
479
- limit?: number;
480
- markets?: KnownMarket[];
585
+ /** Request body for `POST /v1/liquidity/batch` (1-100 names). */
586
+ interface LiquidityBatchBody<Market extends string = SupportedLiquidityMarket> {
587
+ marketHashNames: string[];
588
+ market?: Market;
481
589
  }
482
- interface AttributeHistoryResponse {
483
- bucketSchemaVersion: 1;
484
- markets: string[];
485
- currency: "USD";
486
- granularity: AttributeGranularity;
487
- items: AttributeHistoryItem[];
488
- sourceGaps: string[];
590
+ /** `POST /v1/liquidity/batch` — up to 100 full results in one call. */
591
+ interface LiquidityBatchResponse {
592
+ results: LiquidityResponse[];
593
+ notFound: string[];
594
+ requested: number;
595
+ calculatedAt: IsoDateString;
489
596
  }
490
- interface Buff163LatestParams {
491
- canonicalItemId?: string;
492
- marketHashName?: string;
493
- attributes?: AttributeType[];
494
- limit?: number;
495
- cursor?: string;
597
+ /** Bulk-map entry. */
598
+ interface LiquidityBulkItem {
599
+ marketHashName: string;
600
+ /** @deprecated Use `marketHashName`. The API stops sending it on 2027-01-15. */
601
+ market_hash_name: string;
602
+ liquidity: LiquidityLabel;
603
+ estimatedSaleTime: string;
604
+ /** @deprecated Use `estimatedSaleTime`. The API stops sending it on 2027-01-15. */
605
+ estimated_sale_time: string;
606
+ liquidityBadge: LiquidityBadge;
607
+ confidence: LiquidityConfidence;
608
+ score: number | null;
609
+ bestMarketToList: string | null;
610
+ /** What `bestMarketToList` pays; null exactly when it is null. Steam Community Market pays Steam Wallet funds, which cannot be withdrawn. */
611
+ bestMarketToListPayout?: LiquidityPayout | null;
612
+ /** Reserved; always `{}` for now. */
613
+ variants: Record<string, never>;
496
614
  }
497
- interface Buff163AttributeLatestResponse {
498
- bucketSchemaVersion: 1;
499
- market: "buff163";
500
- currency: "USD";
501
- asOf: IsoDateString;
502
- items: AttributePriceItem[];
503
- nextCursor: string | null;
504
- sourceGaps: string[];
615
+ interface LiquidityBulkParams {
616
+ /** ETag from the preceding response. HTTP 304 returns null. */
617
+ ifNoneMatch?: string;
505
618
  }
506
- interface Buff163HistoryParams {
507
- canonicalItemId?: string;
508
- marketHashName?: string;
509
- bucketId?: string;
510
- bucketIds?: string[];
511
- attributes?: AttributeType[];
512
- from?: Date | string;
513
- to?: Date | string;
514
- granularity?: AttributeGranularity;
515
- limit?: number;
619
+ /** `GET /v1/liquidity/items/manifest` — cheap change-probe; compare `version` before refetching. */
620
+ interface LiquidityBulkManifest {
621
+ /** Snapshot version / ETag. */
622
+ version: string;
623
+ calculatedAt: IsoDateString;
624
+ /** Recompute cadence as an ISO-8601 duration, e.g. `"PT10M"`. */
625
+ cadence: string;
626
+ markets: string[];
627
+ itemCount: number;
516
628
  }
517
- interface Buff163AttributeHistoryResponse {
518
- bucketSchemaVersion: 1;
519
- market: "buff163";
520
- currency: "USD";
521
- granularity: AttributeGranularity;
522
- items: AttributeHistoryItem[];
523
- sourceGaps: string[];
629
+ /** `GET /v1/liquidity/items` — Enterprise: whole-catalog map keyed by market hash name. */
630
+ interface LiquidityBulkResponse extends LiquidityBulkManifest {
631
+ items: Record<string, LiquidityBulkItem>;
524
632
  }
525
633
 
526
- /** Cross-market attribute (float/fade/tag) bucket prices. */
527
- declare class AttributePricesResource extends BaseResource {
528
- /** GET /v1/attribute-prices/latest — latest attribute buckets across markets. */
529
- latest(params?: AttributeLatestParams, options?: RequestOptions): Promise<AttributeLatestResponse>;
530
- /** GET /v1/attribute-prices/history — OHLC attribute bucket history. */
531
- history(params?: AttributeHistoryParams, options?: RequestOptions): Promise<AttributeHistoryResponse>;
532
- /** Async iterator over every latest attribute item, following `nextCursor`. */
533
- latestEach(params?: AttributeLatestParams, options?: RequestOptions): AsyncGenerator<AttributePriceItem>;
634
+ /**
635
+ * Liquidity & expected time-to-sell, from cross-market order-book depth and
636
+ * sales velocity. The single + summary + batch endpoints are Pro; the bulk map
637
+ * + manifest are Enterprise.
638
+ */
639
+ declare class ItemLiquidityResource<Market extends string = SupportedLiquidityMarket> extends BaseResource {
640
+ /** `GET /v1/liquidity/:marketHashName` — full liquidity model for one item. */
641
+ get(marketHashName: string, params?: LiquidityParams<Market>, options?: RequestOptions): Promise<LiquidityResponse>;
642
+ /** `GET /v1/liquidity/summary/:marketHashName` — slim badge-only projection. */
643
+ summary(marketHashName: string, params?: LiquidityParams<Market>, options?: RequestOptions): Promise<LiquiditySummaryResponse>;
644
+ /** `POST /v1/liquidity/batch` — score up to 100 items in one call. */
645
+ batch(body: LiquidityBatchBody<Market>, options?: RequestOptions): Promise<LiquidityBatchResponse>;
646
+ }
647
+ /** CS2 liquidity, including Enterprise bulk exports. */
648
+ declare class LiquidityResource extends ItemLiquidityResource {
649
+ /** `GET /v1/liquidity/:marketHashName`. `"items"` is reserved for {@link bulk}. */
650
+ get(marketHashName: string, params?: LiquidityParams<SupportedLiquidityMarket>, options?: RequestOptions): Promise<LiquidityResponse>;
651
+ /**
652
+ * `GET /v1/liquidity/items`. Enterprise: the whole-catalog liquidity map,
653
+ * rematerialized every ~10 minutes. Poll {@link manifest} and compare
654
+ * `version` before refetching this heavier payload.
655
+ */
656
+ bulk(params?: undefined, options?: RequestOptions): Promise<LiquidityBulkResponse>;
657
+ /** A matching conditional ETag returns null. */
658
+ bulk(params: LiquidityBulkParams, options?: RequestOptions): Promise<LiquidityBulkResponse | null>;
659
+ /**
660
+ * `GET /v1/liquidity/items/manifest`. Enterprise: a cheap change-probe for
661
+ * the {@link bulk} map (`version`, `calculatedAt`, `cadence`, `markets`,
662
+ * `itemCount`). Refetch the bulk map only when `version` changes.
663
+ */
664
+ manifest(params?: undefined, options?: RequestOptions): Promise<LiquidityBulkManifest>;
665
+ /** A matching conditional ETag returns null. */
666
+ manifest(params: LiquidityBulkParams, options?: RequestOptions): Promise<LiquidityBulkManifest | null>;
534
667
  }
535
668
 
536
- /** Buff163-specific attribute bucket prices. */
537
- declare class Buff163Resource extends BaseResource {
538
- /** GET /v1/markets/buff163/latest — latest Buff163 attribute buckets. */
539
- latest(params?: Buff163LatestParams, options?: RequestOptions): Promise<Buff163AttributeLatestResponse>;
540
- /** GET /v1/markets/buff163/history — OHLC Buff163 attribute bucket history. */
541
- history(params?: Buff163HistoryParams, options?: RequestOptions): Promise<Buff163AttributeHistoryResponse>;
542
- /** Async iterator over every latest Buff163 attribute item, following `nextCursor`. */
543
- latestEach(params?: Buff163LatestParams, options?: RequestOptions): AsyncGenerator<AttributePriceItem>;
669
+ /** Market registry health & integration status. */
670
+ declare class MarketsResource extends BaseResource {
671
+ /**
672
+ * `GET /v1/markets/health` — per-market ingest status, last event time, and
673
+ * listing counts for every integrated market. Returns a plain array of
674
+ * {@link import("../types/markets").MarketHealthRow}.
675
+ */
676
+ health(options?: RequestOptions): Promise<MarketHealthResponse>;
544
677
  }
545
678
 
546
- type HistoryListingType = "SELL_OFFER" | "BUY_ORDER" | "SALE_HISTORY";
547
- /** Accepted on input; the backend also normalizes `SELL`/`BUY`/`SALES`. */
548
- type HistoryListingTypeInput = HistoryListingType | "SELL" | "BUY" | "SALES";
549
- type SalesHistoryWindow = "24h" | "7d" | "30d" | "90d";
550
- type PriceHistoryInterval = "MINUTE_5" | "MINUTE_15" | "HOUR_1" | "HOUR_6" | "DAY_1";
551
- interface PriceHistoryParams {
552
- /** Start of the range (Date or ISO string). */
553
- from?: Date | string;
554
- /** End of the range (Date or ISO string). */
555
- to?: Date | string;
556
- /** Markets to include; when set, `byMarket` returns per-market series. */
679
+ /** How well the fees on one side of the trade are known. With `unknown`, an ask's `appliedFeeBps` is null and a bid assumes a default commission. */
680
+ type FeeStatus = "complete" | "partial" | "unknown";
681
+ interface NbboParams {
682
+ /** Canonical item id. Provide this or `marketHashName`. */
683
+ id?: string;
684
+ /** Market hash name. */
685
+ marketHashName?: string;
557
686
  markets?: KnownMarket[];
558
- listingType?: HistoryListingTypeInput;
559
- salesWindow?: SalesHistoryWindow;
560
- interval?: PriceHistoryInterval;
561
687
  }
562
- interface PriceHistoryPoint {
563
- timestamp: IsoDateString;
564
- avgPrice: Cents | null;
565
- medianPrice: Cents | null;
566
- minPrice: Cents | null;
567
- maxPrice: Cents | null;
568
- listingCount: number | null;
569
- totalQuantity: number | null;
570
- volume: number | null;
571
- bestBidCents: Cents | null;
572
- bestAskCents: Cents | null;
688
+ /** Fee-aware, executability-ranked best price for one side. Ask `price` is the total a buyer pays; bid `price` is the net a seller receives after fees. */
689
+ interface ExecutionAdjustedBestPrice {
690
+ market: string;
691
+ price: Cents;
692
+ rawPrice: Cents;
693
+ /** Null on an ask when `feeStatus` is `unknown`. */
694
+ appliedFeeBps: number | null;
695
+ /** Null rather than zero when the market is not in the fee model. */
696
+ withdrawalFlatUsdCents?: Cents | null;
697
+ feeStatus?: FeeStatus;
698
+ feeModelVersion?: string;
699
+ executability: number;
700
+ updatedAt: IsoDateString;
701
+ isStale: boolean;
702
+ reasons: string[];
703
+ priceKind?: QuotePriceKind;
704
+ /** True only for an ask you can buy at now. Always false on a bid. */
705
+ purchasable?: boolean;
706
+ }
707
+ /** Execution-adjusted NBBO block: fee-aware best bid/ask re-ranked by executability. */
708
+ interface ExecutionAdjustedNbbo {
709
+ bestAsk: ExecutionAdjustedBestPrice | null;
710
+ bestBid: ExecutionAdjustedBestPrice | null;
573
711
  spreadBps: number | null;
712
+ locked: boolean;
713
+ crossed: boolean;
714
+ executableConfidence: number;
715
+ reasons: string[];
716
+ feeModelVersion: string;
717
+ calculatedAt: IsoDateString;
574
718
  }
575
- /** `GET /v1/pricing/:marketHashName/history` (camelCase). */
576
- interface PriceHistoryResponse {
719
+ /** `GET /v1/nbbo` (camelCase). */
720
+ interface NbboResponse {
721
+ marketHashName: string;
577
722
  canonicalItemId: string;
578
- name: string;
579
- history: PriceHistoryPoint[];
580
- listingType: HistoryListingType;
581
- salesWindow: SalesHistoryWindow | null;
723
+ bestAsk: NbboBestPrice | null;
724
+ bestBid: NbboBestPrice | null;
725
+ spreadBps: number | null;
726
+ marketCount: number;
727
+ freshMarketCount: number;
728
+ locked: boolean;
729
+ crossed: boolean;
730
+ confidence: number;
731
+ calculatedAt: IsoDateString;
732
+ /** Execution-adjusted "real best market"; null when no quotes. */
733
+ executionAdjusted: ExecutionAdjustedNbbo | null;
582
734
  }
583
- interface MarketSeries {
735
+ interface NbboDepthParams extends NbboParams {
736
+ /** Aggregated depth levels per side (1–50, default 10). */
737
+ depth?: number;
738
+ }
739
+ interface NbboDepthQuote {
584
740
  market: string;
585
- history: PriceHistoryPoint[];
741
+ level: number;
742
+ price: Cents;
743
+ quantity: number;
744
+ ordersCount: number;
745
+ updatedAt: IsoDateString;
746
+ isStale: boolean;
747
+ priceKind?: QuotePriceKind;
748
+ /** True only for an ask level you can buy at now. Always false on a bid. */
749
+ purchasable?: boolean;
750
+ valueKind?: ValueKind;
586
751
  }
587
- /** `GET /v1/pricing/:marketHashName/history/markets` (camelCase). */
588
- interface PriceHistoryByMarketResponse {
752
+ interface NbboDepthLevel {
753
+ rank: number;
754
+ price: Cents;
755
+ quantity: number;
756
+ ordersCount: number;
757
+ marketCount: number;
758
+ cumulativeQuantity: number;
759
+ updatedAt: IsoDateString;
760
+ isStale: boolean;
761
+ quotes: NbboDepthQuote[];
762
+ }
763
+ /** `GET /v1/nbbo/depth` (camelCase). */
764
+ interface NbboDepthResponse {
765
+ marketHashName: string;
589
766
  canonicalItemId: string;
590
- name: string;
591
- series: MarketSeries[];
592
- listingType: HistoryListingType;
593
- salesWindow: SalesHistoryWindow | null;
767
+ depth: number;
768
+ marketCount: number;
769
+ asks: NbboDepthLevel[];
770
+ bids: NbboDepthLevel[];
771
+ spreadBps: number | null;
772
+ locked: boolean;
773
+ crossed: boolean;
774
+ calculatedAt: IsoDateString;
594
775
  }
595
776
 
596
- /** Historical price series for an item. */
597
- declare class HistoryResource extends BaseResource {
598
- /** `GET /v1/pricing/:marketHashName/history` — aggregated time series. */
599
- get(marketHashName: string, params?: PriceHistoryParams, options?: RequestOptions): Promise<PriceHistoryResponse>;
600
- /** `GET /v1/pricing/:marketHashName/history/markets` — per-market series. */
601
- byMarket(marketHashName: string, params?: PriceHistoryParams, options?: RequestOptions): Promise<PriceHistoryByMarketResponse>;
777
+ /** National Best Bid and Offer (top of book) and aggregated depth. */
778
+ declare class NbboResource extends BaseResource {
779
+ /** `GET /v1/nbbo` — best bid/ask across markets. Pass `id` or `marketHashName`. */
780
+ get(params: NbboParams, options?: RequestOptions): Promise<NbboResponse>;
781
+ /** `GET /v1/nbbo/depth` — aggregated order-book depth per side. */
782
+ depth(params: NbboDepthParams, options?: RequestOptions): Promise<NbboDepthResponse>;
602
783
  }
603
784
 
604
- interface CurrentPriceParams {
605
- /** Restrict the response to these market ids. */
606
- markets?: KnownMarket[];
785
+ /** Current cross-market pricing for a single item. */
786
+ declare class PricingResource extends BaseResource {
787
+ /** `GET /v1/pricing/:marketHashName` — full cross-market pricing snapshot. */
788
+ get(marketHashName: string, params?: CurrentPriceParams, options?: RequestOptions): Promise<CurrentPriceResponse>;
789
+ /** `GET /v1/pricing/:marketHashName/listings` — individual listing samples. */
790
+ listings(marketHashName: string, params?: PricingListingsParams, options?: RequestOptions): Promise<PricingListingsResponse>;
607
791
  }
608
- /** `GET /v1/pricing/:marketHashName` (camelCase). */
609
- interface CurrentPriceResponse {
610
- canonicalItemId: string;
792
+
793
+ interface SchemaRarity {
794
+ key: string;
611
795
  name: string;
612
- aggregate?: AggregatePriceData;
613
- markets: MarketPricePoint[];
614
- buyOrders?: MarketPricePoint[];
615
- bestAsk?: NbboBestPrice | null;
616
- bestBid?: NbboBestPrice | null;
617
- spreadBps?: number | null;
618
- marketCount?: number;
619
- freshMarketCount?: number;
620
- calculatedAt: IsoDateString;
796
+ tier: number;
797
+ color?: string;
621
798
  }
622
- interface PricingListingsParams {
623
- /** Max listing samples to return (1–2000, default 500). */
799
+ interface SchemaCollection {
800
+ name: string;
801
+ image?: string;
802
+ }
803
+ interface SchemaContainer {
804
+ name: string;
805
+ type: string;
806
+ releaseDate?: IsoDateString;
807
+ image?: string;
808
+ }
809
+ interface SchemaRegistries {
810
+ rarities: SchemaRarity[];
811
+ collections: Record<string, SchemaCollection>;
812
+ containers: Record<string, SchemaContainer>;
813
+ }
814
+ interface SchemaVariant {
815
+ marketHashName: string;
816
+ family: string;
817
+ name: string;
818
+ phase?: number;
819
+ image?: string;
820
+ }
821
+ /** Schema fields that do not apply to the item or game are omitted. */
822
+ interface SchemaItem {
823
+ id: string;
824
+ marketHashName: string;
825
+ slug: string;
826
+ category: string;
827
+ baseName?: string;
828
+ weapon?: string;
829
+ finish?: string;
830
+ paintIndex?: string;
831
+ rarity?: string;
832
+ wear?: string;
833
+ wears?: string[];
834
+ stattrak?: boolean;
835
+ souvenir?: boolean;
836
+ hasStattrak?: boolean;
837
+ hasSouvenir?: boolean;
838
+ stattrakOf?: string;
839
+ souvenirOf?: string;
840
+ floatRange?: {
841
+ min: number;
842
+ max: number;
843
+ };
844
+ variants?: SchemaVariant[];
845
+ variant?: {
846
+ base: string;
847
+ family: string;
848
+ name: string;
849
+ };
850
+ collections?: string[];
851
+ containers?: string[];
852
+ image?: string;
853
+ releaseDate?: IsoDateString;
854
+ ids: Record<string, string>;
855
+ aliases?: Record<string, string>;
856
+ }
857
+ interface SchemaSnapshotResponse extends SchemaRegistries {
858
+ schemaVersion: number;
859
+ generatedAt: IsoDateString;
860
+ itemCount: number;
861
+ items: Record<string, SchemaItem>;
862
+ }
863
+ interface SchemaItemResponse {
864
+ schemaVersion: number;
865
+ item: SchemaItem;
866
+ registries?: SchemaRegistries;
867
+ }
868
+ interface SchemaSnapshotParams {
869
+ /** ETag from the preceding snapshot. HTTP 304 returns null. */
870
+ ifNoneMatch?: string;
871
+ }
872
+ interface SchemaChangesParams {
873
+ /** Schema version or ISO timestamp. Keep this value unchanged while paging. */
874
+ since: number | string | Date;
875
+ /** Opaque cursor returned by this game's previous delta page. */
876
+ cursor?: string;
877
+ /** Items per page, from 1 to 5000. */
624
878
  limit?: number;
879
+ }
880
+ interface SchemaChangesResponse {
881
+ schemaVersion: number;
882
+ since: number;
883
+ count: number;
884
+ hasMore: boolean;
885
+ nextCursor: string | null;
886
+ items: SchemaItem[];
887
+ registries?: SchemaRegistries;
888
+ }
889
+
890
+ /** Item catalog snapshots, single-item lookup, and incremental changes. */
891
+ declare class SchemaResource extends BaseResource {
892
+ snapshot(params?: undefined, options?: RequestOptions): Promise<SchemaSnapshotResponse>;
893
+ snapshot(params: SchemaSnapshotParams, options?: RequestOptions): Promise<SchemaSnapshotResponse | null>;
894
+ /** Look up one item by canonical id or exact name; v2 also accepts its game-scoped slug. */
895
+ get(idOrName: string, options?: RequestOptions): Promise<SchemaItemResponse>;
896
+ /** One page of items changed after a catalog version or timestamp. */
897
+ changes(params: SchemaChangesParams, options?: RequestOptions): Promise<SchemaChangesResponse>;
898
+ /** Iterate changes without moving the original version boundary while paging. */
899
+ changesEach(params: SchemaChangesParams, options?: RequestOptions): AsyncGenerator<SchemaItem>;
900
+ }
901
+
902
+ /** Game-scoped v2 resources. Construct with `client.forGame(game)`. */
903
+ declare class GameClient<G extends Game> {
904
+ readonly game: G;
905
+ readonly pricing: PricingResource;
906
+ readonly history: HistoryResource;
907
+ readonly items: ItemSearchResource;
908
+ readonly nbbo: NbboResource;
909
+ readonly liquidity: ItemLiquidityResource<LiquidityMarketForGame<G>>;
910
+ readonly schema: SchemaResource;
911
+ readonly markets: MarketsResource;
912
+ constructor(http: HttpClient, game: G);
913
+ }
914
+
915
+ interface AggregationsParams {
916
+ /** Canonical item ids (1–100). Provide this or {@link AggregationsParams.marketHashNames}. */
917
+ ids?: string[];
918
+ /** Market hash names (1–100). Provide this or {@link AggregationsParams.ids}. */
919
+ marketHashNames?: string[];
625
920
  markets?: KnownMarket[];
626
921
  }
627
- interface PricingListing {
628
- listingId: string | null;
629
- market: string;
922
+ /** Per-market minimum sell price. */
923
+ interface MarketMinPrice {
924
+ marketName: string;
925
+ offers: number;
630
926
  price: Cents;
631
- currency: "USD";
632
- floatValue: number | null;
633
- paintSeed: number | null;
634
- paintIndex: number | null;
635
- inspectLink: string | null;
636
- stickers: unknown[];
637
- isStatTrak: boolean;
638
- fetchedAt: IsoDateString;
927
+ updatedAt: IsoDateString;
928
+ isStale?: boolean;
929
+ ingestedAt?: IsoDateString;
930
+ ingestLatencyMs?: number;
931
+ priceKind?: "ask";
932
+ /** True only when you can buy at this price now. */
933
+ purchasable?: boolean;
934
+ /** @deprecated Use `marketName`. The API stops sending it on 2027-01-15. */
935
+ market_name: string;
936
+ /** @deprecated Use `updatedAt`. The API stops sending it on 2027-01-15. */
937
+ updated_at: IsoDateString;
938
+ /** @deprecated Use `isStale`. The API stops sending it on 2027-01-15. */
939
+ is_stale?: boolean;
940
+ /** @deprecated Use `ingestedAt`. The API stops sending it on 2027-01-15. */
941
+ ingested_at?: IsoDateString;
942
+ /** @deprecated Use `ingestLatencyMs`. The API stops sending it on 2027-01-15. */
943
+ ingest_latency_ms?: number;
639
944
  }
640
- interface PricingListingFloatCoverage {
641
- coverage: "none" | "partial" | "complete";
642
- sampledListings: number;
643
- listingsWithFloat: number;
644
- marketsWithFloat: string[];
645
- marketsWithoutFloat: string[];
945
+ interface ItemMinPrices {
946
+ canonicalItemId: string;
947
+ marketHashName: string;
948
+ prices: MarketMinPrice[];
949
+ /** @deprecated Use `canonicalItemId`. The API stops sending it on 2027-01-15. */
950
+ canonical_item_id: string;
951
+ /** @deprecated Use `marketHashName`. The API stops sending it on 2027-01-15. */
952
+ market_hash_name: string;
646
953
  }
647
- interface PricingListingObservedFloatSource {
648
- market: string;
649
- price: Cents;
650
- fetchedAt: IsoDateString;
954
+ /** `GET /v1/aggregations/min-prices`. */
955
+ interface MinPricesResponse {
956
+ items: ItemMinPrices[];
651
957
  }
652
- interface PricingListingFloatSummary {
653
- observed: number;
654
- itemMin: number | null;
655
- itemMax: number | null;
656
- observedSource: PricingListingObservedFloatSource;
958
+ /** Per-market maximum buy order. */
959
+ interface MarketMaxOrder {
960
+ marketName: string;
961
+ offers: number;
962
+ price: Cents;
963
+ updatedAt: IsoDateString;
964
+ isStale: boolean;
965
+ totalQuantity?: number;
966
+ ingestedAt?: IsoDateString;
967
+ ingestLatencyMs?: number;
968
+ valueKind?: ValueKind;
969
+ priceKind?: "bid";
970
+ purchasable?: false;
971
+ /** @deprecated Use `marketName`. The API stops sending it on 2027-01-15. */
972
+ market_name: string;
973
+ /** @deprecated Use `updatedAt`. The API stops sending it on 2027-01-15. */
974
+ updated_at: IsoDateString;
975
+ /** @deprecated Use `isStale`. The API stops sending it on 2027-01-15. */
976
+ is_stale: boolean;
977
+ /** @deprecated Use `totalQuantity`. The API stops sending it on 2027-01-15. */
978
+ total_quantity?: number;
979
+ /** @deprecated Use `ingestedAt`. The API stops sending it on 2027-01-15. */
980
+ ingested_at?: IsoDateString;
981
+ /** @deprecated Use `ingestLatencyMs`. The API stops sending it on 2027-01-15. */
982
+ ingest_latency_ms?: number;
657
983
  }
658
- /** `GET /v1/pricing/:marketHashName/listings` (camelCase). */
659
- interface PricingListingsResponse {
660
- marketHashName: string;
984
+ interface ItemMaxOrders {
661
985
  canonicalItemId: string;
662
- totalListings: number;
663
- sampledListings: number;
664
- floatCoverage: PricingListingFloatCoverage;
665
- floatSummary: PricingListingFloatSummary | null;
666
- listings: PricingListing[];
667
- calculatedAt: IsoDateString;
986
+ marketHashName: string;
987
+ orders: MarketMaxOrder[];
988
+ /** @deprecated Use `canonicalItemId`. The API stops sending it on 2027-01-15. */
989
+ canonical_item_id: string;
990
+ /** @deprecated Use `marketHashName`. The API stops sending it on 2027-01-15. */
991
+ market_hash_name: string;
992
+ }
993
+ /** `GET /v1/aggregations/max-orders`. */
994
+ interface MaxOrdersResponse {
995
+ items: ItemMaxOrders[];
668
996
  }
669
997
 
670
- interface ItemSearchParams {
671
- /** Case-insensitive contains match on item name. */
672
- search?: string;
998
+ interface AggregationsBatchParams {
673
999
  markets?: KnownMarket[];
674
- /** 1-based page number (default 1). */
675
- page?: number;
676
- /** Items per page (1–100, default 10). */
677
- perPage?: number;
1000
+ concurrency?: number;
678
1001
  }
679
- /** `GET /v1/items` — paginated (camelCase). */
680
- interface ItemPriceListResponse {
681
- data: CurrentPriceResponse[];
682
- pagination: PaginationMeta;
1002
+ declare class AggregationsResource extends BaseResource {
1003
+ /** GET /v1/aggregations/min-prices — minimum sell price per market. Pass up to 100 `ids` or `marketHashNames`. */
1004
+ minPrices(params: AggregationsParams, options?: RequestOptions): Promise<MinPricesResponse>;
1005
+ /** GET /v1/aggregations/max-orders — maximum buy order per market. Pass up to 100 `ids` or `marketHashNames`. */
1006
+ maxOrders(params: AggregationsParams, options?: RequestOptions): Promise<MaxOrdersResponse>;
1007
+ /** Like `minPrices` but splits more than 100 ids into batches and merges them. */
1008
+ minPricesAll(ids: string[], params?: AggregationsBatchParams, options?: RequestOptions): Promise<MinPricesResponse>;
1009
+ /** Like `maxOrders` but splits more than 100 ids into batches and merges them. */
1010
+ maxOrdersAll(ids: string[], params?: AggregationsBatchParams, options?: RequestOptions): Promise<MaxOrdersResponse>;
1011
+ private runBatched;
683
1012
  }
684
- interface AllItemsLatestPrice {
685
- market: string;
686
- effectiveUsdCents: Cents;
687
- fetchedAt: IsoDateString;
688
- originalCurrency: string;
1013
+
1014
+ /** Sorting by spreadBps ranks opportunities by netSpreadBps after seller commission. */
1015
+ type ArbitrageSort = "estimatedNetCents" | "spreadBps";
1016
+ interface ArbitrageParams {
1017
+ /** Max opportunities to return (1–100, default 50). */
1018
+ limit?: number;
1019
+ /** Minimum spread after estimated seller commission, in basis points (default 200). */
1020
+ minSpreadBps?: number;
1021
+ /**
1022
+ * Minimum verified buy-side notional in integer USD cents (default 1000).
1023
+ * Positive values require verified capacity; 0 also includes indicative price pairs.
1024
+ */
1025
+ minNotionalCents?: number;
1026
+ /** @deprecated Alias for {@link ArbitrageParams.minNotionalCents}. */
1027
+ minNotional?: number;
1028
+ sort?: ArbitrageSort;
1029
+ markets?: KnownMarket[];
1030
+ /** Maximum candidate items to consider (50–1000, default 500). */
1031
+ candidateLimit?: number;
689
1032
  }
690
- interface AllItemsPriceAggregates {
691
- minPrice: Cents | null;
692
- maxPrice: Cents | null;
693
- avgPrice: Cents | null;
694
- medianPrice: Cents | null;
695
- stdDev: number | null;
1033
+ interface ArbitrageQuote {
1034
+ market: string;
1035
+ price: Cents;
1036
+ /** Aggregate quantity reported by the market; it does not verify availability at this price. */
1037
+ quoteSize: number;
1038
+ /** Verified observed quantity at this quote's price; null when unavailable. */
1039
+ priceLevelQuantity: number | null;
696
1040
  updatedAt: IsoDateString;
1041
+ isStale: boolean;
1042
+ priceKind?: QuotePriceKind;
1043
+ /** True only for an ask you can buy at now. Always false on a bid. */
1044
+ purchasable?: boolean;
697
1045
  }
698
- interface AllItemsItem {
699
- id: string;
700
- name: string;
701
- latestPrices: AllItemsLatestPrice[];
702
- priceAggregates: AllItemsPriceAggregates | null;
1046
+ interface ArbitrageFreshness {
1047
+ buyAgeMs: number;
1048
+ sellAgeMs: number;
1049
+ }
1050
+ interface ArbitrageOpportunity {
1051
+ canonicalItemId: string;
1052
+ marketHashName: string;
1053
+ slug: string;
1054
+ imageUrl: string | null;
1055
+ buy: ArbitrageQuote;
1056
+ sell: ArbitrageQuote;
1057
+ /** Gross spread relative to the buy price, in basis points, before seller fees. */
1058
+ spreadBps: number;
1059
+ /** Gross per-unit sell price minus buy price, before seller fees. */
1060
+ spreadCents: Cents;
1061
+ /** Spread after estimated seller commission, relative to the buy price, in basis points. */
1062
+ netSpreadBps: number;
1063
+ /** Estimated per-unit proceeds after seller commission minus the buy price; excludes withdrawal and transfer costs. */
1064
+ estimatedNetCents: Cents;
1065
+ /** Estimated seller commission applied to the sell quote, in basis points. */
1066
+ sellerFeeBps: number;
1067
+ /** Version identifier of the estimated fee model. */
1068
+ feeModelVersion: string;
1069
+ /** Whether the seller commission uses an assumed default rate. */
1070
+ assumedFees?: boolean;
1071
+ /** Matched capacity at the displayed buy and sell prices; null when either leg is unverified. */
1072
+ maxTradableQuantity: number | null;
1073
+ /** Buy-side notional for verified capacity in USD cents; null when unknown. */
1074
+ estimatedNotionalCents: Cents | null;
1075
+ feeNotes: string;
1076
+ freshness: ArbitrageFreshness;
1077
+ calculatedAt: IsoDateString;
1078
+ }
1079
+ /** `GET /v1/arbitrage/opportunities` (camelCase). */
1080
+ interface ArbitrageOpportunitiesResponse {
1081
+ opportunities: ArbitrageOpportunity[];
1082
+ totalCandidates: number;
1083
+ calculatedAt: IsoDateString;
703
1084
  }
704
- /** `GET /v1/items/all` — a plain array (camelCase). */
705
- type AllItemsResponse = AllItemsItem[];
706
1085
 
707
- /** Item discovery / search. */
708
- declare class ItemsResource extends BaseResource {
709
- /** GET /v1/items — paginated item search with current pricing. */
710
- search(params?: ItemSearchParams, options?: RequestOptions): Promise<ItemPriceListResponse>;
711
- /** GET /v1/items/all — every tracked item with latest prices (capped, unpaginated). */
712
- all(options?: RequestOptions): Promise<AllItemsResponse>;
713
- /** Async iterator over every matching item, walking pages. */
714
- searchEach(params?: ItemSearchParams, options?: RequestOptions): AsyncGenerator<CurrentPriceResponse>;
1086
+ /** Cross-market arbitrage opportunities. */
1087
+ declare class ArbitrageResource extends BaseResource {
1088
+ /** `GET /v1/arbitrage/opportunities` — ranked cross-market opportunities. */
1089
+ opportunities(params?: ArbitrageParams, options?: RequestOptions): Promise<ArbitrageOpportunitiesResponse>;
715
1090
  }
716
1091
 
717
- declare const LIQUIDITY_BADGES: readonly ["EXTREMELY_LIQUID", "VERY_LIQUID", "LIQUID", "ILLIQUID", "VERY_ILLIQUID", "EXTREMELY_ILLIQUID", "UNTRADED"];
718
- type LiquidityBadge = (typeof LIQUIDITY_BADGES)[number];
719
- declare const LIQUIDITY_CONFIDENCE: readonly ["HIGH", "MEDIUM", "LOW", "CRITICAL"];
720
- type LiquidityConfidence = (typeof LIQUIDITY_CONFIDENCE)[number];
721
- type LiquidityCoverage = "full" | "partial" | "none";
722
- /** Lowercase label form of the badge; `UNTRADED` maps to `"unknown"`, no `"moderate"` tier. */
723
- declare const LIQUIDITY_LABELS: readonly ["extremely_liquid", "very_liquid", "liquid", "illiquid", "very_illiquid", "extremely_illiquid", "unknown"];
724
- type LiquidityLabel = (typeof LIQUIDITY_LABELS)[number];
725
- declare const SUPPORTED_LIQUIDITY_MARKETS: readonly ["skinport", "marketcsgo", "dmarket", "csdeals", "csfloat"];
726
- type SupportedLiquidityMarket = (typeof SUPPORTED_LIQUIDITY_MARKETS)[number];
727
- interface LiquidityParams {
728
- /** Hypothetical ask (USD cents) to estimate against; defaults to the best ask. */
729
- askPrice?: Cents;
730
- market?: SupportedLiquidityMarket;
1092
+ type AttributeType = "float" | "fade" | "tag";
1093
+ type AttributeGranularity = "10m" | "1h" | "1d";
1094
+ interface AttributeRangeDimension {
1095
+ min: number;
1096
+ max: number;
1097
+ minInclusive: boolean;
1098
+ maxInclusive: boolean;
731
1099
  }
732
- /** Per-market row; every metric is null when that market has no data. */
733
- interface LiquidityMarketMetric {
734
- market: string;
735
- salesPerDay: number | null;
736
- activeListings: number | null;
737
- bestAskUsdCents: Cents | null;
738
- medianTimeToSellHours: number | null;
739
- p90TimeToSellHours: number | null;
740
- salesDataAgeMinutes: number | null;
741
- listingsDataAgeMinutes: number | null;
1100
+ interface AttributeBucketDimensions {
1101
+ variant: string | null;
1102
+ float: AttributeRangeDimension | null;
1103
+ fade: AttributeRangeDimension | null;
1104
+ pattern: number | null;
1105
+ finishCatalog: number | null;
1106
+ paintSeed: number | null;
1107
+ charmTemplate: number | null;
1108
+ stickerScrape: number | null;
1109
+ sourceTagId: number | null;
1110
+ sourceTagName: string | null;
1111
+ nameTag: string | null;
742
1112
  }
743
- /** `GET /v1/liquidity/:marketHashName` — full liquidity model for one item. */
744
- interface LiquidityResponse {
1113
+ interface AttributePriceBucket {
1114
+ bucketId: string;
1115
+ bucketKey: string;
1116
+ sourceBucketId: string;
1117
+ bucketType: "attribute";
1118
+ attributeType: AttributeType;
1119
+ attributeTypes: AttributeType[];
1120
+ sourceItemId: string;
1121
+ dimensions: AttributeBucketDimensions;
1122
+ askCents: Cents | null;
1123
+ avgAskCents: Cents | null;
1124
+ medianAskCents: Cents | null;
1125
+ bidCents: Cents | null;
1126
+ askListingCount: number | null;
1127
+ bidOrderCount: number | null;
1128
+ sourceUpdatedAt: IsoDateString;
1129
+ collectedAt: IsoDateString;
1130
+ }
1131
+ interface AttributePriceItem {
745
1132
  canonicalItemId: string;
746
1133
  marketHashName: string;
747
- liquidityBadge: LiquidityBadge;
748
- confidence: LiquidityConfidence;
749
- coverage: LiquidityCoverage;
750
- medianTimeToSellHours: number | null;
751
- p90TimeToSellHours: number | null;
752
- bestMarketToList: string | null;
753
- salesPerDay: number | null;
754
- activeListings: number | null;
755
- referenceAskUsdCents: Cents | null;
756
- marketWideSalesPerDay: number | null;
757
- marketWideListings: number | null;
758
- marketsWithSales: number;
759
- marketsWithDepth: number;
760
- /** Whole-market saturation (hours), NOT a per-listing estimate. */
761
- marketWideMedianTimeToSellHours: number | null;
762
- marketWideP90TimeToSellHours: number | null;
763
- metrics: LiquidityMarketMetric[];
764
- /** Data-quality flags, e.g. `sales_data_stale:marketcsgo`. */
765
- notes: string[];
766
- calculatedAt: IsoDateString;
1134
+ market: string;
1135
+ buckets: AttributePriceBucket[];
767
1136
  }
768
- /** `GET /v1/liquidity/summary/:marketHashName` — slim badge-only projection. */
769
- interface LiquiditySummaryResponse {
770
- marketHashName: string;
771
- liquidityBadge: LiquidityBadge;
772
- liquidity: LiquidityLabel;
773
- /** Human time-to-sell, e.g. `"2 - 6 hours"` (`"No recent sales"` when untraded). */
774
- estimatedSaleTime: string;
775
- confidence: LiquidityConfidence;
776
- /** 0-100, higher sells faster; null when untraded. */
777
- score: number | null;
778
- bestMarketToList: string | null;
779
- calculatedAt: IsoDateString;
1137
+ interface AttributeHistoryPoint {
1138
+ bucketStart: IsoDateString;
1139
+ openAskCents: Cents | null;
1140
+ highAskCents: Cents | null;
1141
+ lowAskCents: Cents | null;
1142
+ closeAskCents: Cents | null;
1143
+ avgAskCents: Cents | null;
1144
+ closeBidCents: Cents | null;
1145
+ askListingCount: number | null;
1146
+ bidOrderCount: number | null;
1147
+ firstObservedAt: IsoDateString;
1148
+ lastObservedAt: IsoDateString;
1149
+ }
1150
+ interface AttributeHistoryBucket {
1151
+ bucketId: string;
1152
+ bucketKey: string;
1153
+ sourceBucketId: string;
1154
+ bucketType: "attribute";
1155
+ attributeType: AttributeType;
1156
+ attributeTypes: AttributeType[];
1157
+ sourceItemId: string;
1158
+ dimensions: AttributeBucketDimensions;
1159
+ points: AttributeHistoryPoint[];
1160
+ }
1161
+ interface AttributeHistoryItem {
1162
+ canonicalItemId: string;
1163
+ marketHashName: string;
1164
+ market: string;
1165
+ buckets: AttributeHistoryBucket[];
780
1166
  }
781
- /** Request body for `POST /v1/liquidity/batch` (1-100 names). */
782
- interface LiquidityBatchBody {
783
- marketHashNames: string[];
784
- market?: SupportedLiquidityMarket;
1167
+ interface AttributeLatestParams {
1168
+ canonicalItemId?: string;
1169
+ marketHashName?: string;
1170
+ attributes?: AttributeType[];
1171
+ /** Max attribute buckets to return (1–1000). */
1172
+ limit?: number;
1173
+ /** Opaque pagination cursor from a previous `nextCursor`. */
1174
+ cursor?: string;
1175
+ /** Supported markets to include. */
1176
+ markets?: KnownMarket[];
785
1177
  }
786
- /** `POST /v1/liquidity/batch` — up to 100 full results in one call. */
787
- interface LiquidityBatchResponse {
788
- results: LiquidityResponse[];
789
- notFound: string[];
790
- requested: number;
791
- calculatedAt: IsoDateString;
1178
+ interface AttributeLatestResponse {
1179
+ bucketSchemaVersion: 1;
1180
+ markets: string[];
1181
+ currency: "USD";
1182
+ asOf: IsoDateString;
1183
+ items: AttributePriceItem[];
1184
+ nextCursor: string | null;
1185
+ sourceGaps: string[];
792
1186
  }
793
- /** Bulk-map entry. `market_hash_name` and `estimated_sale_time` are snake_case on the wire. */
794
- interface LiquidityBulkItem {
795
- market_hash_name: string;
796
- liquidity: LiquidityLabel;
797
- estimated_sale_time: string;
798
- liquidityBadge: LiquidityBadge;
799
- confidence: LiquidityConfidence;
800
- score: number | null;
801
- bestMarketToList: string | null;
802
- /** Reserved; always `{}` for now. */
803
- variants: Record<string, never>;
1187
+ interface AttributeHistoryParams {
1188
+ canonicalItemId?: string;
1189
+ marketHashName?: string;
1190
+ bucketId?: string;
1191
+ bucketIds?: string[];
1192
+ attributes?: AttributeType[];
1193
+ from?: Date | string;
1194
+ to?: Date | string;
1195
+ granularity?: AttributeGranularity;
1196
+ /** Max history points across all buckets (1–10000). */
1197
+ limit?: number;
1198
+ markets?: KnownMarket[];
804
1199
  }
805
- /** `GET /v1/liquidity/items/manifest` — cheap change-probe; compare `version` before refetching. */
806
- interface LiquidityBulkManifest {
807
- /** Snapshot version / ETag. */
808
- version: string;
809
- calculatedAt: IsoDateString;
810
- /** Recompute cadence as an ISO-8601 duration, e.g. `"PT10M"`. */
811
- cadence: string;
1200
+ interface AttributeHistoryResponse {
1201
+ bucketSchemaVersion: 1;
812
1202
  markets: string[];
813
- itemCount: number;
1203
+ currency: "USD";
1204
+ granularity: AttributeGranularity;
1205
+ items: AttributeHistoryItem[];
1206
+ sourceGaps: string[];
814
1207
  }
815
- /** `GET /v1/liquidity/items` — Enterprise: whole-catalog map keyed by market_hash_name. */
816
- interface LiquidityBulkResponse extends LiquidityBulkManifest {
817
- items: Record<string, LiquidityBulkItem>;
1208
+ interface Buff163LatestParams {
1209
+ canonicalItemId?: string;
1210
+ marketHashName?: string;
1211
+ attributes?: AttributeType[];
1212
+ limit?: number;
1213
+ cursor?: string;
1214
+ }
1215
+ interface Buff163AttributeLatestResponse {
1216
+ bucketSchemaVersion: 1;
1217
+ market: "buff163";
1218
+ currency: "USD";
1219
+ asOf: IsoDateString;
1220
+ items: AttributePriceItem[];
1221
+ nextCursor: string | null;
1222
+ sourceGaps: string[];
1223
+ }
1224
+ interface Buff163HistoryParams {
1225
+ canonicalItemId?: string;
1226
+ marketHashName?: string;
1227
+ bucketId?: string;
1228
+ bucketIds?: string[];
1229
+ attributes?: AttributeType[];
1230
+ from?: Date | string;
1231
+ to?: Date | string;
1232
+ granularity?: AttributeGranularity;
1233
+ limit?: number;
1234
+ }
1235
+ interface Buff163AttributeHistoryResponse {
1236
+ bucketSchemaVersion: 1;
1237
+ market: "buff163";
1238
+ currency: "USD";
1239
+ granularity: AttributeGranularity;
1240
+ items: AttributeHistoryItem[];
1241
+ sourceGaps: string[];
818
1242
  }
819
1243
 
820
- /**
821
- * Liquidity & expected time-to-sell, from cross-market order-book depth and
822
- * sales velocity. The single + summary + batch endpoints are Pro; the bulk map
823
- * + manifest are Enterprise.
824
- */
825
- declare class LiquidityResource extends BaseResource {
826
- /** `GET /v1/liquidity/:marketHashName` — full liquidity model for one item. */
827
- get(marketHashName: string, params?: LiquidityParams, options?: RequestOptions): Promise<LiquidityResponse>;
828
- /** `GET /v1/liquidity/summary/:marketHashName` — slim badge-only projection. */
829
- summary(marketHashName: string, params?: LiquidityParams, options?: RequestOptions): Promise<LiquiditySummaryResponse>;
830
- /** `POST /v1/liquidity/batch` — score up to 100 items in one call. */
831
- batch(body: LiquidityBatchBody, options?: RequestOptions): Promise<LiquidityBatchResponse>;
832
- /**
833
- * `GET /v1/liquidity/items` — Enterprise: the whole-catalog liquidity map,
834
- * rematerialized every ~10 minutes. Poll {@link manifest} and compare
835
- * `version` before refetching this heavier payload.
836
- */
837
- bulk(options?: RequestOptions): Promise<LiquidityBulkResponse>;
838
- /**
839
- * `GET /v1/liquidity/items/manifest` — Enterprise: a cheap change-probe for
840
- * the {@link bulk} map (`version`, `calculatedAt`, `cadence`, `markets`,
841
- * `itemCount`). Refetch the bulk map only when `version` changes.
842
- */
843
- manifest(options?: RequestOptions): Promise<LiquidityBulkManifest>;
1244
+ /** Cross-market attribute (float/fade/tag) bucket prices. */
1245
+ declare class AttributePricesResource extends BaseResource {
1246
+ /** GET /v1/attribute-prices/latest — latest attribute buckets across markets. */
1247
+ latest(params?: AttributeLatestParams, options?: RequestOptions): Promise<AttributeLatestResponse>;
1248
+ /** GET /v1/attribute-prices/history — OHLC attribute bucket history. */
1249
+ history(params?: AttributeHistoryParams, options?: RequestOptions): Promise<AttributeHistoryResponse>;
1250
+ /** Async iterator over every latest attribute item, following `nextCursor`. */
1251
+ latestEach(params?: AttributeLatestParams, options?: RequestOptions): AsyncGenerator<AttributePriceItem>;
1252
+ }
1253
+
1254
+ /** Buff163-specific attribute bucket prices. */
1255
+ declare class Buff163Resource extends BaseResource {
1256
+ /** GET /v1/markets/buff163/latest — latest Buff163 attribute buckets. */
1257
+ latest(params?: Buff163LatestParams, options?: RequestOptions): Promise<Buff163AttributeLatestResponse>;
1258
+ /** GET /v1/markets/buff163/history — OHLC Buff163 attribute bucket history. */
1259
+ history(params?: Buff163HistoryParams, options?: RequestOptions): Promise<Buff163AttributeHistoryResponse>;
1260
+ /** Async iterator over every latest Buff163 attribute item, following `nextCursor`. */
1261
+ latestEach(params?: Buff163LatestParams, options?: RequestOptions): AsyncGenerator<AttributePriceItem>;
844
1262
  }
845
1263
 
846
1264
  interface MarketAnalyticsParams {
@@ -848,32 +1266,78 @@ interface MarketAnalyticsParams {
848
1266
  /** Historical analytics window in hours (1–168, default 24). */
849
1267
  windowHours?: number;
850
1268
  }
851
- /** Per-market analytics row (snake_case fields, camelCase `market`). */
1269
+ /** Per-market analytics row. */
852
1270
  interface MarketAnalyticsPoint {
853
1271
  market: string;
1272
+ currentAsk: Cents | null;
1273
+ currentBid: Cents | null;
1274
+ spreadBps: number | null;
1275
+ askIsStale: boolean | null;
1276
+ bidIsStale: boolean | null;
1277
+ currentListingCount: number | null;
1278
+ currentBuyOrderCount: number | null;
1279
+ currentBidQuantity: number | null;
1280
+ sellAvgPrice: Cents | null;
1281
+ sellMinPrice: Cents | null;
1282
+ sellMaxPrice: Cents | null;
1283
+ sellAvgListingCount: number | null;
1284
+ buyAvgPrice: Cents | null;
1285
+ buyMaxPrice: Cents | null;
1286
+ buyAvgOrderCount: number | null;
1287
+ buyAvgTotalQuantity: number | null;
1288
+ /** True only when you can buy at `currentAsk` now. */
1289
+ askPurchasable?: boolean | null;
1290
+ /** Basis of `sellAvgPrice` and `sellMaxPrice`. */
1291
+ sellBasis?: SellBasis;
1292
+ /** Settlement kind of this market's bids: `currentBid`, `buyAvgPrice` and `buyMaxPrice`. */
1293
+ valueKind?: ValueKind;
1294
+ /** @deprecated Use `currentAsk`. The API stops sending it on 2027-01-15. */
854
1295
  current_ask: Cents | null;
1296
+ /** @deprecated Use `currentBid`. The API stops sending it on 2027-01-15. */
855
1297
  current_bid: Cents | null;
1298
+ /** @deprecated Use `spreadBps`. The API stops sending it on 2027-01-15. */
856
1299
  spread_bps: number | null;
1300
+ /** @deprecated Use `askIsStale`. The API stops sending it on 2027-01-15. */
857
1301
  ask_is_stale: boolean | null;
1302
+ /** @deprecated Use `bidIsStale`. The API stops sending it on 2027-01-15. */
858
1303
  bid_is_stale: boolean | null;
1304
+ /** @deprecated Use `currentListingCount`. The API stops sending it on 2027-01-15. */
859
1305
  current_listing_count: number | null;
1306
+ /** @deprecated Use `currentBuyOrderCount`. The API stops sending it on 2027-01-15. */
860
1307
  current_buy_order_count: number | null;
1308
+ /** @deprecated Use `currentBidQuantity`. The API stops sending it on 2027-01-15. */
861
1309
  current_bid_quantity: number | null;
1310
+ /** @deprecated Use `sellAvgPrice`. The API stops sending it on 2027-01-15. */
862
1311
  sell_avg_price: Cents | null;
1312
+ /** @deprecated Use `sellMinPrice`. The API stops sending it on 2027-01-15. */
863
1313
  sell_min_price: Cents | null;
1314
+ /** @deprecated Use `sellMaxPrice`. The API stops sending it on 2027-01-15. */
864
1315
  sell_max_price: Cents | null;
1316
+ /** @deprecated Use `sellAvgListingCount`. The API stops sending it on 2027-01-15. */
865
1317
  sell_avg_listing_count: number | null;
1318
+ /** @deprecated Use `buyAvgPrice`. The API stops sending it on 2027-01-15. */
866
1319
  buy_avg_price: Cents | null;
1320
+ /** @deprecated Use `buyMaxPrice`. The API stops sending it on 2027-01-15. */
867
1321
  buy_max_price: Cents | null;
1322
+ /** @deprecated Use `buyAvgOrderCount`. The API stops sending it on 2027-01-15. */
868
1323
  buy_avg_order_count: number | null;
1324
+ /** @deprecated Use `buyAvgTotalQuantity`. The API stops sending it on 2027-01-15. */
869
1325
  buy_avg_total_quantity: number | null;
870
1326
  }
871
- /** `GET /v1/market-analytics/:marketHashName` (snake_case top-level). */
1327
+ /** `GET /v1/market-analytics/:marketHashName`. */
872
1328
  interface MarketAnalyticsResponse {
1329
+ canonicalItemId: string;
1330
+ marketHashName: string;
1331
+ windowHours: number;
1332
+ markets: MarketAnalyticsPoint[];
1333
+ calculatedAt: IsoDateString;
1334
+ /** @deprecated Use `canonicalItemId`. The API stops sending it on 2027-01-15. */
873
1335
  canonical_item_id: string;
1336
+ /** @deprecated Use `marketHashName`. The API stops sending it on 2027-01-15. */
874
1337
  market_hash_name: string;
1338
+ /** @deprecated Use `windowHours`. The API stops sending it on 2027-01-15. */
875
1339
  window_hours: number;
876
- markets: MarketAnalyticsPoint[];
1340
+ /** @deprecated Use `calculatedAt`. The API stops sending it on 2027-01-15. */
877
1341
  calculated_at: IsoDateString;
878
1342
  }
879
1343
 
@@ -883,137 +1347,129 @@ declare class MarketAnalyticsResource extends BaseResource {
883
1347
  get(marketHashName: string, params?: MarketAnalyticsParams, options?: RequestOptions): Promise<MarketAnalyticsResponse>;
884
1348
  }
885
1349
 
886
- /** Market registry health & integration status. */
887
- declare class MarketsResource extends BaseResource {
888
- /**
889
- * `GET /v1/markets/health` — per-market ingest status, last event time, and
890
- * listing counts for every integrated market. Returns a plain array of
891
- * {@link import("../types/markets").MarketHealthRow}.
892
- */
893
- health(options?: RequestOptions): Promise<MarketHealthResponse>;
894
- }
895
-
896
- interface NbboParams {
897
- /** Canonical item id. Provide this or `marketHashName`. */
898
- id?: string;
899
- /** Market hash name. Sent as the `market_hash_name` query param. */
900
- marketHashName?: string;
901
- markets?: KnownMarket[];
1350
+ interface LatestPricesParams {
1351
+ game: Game;
1352
+ /** ETag from the preceding snapshot. HTTP 304 returns null. */
1353
+ ifNoneMatch?: string;
902
1354
  }
903
- /** Fee-aware, executability-ranked best price for one side. Ask `price` is the total a buyer pays; bid `price` is the net a seller receives after fees. */
904
- interface ExecutionAdjustedBestPrice {
1355
+ /** Fields shared by every quote in the all-item snapshot. */
1356
+ interface LatestPricePoint {
905
1357
  market: string;
906
1358
  price: Cents;
907
- rawPrice: Cents;
908
- appliedFeeBps: number;
909
- withdrawalFlatUsdCents?: Cents;
910
- executability: number;
911
- updatedAt: IsoDateString;
1359
+ /** When the price was last read or confirmed still current. Not the age of the data. */
1360
+ fetchedAt: IsoDateString;
1361
+ /** Whether the quote was older than 30 minutes when the snapshot was built. */
912
1362
  isStale: boolean;
913
- reasons: string[];
914
- }
915
- /** Execution-adjusted NBBO block: fee-aware best bid/ask re-ranked by executability. */
916
- interface ExecutionAdjustedNbbo {
917
- bestAsk: ExecutionAdjustedBestPrice | null;
918
- bestBid: ExecutionAdjustedBestPrice | null;
919
- spreadBps: number | null;
920
- locked: boolean;
921
- crossed: boolean;
922
- executableConfidence: number;
923
- reasons: string[];
924
- feeModelVersion: string;
925
- calculatedAt: IsoDateString;
1363
+ /** Source price in minor units of `originalCurrency`, before conversion and fees. */
1364
+ originalPriceCents?: number;
1365
+ originalCurrency?: string;
1366
+ /** When the source produced this data. Absent when unknown. */
1367
+ sourceUpdatedAt?: IsoDateString;
926
1368
  }
927
- /** `GET /v1/nbbo` (camelCase). */
928
- interface NbboResponse {
929
- marketHashName: string;
1369
+ interface LatestPriceAskPoint extends LatestPricePoint {
1370
+ quoteSize: number;
1371
+ /** True for a placeholder ask far above the corroborated cheaper asks. It is still a real listing. */
1372
+ outlier?: boolean;
1373
+ /** Present, and false, only when the ask cannot be bought now. */
1374
+ purchasable?: false;
1375
+ }
1376
+ interface LatestPriceBidPoint extends LatestPricePoint {
1377
+ /** Null when unknown, which is not zero. */
1378
+ quoteSize: number | null;
1379
+ /** Quantity across bid price levels. Null when unknown. */
1380
+ totalQuantity: number | null;
1381
+ totalOrdersCount?: number;
1382
+ /** False when the source's book was read only in part, so quantities are lower bounds. */
1383
+ orderBookComplete?: boolean;
1384
+ sourceTimeKind?: SourceTimeKind;
1385
+ /** Age of the source's data when it was read, in seconds. */
1386
+ sourceAgeSeconds?: number;
1387
+ /** Whether the source's data was older than 30 minutes when the snapshot was built. */
1388
+ isSourceStale?: boolean;
1389
+ valueKind?: ValueKind;
1390
+ }
1391
+ interface LatestPriceItem {
1392
+ /** Market hash name. */
1393
+ name: string;
930
1394
  canonicalItemId: string;
931
1395
  bestAsk: NbboBestPrice | null;
1396
+ /** Best bid among markets that pay out in cash. */
932
1397
  bestBid: NbboBestPrice | null;
933
- spreadBps: number | null;
934
- marketCount: number;
935
- freshMarketCount: number;
936
- locked: boolean;
937
- crossed: boolean;
938
- confidence: number;
939
- calculatedAt: IsoDateString;
940
- /** Execution-adjusted "real best market"; null when no quotes. */
941
- executionAdjusted: ExecutionAdjustedNbbo | null;
942
- }
943
- interface NbboDepthParams extends NbboParams {
944
- /** Aggregated depth levels per side (1–50, default 10). */
945
- depth?: number;
946
- }
947
- interface NbboDepthQuote {
948
- market: string;
949
- level: number;
950
- price: Cents;
951
- quantity: number;
952
- ordersCount: number;
953
- updatedAt: IsoDateString;
954
- isStale: boolean;
955
- }
956
- interface NbboDepthLevel {
957
- rank: number;
958
- price: Cents;
959
- quantity: number;
960
- ordersCount: number;
961
- marketCount: number;
962
- cumulativeQuantity: number;
963
- updatedAt: IsoDateString;
964
- isStale: boolean;
965
- quotes: NbboDepthQuote[];
966
- }
967
- /** `GET /v1/nbbo/depth` (camelCase). */
968
- interface NbboDepthResponse {
969
- marketHashName: string;
970
- canonicalItemId: string;
971
- depth: number;
972
- marketCount: number;
973
- asks: NbboDepthLevel[];
974
- bids: NbboDepthLevel[];
975
- spreadBps: number | null;
976
- locked: boolean;
977
- crossed: boolean;
978
- calculatedAt: IsoDateString;
979
- }
980
-
981
- /** National Best Bid and Offer (top of book) and aggregated depth. */
982
- declare class NbboResource extends BaseResource {
983
- /** `GET /v1/nbbo` — best bid/ask across markets. Pass `id` or `marketHashName`. */
984
- get(params: NbboParams, options?: RequestOptions): Promise<NbboResponse>;
985
- /** `GET /v1/nbbo/depth` — aggregated order-book depth per side. */
986
- depth(params: NbboDepthParams, options?: RequestOptions): Promise<NbboDepthResponse>;
1398
+ markets: LatestPriceAskPoint[];
1399
+ buyOrders: LatestPriceBidPoint[];
1400
+ }
1401
+ /** `GET /v2/prices/latest`: every item of one game that has a servable quote. */
1402
+ interface LatestPricesResponse {
1403
+ /** When the oldest read in the snapshot started. A quote's `fetchedAt` can be later. */
1404
+ generatedAt: IsoDateString;
1405
+ game: Game;
1406
+ currency: "USD";
1407
+ /** Ordered by `canonicalItemId`. */
1408
+ items: LatestPriceItem[];
1409
+ itemCount: number;
987
1410
  }
988
1411
 
989
- /** Current cross-market pricing for a single item. */
990
- declare class PricingResource extends BaseResource {
991
- /** `GET /v1/pricing/:marketHashName` — full cross-market pricing snapshot. */
992
- get(marketHashName: string, params?: CurrentPriceParams, options?: RequestOptions): Promise<CurrentPriceResponse>;
993
- /** `GET /v1/pricing/:marketHashName/listings` — individual listing samples. */
994
- listings(marketHashName: string, params?: PricingListingsParams, options?: RequestOptions): Promise<PricingListingsResponse>;
1412
+ /** All-item price snapshots. */
1413
+ declare class PricesResource extends BaseResource {
1414
+ /** `GET /v2/prices/latest`. Enterprise: every item of one game with each market's ask and bid. */
1415
+ latestAll(params: {
1416
+ game: Game;
1417
+ ifNoneMatch?: undefined;
1418
+ }, options?: RequestOptions): Promise<LatestPricesResponse>;
1419
+ /** A matching conditional ETag returns null. */
1420
+ latestAll(params: LatestPricesParams, options?: RequestOptions): Promise<LatestPricesResponse | null>;
995
1421
  }
996
1422
 
997
1423
  interface RecommendationParams {
998
1424
  markets?: KnownMarket[];
999
1425
  }
1000
- /** `GET /v1/recommendations/:marketHashName` (snake_case). */
1426
+ /** `GET /v1/recommendations/:marketHashName`. */
1001
1427
  interface RecommendationResponse {
1428
+ canonicalItemId: string;
1429
+ marketHashName: string;
1430
+ suggestedPrice: Cents | null;
1431
+ /** `suggestedPrice` is a model estimate, not a quote from any market. */
1432
+ suggestedPriceKind?: "estimate";
1433
+ strategy: string;
1434
+ confidence: number;
1435
+ liquidityScore: number;
1436
+ unstableReasons: string[];
1437
+ bestAsk: BestPrice | null;
1438
+ bestBid: BestPrice | null;
1439
+ spreadBps: number | null;
1440
+ marketCount: number;
1441
+ freshMarketCount: number;
1442
+ listingCount: number;
1443
+ buyOrderCount: number;
1444
+ totalBidQuantity: number;
1445
+ calculatedAt: IsoDateString;
1446
+ /** @deprecated Use `canonicalItemId`. The API stops sending it on 2027-01-15. */
1002
1447
  canonical_item_id: string;
1448
+ /** @deprecated Use `marketHashName`. The API stops sending it on 2027-01-15. */
1003
1449
  market_hash_name: string;
1450
+ /** @deprecated Use `suggestedPrice`. The API stops sending it on 2027-01-15. */
1004
1451
  suggested_price: Cents | null;
1005
- strategy: string;
1006
- confidence: number;
1452
+ /** @deprecated Use `liquidityScore`. The API stops sending it on 2027-01-15. */
1007
1453
  liquidity_score: number;
1454
+ /** @deprecated Use `unstableReasons`. The API stops sending it on 2027-01-15. */
1008
1455
  unstable_reasons: string[];
1456
+ /** @deprecated Use `bestAsk`. The API stops sending it on 2027-01-15. */
1009
1457
  best_ask: BestPrice | null;
1458
+ /** @deprecated Use `bestBid`. The API stops sending it on 2027-01-15. */
1010
1459
  best_bid: BestPrice | null;
1460
+ /** @deprecated Use `spreadBps`. The API stops sending it on 2027-01-15. */
1011
1461
  spread_bps: number | null;
1462
+ /** @deprecated Use `marketCount`. The API stops sending it on 2027-01-15. */
1012
1463
  market_count: number;
1464
+ /** @deprecated Use `freshMarketCount`. The API stops sending it on 2027-01-15. */
1013
1465
  fresh_market_count: number;
1466
+ /** @deprecated Use `listingCount`. The API stops sending it on 2027-01-15. */
1014
1467
  listing_count: number;
1468
+ /** @deprecated Use `buyOrderCount`. The API stops sending it on 2027-01-15. */
1015
1469
  buy_order_count: number;
1470
+ /** @deprecated Use `totalBidQuantity`. The API stops sending it on 2027-01-15. */
1016
1471
  total_bid_quantity: number;
1472
+ /** @deprecated Use `calculatedAt`. The API stops sending it on 2027-01-15. */
1017
1473
  calculated_at: IsoDateString;
1018
1474
  }
1019
1475
 
@@ -1026,29 +1482,53 @@ declare class RecommendationsResource extends BaseResource {
1026
1482
  type MarketHealthStatus = "healthy" | "degraded" | "stale";
1027
1483
  interface MarketFreshness {
1028
1484
  market: string;
1485
+ delaySeconds: number;
1486
+ lastUpdate: IsoDateString;
1487
+ status: MarketHealthStatus;
1488
+ /** @deprecated Use `delaySeconds`. The API stops sending it on 2027-01-15. */
1029
1489
  delay_seconds: number;
1490
+ /** @deprecated Use `lastUpdate`. The API stops sending it on 2027-01-15. */
1030
1491
  last_update: IsoDateString;
1031
- status: MarketHealthStatus;
1032
1492
  }
1033
- /** `GET /v1/status/freshness` (snake_case). */
1493
+ /** `GET /v1/status/freshness`. */
1034
1494
  interface FreshnessResponse {
1035
1495
  markets: MarketFreshness[];
1496
+ overallStatus: MarketHealthStatus;
1497
+ checkedAt: IsoDateString;
1498
+ /** @deprecated Use `overallStatus`. The API stops sending it on 2027-01-15. */
1036
1499
  overall_status: MarketHealthStatus;
1500
+ /** @deprecated Use `checkedAt`. The API stops sending it on 2027-01-15. */
1037
1501
  checked_at: IsoDateString;
1038
1502
  }
1039
1503
  interface MarketLatency {
1040
1504
  market: string;
1505
+ avgLatencyMs: number;
1506
+ p95LatencyMs: number;
1507
+ p99LatencyMs: number;
1508
+ fetchCount: number;
1509
+ errorRate: number;
1510
+ sloBreachRate: number;
1511
+ /** @deprecated Use `avgLatencyMs`. The API stops sending it on 2027-01-15. */
1041
1512
  avg_latency_ms: number;
1513
+ /** @deprecated Use `p95LatencyMs`. The API stops sending it on 2027-01-15. */
1042
1514
  p95_latency_ms: number;
1515
+ /** @deprecated Use `p99LatencyMs`. The API stops sending it on 2027-01-15. */
1043
1516
  p99_latency_ms: number;
1517
+ /** @deprecated Use `fetchCount`. The API stops sending it on 2027-01-15. */
1044
1518
  fetch_count: number;
1519
+ /** @deprecated Use `errorRate`. The API stops sending it on 2027-01-15. */
1045
1520
  error_rate: number;
1521
+ /** @deprecated Use `sloBreachRate`. The API stops sending it on 2027-01-15. */
1046
1522
  slo_breach_rate: number;
1047
1523
  }
1048
- /** `GET /v1/status/market-latency` (snake_case). */
1524
+ /** `GET /v1/status/market-latency`. */
1049
1525
  interface MarketLatencyResponse {
1050
1526
  markets: MarketLatency[];
1527
+ windowHours: number;
1528
+ measuredAt: IsoDateString;
1529
+ /** @deprecated Use `windowHours`. The API stops sending it on 2027-01-15. */
1051
1530
  window_hours: number;
1531
+ /** @deprecated Use `measuredAt`. The API stops sending it on 2027-01-15. */
1052
1532
  measured_at: IsoDateString;
1053
1533
  }
1054
1534
 
@@ -1074,6 +1554,10 @@ declare class SkinpricerClient {
1074
1554
  readonly buff163: Buff163Resource;
1075
1555
  readonly liquidity: LiquidityResource;
1076
1556
  readonly markets: MarketsResource;
1557
+ readonly schema: SchemaResource;
1558
+ readonly prices: PricesResource;
1559
+ /** Access the v2 endpoints supported by the selected game. */
1560
+ forGame<G extends Game>(game: G): GameClient<G>;
1077
1561
  private readonly httpClient;
1078
1562
  constructor(config: ClientConfig);
1079
1563
  }
@@ -1082,7 +1566,7 @@ declare class SkinpricerClient {
1082
1566
  declare class APIError extends SkinpricerError {
1083
1567
  }
1084
1568
  interface ValidationErrorOptions extends SkinpricerErrorOptions {
1085
- /** Individual validation messages (NestJS returns `message` as an array on 400). */
1569
+ /** One entry per rejected field or parameter, from the error body's `details` (or a NestJS `message` array). */
1086
1570
  messages?: string[];
1087
1571
  }
1088
1572
  /** 400 Bad Request — request validation failed. */
@@ -1158,6 +1642,6 @@ declare function chunk<T>(items: readonly T[], size: number): T[][];
1158
1642
  /** Runs `fn` over `items` with at most `limit` concurrent executions, keeping order. */
1159
1643
  declare function mapWithConcurrency<T, R>(items: readonly T[], limit: number, fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
1160
1644
 
1161
- declare const VERSION = "0.3.0";
1645
+ declare const VERSION = "0.5.0";
1162
1646
 
1163
- export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_PUBLIC_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, type ExecutionAdjustedBestPrice, type ExecutionAdjustedNbbo, FeatureNotAvailableError, type FormatUsdOptions, type FreshnessResponse, type HistoryListingType, type HistoryListingTypeInput, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, LIQUIDITY_BADGES, LIQUIDITY_CONFIDENCE, LIQUIDITY_LABELS, type LiquidityBadge, type LiquidityBatchBody, type LiquidityBatchResponse, type LiquidityBulkItem, type LiquidityBulkManifest, type LiquidityBulkResponse, type LiquidityConfidence, type LiquidityCoverage, type LiquidityLabel, type LiquidityMarketMetric, type LiquidityParams, LiquidityResource, type LiquidityResponse, type LiquiditySummaryResponse, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthResponse, type MarketHealthRow, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketRegistryStatus, type MarketSeries, MarketsResource, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, SUPPORTED_LIQUIDITY_MARKETS, type SalesHistoryWindow, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, StatusResource, type SupportedLiquidityMarket, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };
1647
+ export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_PUBLIC_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, type ExecutionAdjustedBestPrice, type ExecutionAdjustedNbbo, FeatureNotAvailableError, type FeeStatus, type FormatUsdOptions, type FreshnessResponse, type Game, GameClient, type HistoryListingType, type HistoryListingTypeInput, type HistoryPriceKind, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, LIQUIDITY_BADGES, LIQUIDITY_CONFIDENCE, LIQUIDITY_LABELS, type LatestPriceAskPoint, type LatestPriceBidPoint, type LatestPriceItem, type LatestPricePoint, type LatestPricesParams, type LatestPricesResponse, type LiquidityBadge, type LiquidityBatchBody, type LiquidityBatchResponse, type LiquidityBulkItem, type LiquidityBulkManifest, type LiquidityBulkParams, type LiquidityBulkResponse, type LiquidityConfidence, type LiquidityCoverage, type LiquidityLabel, type LiquidityMarketForGame, type LiquidityMarketMetric, type LiquidityParams, type LiquidityPayout, LiquidityResource, type LiquidityResponse, type LiquiditySummaryResponse, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthResponse, type MarketHealthRow, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketRegistryStatus, type MarketSeries, MarketsResource, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, PricesResource, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, type QuotePriceKind, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, SUPPORTED_LIQUIDITY_MARKETS, SUPPORTED_RUST_LIQUIDITY_MARKETS, type SalesHistoryWindow, type SchemaChangesParams, type SchemaChangesResponse, type SchemaCollection, type SchemaContainer, type SchemaItem, type SchemaItemResponse, type SchemaRarity, type SchemaRegistries, SchemaResource, type SchemaSnapshotParams, type SchemaSnapshotResponse, type SchemaVariant, type SellBasis, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, type SourceTimeKind, StatusResource, type SupportedLiquidityMarket, type SupportedRustLiquidityMarket, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type ValueKind, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };