@seekdaseek/plugin-agentfeed 0.2.0 → 0.4.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.ts CHANGED
@@ -54,7 +54,7 @@ interface EndpointDef {
54
54
  /** Natural-language examples that should trigger this action. */
55
55
  triggers: string[];
56
56
  /** Which param the path needs, if any. */
57
- param?: 'mint' | 'wallet';
57
+ param?: 'mint' | 'wallet' | 'symbol';
58
58
  }
59
59
  declare const ENDPOINTS: EndpointDef[];
60
60
 
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { ExactSvmScheme } from "@x402/svm/exact/client";
6
6
  import { wrapFetchWithPaymentFromConfig, decodePaymentResponseHeader } from "@x402/fetch";
7
7
  import bs58 from "bs58";
8
8
  var DEFAULT_BASE_URL = "https://x402.ochinimus.app";
9
- var DEFAULT_MAX_SPEND_USD = 0.05;
9
+ var DEFAULT_MAX_SPEND_USD = 0.5;
10
10
  var QUOTE_TTL_MS = 10 * 60 * 1e3;
11
11
  var USDC_DECIMALS = 6;
12
12
  var AgentFeedService = class _AgentFeedService extends Service {
@@ -328,8 +328,246 @@ var ENDPOINTS = [
328
328
  description: "Fetch a Solana wallet's token holdings via Helius DAS ($0.008). The message must contain a Solana wallet address.",
329
329
  triggers: ["what does this wallet hold: <address>", "portfolio of <address>"],
330
330
  param: "wallet"
331
+ },
332
+ // ---- expansion v0.1.3 (18->44): 26 tools. Query tools default server-side (SOLUSDT etc).
333
+ {
334
+ path: "/api/squeeze-score",
335
+ usd: 0.1,
336
+ action: "AGENTFEED_GET_SQUEEZE_SCORE",
337
+ similes: ["SQUEEZE_SCORE", "GET_SQUEEZE_SCORE"],
338
+ description: 'FLAGSHIP: short-squeeze / long-flush score 0-100 for any USDT perp. Composite of funding, long/short crowding, 24h OI build, and liq-skew from our exclusive tape. One number that answers "is this trade crowded and about to hurt someone".',
339
+ triggers: ["is SOL a crowded long right now", "squeeze score for SOL", "are shorts about to get squeezed on BTC"]
340
+ },
341
+ {
342
+ path: "/api/liq-history",
343
+ usd: 0.05,
344
+ action: "AGENTFEED_GET_LIQ_HISTORY",
345
+ similes: ["LIQ_HISTORY", "GET_LIQ_HISTORY"],
346
+ description: "HISTORICAL liquidation tape, time-bucketed: total/long/short USD, prints, biggest print per bucket. Any USDT perp or the whole ~600-perp universe, up to 7 days back. Bybit is the only complete liq tape in crypto and no exchange publishes history of it \u2014 this data exists nowhere else.",
347
+ triggers: ["liquidation history for SOL over the last day", "how much got liquidated per hour today"]
348
+ },
349
+ {
350
+ path: "/api/liq-heatmap",
351
+ usd: 0.05,
352
+ action: "AGENTFEED_GET_LIQ_HEATMAP",
353
+ similes: ["LIQ_HEATMAP", "GET_LIQ_HEATMAP"],
354
+ description: "Liquidation heatmap by PRICE LEVEL from our own tape: where leverage actually got flushed in the last N hours \u2014 USD, prints, long/short split per price zone, hottest zone flagged. Real prints, not entry-price estimates.",
355
+ triggers: ["where did SOL leverage get flushed", "liquidation heatmap for BTC by price"]
356
+ },
357
+ {
358
+ path: "/api/cascade-history",
359
+ usd: 0.03,
360
+ action: "AGENTFEED_GET_CASCADE_HISTORY",
361
+ similes: ["CASCADE_HISTORY", "GET_CASCADE_HISTORY"],
362
+ description: "PAST liquidation cascades reconstructed from our tape: clustered same-side flush events with start/end, prints, USD total, peak print. get_cascade_alert tells you NOW; this tells you what already happened, up to 72h back.",
363
+ triggers: ["were there any liquidation cascades today", "past SOL cascade events"]
364
+ },
365
+ {
366
+ path: "/api/venue-liq-share",
367
+ usd: 0.02,
368
+ action: "AGENTFEED_GET_VENUE_LIQ_SHARE",
369
+ similes: ["VENUE_LIQ_SHARE", "GET_VENUE_LIQ_SHARE"],
370
+ description: "Which venue is flushing whom: per-exchange liquidation share (Bybit/OKX/Binance) with long/short split and biggest print, any symbol or whole universe.",
371
+ triggers: ["which exchange is liquidating the most", "venue breakdown of liquidations"]
372
+ },
373
+ {
374
+ path: "/api/funding-cross",
375
+ usd: 0.01,
376
+ action: "AGENTFEED_GET_FUNDING_CROSS",
377
+ similes: ["FUNDING_CROSS", "GET_FUNDING_CROSS"],
378
+ description: "Funding for ANY USDT perp across Bybit + OKX + Hyperliquid in one call, with cross-venue spread and crowding read. (get_funding_rate covers SOL+BTC only.)",
379
+ triggers: ["funding for SOL across exchanges", "cross-venue funding on WIF"]
380
+ },
381
+ {
382
+ path: "/api/funding-extremes",
383
+ usd: 0.02,
384
+ action: "AGENTFEED_GET_FUNDING_EXTREMES",
385
+ similes: ["FUNDING_EXTREMES", "GET_FUNDING_EXTREMES"],
386
+ description: "Most crowded trades across ~600 USDT perps: top most-positive and most-negative funding with annualized %, 24h price move and OI. Crowded shorts = squeeze candidates.",
387
+ triggers: ["most crowded funding trades right now", "which perps have extreme funding"]
388
+ },
389
+ {
390
+ path: "/api/open-interest",
391
+ usd: 0.01,
392
+ action: "AGENTFEED_GET_OPEN_INTEREST",
393
+ similes: ["OPEN_INTEREST", "GET_OPEN_INTEREST"],
394
+ description: "Open interest for ANY USDT perp: Bybit OI in base + USD with 1h/24h change, plus OKX OI. (get_positioning covers SOL+BTC only.)",
395
+ triggers: ["open interest on SOL", "OI change for BTC"]
396
+ },
397
+ {
398
+ path: "/api/oi-spike-scan",
399
+ usd: 0.02,
400
+ action: "AGENTFEED_GET_OI_SPIKE_SCAN",
401
+ similes: ["OI_SPIKE_SCAN", "GET_OI_SPIKE_SCAN"],
402
+ description: "Abnormal open-interest jumps across ~600 USDT perps vs a 30min+ baseline \u2014 where new leverage is piling in, with funding and price context. Squeeze/flush precursor screener.",
403
+ triggers: ["where is open interest spiking", "any OI spikes across perps"]
404
+ },
405
+ {
406
+ path: "/api/long-short",
407
+ usd: 0.01,
408
+ action: "AGENTFEED_GET_LONG_SHORT",
409
+ similes: ["LONG_SHORT", "GET_LONG_SHORT"],
410
+ description: "Long/short account ratio for ANY USDT perp with 1h and 24h trend (retail crowding gauge).",
411
+ triggers: ["long short ratio for SOL", "are traders long or short WIF"]
412
+ },
413
+ {
414
+ path: "/api/basis",
415
+ usd: 0.01,
416
+ action: "AGENTFEED_GET_BASIS",
417
+ similes: ["BASIS", "GET_BASIS"],
418
+ description: "Perp-vs-spot basis for any USDT pair: premium/discount %, contango/backwardation read, funding context.",
419
+ triggers: ["perp basis for SOL", "is BTC in contango"]
420
+ },
421
+ {
422
+ path: "/api/volatility",
423
+ usd: 0.01,
424
+ action: "AGENTFEED_GET_VOLATILITY",
425
+ similes: ["VOLATILITY", "GET_VOLATILITY"],
426
+ description: "Realized volatility for any USDT perp: 7d and 30d annualized from daily closes, plus today's range. Position-sizing input.",
427
+ triggers: ["realized vol for SOL", "how volatile is BTC"]
428
+ },
429
+ {
430
+ path: "/api/funding-history",
431
+ usd: 5e-3,
432
+ action: "AGENTFEED_GET_FUNDING_HISTORY",
433
+ similes: ["FUNDING_HISTORY", "GET_FUNDING_HISTORY"],
434
+ description: "Funding-rate history for any USDT perp (up to 200 intervals): average, annualized, share of positive intervals \u2014 what the carry has actually been.",
435
+ triggers: ["funding history for SOL", "average carry on BTC perp"]
436
+ },
437
+ {
438
+ path: "/api/top-movers",
439
+ usd: 0.01,
440
+ action: "AGENTFEED_GET_TOP_MOVERS",
441
+ similes: ["TOP_MOVERS", "GET_TOP_MOVERS"],
442
+ description: '24h top gainers and losers across ~600 USDT perps with a liquidity floor, funding attached. The "what moved" screener.',
443
+ triggers: ["top gainers and losers today", "what perps are moving most"]
444
+ },
445
+ {
446
+ path: "/api/orderbook-imbalance",
447
+ usd: 0.01,
448
+ action: "AGENTFEED_GET_ORDERBOOK_IMBALANCE",
449
+ similes: ["ORDERBOOK_IMBALANCE", "GET_ORDERBOOK_IMBALANCE"],
450
+ description: "Bid/ask resting-liquidity imbalance within \xB1N bps of mid for any USDT perp: USD each side, ratio, skew read.",
451
+ triggers: ["order book imbalance for SOL", "is the SOL book bid or ask heavy"]
452
+ },
453
+ {
454
+ path: "/api/orderbook-walls",
455
+ usd: 0.01,
456
+ action: "AGENTFEED_GET_ORDERBOOK_WALLS",
457
+ similes: ["ORDERBOOK_WALLS", "GET_ORDERBOOK_WALLS"],
458
+ description: "Largest resting orders each side of the book for any USDT perp, with USD size and distance from mid.",
459
+ triggers: ["order book walls on SOL", "biggest resting orders for BTC"]
460
+ },
461
+ {
462
+ path: "/api/whale-trades",
463
+ usd: 0.02,
464
+ action: "AGENTFEED_GET_WHALE_TRADES",
465
+ similes: ["WHALE_TRADES", "GET_WHALE_TRADES"],
466
+ description: "Large prints from the live trade tape for any USDT perp: trades over a USD threshold, buy/sell totals, net flow, dominant side.",
467
+ triggers: ["any whale trades on SOL", "large prints for BTC"]
468
+ },
469
+ {
470
+ path: "/api/spread-arb",
471
+ usd: 0.02,
472
+ action: "AGENTFEED_GET_SPREAD_ARB",
473
+ similes: ["SPREAD_ARB", "GET_SPREAD_ARB"],
474
+ description: "Best bid/ask for a USDT perp across Bybit, OKX and Hyperliquid, with the best cross-venue edge in bps (pre-fee).",
475
+ triggers: ["spread across venues for SOL", "cross-exchange arb on WIF"]
476
+ },
477
+ {
478
+ path: "/api/token-holders/:mint",
479
+ usd: 0.02,
480
+ action: "AGENTFEED_GET_TOKEN_HOLDERS",
481
+ similes: ["TOKEN_HOLDERS", "GET_TOKEN_HOLDERS"],
482
+ description: "Top holders of any SPL token with per-account share and top1/top5/top10 concentration. Deeper cut than get_token_risk's summary.",
483
+ triggers: ["top holders of <mint>", "holder concentration for <mint>"],
484
+ param: "mint"
485
+ },
486
+ {
487
+ path: "/api/wallet-activity/:wallet",
488
+ usd: 0.02,
489
+ action: "AGENTFEED_GET_WALLET_ACTIVITY",
490
+ similes: ["WALLET_ACTIVITY", "GET_WALLET_ACTIVITY"],
491
+ description: "Recent transactions of any Solana wallet, parsed human-readable: type, protocol, description, fee, failures (Helius enhanced).",
492
+ triggers: ["recent activity for <address>", "what has <address> been doing"],
493
+ param: "wallet"
494
+ },
495
+ {
496
+ path: "/api/priority-fees",
497
+ usd: 5e-3,
498
+ action: "AGENTFEED_GET_PRIORITY_FEES",
499
+ similes: ["PRIORITY_FEES", "GET_PRIORITY_FEES"],
500
+ description: "Solana priority-fee estimate right now, all levels (min to unsafeMax) in micro-lamports/CU, with a recommended tip. For bots that need txs to land.",
501
+ triggers: ["solana priority fee right now", "what should I tip to land a tx"]
502
+ },
503
+ {
504
+ path: "/api/jito-tips",
505
+ usd: 5e-3,
506
+ action: "AGENTFEED_GET_JITO_TIPS",
507
+ similes: ["JITO_TIPS", "GET_JITO_TIPS"],
508
+ description: "Jito bundle tip floor percentiles (p25-p99, SOL) \u2014 what landed bundles are actually paying, with a landing recommendation.",
509
+ triggers: ["jito tip floor", "what are bundles paying"]
510
+ },
511
+ {
512
+ path: "/api/sol-network",
513
+ usd: 5e-3,
514
+ action: "AGENTFEED_GET_SOL_NETWORK",
515
+ similes: ["SOL_NETWORK", "GET_SOL_NETWORK"],
516
+ description: "Solana network health: recent average TPS, current slot, epoch and epoch progress.",
517
+ triggers: ["solana network health", "current TPS on solana"]
518
+ },
519
+ {
520
+ path: "/api/tvl",
521
+ usd: 5e-3,
522
+ action: "AGENTFEED_GET_TVL",
523
+ similes: ["TVL", "GET_TVL"],
524
+ description: "TVL for any DeFi protocol (with 1d/7d change) or top-15 chains ranking. DefiLlama-backed.",
525
+ triggers: ["TVL of jito", "top chains by TVL"]
526
+ },
527
+ {
528
+ path: "/api/stablecoin-flows",
529
+ usd: 0.01,
530
+ action: "AGENTFEED_GET_STABLECOIN_FLOWS",
531
+ similes: ["STABLECOIN_FLOWS", "GET_STABLECOIN_FLOWS"],
532
+ description: "Total stablecoin supply with 7d/30d deltas and top stables \u2014 the macro risk-on/risk-off dial for crypto.",
533
+ triggers: ["stablecoin supply trend", "is stablecoin supply growing"]
534
+ },
535
+ {
536
+ path: "/api/dex-quote",
537
+ usd: 5e-3,
538
+ action: "AGENTFEED_GET_DEX_QUOTE",
539
+ similes: ["DEX_QUOTE", "GET_DEX_QUOTE"],
540
+ description: "Live Jupiter swap quote for any SPL pair: output amount, price impact, route. The real executable price on Solana, not an index price.",
541
+ triggers: ["jupiter quote for <mint>", "swap price on solana"]
542
+ },
543
+ {
544
+ path: "/api/peg-universe",
545
+ usd: 0.05,
546
+ action: "AGENTFEED_GET_PEG_UNIVERSE",
547
+ similes: ["PEG_UNIVERSE", "TOKENIZED_STOCK_PEGS", "RWA_PEG_RANKING", "WHICH_XSTOCKS_DEPEG"],
548
+ description: "Rank every tokenized US equity we track by off-hours peg risk ($0.05): p95 and max deviation in bps, market-open deviation as a control, and median pool liquidity. Sampled every 5 minutes by our own collector since 19 July 2026 \u2014 this tape exists nowhere else. Deviation is measured against the underlying last real trade; outside US market hours that is the last print before the close, not a live quote. Dead pools are excluded rather than reported as perfect pegs. Use when the agent needs to know which tokenized stocks are unreliable while the market is shut.",
549
+ triggers: ["which tokenized stocks depeg", "rank xstocks by peg risk", "rwa peg overview"]
550
+ },
551
+ {
552
+ path: "/api/peg-deviation?symbol=:symbol",
553
+ usd: 0.02,
554
+ action: "AGENTFEED_GET_PEG_DEVIATION",
555
+ similes: ["PEG_DEVIATION", "TOKENIZED_STOCK_PEG", "XSTOCK_PEG"],
556
+ description: "Current peg deviation for one tokenized US equity on Solana ($0.02): on-chain DEX price vs the underlying last real trade in bps, direction, pool liquidity, plus window stats split into market-open and off-hours. Deviation is measured against the last real trade \u2014 off-hours that is the last print before the close, not a live quote.",
557
+ triggers: ["peg deviation for <symbol>", "is <symbol> tracking its underlying", "how far off is <symbol>"],
558
+ param: "symbol"
559
+ },
560
+ {
561
+ path: "/api/peg-sessions?symbol=:symbol",
562
+ usd: 0.03,
563
+ action: "AGENTFEED_GET_PEG_SESSIONS",
564
+ similes: ["PEG_SESSIONS", "PEG_BY_SESSION", "WHEN_DOES_IT_DEPEG"],
565
+ description: "Peg deviation for one tokenized equity broken out by trading session ($0.03) \u2014 open, premarket, afterhours, overnight, weekend \u2014 with mean, p95, max bps and median liquidity per session, and the worst off-hours window flagged. The open session acts as a control: tight deviation there means the off-hours numbers are signal rather than measurement noise.",
566
+ triggers: ["when does <symbol> depeg", "peg by session for <symbol>", "weekend peg for <symbol>"],
567
+ param: "symbol"
331
568
  }
332
569
  ];
