No API key. Connect in one line.
Everything below works without an account or key, built for BNB Hack Bangkok. Check a token with one request, or give your AI agent the guard in one line.
Try it in 10 seconds
Paste this in a terminal. It checks TRX for a $1,000 buy on BNB Smart Chain and records the answer on chain.
curl "https://guard.coingraph.ai/api/check?token=0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3&usd=1000"Change token to any BNB Smart Chain contract address and usd to your order size (1 to 100,000). You get back proceed, caution or avoid, every reason, and a BscScan link to the record. Prefer clicking? Use the check box on the homepage.
Connect your AI agent
The guard is an MCP server. Add it to your AI tool and it can check any token before it buys.
Claude Code
claude mcp add --transport http coingraph-guard https://guard.coingraph.ai/mcpCursor, Windsurf, VS Code and other MCP clients
{
"mcpServers": {
"coingraph-guard": { "url": "https://guard.coingraph.ai/mcp" }
}
}Then just ask
| Tool | What it does |
|---|---|
check_token | Checks a token for an order size: buy and sell simulated on PancakeSwap, CoinMarketCap data, Atlas Oracle price, Cournot market risk, and what Living Brain remembers about the token. Returns the verdict with reasons and records it on BNB Smart Chain. |
bnb_top50 | The 50 largest assets on BNB Chain with a verdict for each and their contract addresses. |
token_memory | What CoinGraph remembers about a token from earlier checks, using Living Brain: past verdicts, reasons and their on-chain records. |
market_risk | Cournot's current probability of a sharp BNB drop, with its evidence. |
Use it from code
Call the check before every buy, and stop unless it says proceed.
async function safeToBuy(token: string, usd: number) {
const url = `https://guard.coingraph.ai/api/check?token=${token}&usd=${usd}`;
const check = await (await fetch(url)).json();
if (check.verdict !== "proceed") {
console.log("Stopped:", check.findings[0].text);
return false;
}
console.log("OK. Record:", check.proof?.explorer);
return true;
}import requests
def safe_to_buy(token: str, usd: int) -> bool:
check = requests.get("https://guard.coingraph.ai/api/check",
params={"token": token, "usd": usd}, timeout=120).json()
if check["verdict"] != "proceed":
print("Stopped:", check["findings"][0]["text"])
return False
return TrueAll free endpoints
| Endpoint | Returns |
|---|---|
GET /api/check?token=&usd= | The full check for one token and order size, recorded on chain. |
GET /api/board | BNB Chain top 50, each with a verdict for a $500 buy. |
GET /api/top10 | The top 10 with full findings. |
GET /api/market-risk | Cournot's probability of a sharp BNB drop, with evidence. |
GET /api/proofs | How many answers are recorded on chain, and the cost. |
POST /mcp | The MCP server (tools above). |
All on https://guard.coingraph.ai.
Guard contract
The guard wraps a PancakeSwap v2 buy. It swaps only with a recent CoinGraph answer, signed for that exact agent, token and amount, that says proceed. Anything else reverts and the BNB stays in the wallet.
| Contract | Address (BNB Smart Chain mainnet) |
|---|---|
| CoinGraphGuard | 0x7f914975c2af57253a707fb2c2e44776dc45000b |
| CoinGraphGuardAtlas | 0xf86e3867cee19d56cacfb704dabb1b138af8b0ed · also verifies Atlas Oracle's signed price in the same transaction |
| ProofLog | 0x186ef344dcd0dd74d292a5d2b4433d77e19f5f7d · every answer recorded before the trade |
struct Answer {
address agent; // who may use this answer
address token; // the token that was checked
uint256 maxAmountIn; // largest BNB amount (wei) it covers
uint8 verdict; // 1 proceed, 2 caution, 3 avoid
uint64 issuedAt; // valid for 5 minutes, once
bytes32 evidenceHash; // keccak256 of the full check
}
function buy(Answer calldata a, bytes calldata sig,
uint256 amountOutMin, address[] calldata path,
uint256 deadline) external payable;Why a buy reverts
| Error | Meaning |
|---|---|
NotProceed | The answer says caution or avoid. |
OracleDeviation | The pool price is too far from Atlas Oracle's signed price (Atlas guard). |
AmountTooLarge | More BNB than the answer covers. |
AnswerExpired / AnswerUsed | Older than 5 minutes, or already used. |
NotYourAnswer / WrongToken / WrongSigner | Signed for another agent or token, or not by CoinGraph. |
Reading a response
{
"symbol": "TRX",
"orderUsd": 1000,
"verdict": "proceed", // proceed | caution | avoid
"findings": [ // worst first, each with level and text
{ "level": "ok", "check": "oracle_price",
"text": "PancakeSwap price $0.303 vs Atlas Oracle TRX/USD $0.303: 0.13% apart." }
],
"numbers": { "liquidityUsd": 276454, "priceImpactPct": 0.73, "atlas": { … }, "cournot": { … } },
"proof": { "recorded": true, "txHash": "0x…", "evidenceHash": "0x…", "explorer": "https://bscscan.com/tx/0x…" }
}Treat anything other than proceed as a stop. A finding the check could not measure is never assumed safe.
Limits
| Surface | Key | Limit |
|---|---|---|
| Guard API and MCP | None | 12 checks per minute per connection |
| Board, Top 10, market risk | None | Cached, refreshed in the background |
Verify an answer
Every response includes proof.page (a page for that transaction) and proof.raw (the exact JSON whose hash is on chain). Open guard.coingraph.ai/proof, paste any transaction, and your browser recomputes the hash and matches it to the ProofLog event.
curl -s https://guard.coingraph.ai/api/proof/<txHash> # the on-chain record
curl -s https://guard.coingraph.ai/api/evidence/<evidenceHash> # the exact raw outputMore with a CoinGraph key
You don't need this for the hackathon. With a free account, the wider CoinGraph platform adds the top 1,000 tokens on every chain, sized checks with your own rules, and five ready-made agents (Trade Gatekeeper, Wallet Guard, Due Diligence Analyst, Portfolio Checkup, Daily Market Brief).
- Get a key at coingraph.ai/account/keys (Google or email). New accounts get 500 free credits.
- Call the API with it:
curl -X POST https://coingraph.ai/api/v1/evaluate \
-H "Authorization: Bearer $COINGRAPH_KEY" \
-H "Content-Type: application/json" \
-d '{"token": "chainlink", "size_usd": 1000}'Full reference: coingraph.ai/docs · agents playground: coingraph.ai/agents.