Cost for Shares · Cost FOR Shares

by Cost for Shares

POSTBaseSolana

$0.001

per call · USD Coin on Base

Cash cost to buy a target share count at price. Call when pre-trade cash check for prediction-market size targets. Returns total cost as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

Endpoint

POST https://api.delx.ai/api/v1/x402/cost-for-shares

3

Calls / 30d

2

Unique payers / 30d

Sep 7

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://api.delx.ai/api/v1/x402/cost-for-shares", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "price": 0.25,
    "shares": 200
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://api.delx.ai/api/v1/x402/cost-for-shares" \
  -H "Content-Type: application/json" \
  -d '{"price":0.25,"shares":200}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "cost": 50,
  "price": 0.25,
  "schema": "delx/util-cost-for-shares/v1",
  "shares": 200
}

Payment details

Pay to0x9f8bd9875b3e0b632a24a3a7c73f7787175e73a2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from Cost for Shares & similar services