@seekdaseek/plugin-agentfeed 0.1.2 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +251 -3
  2. package/package.json +3 -3
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.02;
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 {
@@ -174,6 +174,43 @@ function parseKey(raw) {
174
174
 
175
175
  // src/endpoints.ts
176
176
  var ENDPOINTS = [
177
+ {
178
+ path: "/api/cascade-scan",
179
+ usd: 0.05,
180
+ action: "AGENTFEED_GET_CASCADE_SCAN",
181
+ similes: ["CASCADE_SCAN", "FULL_CASCADE_SCAN", "SCAN_ALL_LIQUIDATIONS", "WHAT_IS_CASCADING"],
182
+ description: "Scan for liquidation cascades across the FULL universe of ~600 USDT perps on Bybit, OKX and Binance simultaneously ($0.05) \u2014 not just the majors. Returns each active cascade: symbol, side liquidated, USD total, print count, duration, severity (minor/major/extreme). Bybit is the only complete unthrottled liquidation tape in crypto and no exchange publishes history of it, so this coverage is not available anywhere else. Use when the agent needs to know what is blowing up across the whole market, including alts it is not already watching.",
183
+ triggers: [
184
+ "is anything cascading right now",
185
+ "scan the whole market for liquidation cascades",
186
+ "what alts are getting liquidated hard",
187
+ "any cascades outside the majors"
188
+ ]
189
+ },
190
+ {
191
+ path: "/api/liquidation-leaders",
192
+ usd: 0.02,
193
+ action: "AGENTFEED_GET_LIQUIDATION_LEADERS",
194
+ similes: ["LIQUIDATION_LEADERS", "WHATS_GETTING_REKT", "TOP_LIQUIDATIONS"],
195
+ description: "Rank the top symbols by liquidation USD right now across ~600 USDT perps on Bybit, OKX and Binance ($0.02). Per symbol: total liquidated, long vs short split, biggest single print, venue count, dominant side. The fastest read on where leverage is being flushed.",
196
+ triggers: [
197
+ "what is getting rekt right now",
198
+ "which coins have the most liquidations today",
199
+ "where is leverage being flushed"
200
+ ]
201
+ },
202
+ {
203
+ path: "/api/cascade",
204
+ usd: 0.01,
205
+ action: "AGENTFEED_GET_CASCADE_ALERT",
206
+ similes: ["CASCADE_ALERT", "IS_THERE_A_CASCADE"],
207
+ description: "Liquidation cascade detector for the 5 majors \u2014 SOL, BTC, ETH, XRP, DOGE \u2014 across Bybit, OKX and Binance ($0.01). Returns cascades active NOW: clustered same-side liquidations with symbol, side, USD total, prints, duration, severity. Empty array = no cascade in the window. For all ~600 perps use AGENTFEED_GET_CASCADE_SCAN instead.",
208
+ triggers: [
209
+ "is SOL cascading",
210
+ "is there a liquidation cascade on BTC right now",
211
+ "check for a cascade before I enter"
212
+ ]
213
+ },
177
214
  {
178
215
  path: "/api/trade-context",
179
216
  usd: 0.01,
@@ -192,7 +229,7 @@ var ENDPOINTS = [
192
229
  usd: 3e-3,
193
230
  action: "AGENTFEED_GET_LIQUIDATIONS",
194
231
  similes: ["GET_RECENT_LIQUIDATIONS", "RECENT_LIQUIDATIONS", "LIQUIDATION_FEED"],
195
- description: "Fetch recent SOL/BTC perp liquidation prints ($0.003): side, size, price, exchange, timestamp. Use for questions about recent liquidations, cascades, or big liquidation prints.",
232
+ description: "Fetch recent perp liquidation prints ($0.003) across ~600 USDT perps on Bybit (complete unthrottled tape), OKX and Binance: side, size, price, exchange, timestamp. Filterable by symbol \u2014 any USDT perp, not just majors. Use for questions about recent liquidations or big prints.",
196
233
  triggers: [
197
234
  "any big liquidations in the last hour",
198
235
  "show me recent SOL liquidations",
@@ -291,6 +328,217 @@ var ENDPOINTS = [
291
328
  description: "Fetch a Solana wallet's token holdings via Helius DAS ($0.008). The message must contain a Solana wallet address.",
292
329
  triggers: ["what does this wallet hold: <address>", "portfolio of <address>"],
293
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"]
294
542
  }
295
543
  ];
296
544
  var BASE58_RE = /\b[1-9A-HJ-NP-Za-km-z]{32,44}\b/;
@@ -365,7 +613,7 @@ var agentfeedActions = ENDPOINTS.map(makeAction);
365
613
  // src/index.ts
366
614
  var agentfeedPlugin = {
367
615
  name: "agentfeed",
368
- 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.",
616
+ 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.",
369
617
  services: [AgentFeedService],
370
618
  actions: agentfeedActions
371
619
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seekdaseek/plugin-agentfeed",
3
- "version": "0.1.2",
4
- "description": "elizaOS plugin for AgentFeed — paid crypto market data (liquidations, positioning, funding, token risk) over x402 micropayments on Solana. $0.001–$0.01 per call in USDC, no API keys, no subscriptions.",
3
+ "version": "0.3.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.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "AGENTFEED_MAX_SPEND_PER_CALL": {
67
67
  "type": "string",
68
- "description": "Safety cap in USD per single API call. Any 402 quote above this is refused. Default: 0.02"
68
+ "description": "Safety cap in USD per single API call. Any 402 quote above this is refused. Default: 0.05 (the price of the most expensive tool, get_cascade_scan). Lower it to restrict spend; raise it only if AgentFeed adds a pricier tool."
69
69
  }
70
70
  }
71
71
  }