Skip to navigation

Archive a sub-account

Archives one of the authenticated main account’s sub-accounts.

Archiving only marks the sub-account as archived so clients can hide it: nothing is deleted, its keys keep working and its on-chain account is untouched. GET /account/subaccounts keeps listing it, with archived_at set. Only a session authenticated with the main account’s own key is accepted.

address must be a sub-account onboarded under the authenticated account, matched regardless of case and leading zeros; any other address answers 404 ACCOUNT_NOT_FOUND. Only an account of kind subaccount can be archived: an isolated or vault account answers 400 INVALID_REQUEST_PARAMETER.

The sub-account must hold nothing: its account value and total collateral must both be zero, every token balance must have a size of zero (a token with no price adds nothing to the account value), it must hold no shares of any vault, and it must have no open position and no open order (stop orders included). Otherwise the request is refused with 400 SUBACCOUNT_HAS_FUNDS, whose message says which. When any of these cannot be read, the request fails rather than archiving a sub-account that may still hold something.

An archived sub-account frees its place in the main account’s sub-account limit (SUBACCOUNTS_LIMIT_EXCEEDED at onboarding), but archived sub-accounts still count towards a total of twice that limit.

Archiving is idempotent: archiving a sub-account already archived answers 200 with its first archived_at, without checking its funds again.

Responds with the archived sub-account; archived_at is in milliseconds since epoch.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

addressstringRequired

Sub-account address

Response

OK
accountstringOptional
Starknet address of the account
archived_atintegerOptional

Time the main account archived this sub-account, in unix milliseconds; absent when not archived

created_atintegerOptional
Account creation time
derivation_pathstringOptional

Account derivation path used to derive the account, if a sub-account

feesobjectOptional
has_ecosystem_nftbooleanOptional

True if account owns an ecosystem NFT (Money Badgers / ShizoPunk) — qualifies for the lower retail tier thresholds

isolated_marketstringOptional
Isolated market for the account
kindenumOptional
Account kind
Allowed values:
parent_accountstringOptional
Starknet address of the parent account
public_keystringOptional
Starknet public key
usernamestringOptional
Username of the account
volume_tiersmap from strings to objectsOptional
Volume tier info by kind

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error