SET Crypto API Suite · Positions and watched addresses
Note a balance mismatch
POST/v1/close/positions/{position}/note
Records a note on a position check in state balance_mismatch: what was found and why. A mismatch with no note blocks preparing its month.
Path parameters
positionstringrequired- The position check's id:
cp_followed by 32 hex characters.
Headers
Idempotency-Keystring- Any unique string, so a retry runs once. See Idempotency.
Body
notestringrequired- What was found and why, 1 to 500 characters. Missing or empty answers 400
note_required.
Notes
- SET Close is switched on per deployment; while it is off every
/v1/close/*call answers 403close_off. CheckGET /v1/capabilities(features.close). - Needs a key with the
writescope. - Only a check in state
balance_mismatchtakes a note: any other state answers 409not_a_mismatch. - The note can be written only while the check's month is neither prepared nor locked: 409
period_lockedafter that. notedByis the key that wrote the note. A second note replaces the first until the month is prepared.- A mismatch with no note blocks
POST /v1/close/periods/{period}/prepare(409open_position_mismatches). - Emits the event
close.position.noted. - A sandbox wallet's check is always
not_applicable, so only a live wallet can have a mismatch; the example's mismatch row (provider 1250.50 USDC, chain 1249.50 USDC) was prepared for illustration. - 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_off400 note_required404 not_found409 not_a_mismatch409 period_locked