transferShareGroupToMd. This action moves collateral from a share group’s shared margin pool back into a specific market deployer’s cross margin pool. The transfer is constrained by the withdrawable amount available in the source share group — meaning position IM and order-frozen margin held against contracts in that group reduce how much you can move.
Your account must be in PORTFOLIO mode to interact with share groups. If you want to revert fully to UNIFIED mode, first drain all share groups back to their market deployers, then call
setMarginShareType with marginShareType: 0.Endpoint
Request
Every request must carry an ECDSA signature and a nonce to prevent replay attacks.Action parameters
int32
required
The ID of the source share group. Funds are deducted from this group’s shared margin pool, subject to its withdrawable amount limit.
int32
required
The ID of the destination market deployer. Funds are credited to this deployer’s cross margin pool.
int32
required
The coin or currency ID to transfer.
string
required
The amount to transfer, expressed as a raw integer string (e.g.
"1000"). Must be greater than zero and must not exceed the withdrawable amount available in the source share group. Decimals are not accepted — use the coin’s smallest unit.Response
A successful transfer returns the updated balances for both the source share group and the destination market deployer. The response type isshareGroupFund, consistent with other share group fund operations.
int32
The coin ID that was transferred.
int64
The amount moved from the share group into the market deployer.
int64
The share group’s margin pool balance after the transfer.
int64
The cross margin balance of the destination market deployer after the transfer.
Errors
If the request cannot be fulfilled, the exchange still returns HTTP 200 withstatus: "ok" — the rejection is reported inside response.data, where a server-assigned integer errorCode and a human-readable errorMessage are populated while the numeric amount and balance fields are set to 0. Common causes include:
- Amount exceeds withdrawable balance in the share group — position IM and frozen order margin on contracts within the group constrain how much can be moved.
- Account not in PORTFOLIO mode — share groups are only active when your margin share type is
1. - Invalid
groupId— the specified share group must exist and be accessible to your account. - Amount ≤ 0 — the
amountfield must be a positive integer string.