Set the writable-account designation (plan-tiers D18, REQ-6.6).
PUT
/api/accounts/writable
const url = 'https://api.tradr.cloud/api/accounts/writable';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"accountId":"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/accounts/writable \ --header 'Content-Type: application/json' \ --data '{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authed, always-on. Stores which of the user’s accounts stays writable for new trading data while over the Free-tier account cap. A plain stored preference — independent of gating/tier/over-cap state; it only takes effect when L1-writability enforcement consults the resolver. The account must belong to the current user (404 otherwise).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
accountId
required
string format: uuid
Examplegenerated
{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”{ writableAccountId } — the stored designation.
Validation error.
Account not found (or not owned by the user).