# Agent Risk Desk – NEAR Account Counterparty Risk

> Agent Risk Desk – NEAR Account Counterparty Risk is a paid API for AI agents from x402-services.soldano.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-03).

Returns an allow/warn/block risk verdict with reasons for a NEAR account before sending it a payment, checking OFAC/SDN, denylists, account age, contract code changes, and vault payment history.

## Facts

- Endpoint: POST https://x402-services.soldano.workers.dev/v1/risk/near?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-risk-desk-near-account-counterparty-risk-d2aa8a7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LuRgl15y-X_nBnBMZCsp5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-risk-desk-near-account-counterparty-risk-d2aa8a7b -d '<json body>'
```

Example prompt: Before I pay alice.near on NEAR mainnet, run a counterparty risk check on it — screen for OFAC sanctions, check if its contract code changed in the last 72 hours, and warn me if the account is less than 7 days old.

## When to prefer this

Use this endpoint when your agent needs to make a pre-payment risk decision specifically for a NEAR Protocol account, including OFAC sanctions screening, smart contract code-change detection, and optional Allowance vault denylist/history checks. Prefer this over the sibling EVM risk endpoint when the recipient is a NEAR account (*.near or 64-hex implicit). It is especially valuable in automated payment pipelines where blocking a risky counterparty before funds are sent is critical.

## Known failure modes

- Invalid NEAR account ID format returns a 400 validation error
- Account does not exist on the specified network returns a block verdict with 'account not found' reason
- OFAC SDN list unavailable may degrade sanctions checks
- Vault ID provided but vault not found may return a partial result or error
- Network mismatch (testnet account checked on mainnet) may return 'account not found'
- Upstream NEAR RPC unavailability may cause a 503 or timeout

## How this service works

Counterparty-risk verdict (allow, warn or block, with reasons) for a NEAR account, for use before paying it. Checks the OFAC SDN list and operator deny-lists, whether the account exists, its age, its contract code and code changes in the last 72 h, global contracts whose publisher can change them, and, with an Allowance vault, the vault denylist and payment history.

## Output

A JSON object containing a risk verdict of 'allow', 'warn', or 'block', accompanied by an array of human-readable reasons explaining each risk signal triggered — including OFAC/SDN match status, account existence and age, contract code change detection within the specified window, vault denylist membership, and historical payment data from the Allowance vault if provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "vault": {
   "type": "string",
   "pattern": "^(([a-z\\d]+[-_])*[a-z\\d]+\\.)*([a-z\\d]+[-_])*[a-z\\d]+$",
   "maxLength": 64,
   "minLength": 2,
   "description": "Allowance vault: adds its on-chain denylist and its payment history with this account"
  },
  "account": {
   "type": "string",
   "pattern": "^(([a-z\\d]+[-_])*[a-z\\d]+\\.)*([a-z\\d]+[-_])*[a-z\\d]+$",
   "maxLength": 64,
   "minLength": 2,
   "description": "NEAR account id, e.g. alice.near or a 64-hex implicit account"
  },
  "network": {
   "enum": [
    "mainnet",
    "testnet"
   ],
   "type": "string",
   "description": "NEAR network; default: testnet for *.testnet accounts, mainnet otherwise"
  },
  "minAgeDays": {
   "type": "number",
   "maximum": 3650,
   "minimum": 0,
   "description": "warn when the account is younger than this (default 7)"
  },
  "codeWindowHours": {
   "type": "integer",
   "maximum": 720,
   "minimum": 1,
   "description": "warn when the contract code changed within this window (default 72)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-risk-desk-near-account-counterparty-risk-d2aa8a7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services.soldano.workers.dev](https://www.zero.xyz/host/x402-services.soldano.workers.dev/llms.txt)
