POST /subaccounts/archive
Archive one of the authenticated main account's subaccounts. See Subaccounts.
POST https://api.aevo.xyz/subaccounts/archive
Authentication required. Include your
AEVO-KEYandAEVO-SECRETheaders. See Authentication. Call it with the main account's API key and noAEVO-SUBACCOUNTheader. Read-only API keys can't call this endpoint.
The subaccount must be empty: no balances, positions, open orders or pending withdrawals. Archiving frees a slot under the subaccount limit. An archived subaccount can't be selected with AEVO-SUBACCOUNT and can't receive transfers. It still appears in GET /subaccounts with archived: true.
Body Parameters
subaccount
string
Yes
The subaccount to archive. Example: 0xYourSubaccountAddress
Example Request
curl --request POST \
--url https://api.aevo.xyz/subaccounts/archive \
--header 'accept: application/json' \
--header 'AEVO-KEY: <your-api-key>' \
--header 'AEVO-SECRET: <your-api-secret>' \
--header 'content-type: application/json' \
--data '{ "subaccount": "0xYourSubaccountAddress" }'Responses
200 — The subaccount was archived.
parent
string
Yes
The main account. Example: 0xYourMainAccountAddress
subaccount
string
Yes
The subaccount. Example: 0xYourSubaccountAddress
archived
boolean
Yes
Always true. Example: true
400 — Bad request.
error
string
Yes
Error message: SUBACCOUNT_NOT_FOUND, SUBACCOUNT_ARCHIVED or SUBACCOUNT_NOT_EMPTY. Example: SUBACCOUNT_NOT_EMPTY
401 — Unauthorized.
error
string
Yes
Error message. Example: UNAUTHORIZED
429 — Rate limit exceeded.
error
string
Yes
Error message. Example: RATE_LIMIT_EXCEEDED
500 — Internal server error.
error
string
Yes
Error message. Example: INTERNAL_ERROR
Last updated
Was this helpful?

