Add sample data.
const url = 'https://api.tradr.cloud/api/accounts/demo';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradr.cloud/api/accounts/demoAuthed. Creates one flagged sample account for the current user, seeded with a fixed set of trades — closed, open and planned — driven through the normal position lifecycle so realized P&L and its ledger entries are derived exactly as they are for real trades. The fixture is identical on every run, so support, the documentation screenshots and the end-to-end tests all describe the same figures.
Refused with 409 when the user already has an account. Sample figures are kept out of real ones by keeping sample and real data mutually exclusive, so there is no supported state in which both exist. Seeding is all-or-nothing: a failure leaves no account behind, and a retry is safe.
Available identically to self-hosted and hosted deployments — it needs no optional integration configured.
Every account read — the list, the detail and this response — carries a boolean isDemo, which is true on the sample account and false on every real one. That is how a client identifies the sample account to label or remove it; it is server-set and cannot be sent in on create or update.
Responses
Section titled “Responses”The created sample account, with isDemo: true.
The user already has an account.