80trust / 100

Stonk Yield Invoke

by SolEnrich in Onchain & crypto

x402 APIPassing, checked 9 min ago

Trailing 7d, 30d, and lifetime holder yield: rewards distributed in the quote asset, priced in USD, divided by average market cap over the window (daily snapshots). Annualized with an explicit caution flag when the window is under 7 days or partial. Returns quote_exposure — what a holder is economically long (the coin + the quote asset) and the reward asset.

POST https://api.solenrich.com/entrypoints/stonk-yield/invoke

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
342 ms typical, 342 ms slowest 5%
Last check
9 min ago
Next check
in 18 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.solenrich.com/entrypoints/stonk-yield/invoke" \
  -H "content-type: application/json" \
  -d '{"format":"json","mint":"HcRLc9VDgjLeK154xDawfb1dmVJ98DoSqcwTHGqiDeJR"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.solenrich.com%2Fentrypoints%2Fstonk-yield%2Finvoke
const res = await pay("https://api.solenrich.com/entrypoints/stonk-yield/invoke", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"format":"json","mint":"HcRLc9VDgjLeK154xDawfb1dmVJ98DoSqcwTHGqiDeJR"}),
});
console.log(await res.json());

Example input

{
  "format": "json",
  "mint": "HcRLc9VDgjLeK154xDawfb1dmVJ98DoSqcwTHGqiDeJR"
}

Example output

{
  "output": {
    "lifetime": {
      "actual_days": 22.03,
      "annualized_pct": 177.28,
      "avg_market_cap_usd": 94276679,
      "caution": false,
      "rewards_quote": 6836.1,
      "rewards_usd": 10087000,
      "window_days": 23,
      "yield_pct": 10.7
    },
    "mint": "HcRLc9VDgjLeK154xDawfb1dmVJ98DoSqcwTHGqiDeJR",
    "mode": "reward",
    "name": "Anonymous Cat",
    "reward_asset": {
      "category": "custom",
      "decimals": 8,
      "mint": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
      "symbol": "ZEC",
      "usd_price": 1475.6
    },
    "symbol": "ZCAT",
    "trailing_30d": {
      "actual_days": 22.03,
      "annualized_pct": 177.28,
      "avg_market_cap_usd": 94276679,
      "caution": true,
      "rewards_quote": 6836.1,
      "rewards_usd": 10087000,
      "window_days": 30,
      "yield_pct": 10.7
    },
    "trailing_7d": {
      "actual_days": 7,
      "annualized_pct": 82.41,
      "avg_market_cap_usd": 108606083,
      "caution": false,
      "rewards_quote": 1163.3,
      "rewards_usd": 1716500,
      "window_days": 7,
      "yield_pct": 1.5805
    }
  },
  "run_id": "uuid",
  "status": "succeeded"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
9 min agoPassed402184 ms$0.005
3 h agoPassed402342 ms$0.005
9 h agoPassed402422 ms$0.005