Skip to content

Modify User Security

POST /api/v1.0/quote/modify-user-security

Modify user watchlist: add symbols to a group, remove from a specific group only, or delete from all groups entirely. Use user-security-group to query watchlist groups; use user-security to query symbols in a group.

Parameters

NameTypeInRequiredDescription
group_namestringbodynoWatchlist group name (first match if duplicate names), max 100 characters; only custom groups supported. Required for op=ADD/MOVE_OUT; optional for op=DEL.
opstringbodyyesOperation type: ADD=add to specified group / DEL=delete from all groups entirely / MOVE_OUT=remove from specified group only.
code_liststring[]bodyyesList of symbol codes, must not be empty, 1-200 per call. e.g. ["HK.00700","US.AAPL"].

Request Example

bash
curl -X POST "https://webapi.moomoo.com/api/v1.0/quote/modify-user-security" \
  -H "Content-Type: application/json" \
  -d '{"group_name":"我的自选","op":"ADD","code_list":["HK.00700","US.AAPL"]}' | jq

Response Fields

FieldTypeDescription
result_codeintOperation result code, always 0 on success.

Supported Markets

  • Markets: All markets supported (HK / US / CN / SG / JP / cryptocurrency, etc.). Any valid code that resolves to a security is accepted.
  • Categories: Stocks / ETF / warrants / options / futures / indices / bonds and all other categories.
  • Groups: ADD / MOVE_OUT target a single custom group (one group_name per call); system preset groups cannot be targeted. DEL does not depend on groups and removes from all groups.
  • code_list max 200 per call.

Error Codes

ret_codeerror.codeTrigger ConditionHandling
-3invalid_parameterMissing op / invalid op / code_list empty or >200 / group_name >100 chars / op=ADD|MOVE_OUT missing group_name / group does not exist / code format error.Correct request parameters and retry.
-7invalid_symbolCode in code_list has valid format but security not found.Verify code validity via search.
-8unsupportedIllegal add/remove on system / virtual groups.Use custom groups instead.
-9permission_deniedUser identity missing/invalid.Add user identity and retry.
-5internal_errorGateway or backend internal error.Retry later; contact support if persistent.

Response Example

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "result_code": 0
  }
}