Skip to main content
Agent Tools
View .md

Quickstart

Get risk intelligence for your first trade in under 5 minutes.

Use the Agent Skill

If you're integrating Canon through an agent runtime, give your agent SKILL.md. It includes a deterministic flow for:

  • refresh assets and model info
  • validate each trade before execution
  • validate multi-trade batches safely
  • monitor live risk and alerts
  • log outcomes and track calibration health

1. Get an API Key

Sign up for early access at canonprotocol.org. Enter your email and we'll send you a Bearer token to authenticate requests.

2. Make Your First Request

curl -X POST https://api.canonprotocol.org/v1/validate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"asset": "ETH",
"action": "long",
"size": 50000,
"leverage": 10,
"wallet": "0x7a3b1234567890abcdef1234567890abcdef1234"
}'

3. Read the Response

{
"risk_score": 28,
"recommendation": "proceed",
"flags": [],
"slippage": {
"bps": 3.8,
"fill_price": 3412.5,
"mid_price": 3415.2,
"depth_50bps": 1800000,
"depth_100bps": 4200000,
"bid_ask_imbalance": 0.48
},
"liquidation": {
"price": 2901.25,
"distance_pct": 17.2,
"margin_used_pct": 42.1,
"effective_leverage": 10.0,
"mode": "cross"
},
"funding": {
"funding_rate": 0.0012,
"annualized_pct": 2.1,
"vs_cex_divergence": 0.0003,
"direction": "longs_pay"
},
"meta": {
"asset": "ETH",
"mark_price": 3415.2,
"latency_ms": 47,
"request_id": "req_abc123"
}
}

(Additional fields like impact, var, oi, stress, fees are also returned. See the full response reference for details.)

4. Act on It

Use the recommendation field to gate your agent's execution:

import requests

resp = requests.post(
"https://api.canonprotocol.org/v1/validate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"asset": "ETH",
"action": "long",
"size": 50_000,
"leverage": 10,
"wallet": "0x7a3b..."
}
)
result = resp.json()

if result["recommendation"] == "proceed":
execute_trade()
elif result["recommendation"] == "proceed_with_caution":
execute_trade_with_reduced_size()
else:
agent.log(f"Trade aborted: {result['flags']}")

What's Next