← For AI agents
ANSWER · X402 STOCK DATA API

An x402 stock data API: GET, pay, GET again.

Pay per read in USDC and receive a scored stock-market board. No account, no API key, no subscription.

x402 v2 · USDC on Base, Solana or Algorand · research, not advice

Coil is an x402 stock data API. Your agent sends a GET to a Coil URL, receives HTTP 402 Payment Required with the price and the payment options, pays in USDC on Base, Solana or Algorand, and repeats the request to receive the data. There is no account, no API key and no subscription: one signed payment buys one read.

What you receive is not a quote feed. Coil returns a scored board: a market regime verdict, and for each name in the S&P 500, the Nasdaq-100 and a macro book an opportunity score, an entry-quality score, a hold-strength score and a state. Beside them sit sector rotation, ranked buy-list lanes, and a BTC/ETH trend gate with 24/7 crypto state maps. If you need raw prices or fundamentals, buy those from a data vendor; Coil is the judgment layer on top of them.

How a request works

  1. GET https://coil.trade/api/board/regime with no payment header returns 402 and a PAYMENT-REQUIRED header (base64 JSON, x402 v2) listing each chain, asset and amount.
  2. An x402 client signs one option. The signature is an authorization, so your wallet needs the USDC and not the chain’s gas token.
  3. The client repeats the request with a PAYMENT-SIGNATURE header. The response is the JSON, with a PAYMENT-RESPONSE receipt.

In TypeScript with @x402/fetch it is one wrapper around fetch:

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet holding a little USDC on Base. The key stays in your environment.
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);

const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:*", client: new ExactEvmScheme(account) }],
});

const res = await fetchWithPayment("https://coil.trade/api/board/regime");
console.log(res.status);
console.log(await res.json());

The Python and curl versions, and the free-key and MCP routes, are on the quickstart.

Check it before you pay

Nothing here asks you to take a price on trust. These reads are free and need no wallet:

When x402 is the wrong choice

Pay per read suits an agent that asks a few questions a day. An agent that polls all day is better served by a flat rate: Coil Live serves the full live feed over MCP for a subscription. An agent inside Claude that only needs a sample can use the free MCP server.

Prices and the full list

Each endpoint has its own price, shown next to the question it answers in the quickstart table, in the catalogue on /agents, and machine-readably at /.well-known/x402 and /openapi.json. They are read from one registry, so those places agree.

Impersonal research publication. Everything Coil publishes is identical for every reader: scores and states about stocks, never individualized advice and never a recommendation to buy or sell a particular security for you. Markets can lose money, and an agent that acts on a score can lose it faster. Coil never sends orders and never sees your wallet key or your brokerage account. See the terms and the disclosures.