lpsignal 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,7 +28,7 @@ try {
28
28
  | Method | Endpoint | Key |
29
29
  |---|---|---|
30
30
  | `health()` · `chains()` | `/v1/health` · `/v1/chains` | – |
31
- | `pools({ chain, class, window, minTvlUsd, limit, offset, sort, order })` | `GET /v1/pools` — `sort`: `netApr` (default) · `feeApr` · `ilApr` · `inRange` · `emissionApr` · `tvl` · `fee`; `order`: `desc` (default) · `asc`; the page carries `total` | – |
31
+ | `pools({ chain, class, window, minTvlUsd, limit, offset, sort, order })` | `GET /v1/pools` — `sort`: `netApr` (default) · `feeApr` · `ilApr` · `inRange` · `emissionApr` · `tvl` · `fee` · `volume24h` · `fees24h`; `order`: `desc` (default) · `asc`; the page carries `total`; each pool carries `volume24hUsd`, `fees24hUsd` (an estimate: volume × the current fee rate) and `best.net24h` | – |
32
32
  | `iteratePools({ …, sort, order })` | every page, in that order (best effort: none twice; one whose place changes meanwhile may be missed) | – |
33
33
  | `pool(chain, address)` · `poolHours(chain, address, { hours })` | `GET /v1/pools/:chain/:address[/hours]` | – |
34
34
  | `backtest(chain, address, { rangePct, days })` | `GET …/backtest` | – |
@@ -36,7 +36,7 @@ try {
36
36
  | `signalStats({ days })` | `GET /v1/signals/stats` — the public track record | – |
37
37
  | `iterateSignals({ kind })` | every page, newest first | optional |
38
38
  | `signalsAfter(id)` | everything newer than `id`, oldest first | optional |
39
- | `smartLps({ windowDays, chain, limit, offset, sort, order })` | `GET /v1/smart-lps` — `sort`: `rank` (default, = pnl rank) · `pnl` · `return` · `capital` · `closes` · `wins`; `rank` stays the pnl rank whatever the sort; `total` | optional |
39
+ | `smartLps({ windowDays, chain, limit, offset, sort, order })` | `GET /v1/smart-lps` — `sort`: `rank` (default, = pnl rank) · `pnl` · `return` · `capital` · `closes` · `wins` · `apr` · `winRate`; `rank` stays the pnl rank whatever the sort; `total`; each wallet carries `aprVsHold` (annualised vs holding), `winRate`, `avgHoldH` | optional |
40
40
  | `iterateSmartLps({ …, sort, order })` | every wallet on the board, in that order | optional |
41
41
  | `walletPositions(owner, { limit, openOffset, openSort, openOrder, closedOffset, closedSort, closedOrder })` | `GET /v1/smart-lps/:owner/positions` — each list pages and sorts on its own (`openSort`: `lastEvent` · `openedAt` · `entryUsd`; `closedSort`: `closedAt` · `openedAt` · `capitalUsd` · `pnlUsd`); `openTotal` / `closedTotal` | Pro |
42
42
  | `follows()` · `follow(owner)` · `unfollow(owner)` | `/v1/me/follows` | Pro |
package/dist/types.d.ts CHANGED
@@ -42,6 +42,8 @@ export interface BestRange {
42
42
  /** Slipstream: gauge emissions if staked instead (fees forgone, not backtested); 0 = not applicable */
43
43
  stakedEmissionApr: number;
44
44
  asOf: string;
45
+ /** pools list only: the same range's net APR over the last 24h (null = not computed) */
46
+ net24h?: number | null;
45
47
  }
46
48
  export interface RankedPool {
47
49
  chain: Chain;
@@ -55,11 +57,17 @@ export interface RankedPool {
55
57
  /** v4 pools: liquidity within ±2% of price, since v4 has no per-pool balances */
56
58
  tvlUsd: number;
57
59
  tvlAt: string | null;
60
+ /**
61
+ * the last 24h in USD at the latest prices; null = no price yet. fees = an ESTIMATE of the swap fees paid: volume ×
62
+ * the pool's current fee rate, before protocol cuts (dynamic-fee pools: approximate) — not what LPs were paid
63
+ */
64
+ volume24hUsd: number | null;
65
+ fees24hUsd: number | null;
58
66
  best: BestRange;
59
67
  }
60
68
  export type Order = 'asc' | 'desc';
61
69
  /** what `pools` can sort by: the best range's figures, the pool's TVL or fee tier */
62
- export type PoolSort = 'netApr' | 'feeApr' | 'ilApr' | 'inRange' | 'emissionApr' | 'tvl' | 'fee';
70
+ export type PoolSort = 'netApr' | 'feeApr' | 'ilApr' | 'inRange' | 'emissionApr' | 'tvl' | 'fee' | 'volume24h' | 'fees24h';
63
71
  /** what `signals` can sort by: time (newest first, cursor), return (APR at firing), outcome (realised result) */
64
72
  export type SignalSort = 'time' | 'return' | 'outcome';
65
73
  export interface PoolsPage {
@@ -268,6 +276,12 @@ export interface LeaderboardWallet {
268
276
  pnlUsd: number;
269
277
  returnPct: number;
270
278
  chains: Chain[];
279
+ /** annualised return vs holding over the capital × time deployed; null = no close with a known opening */
280
+ aprVsHold: number | null;
281
+ /** closes with a positive pnl / closes */
282
+ winRate: number;
283
+ /** capital-weighted hours a position was held */
284
+ avgHoldH: number | null;
271
285
  }
272
286
  export interface Leaderboard {
273
287
  windowDays: 30 | 90;
@@ -282,7 +296,7 @@ export interface Leaderboard {
282
296
  order: Order;
283
297
  }
284
298
  /** what `smartLps` can sort by; `rank` (the pnl rank) stays the wallet's rank whatever the sort */
285
- export type BoardSort = 'rank' | 'pnl' | 'return' | 'capital' | 'closes' | 'wins';
299
+ export type BoardSort = 'rank' | 'pnl' | 'return' | 'capital' | 'closes' | 'wins' | 'apr' | 'winRate';
286
300
  interface PositionPool {
287
301
  chain: Chain;
288
302
  pool: string;
@@ -297,6 +311,8 @@ export interface OpenPosition extends PositionPool {
297
311
  openedAt: string | null;
298
312
  staked: boolean;
299
313
  entryUsd: number | null;
314
+ /** the pool's tick now (its latest hourly close): in range when tickLower <= poolTick < tickUpper; null = unknown */
315
+ poolTick: number | null;
300
316
  }
301
317
  export interface ClosedPosition extends PositionPool {
302
318
  tokenId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lpsignal",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Official LPSignal SDK: net-of-IL APR signals for concentrated-liquidity pools, a WebSocket stream that never misses a signal, webhook verification and the REST API.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",