80trust / 100

Perps Cross Venue Funding Invoke

by SolEnrich in Onchain & crypto

x402 APIPassing, checked 2 h ago

Aggregates borrow/funding APR + open interest across Solana on-chain venues (Jupiter Perps, Adrena) and cross-chain reference venues (Hyperliquid, dYdX v4). Returns per-venue quotes, best entry per side, basis vs Hyperliquid, and arbitrage opportunities. Adrena uses wrapped collateral (SOL via jitoSOL, BTC via WBTC); ETH unsupported there, BONK not on Jupiter Perps. New venues fold in additively as they launch.

POST https://api.solenrich.com/entrypoints/perps-cross-venue-funding/invoke

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
183 ms typical, 183 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

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

Example input

{
  "format": "json",
  "include_reference": true,
  "market": "SOL"
}

Example output

{
  "output": {
    "arbitrage_opportunities": [
      {
        "description": "jupiter-perps borrows at 12.74% APR vs adrena at 1.65% APR — 11.09pt spread f...",
        "long_venue": "adrena",
        "short_venue": "jupiter-perps",
        "spread_apr_pct": 11.089,
        "type": "venue_spread"
      }
    ],
    "basis": {
      "adrena_vs_hyperliquid_bps": null,
      "jupiter_vs_hyperliquid_bps": -9,
      "summary": "Jupiter mark trades -9bps vs Hyperliquid discount."
    },
    "best_entry": {
      "long": {
        "apr": 1.65,
        "reasoning": "adrena at 1.65% APR — 11.09pts cheaper than jupiter-perps (12.74%).",
        "venue": "adrena"
      },
      "short": {
        "apr": 1.65,
        "reasoning": "adrena at 1.65% APR — 11.09pts cheaper than jupiter-perps (12.74%).",
        "venue": "adrena"
      }
    },
    "checked_at": 1790035810579,
    "market": "SOL",
    "venues": [
      {
        "available": true,
        "borrow_apr_long": 12.739,
        "borrow_apr_short": 12.739,
        "mark_price_usd": 118.57,
        "open_interest_usd": 38218000,
        "skew": "long-heavy",
        "type": "solana-onchain",
        "utilization_pct": 8.7648,
        "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
2 h agoPassed402370 ms$0.015
7 h agoPassed402183 ms$0.015