81trust / 100

Perps Basis Signal Invoke

by SolEnrich in Company & people data

x402 APIPassing, checked 5 min ago

Computes perp mark vs spot price across venues and surfaces actually-earnable yield (funding APR on Hyperliquid + dYdX, not viable on pool perps Jupiter + Adrena). Returns per-venue trade economics, opportunities above threshold, and best trade. Threshold defaults to 5% APR.

POST https://api.solenrich.com/entrypoints/perps-basis-signal/invoke

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.solenrich.com/entrypoints/perps-basis-signal/invoke" \
  -H "content-type: application/json" \
  -d '{"asset":"SOL","format":"json","min_yield_apr_pct":5}'
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%2Fperps-basis-signal%2Finvoke
const res = await pay("https://api.solenrich.com/entrypoints/perps-basis-signal/invoke", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"asset":"SOL","format":"json","min_yield_apr_pct":5}),
});
console.log(await res.json());

Example input

{
  "asset": "SOL",
  "format": "json",
  "min_yield_apr_pct": 5
}

Example output

{
  "output": {
    "asset": "SOL",
    "best_trade": {
      "direction": "short_perp_long_spot",
      "net_yield_pct": 12.085,
      "venue": "hyperliquid"
    },
    "checked_at": 1790035810717,
    "min_yield_apr_pct": 5,
    "opportunities": [
      {
        "available": true,
        "basis_bps": 9,
        "mark_price_usd": 118.68,
        "rate_apr_pct": 12.085,
        "rate_mechanism": "funding-rate",
        "type": "reference",
        "venue": "hyperliquid"
      }
    ],
    "spot": {
      "price_usd": 118.57,
      "sources": 2,
      "spread_pct": 0.06
    },
    "venues": [
      {
        "available": true,
        "basis_bps": 0,
        "mark_price_usd": 118.57,
        "rate_apr_pct": 12.739,
        "rate_mechanism": "borrow-rate",
        "type": "solana-onchain",
        "venue": "jupiter-perps"
      }
    ]
  },
  "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
5 min agoPassed402338 ms$0.015
5 h agoPassed402181 ms$0.015