curl --request POST \
--url https://api.circular.rosetta.sh/api/v1/agent/check-risk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "deposit",
"marketId": "<string>",
"amountUsd": 123,
"walletAddress": "<string>",
"policy": {
"minRating": "BBB",
"maxUtilization": 0.85,
"maxConcentrationPct": 0.05,
"requireFreshOracle": true,
"maxLeverage": 3
}
}
'{
"data": {
"decision": "ALLOW",
"reasons": [
{
"check": "<string>",
"severity": "critical",
"message": "<string>",
"value": "<unknown>",
"threshold": "<unknown>"
}
],
"market": {
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"utilization": 123,
"tvl": 123,
"supplyApy": 123,
"borrowApy": 123
},
"position": {
"healthFactor": 123,
"currentLeverage": 123,
"distanceToLiq": 123
},
"alternative": {
"marketId": "<string>",
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"supplyApy": 123,
"borrowApy": 123,
"tvl": 123,
"utilization": 123,
"chainId": 123,
"protocol": "<string>",
"reason": "<string>"
},
"alternatives": [
{
"marketId": "<string>",
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"supplyApy": 123,
"borrowApy": 123,
"tvl": 123,
"utilization": 123,
"chainId": 123,
"protocol": "<string>",
"reason": "<string>"
}
],
"meta": {
"latencyMs": 123,
"policyApplied": {
"minRating": "BBB",
"maxUtilization": 0.85,
"maxConcentrationPct": 0.05,
"requireFreshOracle": true,
"maxLeverage": 3
},
"checksRun": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z"
}
},
"meta": {
"latencyMs": 123,
"freshness": "<string>",
"source": "<string>"
}
}Evaluate the risk of a proposed DeFi action (deposit, borrow, withdraw) against configurable risk policies. Returns ALLOW, DENY, or WARN with reasons and alternatives.
curl --request POST \
--url https://api.circular.rosetta.sh/api/v1/agent/check-risk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "deposit",
"marketId": "<string>",
"amountUsd": 123,
"walletAddress": "<string>",
"policy": {
"minRating": "BBB",
"maxUtilization": 0.85,
"maxConcentrationPct": 0.05,
"requireFreshOracle": true,
"maxLeverage": 3
}
}
'{
"data": {
"decision": "ALLOW",
"reasons": [
{
"check": "<string>",
"severity": "critical",
"message": "<string>",
"value": "<unknown>",
"threshold": "<unknown>"
}
],
"market": {
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"utilization": 123,
"tvl": 123,
"supplyApy": 123,
"borrowApy": 123
},
"position": {
"healthFactor": 123,
"currentLeverage": 123,
"distanceToLiq": 123
},
"alternative": {
"marketId": "<string>",
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"supplyApy": 123,
"borrowApy": 123,
"tvl": 123,
"utilization": 123,
"chainId": 123,
"protocol": "<string>",
"reason": "<string>"
},
"alternatives": [
{
"marketId": "<string>",
"name": "<string>",
"rating": "<string>",
"riskScore": 123,
"supplyApy": 123,
"borrowApy": 123,
"tvl": 123,
"utilization": 123,
"chainId": 123,
"protocol": "<string>",
"reason": "<string>"
}
],
"meta": {
"latencyMs": 123,
"policyApplied": {
"minRating": "BBB",
"maxUtilization": 0.85,
"maxConcentrationPct": 0.05,
"requireFreshOracle": true,
"maxLeverage": 3
},
"checksRun": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z"
}
},
"meta": {
"latencyMs": 123,
"freshness": "<string>",
"source": "<string>"
}
}API key in format circ_live_* or circ_test_*