Unlink one leg from a group.
DELETE
/api/position-groups/{id}/legs/{positionId}
const url = 'https://api.tradr.cloud/api/position-groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/legs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.tradr.cloud/api/position-groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/legs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Authed. Removes the leg from the group; the leg keeps its own lifecycle and figures unchanged. When one leg or fewer remains, the group dissolves and the last leg behaves as a plain, ungrouped position.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
positionId
required
string format: uuid
Responses
Section titled “ Responses ”The leg was unlinked (and the group dissolved
The group or the position was not found (or not owned by the user)
The group changed under the lock; retry.