Merge Positions
Merge Positions
Merge multiple split positions of the same product and same direction that meet the merge conditions.
Callers only need to provide the product ID and the list of position IDs to merge. The system will automatically identify the position direction, margin mode, and product group based on position information.
Request URL
POST /deepcoin/trade/merge-positions
Request Parameters
| Field Name | Required | Type | Description |
|---|---|---|---|
| instId | true | string | Product ID, e.g. BTC-USDT-SWAP |
| posIds | true | []string | List of position IDs to merge, at least 2, at most 10 |
Request Example
{
"instId": "BTC-USDT-SWAP",
"posIds": [
"1000587858872759",
"1000587858872760"
]
}
Response Parameters
| Field Name | Type | Description |
|---|---|---|
| posId | string | Position ID after merge. Returns empty string if the merged position ID cannot be returned immediately |
| mergedPosIds | []string | Position IDs that participated in this merge |
| instId | string | Product ID |
Response Example
{
"code": "0",
"msg": "",
"data": {
"posId": "1000587858872759",
"mergedPosIds": [
"1000587858872759",
"1000587858872760"
],
"instId": "BTC-USDT-SWAP"
}
}
If the merge is accepted but the merged position ID cannot be returned immediately:
{
"code": "0",
"msg": "",
"data": {
"posId": "",
"mergedPosIds": [
"1000587858872759",
"1000587858872760"
],
"instId": "BTC-USDT-SWAP"
}
}
Notes
Description
- Merge multiple specified split positions
- Only supports merging positions of the same product and same direction
- Position IDs must come from the
posIdreturned byGet PositionsAPI - After a successful merge, the latest position can be queried via
Get Positions
Precautions
posIdsmust contain at least2position IDs and at most10position IDs- Duplicate position IDs are not allowed in
posIds - All positions must belong to the account associated with the current API Key
- All position product IDs must match the
instIdin the request - All positions must be in the same direction, e.g., all
longor allshort - All positions must be split positions, i.e.
mrgPosition=split - Restricted positions such as copy trading, being copied, and Webhook positions cannot be merged
- Positions cannot be merged when there are pending orders such as close orders, stop-loss/take-profit orders, increase orders, or trailing stop orders