SET Crypto API Suite · Positions and watched addresses
Read the next range now
POST/v1/close/watched_addresses/{watch}/scan
Reads the watched address's next range of blocks now, instead of waiting for SET's scheduled pass (which reads one address a run). Each USDC transfer found becomes a verified chain record and is matched; the answer counts what was recorded, matched and left as exceptions, and gives the next block to read.
Path parameters
watchstringrequired- The watched address's id:
cw_followed by 32 hex characters.
Headers
Idempotency-Keystring- Any unique string, so a retry runs once. See Idempotency.
Notes
- SET Close is switched on per deployment, and address watching has its own switch: 403
close_offwhile Close is off, then 403close_watch_offwhile watching is off. CheckGET /v1/capabilities(features.close,features.closeWatch). - Needs a key with the
writescope. - The address must be watching: a stopped address answers 409
watch_stopped. An address of the other mode (live or test) answers 404not_found. - Close reads 10 blocks behind the head on Base and 12 on Ethereum. In the example the head was block 1000, so the transfer at block 995 waits and
nextBlockis 991, where the next pass starts. matchedcounts transfers paired with an uploaded row by hash;exceptionscounts those nothing explains (missing_provider). In the example no file had been uploaded, so both transfers recorded are exceptions.- A second scan straight after reads nothing new:
read: false,recorded: 0. - 429
close_budget_reachedwhen Close's daily writes for the business are used up: nothing is written and the cursor stays. - 503
close_watch_unavailablewhen the chain cannot be read: nothing is recorded, the failure is kept inproblem, and the same blocks are read next time. - This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
403 close_off403 close_watch_off404 not_found409 watch_stopped503 close_watch_unavailable429 close_budget_reached