Fast vs Full Screening Mode
Fast mode (default)
Latency: ~20ms synchronous
Checks Tier 0 (sanctions), Tier 1 (threat intelligence), and Tier 2 (entity attribution) in a single synchronous call. No heuristic analysis.
When to use:
- Real-time deposit screening
- API gateway address checks
- High-volume automated screening
bash
curl -X POST https://api.cryptachain.com/v1/screen/address \
-H "X-API-Key: $CRYPTACHAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": "0xd8dA...", "chain": "ethereum", "mode": "fast"}'Full mode
Latency: Synchronous response (~20ms) + async heuristics (2-30 seconds)
Runs all fast mode checks immediately, then kicks off Tier 3 heuristic analysis in the background. Results delivered via:
- Polling — check
GET /v1/screen/jobs/{jobId}untilstatus: "COMPLETE" - Webhook — receive a
HEURISTICS_COMPLETEevent at your configured URL
bash
curl -X POST https://api.cryptachain.com/v1/screen/address \
-H "X-API-Key: $CRYPTACHAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": "0xd8dA...", "chain": "ethereum", "mode": "full"}'The initial response includes heuristics_status: "PENDING" and a heuristics_job_id.
When to use:
- Compliance officer review
- Onboarding KYC/KYB flows
- Regulatory reporting
- Investigation workflows
Polling for heuristic results
typescript
const initial = await screenAddress(address, 'full');
const jobId = initial.heuristics_job_id;
// Poll every 2 seconds (max 30 seconds)
for (let i = 0; i < 15; i++) {
await new Promise(r => setTimeout(r, 2000));
const job = await fetch(`${BASE}/v1/screen/jobs/${jobId}`, {
headers: { 'X-API-Key': key },
});
const result = await job.json();
if (result.status === 'COMPLETE') {
return result; // Full screening result with heuristics
}
}
throw new Error('Heuristic analysis timed out');Webhook handler for heuristic completion
typescript
// Express.js webhook handler
app.post('/webhooks/cryptachain', (req, res) => {
// Verify HMAC signature first — see /webhooks/verify
const event = req.body;
if (event.type === 'HEURISTICS_COMPLETE') {
const { address, chain, risk_score, flags } = event.data;
console.log(`Heuristics complete for ${address}: score=${risk_score}`);
// Update your database, trigger alerts, etc.
}
res.status(200).send('OK');
});Comparison table
| Feature | Fast | Full |
|---|---|---|
| Sanctions (OFAC, EU, UN, UK) | Synchronous | Synchronous |
| Threat intelligence | Synchronous | Synchronous |
| Entity labels | Synchronous | Synchronous |
| Behavioral heuristics | Not included | Async (2-30s) |
| Risk score accuracy | Good | Best |
| Credits | 2 | 5 |
| Recommended for | Real-time flows | Compliance review |