07/Selling advice
Advice that costs more when it is worth more
Three paid endpoints sell Parity's judgement over x402 v2, settled in USDC on Hedera by the Blocky402 facilitator, at prices that move with market risk, margin, runway and track record. x402 is the HTTP 402 payment protocol: the first request gets a price, the client signs a payment, and the retry gets the answer. No API keys or accounts.
The endpoints
| Route | Weight | Typical price | What you get |
|---|---|---|---|
GET /x402/toxicity-quote | 1× | $0.0100 | Toxicity score, regime, volatility, skew, safe slippage, dynamic fee, split count, 24h LVR, with provenance and the track record |
POST /x402/rebalance-plan | 2× | $0.0200 | The EV-optimal range plan for your position (all seven candidates), hedge size and expected 24h net EV |
POST /x402/protected-execute | 2.5× | $0.0250 | A pre-trade clearance with a guaranteed maximum slippage. See Slippage guarantee |
Typical prices assume a CALM market, a healthy treasury and the neutral starting credibility of 50. Request and response bodies are on HTTP API.
The price formula
computeEndpointPricing in packages/quant-kernel/src/economics.ts runs on every agent push, so the price in each 402 challenge is current.
unit = base × margin × risk(regime) × survival(mode) × credibility
price = max($0.001, round4(unit × weight))| Factor | Values | Set by |
|---|---|---|
| base | $0.01 | X402_BASE_PRICE_USD |
| margin | 1, or 1.5 in quant-only conservation (thin or negative margin) | computeUnitEconomics |
| risk | CALM 1 · ELEVATED 1.5 · TOXIC 2.5 | the latest decision's regime |
| survival | THRIVING 1 · CONSERVING 1.1 · SURVIVAL and SHUTDOWN 1.25 | computeTreasuryState |
| credibility | 0.8 + 0.4 × credibility / 100, so 0.8 to 1.2 | track record |
| weight | toxicity-quote 1 · rebalance-plan 2 · protected-execute 2.5 | fixed |
Worked example: in a TOXIC market with a thin margin, in SURVIVAL mode, with credibility 100, a toxicity quote costs $0.0563 and a clearance $0.1406. With credibility 0 in a calm market, a quote costs $0.0080. The live values and the reason string are in pricing on GET /status and in the UCP card.
How a payment flows
- The client calls a paid route without payment and gets
402 Payment Requiredwith apayment-requiredheader: schemeexact, networkhedera:mainnet, asset USDC0.0.456858,payTothe operator account, and the price. - The client signs a USDC transfer and retries. The
@x402/honomiddleware verifies it with the facilitator, runs the handler and settles. - After settlement,
onAfterSettlebooks anX402_FEEledger entry with the payer and transaction id, publishes it to HCS, and for a clearance binds the payer and payment to it.
A handler that answers with an error status cancels settlement, so you are not charged when the gateway cannot answer: before the agent's first push every paid route returns 503 "Risk agent warming up; you were not charged.", and protected-execute returns 503 if the SaucerSwap pool cannot be read. CORS is open and exposes payment-required, payment-response and x-parity-clearance-id.
curl -si "https://parity.mrnetwork.tech/x402/toxicity-quote?pair=HBAR-USDC" | grep -i payment-requiredTo pay, use the Hedera Agent Kit plugin or its ParityClient, the CLI in packages/client-cli (pnpm quote), or any x402 client that supports the Hedera exact scheme.