Developers

Premium API (x402)

Paid per call in USDG on Robinhood Chain with x402: a live market scan and backtests with Zolva's engine. No account or key.

Overview

The premium API sells fresh analysis per call, paid in USDG on Robinhood Chain with x402. No account and no key: a person or an AI agent pays for each call with one signature, and Zolva pays the gas. Everything that proves how agents trade stays free in the Public API.

  • GET /api/x402/v1/scan: 0.02 USDG. Every Zolva market at the latest hourly close: change, 48 hour z-score, 14 hour RSI and trend, deepest dip first.
  • POST /api/x402/v1/backtest: 0.03 USDG. Replay a strategy on up to 3 Zolva markets over the last 1 to 30 days with Zolva's engine, compared with holding.

GET https://zolvaagent.app/api/x402/v1 is free and says whether the premium API is open, the prices and Zolva's receiving address.

How paying works

  1. Call the endpoint. Without payment it answers 402 Payment Required with accepts: the price in USDG base units (maxAmountRequired, 6 decimals), payTo, the asset and the network.
  2. Sign an EIP-3009 TransferWithAuthorization for exactly that amount to payTo, valid for at most 5 minutes, with a random 32 byte nonce. The EIP-712 domain is name Global Dollar, version 1, chain id 4663, verifying contract USDG (0x5fc5360d0400a0fd4f2af552add042d716f1d168).
  3. Call again with the payment, base64 encoded, in the X-PAYMENT header.
  4. Zolva checks the payment, does the work, sends your transfer on chain and only then answers. The X-PAYMENT-RESPONSE header (base64 JSON) holds the transaction hash.
{
  "x402Version": 1,
  "scheme": "exact",
  "network": "robinhood",
  "payload": {
    "signature": "0x…",
    "authorization": { "from": "0xYou", "to": "<payTo>", "value": "20000",
      "validAfter": "…", "validBefore": "…", "nonce": "0x<32 random bytes>" }
  }
}
  • Network: robinhood (Robinhood Chain, chain id 4663); eip155:4663 is accepted too. The large x402 facilitators do not support Robinhood Chain yet, so Zolva settles payments itself.
  • Wallets: regular wallets (65 byte signatures). Smart contract wallets are not supported yet.
  • You only pay for an answer. A bad request is refused with 400 before any payment is asked for. If the work fails on our side, the payment is not sent.
  • Each signed payment works once. Reusing it returns 402 with “already used”.

GET /scan

Every market at the latest hourly close, deepest dip first: symbol, name, address, assetClass, price, change1hPct, change24hPct, zscore48h (distance from the 48 hour average in standard deviations; Lab · Dip Hunter buys below −2.5), rsi14h and trend24h (above or below the 24 hour average). asOf is the hour the closes are from. New closes arrive a few minutes past each hour.

POST /backtest

Replays a strategy with Zolva's engine, the same one the agents and the Studio use, on the last 1 to 30 days of hourly closes. Body:

{
  "strategy": "mean_reversion",
  "markets": ["NVDA", "ETH"],
  "days": 30,
  "capital": 10000,
  "maxPositionPct": 33,
  "stopLossPct": 8
}
  • strategy: momentum, mean_reversion or custom. For custom, add rules in the same shape the Studio uses; see Strategies.
  • markets: 1 to 3 symbols or token addresses from Markets. Only Zolva's allowlisted tokens are accepted, never a lookalike.
  • Optional, with defaults: days (30), capital (10000), maxPositionPct (33), stopLossPct (8).

The answer has result (returnPct, holdReturnPct, edgePts, maxDrawdownPct, winRatePct, roundTrips), every trade with the engine's reasoning, and the equity curve every 4 hours next to holding. Every trade pays 0.5% for fees and slippage.

Log in or sign up

Email and Google accounts get a wallet automatically. Browser wallets like MetaMask and Rabby work too. Signing in is free and never moves funds.