570
+ var SYMBOL_RE = /\b[A-Z]{1,6}x\b/;
333
571
  var BASE58_RE = /\b[1-9A-HJ-NP-Za-km-z]{32,44}\b/;
334
572
 
335
573
  // src/actions.ts
@@ -337,7 +575,7 @@ function buildExamples(def) {
337
575
  return def.triggers.slice(0, 2).map((t) => [
338
576
  {
339
577
  name: "{{user1}}",
340
- content: { text: t.replace("<mint>", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").replace("<address>", "4a8o45skRPcyjAdyR8yES215Swvh8uTpZD6KLarhxCJ7") }
578
+ content: { text: t.replace("<mint>", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").replace("<address>", "4a8o45skRPcyjAdyR8yES215Swvh8uTpZD6KLarhxCJ7").replace("<symbol>", "CRCLx") }
341
579
  },
342
580
  {
343
581
  name: "{{agent}}",
@@ -355,6 +593,7 @@ function makeAction(def) {
355
593
  description: def.description,
356
594
  validate: async (_runtime, message) => {
357
595
  const text = message?.content?.text ?? "";
596
+ if (def.param === "symbol") return SYMBOL_RE.test(text);
358
597
  if (def.param) return BASE58_RE.test(text);
359
598
  return true;
360
599
  },
@@ -368,10 +607,11 @@ function makeAction(def) {
368
607
  }
369
608
  let path = def.path;
370
609
  if (def.param) {
371
- const m = (message?.content?.text ?? "").match(BASE58_RE);
610
+ const re = def.param === "symbol" ? SYMBOL_RE : BASE58_RE;
611
+ const m = (message?.content?.text ?? "").match(re);
372
612
  if (!m) {
373
613
  await callback?.({
374
- text: `I need a Solana ${def.param} address in the message to run this lookup.`
614
+ text: def.param === "symbol" ? "I need a tokenized equity symbol like CRCLx or MSTRx in the message to run this lookup." : `I need a Solana ${def.param} address in the message to run this lookup.`
375
615
  });
376
616
  return false;
377
617
  }
@@ -402,7 +642,7 @@ var agentfeedActions = ENDPOINTS.map(makeAction);
402
642
  // src/index.ts
403
643
  var agentfeedPlugin = {
404
644
  name: "agentfeed",
405
- description: "Live crypto market data for trading agents \u2014 liquidations, long/short positioning, open interest, funding rates, SOL/BTC prices, and SPL token rug-risk checks. Each call is paid on the fly in USDC via the x402 protocol on Solana ($0.001\u2013$0.01 per call). Requires a funded Solana wallet.",
645
+ description: "Live crypto market data for trading agents \u2014 liquidations, long/short positioning, open interest, funding rates, SOL/BTC prices, and SPL token rug-risk checks. Each call is paid on the fly in USDC via the x402 protocol on Solana ($0.001\u2013$0.10 per call). Requires a funded Solana wallet.",
406
646
  services: [AgentFeedService],
407
647
  actions: agentfeedActions
408
648
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seekdaseek/plugin-agentfeed",
3
- "version": "0.2.0",
4
- "description": "elizaOS plugin for AgentFeed paid crypto liquidation data over x402 micropayments on Solana. Full-universe cascade detection across ~600 USDT perps on Bybit, OKX and Binance, plus positioning, funding, prices and token risk. $0.001–$0.05 per call in USDC, no API keys, no subscriptions.",
3
+ "version": "0.4.0",
4
+ "description": "elizaOS plugin for AgentFeed \u2014 paid crypto liquidation data over x402 micropayments on Solana. Full-universe cascade detection across ~600 USDT perps on Bybit, OKX and Binance, plus positioning, funding, prices and token risk. $0.001\u2013$0.05 per call in USDC, no API keys, no subscriptions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",