Quickstart
Use the Caddy gateway URL as your base URL. Discovery and OpenAPI are free; paid data routes require x402 USDC payment.
1. Read discovery
Fetch the machine-readable endpoint catalog and payment policy.
curl -s https://canix402-api.compx.io/discovery | jq 2. Read OpenAPI
Use OpenAPI for detailed schemas, query params, and x402 metadata.
curl -s https://canix402-api.compx.io/openapi.json | jq '.paths | keys' 3. Probe free routes
Health and metadata routes should return 200 without payment headers.
curl -i https://canix402-api.compx.io/health
curl -i https://canix402-api.compx.io/metadata 4. Call a paid route
First call returns 402 with PAYMENT-REQUIRED. Retry with a signed payload.
1. Preflight
Call a paid route without
PAYMENT-SIGNATURE. Gateway returns 402 with
PAYMENT-REQUIRED.
2. Sign
Client wallet builds and signs the USDC transfer payload expected by the facilitator.
3. Retry
Resend the request with
PAYMENT-SIGNATURE. Caddy verifies and settles via facilitator.
4. Success
Paid route returns
200 and may include PAYMENT-RESPONSE settlement metadata.
curl -i https://canix402-api.compx.io/opportunities
curl -i https://canix402-api.compx.io/opportunities \
-H 'PAYMENT-SIGNATURE: <base64-json-payload>'