Link an exit fill to an entry fill as one in-kind transfer.
const url = 'https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fills/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/transfer-link';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"entryFillId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fills/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/transfer-link \ --header 'Content-Type: application/json' \ --data '{ "entryFillId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authed. Stores the link only if entryFillId names one of the caller’s own entry fills, the first fill is an exit, their positions sit in different accounts, they share the exit position’s symbol and side, their quantities are equal, and neither fill is already in a link; otherwise refuses with 409 and a reason first in the message (not_an_entry, same_account, different_security, quantity_mismatch, exit_already_linked, entry_already_linked). An entryFillId naming another user’s fill is refused as not_an_entry and never otherwise resolved. The write touches only the link row — no fill hook, ledger write, or position change runs.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Must be an exit fill of this position.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "entryFillId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”The created link.
object
Examplegenerated
{ "createdAt": "2026-04-15T12:00:00Z", "entryAccountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "entryAccountName": "example", "entryFillId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "entryPositionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "exitFillId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}No such position for this user
One of the six link rules is violated; the message starts with its reason.