Trading & Capital Markets
Trading Journal Analytics API
Most retail traders lose money through a small number of repeated behaviours. Showing them which ones, with their own numbers, is one of the few genuinely pro-client features a broker can ship.
- Brokers
- Prop firms
- Trading terminals
- Trading journal apps
What your customers would see
example interfaceMockupIllustrative mockup of the interface we would build. Figures shown are examples, not results from a live deployment.
The problem this solves
The patterns are remarkably consistent across retail books: holding losers far longer than winners, increasing size immediately after a loss, trading heavily in the hours around a loss, abandoning a strategy after two bad trades, and concentrating risk in one instrument during drawdown. Each is measurable from closed-trade data that you already store.
Almost nobody surfaces it. The trade history screen on a typical platform is a ledger — rows of fills with a P&L column. It records what happened without ever telling the trader what it means.
There is a commercial argument alongside the ethical one. Traders who understand their own mistakes survive longer, and a longer-lived account is worth more than a fast-churning one. For prop firms the case is even more direct: behavioural scoring is a leading indicator of which funded traders will breach their risk limits.
Who buys this
Brokers, Prop firms, Trading terminals, Trading journal apps
What the API returns
What comes back
- Trade quality scoring independent of whether the trade was profitable
- Detected behavioural patterns with the measured cost of each in the trader's own currency
- Win rate, expectancy and payoff ratio by instrument, session and holding period
- Risk consistency analysis across position sizes
- Revenge-trading and over-trading detection with time clustering
- Drawdown behaviour: what the trader does differently while losing
- Peer benchmarking against anonymised cohorts of similar accounts
- A prioritised list of the few changes with the largest expected effect
Endpoints
| Method | Path | Returns |
|---|---|---|
| POST | /v1/analyse | Analyse a batch of closed trades for one account |
| GET | /v1/accounts/{id}/summary | Current behavioural profile for an account |
| GET | /v1/accounts/{id}/patterns | Detected patterns with measured cost |
| GET | /v1/accounts/{id}/benchmark | Comparison against an anonymised peer cohort |
| GET | /v1/accounts/{id}/risk-flags | Early warning flags for prop-firm risk teams |
| POST | /v1/cohorts | Define peer cohorts for benchmarking |
Request and response
illustrativeRequest
{
"account_id": "acct_88213",
"period": { "from": "2026-07-01", "to": "2026-10-21" },
"benchmark_cohort": "funded_50k",
"currency": "USD"
}Response
{
"account_id": "acct_88213",
"trades_analysed": 318,
"quality_score": 54,
"expectancy_per_trade": -2.14,
"patterns": [
{
"pattern": "losers_held_longer",
"confidence": 0.94,
"detail": "Median losing trade held 4.1x longer than median winner",
"estimated_cost": -3840.20
},
{
"pattern": "size_increase_after_loss",
"confidence": 0.81,
"detail": "Position size rises 62% on the trade following a loss",
"estimated_cost": -2110.65
}
],
"benchmark": { "cohort": "funded_50k", "quality_percentile": 31 },
"risk_flags": [
{ "flag": "drawdown_size_escalation", "severity": "high" }
],
"recommendations": [
"Apply a fixed maximum holding period to losing positions",
"Cap position size for the first trade after any loss"
]
}Where the data comes from
| Your closed-trade records | Entry, exit, size, instrument, timestamps and P&L — data you already store |
| Your price history | Needed to evaluate exit quality against what the market subsequently did |
| Account metadata | Account tier, funding level and experience, used for cohort construction |
| Session and instrument reference data | So behaviour is analysed against the right trading session |
| Anonymised cohort aggregates | Built from your own book to make peer benchmarking meaningful |
| Optional platform event logs | Login and screen-view timing, which sharpens over-trading detection |
The intelligence layer
The difference between a demo and a service is mostly in this section. These are the parts that keep the answer trustworthy once real traffic is hitting it.
- Behavioural pattern detection with explicit statistical tests rather than threshold rules
- Counterfactual cost estimation: what the account would have made had the pattern not been present
- Trade quality scored on process rather than outcome, so a lucky bad trade still scores poorly
- Clustering to identify trader archetypes within your book
- Cohort construction with minimum sizes so benchmarks cannot identify individuals
- Early-warning models for prop-firm limit breaches, validated against actual historical breaches
- Confidence reporting on every detected pattern, with suppression below a sample threshold
- Separation of skill from variance, so a short profitable streak is not read as competence
What it changes for the business
Account longevity
Traders who understand their own failure modes survive longer, and a longer account life is worth more than fast churn.
Prop-firm risk control
Behavioural flags identify funded traders heading for a breach before equity shows it.
Genuine differentiation
Very few retail platforms offer real behavioural analysis, and it is hard to copy quickly.
Support and education targeting
You can direct educational content at the specific mistake an account is actually making.
How it fits into your product
How it embeds
- REST endpoints returning JSON for your own analytics screens
- Prebuilt journal components if you would rather not build the UI
- Batch processing for overnight analysis across your whole book
- Webhooks pushing risk flags into prop-firm monitoring systems
- Deployment inside your infrastructure where trade data cannot leave
- Per-tier entitlements so deeper analysis can sit behind a premium plan
Included in every build
- Authentication, scoped API keys and per-customer rate limiting
- Input validation with predictable, documented error responses
- Versioned endpoints so your integration never breaks without notice
- Request and response logging for audit and dispute resolution
- Latency, error-rate and usage monitoring with alerting
- OpenAPI specification, sandbox environment and client examples
- Backups, failover design and a documented recovery procedure
- An agreed support arrangement once the service is live
How we would build it
about 12 weeksDiscovery and data review
Weeks 1–2
We agree the exact question the API answers, review the sources you already hold, check what has to be licensed, and write down the response contract your developers will code against.
Architecture and prototype
Weeks 3–4
You get a written architecture plus a working endpoint on real data — narrow, but genuinely callable — so integration can be tested against something concrete rather than a document.
Production build
Weeks 5–10
Pipelines, models, storage, authentication, rate limiting, logging, tests and documentation. Security and observability are part of this phase, not a later one.
Integration and handover
Weeks 11–12
We support your engineers through their integration, run load tests at your expected volume, and agree how the service is monitored and supported once it is live.
Commercial models
There is no fixed price list, because the cost is driven by data complexity, integration count, model requirements, request volume and the support level you need. Scope is agreed in writing before development starts.
Fixed-scope prototype
A defined slice of the service, built and priced as one piece of work. The usual first step when the business case needs proving internally.
Fixed-price build
An agreed scope against a written architecture, delivered for an agreed price. Best when the requirements are already clear.
Build then retainer
We build the service, then operate and improve it under a monthly agreement covering monitoring, updates and model maintenance.
White-label product
The service runs under your brand, your domain and your pricing, with MLPivot invisible to your customers.
Questions buyers ask
Does this encourage more trading?
It should not, and we would not build it that way. Most of what the analysis surfaces argues for trading less and more deliberately. If you want a feature engineered to increase trade frequency, this is the wrong one, and we would say so rather than quietly reframing it.
How many trades before the analysis is meaningful?
Roughly thirty closed trades for basic patterns, and a hundred or more for reliable behavioural detection. Below those thresholds the API returns low confidence explicitly rather than guessing.
Can we use it for prop-firm risk management?
Yes, and it is one of the strongest uses. Behavioural escalation during drawdown is a measurable leading indicator of limit breaches, usually visible before the equity curve makes it obvious.
Is trade data sent to you?
Only if you choose a hosted deployment. For most brokers and prop firms we deploy inside your own environment so closed-trade records never leave your infrastructure.
How is the cost of a pattern estimated?
By counterfactual: we re-evaluate the same trades with the behaviour removed — for example capping holding time at the median winner — and report the difference. It is an estimate, bounded by what the price history can tell us, and we present it as such.
Related blueprints
Market Sentiment & Positioning API
Aggregated sentiment and positioning estimates by instrument, delivered as a feed your platform can display or trade against.
Portfolio Risk Analytics API
Stress tests, factor exposure and concentration analysis returned as an API your wealth or brokerage platform can display.
Forex Technical Analysis API
Chart patterns, support and resistance levels and trade setups, delivered as a white-label research module for your trading platform.
Want this built for your platform?
Tell us what your product does today and what you want another system to be able to ask it. We will come back with an approach, a scope and a price.