SET Crypto API Suite · Positions and watched addresses
Position checks: a wallet's provider balance against its chain balance at a block
GET/v1/close/positions
Position checks, newest first: each compares a wallet's USDC balance at the provider (ledgerBalance) with its USDC balance read on chain at a block (chainBalance). variance is chain minus ledger, compared at the decimals the provider states (comparedDecimals).
Query parameters
periodstringYYYY-MM: only checks in this month. Anything else answers 400period_invalid.walletstring- A wallet id: only that wallet's checks.
state"matched" | "balance_mismatch" | "unreadable" | "not_applicable"- Only checks in this state. Anything else answers 400
state_invalid. createdBeforestring- The last answer's
nextCreatedBefore, or an ISO 8601 time: checks strictly older. A malformed value answers 400created_before_invalid. limitinteger- 1 to 100; 50 by default.
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
readscope. - A sandbox wallet's check is
not_applicable(reasonsandbox) with no balances, because the provider's sandbox moves no money on chain. The example was made with a sandbox key. - A live wallet's check is
matchedorbalance_mismatch, orunreadablewhen a balance could not be read (reasonprovider_unreadableorchain_unreadable). A chain SET does not read isnot_applicable(reasonchain_not_read). - Amounts are USDC with six decimals. EVM chains are read at a named block; Solana at a finalized slot.
- A
balance_mismatchneeds a note (POST /v1/close/positions/{position}/note) before its month is prepared. - Paged newest first: follow
nextCreatedBeforewhilehasMoreis true. - 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 created_before_invalid400 period_invalid400 wallet_invalid400 state_invalid