For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To Screen Wallets For Fraud and Sanctions With Wallet Risk Check API

This guide teaches you how to validate wallet for fraud and sanctions before transaction using the GetBlock wallet Risk API

Before a bank wires money, it runs the recipient against a sanctions list. Before a payout API releases crypto, it should do the same — except on-chain you don't have a name to check, only an address. The GetBlock Wallet Risk Check API turns that address into a verdict:

  1. a fraud probability

  2. a list of forensic red flags (mixer, phishing, theft attacks, fake KYC…),

  3. a direct sanctions list match — all in a single HTTP request.

In this guide, you'll build a pre-transaction screening gate: a small Node.js function that screens a wallet before you let a swap, withdrawal, or payout go through, and blocks anything that looks like fraud or lands on a sanctions list.

Without screening
With a Wallet Risk Check gate

You sign first and find out later

You get a verdict before you sign

Sanctions exposure is invisible

OFAC / sanctions hits are returned explicitly

"Was that wallet a mixer?" — you can't tell

19 forensic categories, flagged 0/1

Manual, after-the-fact review

One API call in your transaction path

Limitation

What you'll build

A shouldAllow(address, network) function that:

  1. Sends the wallet to the Wallet Risk Check endpoint.

  2. Reads back a fraud probability and converts it to a LOW / MEDIUM / HIGH level.

  3. Collects the forensic flags that were triggered.

  4. Checks the sanctions data.

  5. Returns a clear allow / block decision — and fails closed (blocks) if the check itself errors out.

By the end you'll be able to drop this straight into a payout queue, a swap confirmation flow, or an Express route.

How it works

The endpoint is fast: pre-calculated results return instantly, and a fresh recalculation takes about 3–4 seconds. That makes it safe to call inline, in the transaction path.

Prerequisites

Project Setup

1

Set up the project

Setting type=module lets us use import/top-level await. We add no dependenciesfetch is built into Node 18+.

2

Get your API key

  1. Open the Address Audit product and go to the API keys tab.

  2. Copy your key and save it in an .env file

3

Write the API caller

Create screen.js. This is the only function that talks to GetBlock; everything else builds on it.

4

Turn the response into a decision

The API gives you raw signals. Your policy decides what to do with them. Add a small helper to bucket the probability, then a gate that combines probability, the explicit status, and sanctions.

5

Wire it into your transaction flow

Create index.js to run the gate:

In a real service, the gate slots in right before you sign or release funds — for example in an Express route:

6

Run it

Expected output for a clean wallet:

For a flagged wallet you'd instead see something like:

Understanding the response

The fields you'll lean on most:

Field
Type
What it tells you

status

"Fraud" | "Not Fraud"

The API's binary verdict — use it as a hard block.

probabilityFraud

string 0–1

Continuous fraud score. Bucket it with riskLevel().

forensic_details

object of "0"/"1"

19 categories: mixer, phishing_activities, money_laundering, sanctioned, stealing_attack, fake_kyc, honeypot_related_address, and more.

sanctionData

array

Sanctions-list matches. isSanctioned: false with null fields means checked and cleared.

Troubleshooting

Symptom
Likely cause
Fix

HTTP 401 / 403

Bad or missing key, or your plan lacks Address Audit access

Re-check GETBLOCK_KEY; confirm the key is from the Address Audit product.

HTTP 402

Out of requests / insufficient balance

You've hit the free-tier limit (5/day) — top up or wait.

HTTP 429

Rate limited

Back off and retry; respect the Retry-After header.

HTTP 400

Bad address or unsupported network

Verify the address and use a supported lowercase code (eth/bsc/base/polygon/tron).

probabilityFraud looks like "0" always

You're comparing a string to a number

parseFloat it before comparing.

Conclusion

You built a pre-transaction screening gate that calls the GetBlock Wallet Risk Check API directly, turns the response into a LOW/MEDIUM/HIGH decision, surfaces sanctions and forensic flags, and fails closed when in doubt. The same checkWallet function scales to a batch job — screen a payout queue concurrently and exit non-zero if anything needs manual review.

Resources

Last updated

Was this helpful?