Set the authenticated user's trade-data consent flag.
PUT
/api/advisor/trade-data-consent
const url = 'https://api.tradr.cloud/api/advisor/trade-data-consent';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"consent":true}'};
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/advisor/trade-data-consent \ --header 'Content-Type: application/json' \ --data '{ "consent": true }'Grants or revokes the advisor’s access to the user’s stored trade data (REQ-9.1). Revoking consent stops new trade-data reads and removes stored structured trade-data from what is replayed to the provider; it cannot remove figures already disclosed in prior replies (REQ-10.2). Consent is re-read on every provider round-trip, so a change takes effect on the next iteration of an in-flight turn (REQ-1.7).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
consent
required
boolean
Examplegenerated
{ "consent": true}Responses
Section titled “Responses”{ consent: boolean } — the stored flag.
Validation error.