API Documentation

Integrate TradeLossMD analysis into your workflow. Upload tradebooks, get behavioral insights and psychology reports programmatically.

Authentication

All API requests require an API key sent in the X-API-Key header.

X-API-Key: tlmd_live_your_key_here

Create API keys from your Teams Dashboard. Keys start with tlmd_live_ (production) or tlmd_test_ (sandbox).

Rate Limits

PlanPer MinutePer MonthOverage
Teams Starter10 req/min500 req/moNot available
Teams Pro60 req/min2,000 req/moContact sales
EnterpriseCustomCustomNegotiable

Rate limit headers are returned on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Endpoints

POST/v1/analyze

Upload and analyze a tradebook CSV/Excel file

Params: multipart/form-data with file field
Response: { upload_id, status, message }
GET/v1/status/{upload_id}

Check processing status and get results

Params: upload_id in path
Response: { upload_id, status, analysis: { pnl_summary, behavioral, psychology, tdi_score } }
GET/v1/history

Get upload/analysis history

Params: ?limit=20&offset=0
Response: { items: [...], total, limit, offset }

Code Examples

curl -X POST "https://api.tradelossmd.com/v1/analyze" \
  -H "X-API-Key: tlmd_live_your_key_here" \
  -F "[email protected]"

# Poll for results
curl "https://api.tradelossmd.com/v1/status/{upload_id}" \
  -H "X-API-Key: tlmd_live_your_key_here"