Skip to main content

Partner attribution

Broker → cTrader endpoints for managing the partnerId used in trader attribution. Authenticated with the Manager Token (see Authentication of API calls).

Set a partner identifier

Assigns a partner identifier from the broker's backend to an existing user or account in cTrader.

MethodURL
PUT/oauth2/ctid/referral

Request body

KeyRequired?Data typeDescription
brokerCrmNameYesstringSee broker identification.
partnerIdYesstringThe partner identifier string to assign.
userIdNo (required if assigning to a user)integerThe unique ID of the user.
ctidTraderAccountIdNo (required if assigning to an account)integerThe unique ID of the linkage between a user and a trading account.

Expected status code

200

Errors

See Error codes.

Read a partner identifier

Retrieves the partner identifier assigned to a specific user or account.

MethodURL
GET/oauth2/ctid/referral

Query parameters

ParameterRequired?Data typeDescription
brokerCrmNameYesstringSee broker identification.
userIdNo (required if the partner is a user)integerThe unique ID of the user.
ctidTraderAccountIdNo (required if the partner is an account)integerThe unique ID of the linkage between a user and a trading account.

Output

KeyData typeDescription
userIdintegerThe unique ID of the user.
ctidTraderAccountIdintegerThe unique ID of the linkage between a user and a trading account.
partnerIdstringThe partner identifier string assigned to the entity.

Expected status code

200

Errors

See Error codes.

Delete a partner identifier

Deletes the partner identifier attached to a specific user or account.

MethodURL
DELETE/oauth2/ctid/referral

Query parameters

ParameterRequired?Data typeDescription
brokerCrmNameYesstringSee broker identification.
userIdYesintegerThe unique ID of the user.
ctidTraderAccountIdNointegerThe unique ID of the linkage between a user and a trading account. If unspecified, only the user-level record is deleted.

Expected status code

200

Errors

See Error codes.