Skip to content

Delete a sub-account​

DELETE
/v1/account/subaccount

Requires SUB_ACCOUNTS_MANAGE, granted by TREASURY_WRITE (bundles)

Deletes a sub-account, so it no longer appears in your account lists, and responds with 204. The sub-account must be empty first: no balances, reserved amounts or debt. Call it on your primary account (don't send X-VALR-SUB-ACCOUNT-ID); keys limited to some sub-accounts can't use it.

Request Body​

application/json
JSON
{
"id": 7340032581337088
}

Responses​

No content

Samples​

Errors

HTTPErrorWhen
400-113INVALID_JSONThe body isn't valid JSON.
400-11INVALID_REQUESTThe body is empty or a field fails validation; validationErrors lists each failing field.
400-11134SUB_ACCOUNT_NOT_FOUNDNone of your business's sub-accounts has this id.
400-11163CANNOT_DISABLE_SUB_ACCOUNT_WITH_BALANCESThe sub-account still holds funds, reserved amounts or debt. Cancel its open orders, transfer its funds out and repay any borrowing, then try again.
400-17217CANNOT_DISABLE_SYSTEM_PROVISIONED_SUB_ACCOUNTVALR set this sub-account up for you, so it can't be deleted.
400-17216CANNOT_DISABLE_SHARED_SUB_ACCOUNTThe sub-account is shared with another VALR user. Stop sharing it, then try again.

Plus the errors common to all signed endpoints.