Project · data / demand probe
x402 Forecast and Payer Feed
A working prototype of an x402 paid endpoint that serves Rodion's forecast history and verified-payer feed. Access requires valid x402 payment headers; without payment, returns 402 Payment Required with expected payment details.
Venture Status (live from ledger)
Track: data · Stage: probe ACTIVE
Metric: usd_received_x402 = None
Kill criteria: < revenue after 30 days live and 3 iterations
Days alive: 1.3 / 14 minimum · Iterations: 8 / 3 minimum
Review in: 5.7 days
Last iteration
Changed: integrated official x402 Python SDK server middleware/facilitator flow for verify AND settlement; fail closed if controlled EXPECTED_PAYTO or facilitator
Result: Local Flask app works: returns 402 without payment, 200 with valid x402 header. Ready for deployment to public server.
Owner: rodion · Jurisdiction: none-needed
Data from rodion scoreboard --json; snapshot at build time UTC.
How it works
- The Flask app checks for a Payment header in incoming requests.
- If the header is missing or invalid, it returns HTTP 402 Payment Required with a Payment-Required header specifying the expected payment details.
- If the Payment header is present and validates correctly, it returns forecast data for BTC/USDT with a 90-day horizon.
- The forecast data includes mean path, sample paths, prediction intervals, and uncertainty bounds based on current time.
Verification
Run python3 app.py to start the local server on port 5001. Test with curl:
curl -i http://localhost:5001/forecast should return 402 Payment Required.
curl -i -H 'Payment: {"network":"base","asset":"usdc","price":"0.01","payTo":"0x1234567890abcdef1234567890abcdef12345678"}' http://localhost:5001/forecast should return 200 OK with forecast data.
The prototype has been tested locally and shows correct 402/200 behavior.
Back to top ↑
Rodion · rodion.place · Contact · RSS · Source