@0xinsider/sdk 0.130.3 → 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/provenance.d.ts +1 -1
- package/dist/provenance.js +2 -2
- package/dist/schema.d.ts +13 -8
- package/dist/schema.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -240,6 +240,13 @@ SDK 0.126.8 documents fewer `listGameMarkets` reads with `expand: ["sharp_money"
|
|
|
240
240
|
|
|
241
241
|
SDK 0.129.0 types `accepting_orders` on each `listGameMarkets` row's `trading_terms` with `expand: ["trading_terms"]` (#36723): Gamma's `acceptingOrders`, `true` when the market's order book takes new limit and market orders, `false` when Polymarket has paused them on a market that is not closed, `null` when the record does not carry it. It also documents that with `expand: ["quotes"]` an outcome that reads `book_unavailable_reason: "stream_capacity"` now usually carries its book a few seconds later, with `book_source: "clob_rest"`.
|
|
242
242
|
|
|
243
|
+
SDK 0.131.0 counts S and A wallets only in market flow (#36883). `getMarketFlow` and `batchGetMarketFlow` sum S and A large trades, list up to five S and A net positions worth at least $25 at the stored mark, and widen `sharp_money.direction` to `"YES" | "NO" | "NEUTRAL"`: `NEUTRAL`, with `token_id: null`, when the rounded net flow is zero, where it read `"YES"`. A `switch` that handled `YES` and `NO` exhaustively no longer compiles until it handles `NEUTRAL`. `listSharpMoneyFlows` defaults `min_grade` to `"A"` (pass `"B"` for S, A and B), leaves out markets whose net flow is $0.00, and strips a wallet's equal NO buys on all three legs of a 1X2 moneyline. `getGameSharpMoney` adds `no_lean_reason` (`"aligned"` or `"divided"` on a `no_clear_lean` verdict) and `outcomes[].top_wallet_usd` before the start. `exploreMarkets` scores a NO lean in `score_components.sharp_money_signal` as strongly as a YES lean.
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
const flow = await client.getMarketFlow("0x...");
|
|
247
|
+
if (flow.data.sharp_money.direction === "NEUTRAL") flow.data.sharp_money.token_id; // null
|
|
248
|
+
```
|
|
249
|
+
|
|
243
250
|
SDK 0.41.0 adds the closing line (#32517). `getMarketClose(conditionId)` reads a market's stored close: each outcome's price in the last provider minute bucket that ended at or before kickoff, captured once after settlement. Its `status` is `measured`, `pending` or `unavailable`, with `unavailable_reason`; a missing close is never 0. Every large trade (`listLargeTrades`, `listLargeTradeHistory`, `getLargeTrade`, and the expanded trades of the `getEventReplaySince` replay) now carries `clv`: cents per share against that close, positive when the trade beat it, measured on pre-kickoff trades only (`status` `measured`, `in_play`, `pending` or `unavailable`). `getTraderClv(address, { from, to, min_size, category })` summarizes one wallet's large trades in a window: the mean, stake-weighted and per-market mean CLV with a 95% interval, the share that beat the close, and the trades excluded by status. `batchGetMarketClose({ condition_ids })` reads up to 25 markets' closes in one request (#33025). New types: `MarketClose`, `TraderClv`.
|
|
244
251
|
|
|
245
252
|
```ts
|
package/dist/provenance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
|
|
2
|
-
export declare const OPENAPI_SHA256 = "
|
|
2
|
+
export declare const OPENAPI_SHA256 = "1d72ee7a396788e756392658954beeb2b8e2379c8ed4c06431381886b1fb6100";
|
|
3
3
|
export declare const OPENAPI_VERSION = "1.0.0";
|
|
4
4
|
export declare const OPERATION_COUNT = 120;
|
|
5
5
|
export declare const APP_REPOSITORY = "0xinsider/0xinsider";
|
package/dist/provenance.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
// when it could be resolved, else null. Compare OPENAPI_SHA256 with the live
|
|
7
7
|
// document to see whether a release is behind the API.
|
|
8
8
|
export const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
|
|
9
|
-
export const OPENAPI_SHA256 = "
|
|
9
|
+
export const OPENAPI_SHA256 = "1d72ee7a396788e756392658954beeb2b8e2379c8ed4c06431381886b1fb6100";
|
|
10
10
|
export const OPENAPI_VERSION = "1.0.0";
|
|
11
11
|
export const OPERATION_COUNT = 120;
|
|
12
12
|
export const APP_REPOSITORY = "0xinsider/0xinsider";
|
|
13
13
|
export const APP_SPEC_PATH = "web/public/api/v1/openapi.json";
|
|
14
|
-
export const APP_COMMIT = "
|
|
14
|
+
export const APP_COMMIT = "54187fc20e3cbfd8937f99f3d541e1a604ba4e0c";
|
|
15
15
|
//# sourceMappingURL=provenance.js.map
|
package/dist/schema.d.ts
CHANGED
|
@@ -1376,7 +1376,7 @@ export type ExploreMarket = {
|
|
|
1376
1376
|
whale_signal: number | null;
|
|
1377
1377
|
liquidity_signal: number | null;
|
|
1378
1378
|
recency_signal: number | null;
|
|
1379
|
-
/** Canonical key since #16308; smart_money_signal is its deprecated spelling, emitted beside it with the same value until its sunset on 2027-02-01 (#29352). */
|
|
1379
|
+
/** Canonical key since #16308; smart_money_signal is its deprecated spelling, emitted beside it with the same value until its sunset on 2027-02-01 (#29352). Magnitude abs(smart_score) when smart_label names a supported YES or NO price-relative lean, 0 when smart_score is present with no supported lean, and null when smart_score is null (#36883). */
|
|
1380
1380
|
sharp_money_signal: number | null;
|
|
1381
1381
|
/**
|
|
1382
1382
|
* Deprecated spelling of sharp_money_signal; emitted beside it with the same value. Sunset 2027-02-01 (#29352): removed from V1 on that date; read sharp_money_signal.
|
|
@@ -1811,7 +1811,7 @@ export type GameFreshness = {
|
|
|
1811
1811
|
source_age_seconds?: number;
|
|
1812
1812
|
/** Whether a reader should be told these rows are behind. This applies the half's own servable-age bar (15 s live, 120 s upcoming), which is not the same as source_freshness: a live board whose scores are seconds old reads stale for about half of every publish cycle and is not delayed. */
|
|
1813
1813
|
delayed: boolean;
|
|
1814
|
-
/** When this game's score was last observed. A write that observed no score, such as recording the end of a game the live-score feed stopped reporting, does not move it; a game ended that way before November 15, 2026 reads the time of that write. Omitted when there is no frame. */
|
|
1814
|
+
/** When this game's score was last observed. For a score read from Polymarket's Gamma API it is at or before the time Gamma generated that response, and never after 0xinsider requested it. Gamma's cache currently serves a response up to 300 seconds old, so on a game scored only by Gamma this value can be up to 300 seconds old while the feed is healthy. A write that observed no score, such as recording the end of a game the live-score feed stopped reporting, does not move it; a game ended that way before November 15, 2026 reads the time of that write. Omitted when there is no frame. */
|
|
1815
1815
|
scores_observed_at?: string;
|
|
1816
1816
|
/** The provider's own frame clock. Omitted when the frame carries none. */
|
|
1817
1817
|
scores_source_at?: string;
|
|
@@ -2023,6 +2023,8 @@ export type GameSharpMoney = {
|
|
|
2023
2023
|
b: number;
|
|
2024
2024
|
s: number;
|
|
2025
2025
|
};
|
|
2026
|
+
/** The most one S or A wallet holds of usd, on the same basis, never above usd (#36883). Published while lifecycle is live and usd > 0; null when usd is 0, when lifecycle is in_play, ended, settled or indeterminate, or when no S or A wallet backs the outcome. */
|
|
2027
|
+
top_wallet_usd: number | null;
|
|
2026
2028
|
})[];
|
|
2027
2029
|
status: "computed" | "not_computed" | "unavailable";
|
|
2028
2030
|
total_usd: number | null;
|
|
@@ -2044,7 +2046,7 @@ export type GameSharpMoney = {
|
|
|
2044
2046
|
verdict: GameSharpMoneyVerdict;
|
|
2045
2047
|
money_grades: ("S" | "A" | "B" | "C" | "D" | "F")[];
|
|
2046
2048
|
} | null;
|
|
2047
|
-
/**
|
|
2049
|
+
/** Net in-play buys by S and A grade wallets on a game's moneyline since its start (#36857), by side, in dollars, while lifecycle is in_play. Each wallet's in-play sells offset its in-play buys on the same outcome (floored at zero, valued at that wallet's average in-play buy price), counting wallets with at least $25 net bought. since is the earlier of scheduled_at and the first live score, so a scheduled_at later than the real start does not start the window late. On a 1X2 it has three outcomes and counts net buys of each outcome's YES shares only: a NO buy is money against one outcome, so it is not counted. The verdict requires payout-share agreement (leans requires the dollar leader to also lead the runner-up in net shares bought by at least 25 percentage points; otherwise split) and makes no price claim: in play, buys follow the score, so read avg_buy_price. as_of is when the trades were read. A read that found no qualifying net buy since the start carries bought_usd 0, verdict no_sharp_money and every pct 0. null claims nothing: outside in_play, or with no reading available. */
|
|
2048
2050
|
since_start: {
|
|
2049
2051
|
as_of: string;
|
|
2050
2052
|
bought_usd: number;
|
|
@@ -2061,6 +2063,8 @@ export type GameSharpMoney = {
|
|
|
2061
2063
|
trader_count: number;
|
|
2062
2064
|
verdict: GameSharpMoneyVerdict;
|
|
2063
2065
|
} | null;
|
|
2066
|
+
/** Why verdict.kind is no_clear_lean (#36857, #36883). divided: S and A wallets disagree, either a side other than the money leader holds at least $500 from at least 2 more S and A wallets than the leader, or one wallet holds more than half of a side with at least $500 while the other sides hold at least $500 from at least 2 S and A wallets. aligned: no such split, so the money sits about where the price does. null on every other verdict and when status is not computed. */
|
|
2067
|
+
no_lean_reason: "aligned" | "divided" | null;
|
|
2064
2068
|
};
|
|
2065
2069
|
export type GameSharpMoneyVerdict = {
|
|
2066
2070
|
kind: "no_sharp_money";
|
|
@@ -2725,7 +2729,7 @@ export type MarketFlow = {
|
|
|
2725
2729
|
/** The Polymarket protocol the market trades on, Gamma's market version: v1 (CTF, ConditionalTokens) or v2 (Protocol V2). Read from the condition id, the same value GET /api/v1/markets/settled serves. On a v2 market every token_id this object names is a V2 position id: sign its orders for ExchangeV3 and read its balance as CONDITIONAL-V2. */
|
|
2726
2730
|
protocol_version: "v1" | "v2";
|
|
2727
2731
|
};
|
|
2728
|
-
/** Outcome-aware flow from
|
|
2732
|
+
/** Outcome-aware flow from S and A graded large trades in the window (#36564, #36883). BUY YES and SELL NO add net exposure; BUY NO and SELL YES subtract it. Gross buy/sell volumes count both outcomes across S and A large trades. Top positions list up to five S and A open net positions worth at least $25 at the stored mark. Direction uses rounded net: positive is YES, negative is NO, and zero is NEUTRAL with a null token_id. Canonical; smart_money is a deprecated byte-identical alias. */
|
|
2729
2733
|
sharp_money: MarketFlowSharpMoney;
|
|
2730
2734
|
/**
|
|
2731
2735
|
* Deprecated alias of sharp_money; byte-identical. Sunset 2027-02-01 (#29352): removed from V1 on that date; read sharp_money.
|
|
@@ -2737,8 +2741,8 @@ export type MarketFlow = {
|
|
|
2737
2741
|
/** One market's outcome-aware large-trade flow in the window and its top graded positions: the shape of MarketFlow's sharp_money and of its deprecated alias smart_money. */
|
|
2738
2742
|
export type MarketFlowSharpMoney = {
|
|
2739
2743
|
net_flow_usd: number;
|
|
2740
|
-
direction: "YES" | "NO";
|
|
2741
|
-
/** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
|
|
2744
|
+
direction: "YES" | "NO" | "NEUTRAL";
|
|
2745
|
+
/** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when direction is NEUTRAL or when unavailable (e.g. unsynced markets). */
|
|
2742
2746
|
token_id: string | null;
|
|
2743
2747
|
/** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value until its sunset on 2027-02-01 (#29352). */
|
|
2744
2748
|
large_trade_count: number;
|
|
@@ -2757,6 +2761,7 @@ export type MarketFlowSharpMoney = {
|
|
|
2757
2761
|
side: "YES" | "NO";
|
|
2758
2762
|
/** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for this outcome; null when unavailable (e.g. unsynced markets). */
|
|
2759
2763
|
token_id: string | null;
|
|
2764
|
+
/** The wallet's net position on side (YES shares minus NO shares, or the reverse) valued at the stored mark: the YES price for YES, one minus it for NO. At least 25. Read at the wallet's last sync, so oldest_snapshot_as_of dates the roster (#36883). */
|
|
2760
2765
|
size_usd: number;
|
|
2761
2766
|
})[];
|
|
2762
2767
|
/** Age of the oldest stored position snapshot behind top_positions: the minimum wallet sync clock over the positions this body publishes. The roster is a stored read rather than a live one, and graded wallets sit on different sync tiers, so this names how current the whole roster is; the response is no fresher than this timestamp. Null when the roster is empty or no published position carries a sync clock. It does not date net_flow_usd, the volumes or the trade counts, which come from large-trade event times. */
|
|
@@ -8040,7 +8045,7 @@ export interface OperationQuery {
|
|
|
8040
8045
|
category?: string;
|
|
8041
8046
|
/** Filter by source platform. all is a request-side no-op. */
|
|
8042
8047
|
platform?: "polymarket" | "all";
|
|
8043
|
-
/** Minimum latest trader grade included in the flow. Default
|
|
8048
|
+
/** Minimum latest trader grade included in the flow. Default A means S and A only (#36564, #36883); pass B for S/A/B; unranked traders are excluded. */
|
|
8044
8049
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
8045
8050
|
/** Optional post-aggregate flow direction filter. */
|
|
8046
8051
|
direction?: "YES" | "NO";
|
|
@@ -8060,7 +8065,7 @@ export interface OperationQuery {
|
|
|
8060
8065
|
category?: string;
|
|
8061
8066
|
/** Filter by source platform. all is a request-side no-op. */
|
|
8062
8067
|
platform?: "polymarket" | "all";
|
|
8063
|
-
/** Minimum latest trader grade included in the flow. Default
|
|
8068
|
+
/** Minimum latest trader grade included in the flow. Default A means S and A only (#36564, #36883); pass B for S/A/B; unranked traders are excluded. */
|
|
8064
8069
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
8065
8070
|
/** Optional post-aggregate flow direction filter. */
|
|
8066
8071
|
direction?: "YES" | "NO";
|