Api referenceCopy trading
Delete a subscription
closePositions is required.
true: the subscription stops at once (stopped,stopReasondeleted,deletingtrue) and every position it holds on the follower is closed, by ticket — including one whose copied open is still in flight, once it fills. The closes are recorded before any is sent, so they go even if this request is cut off, and a follower that is offline gets them when it is back. The subscription is removed once they are all closed: 200 withdeletedtrue when that happens within this request, otherwise 202 with what is stillpending. A close the broker refuses (failed) keeps the subscription until it is closed: delete again to retry, or withfalseto keep the rest.false: the subscription is removed now, and its links with it: the positions stay open on the follower as the account's own, no longer copied, closed or corrected by copy trading (releasedcounts them).
Either way the executions log is kept, with subscriptionId null.
Authorization
apiKey AuthorizationBearer <token>
Authorization: Bearer fx_live_<id>_<secret>.
A key is shown once, at creation. We cannot show it again or recover it for you.
Keys carry a label (live or test) in the key itself, so each configuration is easy to tell
apart. Both reach real brokers: test with a broker demo account.
Scopes are per key. A key without accounts:write can read accounts and nothing else.
In: header
Path Parameters
id*string
Format
uuidQuery Parameters
closePositions?string
Value in
- "true"
- "false"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/copy/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "deleted": true, "deleting": true, "closed": 0, "pending": 0, "failed": 0, "released": 0 }}