x402-gated microservices, real-time prediction market weather telemetry (NWS METAR), sub-50ms AERS error resolution, TEE inference, and multi-chain yield optimization — composable and machine-payable.
Real-time weather station observations mated to Kalshi REST & Polymarket CLOB order books for sub-10s quantitative edge capture.
| Contract Bracket | Ticker | Direction | Fill Price | Allocation | Quant Edge |
|---|---|---|---|---|---|
| 84° or below | KXHIGHCHI-26AUG01-T85 | BUY_YES | $0.09 | $500.00 | +81.0% |
| 87° to 88° | KXHIGHCHI-26AUG01-B87.5 | BUY_NO | $0.54 | $400.00 | +36.0% |
All endpoints are gated via the HTTP 402 Payment Required standard. Client agents pay in micro-USDC or NEAR automatically. First 50 queries free per agent address.
Infrastructure primitives designed from the ground up for machine-to-machine commerce and self-healing operations.
Standard HTTP semantics. No SDK, no API key, no accounts. Agents pay per request with on-chain transactions.
Authorization: x402 <txHash>Select an error payload and get a deterministic, machine-executable recovery plan instantly.
// Select an error and click "Resolve via AERS" …
Use standard HTTP, plug in the MCP config, or integrate via the SDK. No API keys required — x402 handles auth.
import { IntentsSDK } from '@defuse-protocol/intents-sdk';
// Initialize SDK with referral fee collection
const sdk = new IntentsSDK({
referral: 'timetrap.near'
});
// Process instant cross-chain withdrawal / swap
const result = await sdk.processWithdrawal({
withdrawalParams: {
assetId: 'nep141:wrap.near',
amount: 1000000000000000000000000n, // 1 wNEAR
destinationAddress: '0xfD611de9E6a98bEA13b74D877790bE08C4163104',
feeInclusive: false
}
});
console.log('Intent Hash:', result.intentHash);
console.log('Destination Tx:', result.destinationTx);
import fetch from 'node-fetch';
// Step 1: Initial request to x402-gated service
let res = await fetch('https://api.arb402.com/v1/resolve', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ error_code: 'NEAR_RPC_429', payerAddress: '0x43FE...1f72', chain: 'evm' })
});
// Step 2: Handle HTTP 402 challenge automatically
if (res.status === 402) {
const price = res.headers.get('x-payment-amount'); // e.g. "0.05"
const payTo = res.headers.get('x-payment-destination'); // e.g. "timetrap.near"
// Client agent executes micropayment on NEAR or Base
const txHash = await executePayment(payTo, price);
// Step 3: Resubmit with proof header
res = await fetch('https://api.arb402.com/v1/resolve', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `x402 ${txHash}`
},
body: JSON.stringify({ error_code: 'NEAR_RPC_429', payerAddress: '0x43FE...1f72', chain: 'evm' })
});
}
const data = await res.json();
console.log('Deterministic Action Plan:', data.action_plan);
import requests
def resolve_agent_error(error_code, payer_address):
url = "https://api.arb402.com/v1/resolve"
payload = {
"error_code": error_code,
"payerAddress": payer_address,
"chain": "evm"
}
# Initial request
res = requests.post(url, json=payload)
# Handle HTTP 402 Payment Required
if res.status_code == 402:
price = res.headers.get("x-payment-amount")
pay_to = res.headers.get("x-payment-destination")
tx_hash = execute_agent_payment(pay_to, price)
headers = {"Authorization": f"x402 {tx_hash}"}
res = requests.post(url, json=payload, headers=headers)
return res.json()
# 1. Probe endpoint to get HTTP 402 challenge terms
curl -i -X POST https://api.arb402.com/v1/resolve \
-H "Content-Type: application/json" \
-d '{"error_code": "NEAR_RPC_429"}'
# 2. Submit payment proof after on-chain transfer
curl -X POST https://api.arb402.com/v1/resolve \
-H "Content-Type: application/json" \
-H "Authorization: x402 0xYourSignedTxHash" \
-d '{
"error_code": "NEAR_RPC_429",
"payerAddress": "0x43FE...1f72",
"chain": "evm"
}'
{
"mcpServers": {
"arb402-x402-gateway": {
"command": "npx",
"args": ["-y", "@arb402/mcp-server@latest"]
},
"near-intents-mcp": {
"command": "npx",
"args": ["-y", "@nearai/near-mcp@latest", "run"]
}
}
}