71trust / 100

Basis

by x402stock.xyz in Markets & finance

x402 APIPassing, checked 14 h ago

Scans every US stock that also trades as a 24/7 synthetic perp and returns the gap: official (delayed) price, prev close, perp mark and oracle, funding APR, open interest, and computed `basis_percent` + `basis_vs_prev_close_percent` — the implied overnight move while the US market is shut. Widest dislocation first, plus a plain-English `reading`. `?limit=`, `?min_basis=`. From x402stock

GET
https://x402stock.xyz/api/v1/basis
Price
$0.05
per call in USDC
Uptime
96.7%
last 30 days
Response time
503 ms
1.2 s slowest 5%
Last check
Passed
14 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

GET https://x402stock.xyz/api/v1/basis

Each call costs $0.05 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

GET https://x402stock.xyz/api/v1/basis?limit=40&min_basis=0

Parameters

ParameterTypeRequiredDescription
limitintegerYes Default: 40.
min_basisnumberYes Default: 0.

Example response

The provider's example. We can't check it without paying.

Example response, 58 lines
{
  "as_of": "2026-07-30T23:40:00.000Z",
  "count": 2,
  "method": "Legs are joined by ticker symbol. Macro perps (commodities, FX, indices) are excluded because their symbols collide with unrelated US tickers, and any remaining pair differing by more than 25% is treated as a symbol collision rather than a dislocation — see `comparable` and `excluded_reason` per row.",
  "note": null,
  "reading": "US market closed — the 24/7 perp is the live opinion of where these reopen. Widest vs last print: NVDA at 0.84%.",
  "rows": [
    {
      "basis_absolute": 1.53,
      "basis_percent": 0.84,
      "basis_vs_prev_close_percent": 1.58,
      "comparable": true,
      "direction": "premium",
      "equity_as_of": "2026-07-30T20:00:00.000Z",
      "equity_change_percent": 0.73,
      "equity_prev_close": 180.11,
      "equity_price": 181.42,
      "excluded_reason": null,
      "perp_day_volume_usd": 9128441.22,
      "perp_funding_apr_percent": 11.42,
      "perp_mark": 182.95,
      "perp_open_interest": 41230.5,
      "perp_oracle": 182.88,
      "perp_symbol": "xyz:NVDA",
      "ticker": "NVDA"
    },
    {
      "basis_absolute": -1.09,
      "basis_percent": -0.27,
      "basis_vs_prev_close_percent": 0.41,
      "comparable": true,
      "direction": "discount",
      "equity_as_of": "2026-07-30T20:00:00.000Z",
      "equity_change_percent": 0.68,
      "equity_prev_close": 399.4,
      "equity_price": 402.11,
      "excluded_reason": null,
      "perp_day_volume_usd": 4410233.9,
      "perp_funding_apr_percent": -3.19,
      "perp_mark": 401.02,
      "perp_open_interest": 18220.1,
      "perp_oracle": 401.11,
      "perp_symbol": "xyz:TSLA",
      "ticker": "TSLA"
    }
  ],
  "sections": {
    "equities": "ok",
    "perps": "ok"
  },
  "source": "x402stock",
  "total_available": 2,
  "us_market_open": false,
  "venue_map": {
    "equity": "us_listed",
    "perp": "hyperliquid:xyz"
  }
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.05.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://x402stock.xyz/api/v1/basis?limit=40&min_basis=0'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://x402stock.xyz/api/v1/basis?limit=40&min_basis=0' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.05 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.05" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.05 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402stock.xyz%2Fapi%2Fv1%2Fbasis
const res = await pay("https://x402stock.xyz/api/v1/basis?limit=40&min_basis=0");
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.05 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.05"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://x402stock.xyz/api/v1/basis?limit=40&min_basis=0")
    print(res.status_code, res.text)

Security scan

No findings

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

Recent checks

WhenResultHTTPTimePrice
14 h agoPassed402931 ms$0.05
30 h agoPassed402492 ms$0.05
47 h agoPassed402373 ms$0.05
3 days agoPassed402958 ms$0.05
4 days agoTimed out---
Show 10 older checks
6 days agoTimed out---
7 days agoPassed402926 ms$0.05
7 days agoPassed402384 ms$0.05
8 days agoPassed402255 ms$0.05
9 days agoPassed402853 ms$0.05
9 days agoPassed402342 ms$0.05
10 days agoPassed402380 ms$0.05
10 days agoPassed402954 ms$0.05
11 days agoPassed402972 ms$0.05
11 days agoPassed402451 ms$0.05