Update Margin Group

Updates a MarginX group name and/or its complete member set. Requires Main User Level access with TRANSFER permission.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Updates a MarginX group's name, member set, or both. Member arrays specify the complete desired membership, not members to add or remove incrementally.

Rate limit: 10 requests per minute per API key.

API key access

Requires a signed LTP Open API request with TRANSFER permission.

API key typeCan callScope
Main User Level API key (also the Main Portfolio key)YesMargin groups belonging to the main user.
Sub-user Level API keyNoNot supported.
Dedicated Sub Portfolio Level API keyNoNot supported.
Exchange-native API keyNoUse an LTP Main User Level API key.

Parameters

Path

NameTypeRequiredDescription
groupIdstringYesMargin group ID, not a member ID. A positive integer expressed as a string.

JSON body

NameTypeRequiredDescription
namestringNoNew group name, 1–64 characters after trimming leading/trailing whitespace. Must be unique within the main user's groups. Omit to retain the existing name.
dmaGroupMemberListarray of objectsConditionalComplete desired DMA membership. Each item contains memberId, the DMA account ID. Supply together with rxGroupMemberList.
rxGroupMemberListarray of objectsConditionalComplete desired RapidX membership. Each item contains memberId, the Portfolio ID, and venue, its exchange. Supply together with dmaGroupMemberList.

How updates work

  • Rename only: send name and omit both member arrays. Existing members are retained.
  • Update members: send both arrays, including every member to retain. Omit name to retain the existing group name.
  • An existing member omitted from the submitted complete set is removed. Use [] to remove all members of one account family, but the two arrays must contain 1–30 members in total.
  • Supplying only one array, both arrays empty, or an empty body is rejected. A group must always have at least one member.
  • DMA identity is memberId; RapidX identity is memberId plus venue. The same Portfolio's Binance and OKX venues are separate members.
  • New members must be eligible for MarginX and cannot belong to another group. Frozen, restricted or external accounts cannot be added. Members retained in the current group are allowed.
  • A member being removed must have its debt settled; in-flight orders and the resulting group's risk conditions are also checked.
  • If validation fails, neither the name nor the member set is partially saved.

Read all pages of Get Margin Group Members before constructing a complete replacement set. Do not treat one page as the full group.

Signing

See Authentication. Nested member arrays use the same signing representation as Create Margin Group — Signing a body containing member arrays: for example, [{memberId=71001, venue=BINANCE}]. The HTTP body remains standard JSON. Omitted fields are not included in the signing string.

For a rename-only body {"name":"Group Alpha Renamed"}, the HMAC input is:

name=Group Alpha Renamed&<nonce>

Response fields

FieldTypeDescription
codeinteger200 means success; any other value indicates an error.
messagestringResult message.
data.idstringUpdated margin group ID.
data.updatedbooleantrue when the update succeeds.

The response panel includes rename-only, membership-only and combined request examples, plus success and error responses. Query the group list and member list to read back the saved name and membership.

Error codes

Errors can return HTTP 200 with a non-success JSON code. Check code, not HTTP status alone. See Error Codes for shared errors.

CodeWhen it occursWhat to do
1000A member list has the wrong JSON type. Example: Invalid JSON type for dmaGroupMemberList.Send member lists as JSON arrays.
1001A required nested field is missing; for example, Missing required field: venue.Supply the field identified by the message.
100400Invalid ID/name, empty body, only one member array, no members, duplicate members or an unsupported venue.Check the update rules above. An unsupported RapidX venue can return Unsupported RapidX venue.
-1Group or member business validation fails, or the name is already used. Observed messages include Group not found., Account data temporarily unavailable, MarginX group data unavailable and a duplicate-name message.Check the group ID, name and member eligibility. These messages do not necessarily indicate a transient outage; do not blindly retry.
2000Signature verification fails.Check the authentication headers and nested-array signing format.
2003The calling API key level is not allowed.Use a Main User Level API key.
2004The key lacks a required permission.Use a key with TRANSFER permission.
100429Rate limit exceeded.Reduce the request rate.

If a request times out, query the saved name and members before retrying.

Path Params
string
required

Margin group ID, not a DMA account or Portfolio ID. Positive integer expressed as a string.

Body Params

Provide name, both complete member arrays, or both. Rejects an empty object, only one array, or an empty combined membership.

string

Optional new name, 1–64 characters after trimming. Omit to retain the name.

dmaGroupMemberList
array of objects

Complete desired DMA membership, not a delta. Supply with rxGroupMemberList; use [] for none. Combined membership must be 1–30.

dmaGroupMemberList
rxGroupMemberList
array of objects

Complete desired RapidX membership, not a delta. Supply with dmaGroupMemberList; use [] for none.

rxGroupMemberList
Headers
string
required

Current Unix timestamp in seconds, also used in the signature.

string
required

HMAC-SHA256 hex signature; see Authentication.

string
required

Current Unix timestamp in microseconds.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json