API
Exemples de code
Appels réels au contrat /api/v1. Authentification avec header X-API-Key.
NZOChainExemples pratiques d'intégration REST API v1.
Wallet risk — cURL
curl -X POST "https://api.nzochain.com/api/v1/wallets/risk?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: pk_live_VOTRE_CLE" \
-d '{"wallet":"0x...","network":"ethereum"}'Transaction Firewall — JavaScript
const res = await fetch('https://api.nzochain.com/api/v1/transactions/analyze?lang=en', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'pk_live_VOTRE_CLE',
},
body: JSON.stringify({
chainId: 1,
wallet: '0x...',
to: '0x...',
calldata: '0x095ea7b3...',
value: '0',
}),
});
const { data } = await res.json();
// data.decision → ALLOW | REVIEW | BLOCKSimulation — Python
import requests
res = requests.post(
"https://api.nzochain.com/api/v1/transactions/simulate",
headers={"X-API-Key": "pk_live_VOTRE_CLE"},
json={
"wallet": "0x...",
"network": "ethereum",
"tx": {"to": "0x...", "data": "0x...", "value": "0"},
},
)
print(res.json())