Skip to main content

Generate an account statement

Reports are generated in the background and saved as a file you download.

Password session required

Reports need a Trader token from a password login. API-key (API_Trader) tokens get 403. To get trade history from a bot, use GET /api/v1/deals/accounts/me or GET /api/v1/accounts/me/export/history instead.

1. Queue the report​

report_type 19 is the Account Statement; report_data_type 3 is PDF (2 is CSV). Pass your own account ID in account_ids.

curl -X POST https://api.onlytradeplatform.com/api/v1/reports \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"report_type": 19,
"report_data_type": 3,
"account_ids": [26100003],
"scope_label": "Account 26100003 · 01-06-2026 → 13-06-2026",
"filter": { "fromdate": "01-06-2026", "todate": "13-06-2026" }
}'

The response data is the new report row.

2. Wait for it​

curl https://api.onlytradeplatform.com/api/v1/reports \
-H "Authorization: Bearer $TOKEN"

When your report's status shows it's complete, note its request_id. If you have the WebSocket open, report_status tells you when it's done.

3. Download the file​

curl https://api.onlytradeplatform.com/api/v1/reports/file/<request_id> \
-H "Authorization: Bearer $TOKEN" \
--output statement.pdf

Delete a report with DELETE /api/v1/reports/{id}.