account-related function consistent with python api