Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET Crypto API Suite

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

Key scope: read · Success: 200

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

period string
YYYY-MM: only checks in this month. Anything else answers 400 period_invalid.
wallet string
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.
createdBefore string
The last answer's nextCreatedBefore, or an ISO 8601 time: checks strictly older. A malformed value answers 400 created_before_invalid.
limit integer
1 to 100; 50 by default.

Notes

  • SET Close is switched on per deployment; while it is off every /v1/close/* call answers 403 close_off. Check GET /v1/capabilities (features.close).
  • Needs a key with the read scope.
  • A sandbox wallet's check is not_applicable (reason sandbox) 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 matched or balance_mismatch, or unreadable when a balance could not be read (reason provider_unreadable or chain_unreadable). A chain SET does not read is not_applicable (reason chain_not_read).
  • Amounts are USDC with six decimals. EVM chains are read at a named block; Solana at a finalized slot.
  • A balance_mismatch needs a note (POST /v1/close/positions/{position}/note) before its month is prepared.
  • Paged newest first: follow nextCreatedBefore while hasMore is 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_off
  • 400 created_before_invalid
  • 400 period_invalid
  • 400 wallet_invalid
  • 400 state_invalid

All codes: Errors.