Update an account.
const url = 'https://api.tradr.cloud/api/accounts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"brokerageId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","currency":"example","defaultRiskPercent":"1.00","name":"example","taxTreatment":"taxable","timezone":"America/New_York"}'};
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/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "brokerageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "currency": "example", "defaultRiskPercent": "1.00", "name": "example", "taxTreatment": "taxable", "timezone": "America/New_York" }'Authed. All fields optional. startingBalance is deliberately absent — it is creation-only. timezone IS editable: it changes only subsequent trading-day evaluations and rewrites no history, and defaultRiskPercent is editable for the same reason.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Share of the account balance risked per trade (decimal string above 0, up to 100, at most 2 decimal places). Omitting the key leaves the stored value untouched; sending an explicit null clears the rule back to unset.
Example
1.00How this account is taxed. Omitting the key leaves the stored value untouched; unlike defaultRiskPercent there is no null case to clear — this field has no unset state.
Example
registeredIANA zone name (canonical spelling). Unknown zone is a 400.
Example
America/New_YorkResponses
Section titled “ Responses ”The updated account. isDemo is server-set and unchanged by this call.
Validation error (includes an unknown IANA timezone).
FORBIDDEN (cross-user brokerage).
Account not found.
Duplicate account name, or currency change while positions exist.