@uniswap/client-data-api 0.0.167 → 0.0.170
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/data/v2/api_pb.d.ts +55 -12
- package/dist/data/v2/api_pb.js +57 -12
- package/dist/data/v2/types_pb.d.ts +11 -1
- package/dist/data/v2/types_pb.js +3 -1
- package/package.json +1 -1
package/dist/data/v2/api_pb.d.ts
CHANGED
|
@@ -1565,9 +1565,25 @@ export declare class GetTokenTopTradersRequest extends Message<GetTokenTopTrader
|
|
|
1565
1565
|
* so re-entering wallets are accounted correctly. Auction claims are seeded
|
|
1566
1566
|
* before the trade walk as buys at the wallet's true auction cost, so
|
|
1567
1567
|
* bidders never show zero buys. Tokens sold beyond tracked inventory
|
|
1568
|
-
* (transfers in)
|
|
1569
|
-
* claims in hand, an unexplained inflow is a transfer,
|
|
1570
|
-
* and
|
|
1568
|
+
* (transfers in) entered the wallet outside the swap tape — with the full
|
|
1569
|
+
* history and explicit claims in hand, an unexplained inflow is a transfer,
|
|
1570
|
+
* not a hidden buy — so the wallet's basis is UNKNOWN (not $0) and the row
|
|
1571
|
+
* flags transferred_in.
|
|
1572
|
+
*
|
|
1573
|
+
* UNKNOWN-BASIS ROWS: when the server cannot compute a wallet's basis — the
|
|
1574
|
+
* wallet transferred tokens in (transferred_in), or its auction spend was
|
|
1575
|
+
* not USD-convertible — basis_unknown is true and the four basis-derived
|
|
1576
|
+
* money fields (cost_basis_usd, avg_cost_usd, realized_pnl_usd,
|
|
1577
|
+
* unrealized_pnl_usd) are served as 0 and MUST be read as "unknown", never
|
|
1578
|
+
* as a real $0.00. Such wallets rank strictly after every computable-PnL
|
|
1579
|
+
* row — including loss-makers: an unknown 0 never outranks a real figure —
|
|
1580
|
+
* so a transfer-in whale's raw proceeds can never crowd real traders out
|
|
1581
|
+
* of the request limit. Observed figures (buys/sells/proceeds/tokens) are
|
|
1582
|
+
* always set and always truthful. unrealized_pnl_unknown additionally
|
|
1583
|
+
* covers the basis-known wallet whose unrealized leg alone is uncomputable
|
|
1584
|
+
* (token has no spot price). (These are flags rather than proto3 `optional`
|
|
1585
|
+
* on the money fields because changing an existing field's presence is a
|
|
1586
|
+
* breaking gencode change for published clients.)
|
|
1571
1587
|
*
|
|
1572
1588
|
* @generated from message data.v2.TokenTopTrader
|
|
1573
1589
|
*/
|
|
@@ -1616,19 +1632,23 @@ export declare class TokenTopTrader extends Message<TokenTopTrader> {
|
|
|
1616
1632
|
remainingTokens: number;
|
|
1617
1633
|
/**
|
|
1618
1634
|
* USD cost basis of the REMAINING position: grows with buys/claims,
|
|
1619
|
-
* shrinks by average cost × amount on every sell.
|
|
1635
|
+
* shrinks by average cost × amount on every sell. Meaningless (served 0)
|
|
1636
|
+
* when basis_unknown — read that as "unknown", not a zero basis.
|
|
1620
1637
|
*
|
|
1621
1638
|
* @generated from field: double cost_basis_usd = 9;
|
|
1622
1639
|
*/
|
|
1623
1640
|
costBasisUsd: number;
|
|
1624
1641
|
/**
|
|
1625
|
-
* cost_basis_usd ÷ remaining_tokens; 0 for wallets holding nothing
|
|
1626
|
-
*
|
|
1642
|
+
* cost_basis_usd ÷ remaining_tokens; 0 for wallets holding nothing.
|
|
1643
|
+
* Meaningless (served 0) when basis_unknown.
|
|
1627
1644
|
*
|
|
1628
1645
|
* @generated from field: double avg_cost_usd = 10;
|
|
1629
1646
|
*/
|
|
1630
1647
|
avgCostUsd: number;
|
|
1631
1648
|
/**
|
|
1649
|
+
* Meaningless (served 0) when basis_unknown — proceeds booked against an
|
|
1650
|
+
* unknowable basis are not a PnL; such rows rank as realized 0.
|
|
1651
|
+
*
|
|
1632
1652
|
* @generated from field: double realized_pnl_usd = 11;
|
|
1633
1653
|
*/
|
|
1634
1654
|
realizedPnlUsd: number;
|
|
@@ -1650,20 +1670,39 @@ export declare class TokenTopTrader extends Message<TokenTopTrader> {
|
|
|
1650
1670
|
/**
|
|
1651
1671
|
* Mark-to-market PnL of the remaining position at the token's latest
|
|
1652
1672
|
* known price: remaining_tokens × (spot − avg_cost_usd). The documented
|
|
1653
|
-
* ranking tiebreak, served so clients can render it.
|
|
1673
|
+
* ranking tiebreak, served so clients can render it. Meaningless (served
|
|
1674
|
+
* 0) when unrealized_pnl_unknown — basis unknown, or no known spot price.
|
|
1654
1675
|
*
|
|
1655
1676
|
* @generated from field: double unrealized_pnl_usd = 14;
|
|
1656
1677
|
*/
|
|
1657
1678
|
unrealizedPnlUsd: number;
|
|
1658
1679
|
/**
|
|
1659
1680
|
* True when the wallet sold beyond its tracked inventory at least once —
|
|
1660
|
-
* the excess entered the wallet outside the swap tape (a transfer in)
|
|
1661
|
-
*
|
|
1662
|
-
* data gap when cost_basis_usd is 0.
|
|
1681
|
+
* the excess entered the wallet outside the swap tape (a transfer in),
|
|
1682
|
+
* so its basis is unknown. Always implies basis_unknown.
|
|
1663
1683
|
*
|
|
1664
1684
|
* @generated from field: bool transferred_in = 15;
|
|
1665
1685
|
*/
|
|
1666
1686
|
transferredIn: boolean;
|
|
1687
|
+
/**
|
|
1688
|
+
* True when the wallet's basis could not be computed — it transferred
|
|
1689
|
+
* tokens in (transferred_in), or its auction spend was not
|
|
1690
|
+
* USD-convertible. Clients should render the four basis-derived money
|
|
1691
|
+
* fields as unknown ("–"), not $0.00; the row ranks after every
|
|
1692
|
+
* computable-PnL row (see message doc). Implies unrealized_pnl_unknown.
|
|
1693
|
+
*
|
|
1694
|
+
* @generated from field: bool basis_unknown = 16;
|
|
1695
|
+
*/
|
|
1696
|
+
basisUnknown: boolean;
|
|
1697
|
+
/**
|
|
1698
|
+
* True when unrealized_pnl_usd alone is not computable: basis_unknown, or
|
|
1699
|
+
* the token has no known spot price (a missing spot must not read as a
|
|
1700
|
+
* total loss). Served 0 then — render unknown ("–"), not $0.00. The other
|
|
1701
|
+
* money fields stay real when basis_unknown is false.
|
|
1702
|
+
*
|
|
1703
|
+
* @generated from field: bool unrealized_pnl_unknown = 17;
|
|
1704
|
+
*/
|
|
1705
|
+
unrealizedPnlUnknown: boolean;
|
|
1667
1706
|
constructor(data?: PartialMessage<TokenTopTrader>);
|
|
1668
1707
|
static readonly runtime: typeof proto3;
|
|
1669
1708
|
static readonly typeName = "data.v2.TokenTopTrader";
|
|
@@ -1679,8 +1718,12 @@ export declare class TokenTopTrader extends Message<TokenTopTrader> {
|
|
|
1679
1718
|
export declare class GetTokenTopTradersResponse extends Message<GetTokenTopTradersResponse> {
|
|
1680
1719
|
/**
|
|
1681
1720
|
* Ranked realized PnL desc, unrealized PnL desc as the tiebreak (orders
|
|
1682
|
-
* never-sold claimers sensibly — all realized 0),
|
|
1683
|
-
*
|
|
1721
|
+
* never-sold claimers sensibly — all realized 0), wallet address asc as
|
|
1722
|
+
* the final key, capped at the request limit. Unknown-basis rows
|
|
1723
|
+
* (transferred_in, or an inconvertible auction spend) partition strictly
|
|
1724
|
+
* after every computable-PnL row, including losses — so they cannot
|
|
1725
|
+
* consume top slots on raw proceeds or displace losing traders. Only
|
|
1726
|
+
* wallets with at least one trade or claim appear.
|
|
1684
1727
|
*
|
|
1685
1728
|
* @generated from field: repeated data.v2.TokenTopTrader traders = 1;
|
|
1686
1729
|
*/
|
package/dist/data/v2/api_pb.js
CHANGED
|
@@ -1975,9 +1975,25 @@ GetTokenTopTradersRequest.fields = proto3.util.newFieldList(() => [
|
|
|
1975
1975
|
* so re-entering wallets are accounted correctly. Auction claims are seeded
|
|
1976
1976
|
* before the trade walk as buys at the wallet's true auction cost, so
|
|
1977
1977
|
* bidders never show zero buys. Tokens sold beyond tracked inventory
|
|
1978
|
-
* (transfers in)
|
|
1979
|
-
* claims in hand, an unexplained inflow is a transfer,
|
|
1980
|
-
* and
|
|
1978
|
+
* (transfers in) entered the wallet outside the swap tape — with the full
|
|
1979
|
+
* history and explicit claims in hand, an unexplained inflow is a transfer,
|
|
1980
|
+
* not a hidden buy — so the wallet's basis is UNKNOWN (not $0) and the row
|
|
1981
|
+
* flags transferred_in.
|
|
1982
|
+
*
|
|
1983
|
+
* UNKNOWN-BASIS ROWS: when the server cannot compute a wallet's basis — the
|
|
1984
|
+
* wallet transferred tokens in (transferred_in), or its auction spend was
|
|
1985
|
+
* not USD-convertible — basis_unknown is true and the four basis-derived
|
|
1986
|
+
* money fields (cost_basis_usd, avg_cost_usd, realized_pnl_usd,
|
|
1987
|
+
* unrealized_pnl_usd) are served as 0 and MUST be read as "unknown", never
|
|
1988
|
+
* as a real $0.00. Such wallets rank strictly after every computable-PnL
|
|
1989
|
+
* row — including loss-makers: an unknown 0 never outranks a real figure —
|
|
1990
|
+
* so a transfer-in whale's raw proceeds can never crowd real traders out
|
|
1991
|
+
* of the request limit. Observed figures (buys/sells/proceeds/tokens) are
|
|
1992
|
+
* always set and always truthful. unrealized_pnl_unknown additionally
|
|
1993
|
+
* covers the basis-known wallet whose unrealized leg alone is uncomputable
|
|
1994
|
+
* (token has no spot price). (These are flags rather than proto3 `optional`
|
|
1995
|
+
* on the money fields because changing an existing field's presence is a
|
|
1996
|
+
* breaking gencode change for published clients.)
|
|
1981
1997
|
*
|
|
1982
1998
|
* @generated from message data.v2.TokenTopTrader
|
|
1983
1999
|
*/
|
|
@@ -2028,19 +2044,23 @@ export class TokenTopTrader extends Message {
|
|
|
2028
2044
|
this.remainingTokens = 0;
|
|
2029
2045
|
/**
|
|
2030
2046
|
* USD cost basis of the REMAINING position: grows with buys/claims,
|
|
2031
|
-
* shrinks by average cost × amount on every sell.
|
|
2047
|
+
* shrinks by average cost × amount on every sell. Meaningless (served 0)
|
|
2048
|
+
* when basis_unknown — read that as "unknown", not a zero basis.
|
|
2032
2049
|
*
|
|
2033
2050
|
* @generated from field: double cost_basis_usd = 9;
|
|
2034
2051
|
*/
|
|
2035
2052
|
this.costBasisUsd = 0;
|
|
2036
2053
|
/**
|
|
2037
|
-
* cost_basis_usd ÷ remaining_tokens; 0 for wallets holding nothing
|
|
2038
|
-
*
|
|
2054
|
+
* cost_basis_usd ÷ remaining_tokens; 0 for wallets holding nothing.
|
|
2055
|
+
* Meaningless (served 0) when basis_unknown.
|
|
2039
2056
|
*
|
|
2040
2057
|
* @generated from field: double avg_cost_usd = 10;
|
|
2041
2058
|
*/
|
|
2042
2059
|
this.avgCostUsd = 0;
|
|
2043
2060
|
/**
|
|
2061
|
+
* Meaningless (served 0) when basis_unknown — proceeds booked against an
|
|
2062
|
+
* unknowable basis are not a PnL; such rows rank as realized 0.
|
|
2063
|
+
*
|
|
2044
2064
|
* @generated from field: double realized_pnl_usd = 11;
|
|
2045
2065
|
*/
|
|
2046
2066
|
this.realizedPnlUsd = 0;
|
|
@@ -2062,20 +2082,39 @@ export class TokenTopTrader extends Message {
|
|
|
2062
2082
|
/**
|
|
2063
2083
|
* Mark-to-market PnL of the remaining position at the token's latest
|
|
2064
2084
|
* known price: remaining_tokens × (spot − avg_cost_usd). The documented
|
|
2065
|
-
* ranking tiebreak, served so clients can render it.
|
|
2085
|
+
* ranking tiebreak, served so clients can render it. Meaningless (served
|
|
2086
|
+
* 0) when unrealized_pnl_unknown — basis unknown, or no known spot price.
|
|
2066
2087
|
*
|
|
2067
2088
|
* @generated from field: double unrealized_pnl_usd = 14;
|
|
2068
2089
|
*/
|
|
2069
2090
|
this.unrealizedPnlUsd = 0;
|
|
2070
2091
|
/**
|
|
2071
2092
|
* True when the wallet sold beyond its tracked inventory at least once —
|
|
2072
|
-
* the excess entered the wallet outside the swap tape (a transfer in)
|
|
2073
|
-
*
|
|
2074
|
-
* data gap when cost_basis_usd is 0.
|
|
2093
|
+
* the excess entered the wallet outside the swap tape (a transfer in),
|
|
2094
|
+
* so its basis is unknown. Always implies basis_unknown.
|
|
2075
2095
|
*
|
|
2076
2096
|
* @generated from field: bool transferred_in = 15;
|
|
2077
2097
|
*/
|
|
2078
2098
|
this.transferredIn = false;
|
|
2099
|
+
/**
|
|
2100
|
+
* True when the wallet's basis could not be computed — it transferred
|
|
2101
|
+
* tokens in (transferred_in), or its auction spend was not
|
|
2102
|
+
* USD-convertible. Clients should render the four basis-derived money
|
|
2103
|
+
* fields as unknown ("–"), not $0.00; the row ranks after every
|
|
2104
|
+
* computable-PnL row (see message doc). Implies unrealized_pnl_unknown.
|
|
2105
|
+
*
|
|
2106
|
+
* @generated from field: bool basis_unknown = 16;
|
|
2107
|
+
*/
|
|
2108
|
+
this.basisUnknown = false;
|
|
2109
|
+
/**
|
|
2110
|
+
* True when unrealized_pnl_usd alone is not computable: basis_unknown, or
|
|
2111
|
+
* the token has no known spot price (a missing spot must not read as a
|
|
2112
|
+
* total loss). Served 0 then — render unknown ("–"), not $0.00. The other
|
|
2113
|
+
* money fields stay real when basis_unknown is false.
|
|
2114
|
+
*
|
|
2115
|
+
* @generated from field: bool unrealized_pnl_unknown = 17;
|
|
2116
|
+
*/
|
|
2117
|
+
this.unrealizedPnlUnknown = false;
|
|
2079
2118
|
proto3.util.initPartial(data, this);
|
|
2080
2119
|
}
|
|
2081
2120
|
static fromBinary(bytes, options) {
|
|
@@ -2109,6 +2148,8 @@ TokenTopTrader.fields = proto3.util.newFieldList(() => [
|
|
|
2109
2148
|
{ no: 13, name: "has_claims", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
2110
2149
|
{ no: 14, name: "unrealized_pnl_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
2111
2150
|
{ no: 15, name: "transferred_in", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
2151
|
+
{ no: 16, name: "basis_unknown", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
2152
|
+
{ no: 17, name: "unrealized_pnl_unknown", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
2112
2153
|
]);
|
|
2113
2154
|
/**
|
|
2114
2155
|
* @generated from message data.v2.GetTokenTopTradersResponse
|
|
@@ -2118,8 +2159,12 @@ export class GetTokenTopTradersResponse extends Message {
|
|
|
2118
2159
|
super();
|
|
2119
2160
|
/**
|
|
2120
2161
|
* Ranked realized PnL desc, unrealized PnL desc as the tiebreak (orders
|
|
2121
|
-
* never-sold claimers sensibly — all realized 0),
|
|
2122
|
-
*
|
|
2162
|
+
* never-sold claimers sensibly — all realized 0), wallet address asc as
|
|
2163
|
+
* the final key, capped at the request limit. Unknown-basis rows
|
|
2164
|
+
* (transferred_in, or an inconvertible auction spend) partition strictly
|
|
2165
|
+
* after every computable-PnL row, including losses — so they cannot
|
|
2166
|
+
* consume top slots on raw proceeds or displace losing traders. Only
|
|
2167
|
+
* wallets with at least one trade or claim appear.
|
|
2123
2168
|
*
|
|
2124
2169
|
* @generated from field: repeated data.v2.TokenTopTrader traders = 1;
|
|
2125
2170
|
*/
|
|
@@ -409,7 +409,8 @@ export declare enum TradeSide {
|
|
|
409
409
|
SELL = 2
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
|
-
* Volume, TVL, FDV, and price-change stats for a ranked token.
|
|
412
|
+
* Volume, TVL, FDV, market-cap, and price-change stats for a ranked token.
|
|
413
|
+
* All values are USD-denominated.
|
|
413
414
|
* All fields are populated from Clickhouse aggregations.
|
|
414
415
|
*
|
|
415
416
|
* @generated from message data.v2.TokenRankStats
|
|
@@ -467,6 +468,15 @@ export declare class TokenRankStats extends Message<TokenRankStats> {
|
|
|
467
468
|
* @generated from field: optional double price = 11;
|
|
468
469
|
*/
|
|
469
470
|
price?: number;
|
|
471
|
+
/**
|
|
472
|
+
* price * circulating supply (chain_token_stats.market_cap_usd). Like fdv,
|
|
473
|
+
* not additive across a multichain group's members: the canonical chain's
|
|
474
|
+
* value. Unset where the pipeline has no circulating-supply source, and
|
|
475
|
+
* unset for Solana (no Codex source wired here).
|
|
476
|
+
*
|
|
477
|
+
* @generated from field: optional double market_cap = 12;
|
|
478
|
+
*/
|
|
479
|
+
marketCap?: number;
|
|
470
480
|
constructor(data?: PartialMessage<TokenRankStats>);
|
|
471
481
|
static readonly runtime: typeof proto3;
|
|
472
482
|
static readonly typeName = "data.v2.TokenRankStats";
|
package/dist/data/v2/types_pb.js
CHANGED
|
@@ -530,7 +530,8 @@ proto3.util.setEnumType(TradeSide, "data.v2.TradeSide", [
|
|
|
530
530
|
{ no: 2, name: "TRADE_SIDE_SELL" },
|
|
531
531
|
]);
|
|
532
532
|
/**
|
|
533
|
-
* Volume, TVL, FDV, and price-change stats for a ranked token.
|
|
533
|
+
* Volume, TVL, FDV, market-cap, and price-change stats for a ranked token.
|
|
534
|
+
* All values are USD-denominated.
|
|
534
535
|
* All fields are populated from Clickhouse aggregations.
|
|
535
536
|
*
|
|
536
537
|
* @generated from message data.v2.TokenRankStats
|
|
@@ -567,6 +568,7 @@ TokenRankStats.fields = proto3.util.newFieldList(() => [
|
|
|
567
568
|
{ no: 9, name: "price_change_1h", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
568
569
|
{ no: 10, name: "price_change_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
569
570
|
{ no: 11, name: "price", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
571
|
+
{ no: 12, name: "market_cap", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
570
572
|
]);
|
|
571
573
|
/**
|
|
572
574
|
* Sort field and direction for ListTokens.
|