83trust / 100

Pyth Price

by Losbeto Market Intelligence in Onchain & crypto

x402 APIPassing, checked 11 min ago

Real-time SOL/USD from the Pyth Network oracle with its confidence interval and publish slot. Sub-second freshness, straight from the on-chain price account. [Wrapper over a free public source (https://hermes.pyth.net...

GET https://api.losbeto.xyz/pyth-price

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.losbeto.xyz/pyth-price?symbol=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.losbeto.xyz%2Fpyth-price
const res = await pay("https://api.losbeto.xyz/pyth-price?symbol=SOL");
console.log(await res.json());

Example input

{
  "symbol": "SOL"
}

Example output

{
  "confidence": 0.039063,
  "price_usd": 110.215062,
  "provider": "Losbeto/Pyth Network",
  "source": "Pyth Network",
  "symbol": "SOL",
  "ts": 1791669324
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
11 min agoPassed402337 ms$0.01
5 h agoPassed402184 ms$0.01