D-08 · API
[D-08]Reference
API
Every read in the app is a plain GET request that returns JSON. No key, no signature, nothing is written.
Basics#
- Base URL
https://corbel.finance- Method
- GET only. Nothing here writes or signs.
- Format
- JSON. Amounts in raw token units are strings.
- Block
- Reads run at the latest block. Responses carry the block number.
Endpoints#
| Request | Returns |
|---|---|
| GET /api/token?q=<address|ticker> | The trust report: seven checks. A ticker with many contracts returns candidates to pick from. |
| GET /api/quote?from=&to=&amount= | Every route, simulated, with the best one marked. from and to: ETH, WETH, USDG or an address. |
| GET /api/guard?token=&side=&amount= | A pre-trade verdict under a policy: allow or deny, with every rule. Policy: maxIn, minScore, maxImpact, must, hooks=0, allow, deny. |
| GET /api/radar | Newest pools from the index, with launcher history and liveness. |
| GET /api/launches | Launch analytics for the week: launchers, venues, hooks, pools per hour. |
| GET /api/mandate | The attack scenarios. |
| GET /api/mandate?s=<id> | Run one: a real mandate inside an eth_call. Shows the rule, the strikes and the bond left. |
| GET /api/net | The head block and the gas price. |
curl "https://corbel.finance/api/quote?from=ETH&to=USDG&amount=1"
{
"from": "ETH", "to": "USDG", "amountIn": "1",
"block": "114498094",
"best": 0,
"impact": 0.0107,
"routes": [
{
"hops": [{ "venue": "v2", "fee": 3000, "hooked": false, "pool": "0x8803…1C4d" }],
"amountOut": "1739243284",
"gas": 66191,
"ok": true,
"reason": null
},
{
"hops": [{ "venue": "v4", "fee": null, "hooked": true }],
"amountOut": null,
"ok": false,
"reason": "The pool's hook refused the swap."
}
]
}Limits and errors#
Requests are rate-limited per caller. Over the limit you get 429 and a retry-after header in seconds. Wait that long and ask again.
