Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

orchus_fetch

Pay and call a x402 endpoint using your session wallet. The payment is handled automatically.


Parameters

ParameterTypeRequiredDescription
urlstringYesThe x402-gated URL to call
methodstringNoHTTP method: GET (default), POST, PUT
bodyobjectNoJSON request body (for POST/PUT endpoints)
headersobjectNoAdditional 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"]
    }
  }
}
Response:
Paid 0.010000 USDC (solana)
Status: 200 OK
 
{"SOL": 142.42, "ETH": 3210.88, "USDC": 1.00}

What Happens Internally

  1. Requests the resource URL → gets a 402 with payment requirements
  2. Builds and signs a USDC transfer using the session wallet
  3. Sends payment to the Orchus facilitator for settlement
  4. Replays the request with the X-Payment header containing the settlement proof
  5. Returns the resource response body

Notes

  • Ensure your session wallet has sufficient USDC on the correct network before calling
  • Use orchus_probe first to confirm price and network
  • Large response bodies are automatically truncated at 8,000 characters