Examples
All examples use the public Caddy gateway URL. Replace placeholders before running paid retries.
Discovery fetch
curl -s https://canix402-api.compx.io/discovery | jq '.data.endpoints[] | {path, access, summary}' OpenAPI fetch
curl -s https://canix402-api.compx.io/openapi.json | jq '.info, (.paths | keys)' Signed retry shape
The website does not sign payments. Your agent/client wallet must build this payload.
{
"x402Version": 2,
"scheme": "exact",
"network": "algorand-mainnet",
"accepted": { /* selected accept option from PAYMENT-REQUIRED */ },
"payload": {
"paymentGroup": ["<base64-signed-txn>"],
"paymentIndex": 0
},
"paymentRequired": { /* decoded PAYMENT-REQUIRED */ }
} Sample response payloads
Aggregated opportunities
GET /opportunities — top opportunities across all protocols, ranked by APY.
curl -i https://canix402-api.compx.io/opportunities Sample response (200)
{
"data": [
{
"protocol": "tinyman",
"opportunityType": "lp",
"opportunityId": "tinyman:pool:1002541853",
"assetPair": "ALGO/USDC",
"apr": 10.512,
"apy": 12.5,
"tvlUsd": 2450000.5,
"sourceTimestamp": "2026-07-06T09:00:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z",
"notes": "sourceTimestamp reflects fetch time; upstream does not expose a per-row update time."
},
{
"protocol": "folks-finance",
"opportunityType": "lending",
"opportunityId": "folks:lending:31566704",
"assetPair": "USDC",
"apy": 6.06,
"tvlUsd": 29846.609471,
"sourceTimestamp": "2026-07-06T08:55:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z"
}
],
"meta": {
"limit": 10,
"offset": 0,
"includeInactive": false,
"paymentRequired": true
}
} Filtered search
GET /opportunities/search — caller-filtered opportunities by platform, type, APY, and TVL.
curl -i 'https://canix402-api.compx.io/opportunities/search?platform=tinyman&minApy=0.05' Sample response (200)
{
"data": [
{
"protocol": "tinyman",
"opportunityType": "lp",
"opportunityId": "tinyman:pool:1002541853",
"assetPair": "ALGO/USDC",
"apr": 10.512,
"apy": 12.5,
"tvlUsd": 2450000.5,
"sourceTimestamp": "2026-07-06T09:00:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z"
}
],
"meta": {
"limit": 25,
"offset": 0,
"includeInactive": false,
"paymentRequired": true
}
} Wallet-personalized opportunities
GET /opportunities/personalized — opportunities tuned to a wallet's held assets.
Rows include assetIds; meta reports the queried address
and heldAssetCount.
curl -i 'https://canix402-api.compx.io/opportunities/personalized?address=YOUR_ALGORAND_ADDRESS' Sample response (200)
{
"data": [
{
"protocol": "folks-finance",
"opportunityType": "lending",
"opportunityId": "folks:lending:0",
"assetPair": "ALGO",
"assetIds": [
0
],
"apy": 4.25,
"tvlUsd": 1875000.25,
"sourceTimestamp": "2026-07-06T08:55:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z"
},
{
"protocol": "tinyman",
"opportunityType": "lp",
"opportunityId": "tinyman:pool:1002541853",
"assetPair": "ALGO/USDC",
"apr": 10.512,
"apy": 12.5,
"tvlUsd": 2450000.5,
"sourceTimestamp": "2026-07-06T09:00:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z",
"assetIds": [
0,
31566704
]
}
],
"meta": {
"limit": 10,
"offset": 0,
"includeInactive": false,
"paymentRequired": true,
"address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"heldAssetCount": 2
}
} Protocol-specific opportunities
GET /protocols/{protocol}/opportunities — opportunities for a single
protocol. Substitute any supported protocol (e.g. tinyman, pact,
folks-finance, compx, dorkfi).
curl -i https://canix402-api.compx.io/protocols/tinyman/opportunities Sample response (200)
{
"data": [
{
"protocol": "tinyman",
"opportunityType": "lp",
"opportunityId": "tinyman:pool:1002541853",
"assetPair": "ALGO/USDC",
"apr": 10.512,
"apy": 12.5,
"tvlUsd": 2450000.5,
"sourceTimestamp": "2026-07-06T09:00:00.000Z",
"fetchedAt": "2026-07-06T09:00:00.000Z"
}
],
"meta": {
"limit": 25,
"offset": 0,
"includeInactive": false,
"paymentRequired": true
}
} Error responses
Paid routes return 402 before payment; validation and server errors use a stable envelope.
402 — payment required
{
"error": {
"code": "MISSING_PAYMENT_SIGNATURE",
"message": "The paid endpoint was called without PAYMENT-SIGNATURE."
}
} 400 — invalid Algorand address (personalized route)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Query parameter 'address' is not a valid Algorand address."
}
}