@0xinsider/sdk 0.39.0 → 0.40.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/schema.d.ts CHANGED
@@ -1383,6 +1383,21 @@ export type GameMarket = {
1383
1383
  prices?: GameMarketPrices;
1384
1384
  /** Polymarket's reported liquidity for this market. Omitted when the provider read carried none, and on a finished game read from its stored record; never 0 in place of a missing figure. */
1385
1385
  liquidity?: GameMarketLiquidity;
1386
+ /** How Polymarket's oracle settled or is settling this market, the block GET /api/v1/games/{event_slug}/markets serves, from the same per-game store. Always present on GET /api/v1/games/{event_slug}; on GET /api/v1/games only with expand=settlement. It never waits for Polymarket: a game not read lately reads status unavailable while its read starts. */
1387
+ settlement?: {
1388
+ expected_settlement_time: string | null;
1389
+ observed_at: string | null;
1390
+ oracle_status: string | null;
1391
+ payouts: number[] | null;
1392
+ proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
1393
+ resolved_at: string | null;
1394
+ result: "outcome" | "split" | null;
1395
+ settled: boolean | null;
1396
+ settlement_time_basis: string | null;
1397
+ status: "observed" | "not_posed" | "unavailable";
1398
+ was_disputed: boolean | null;
1399
+ winning_outcome_index: number | null;
1400
+ };
1386
1401
  };
1387
1402
  /** One market's liquidity as Polymarket reports it (Gamma liquidityNum), verbatim. Polymarket documents it only as reported market liquidity, with no unit. It describes the market's resting order book, not traded volume. */
1388
1403
  export type GameMarketLiquidity = {
@@ -2264,6 +2279,21 @@ export type MarketSnapshot = {
2264
2279
  };
2265
2280
  /** Price and spread trust metadata. Present only when expand=trust or expand[]=trust is requested. */
2266
2281
  trust?: MarketSnapshotTrust;
2282
+ /** How Polymarket's oracle settled or is settling this market, the block GET /api/v1/games/{event_slug}/markets serves, read from the store of the market's event (a child event's market: its game's). It never waits for Polymarket: with nothing stored it reads status unavailable while the read starts. market.market_result stays null; read settlement.result. */
2283
+ settlement: {
2284
+ expected_settlement_time: string | null;
2285
+ observed_at: string | null;
2286
+ oracle_status: string | null;
2287
+ payouts: number[] | null;
2288
+ proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
2289
+ resolved_at: string | null;
2290
+ result: "outcome" | "split" | null;
2291
+ settled: boolean | null;
2292
+ settlement_time_basis: string | null;
2293
+ status: "observed" | "not_posed" | "unavailable";
2294
+ was_disputed: boolean | null;
2295
+ winning_outcome_index: number | null;
2296
+ };
2267
2297
  };
2268
2298
  export type MarketSnapshotFreshness = {
2269
2299
  status: "fresh" | "stale" | "available" | "not_live" | "unavailable";
@@ -6302,11 +6332,21 @@ export interface OperationData {
6302
6332
  line?: number;
6303
6333
  line_outcome_index?: number;
6304
6334
  negative_risk?: boolean;
6305
- outcomes: {
6335
+ outcomes: ({
6306
6336
  index: number;
6307
6337
  label?: string;
6308
6338
  token_id?: string;
6309
- }[];
6339
+ quote?: {
6340
+ best_ask: number | null;
6341
+ best_bid: number | null;
6342
+ book_observed_at: string | null;
6343
+ price: number | null;
6344
+ price_basis: "midpoint" | "last_trade" | null;
6345
+ price_observed_at: string | null;
6346
+ status: "observed" | "no_orderbook" | "unavailable";
6347
+ book_unavailable_reason: "cache_miss" | "stream_capacity" | "no_orderbook" | "missing_provider_token_id" | null;
6348
+ };
6349
+ })[];
6310
6350
  platform?: string;
6311
6351
  slug?: string;
6312
6352
  sports_market_type?: string;
@@ -6326,6 +6366,42 @@ export interface OperationData {
6326
6366
  status: "computed" | "not_computed" | "unavailable";
6327
6367
  trader_count: number | null;
6328
6368
  };
6369
+ settlement: {
6370
+ expected_settlement_time: string | null;
6371
+ observed_at: string | null;
6372
+ oracle_status: string | null;
6373
+ payouts: number[] | null;
6374
+ proposed_answer: "split" | "too_early" | "outcome_0" | "outcome_1" | null;
6375
+ resolved_at: string | null;
6376
+ result: "outcome" | "split" | null;
6377
+ settled: boolean | null;
6378
+ settlement_time_basis: string | null;
6379
+ status: "observed" | "not_posed" | "unavailable";
6380
+ was_disputed: boolean | null;
6381
+ winning_outcome_index: number | null;
6382
+ };
6383
+ trading_terms?: {
6384
+ fee_schedule: {
6385
+ exponent: number | null;
6386
+ rate: number | null;
6387
+ rebate_rate: number | null;
6388
+ taker_only: boolean | null;
6389
+ } | null;
6390
+ fees_enabled: boolean | null;
6391
+ observed_at: string | null;
6392
+ reward_allocations: ({
6393
+ end_date: string | null;
6394
+ rewards_amount: number | null;
6395
+ rewards_daily_rate: number | null;
6396
+ start_date: string | null;
6397
+ })[] | null;
6398
+ rewards_max_spread: number | null;
6399
+ rewards_min_size: number | null;
6400
+ seconds_delay: number | null;
6401
+ status: "observed" | "not_listed" | "unavailable";
6402
+ tick_size: number | null;
6403
+ min_order_size_shares: number | null;
6404
+ };
6329
6405
  })[];
