orchus_fetch
Pay and call a x402 endpoint using your session wallet. The payment is handled automatically.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The x402-gated URL to call |
method | string | No | HTTP method: GET (default), POST, PUT |
body | object | No | JSON request body (for POST/PUT endpoints) |
headers | object | No | Additional HTTP headers to include |
Example — GET
{
"tool": "orchus_fetch",
"arguments": {
"url": "https://api.coingecko.com/x402/price?coin_id=solana&vs_currency=usd"
}
}Example — POST
{
"tool": "orchus_fetch",
"arguments": {
"url": "https://defi-index.io/x402/prices",
"method": "POST",
"body": {
"tokens": ["SOL", "ETH", "USDC"]
}
}
}Paid 0.010000 USDC (solana)
Status: 200 OK
{"SOL": 142.42, "ETH": 3210.88, "USDC": 1.00}What Happens Internally
- Requests the resource URL → gets a
402with payment requirements - Builds and signs a USDC transfer using the session wallet
- Sends payment to the Orchus facilitator for settlement
- Replays the request with the
X-Paymentheader containing the settlement proof - Returns the resource response body
Notes
- Ensure your session wallet has sufficient USDC on the correct network before calling
- Use
orchus_probefirst to confirm price and network - Large response bodies are automatically truncated at 8,000 characters