6330
6406
  listGames: Game[];
6331
6407
  listGameTrades: GameTrade[];
@@ -6780,15 +6856,15 @@ export interface OperationQuery {
6780
6856
  limit?: number;
6781
6857
  /** Opaque gmk_v1_ cursor from next_cursor, sent with the same filters. It pins the page position (sports_market_type, line, condition_id), not a snapshot. A cursor this endpoint did not issue returns 400 with error.param=cursor. */
6782
6858
  cursor?: string;
6783
- /** sharp_money adds each row's sharp_money: the game page's per-line split, side USD and S, A and B wallet counts per outcome. One read for the event whatever the page size; the request costs 5 instead of 2. Pro and Max. Repeatable: sharp_money. */
6784
- expand?: "sharp_money"[];
6785
- /** Backward-compatible alias for expand. Repeatable: sharp_money. */
6786
- "expand[]"?: "sharp_money"[];
6859
+ /** sharp_money adds each row's sharp_money: the game page's per-line split, side USD and S, A and B wallet counts per outcome. One read for the event whatever the page size; the request costs 5 instead of 2. Pro and Max. quotes adds each outcome's quote: the cached display price and best bid and ask, each with its observation time, in one cache read for the page; it adds 1 to the cost, on every plan. trading_terms adds each row's fee schedule, reward settings and allocations, order delay, tick and minimum order size in shares from its Gamma record, with the read's time; it adds 1 to the cost, on every plan. Repeatable: sharp_money, quotes, trading_terms. */
6860
+ expand?: ("sharp_money" | "quotes" | "trading_terms")[];
6861
+ /** Backward-compatible alias for expand. Repeatable: sharp_money, quotes, trading_terms. */
6862
+ "expand[]"?: ("sharp_money" | "quotes" | "trading_terms")[];
6787
6863
  };
6788
6864
  listGames: {
6789
6865
  /** Canonical sport bucket, case-insensitive, with - and _ read as a space: table-tennis and Table Tennis are the same bucket. Omit for every covered sport. A bucket this deployment does not serve returns an empty page. */
6790
6866
  sport?: string;
6791
- /** League tag, case-insensitive, as coverage.leagues spells it: nfl, epl, cs2, euroleague, cbb, cwbb. EuroLeague games use sport=Basketball and league=euroleague; NCAA men's and women's college basketball games use sport=Basketball with league=cbb and league=cwbb. Omit for every league inside the selected sports. */
6867
+ /** League tag, case-insensitive, as this list's coverage.leagues spells it (GET /api/v1/coverage lists no leagues): nfl, epl, cs2, euroleague, cbb, cwbb. EuroLeague games use sport=Basketball and league=euroleague; NCAA men's and women's college basketball games use sport=Basketball with league=cbb and league=cwbb. Omit for every league inside the selected sports. */
6792
6868
  league?: string;
6793
6869
  /** Keep only games in this state. ended, cancelled and postponed also list finished games that have left the live board, read from their stored records, for kickoffs within starts_after..starts_before (default: the 7 days before now). Without status, or with any other state, the list is the live and upcoming board. A value outside the enum returns an empty page. */
6794
6870
  status?: "scheduled" | "live" | "paused" | "ended" | "postponed" | "cancelled" | "suspended" | "delayed" | "unknown";
@@ -6802,10 +6878,10 @@ export interface OperationQuery {
6802
6878
  limit?: number;
6803
6879
  /** Opaque gms_v1_ cursor from next_cursor. It pins the page position (kickoff and event_slug), not a snapshot: the catalog is live, so a game added or removed between pages moves with it. With a finished status, a page that spent its read budget carries a cursor past everything it read, which may be past the last game it returned. A cursor this endpoint did not issue returns 400 with error.param=cursor. */
6804
6880
  cursor?: string;
6805
- /** Backward-compatible alias for expand. Repeatable: sharp_money. */
6806
- "expand[]"?: "sharp_money"[];
6807
- /** sharp_money adds each game's sharp_money, the GameSharpMoney object GET /api/v1/games/{event_slug}/sharp-money returns, read from the sport board's cached aggregate: one board read per sport on the page, never a per-game compute. A game the board did not evaluate carries status not_computed (read the per-game route for it); a sport whose aggregate could not be read carries status unavailable while the rest of the page is served. Adds 3 to the request cost. Repeatable. */
6808
- expand?: "sharp_money"[];
6881
+ /** Backward-compatible alias for expand. Repeatable: sharp_money, settlement. */
6882
+ "expand[]"?: ("sharp_money" | "settlement")[];
6883
+ /** sharp_money adds each game's sharp_money, the GameSharpMoney object GET /api/v1/games/{event_slug}/sharp-money returns, read from the sport board's cached aggregate: one board read per sport on the page, never a per-game compute. A game the board did not evaluate carries status not_computed (read the per-game route for it); a sport whose aggregate could not be read carries status unavailable while the rest of the page is served. Pro and Max only; adds 3 to the request cost. settlement adds settlement to each winner market, the GameMarketSettlement block GET /api/v1/games/{event_slug}/markets serves, from the same per-game store. It never waits for Polymarket: a game not read lately carries status unavailable and its read starts, so a read a moment later may answer. Every plan; adds 2 to the request cost. Repeatable; the two combine. */
6884
+ expand?: ("sharp_money" | "settlement")[];
6809
6885
  };
6810
6886
  listGameTrades: {
6811
6887
  /** Newest fills to return. Out-of-range values are clamped to 1..200. */