Trading Journal API: Build a Weekly Trading Review with TradeTally

Build a repeatable weekly trading review using TradeTally API data: analytics, diary entries, trade setup tags, P&L, and edge report statistics.

Trading Journal API: Build a Weekly Trading Review with TradeTally

A weekly trading review gets messy when performance, trade notes, and setup statistics live in separate places. This guide shows a practical way to assemble a repeatable review from available TradeTally API data without turning the report into trade recommendations.

The goal is simple: define the week, pull the supported data areas, and present them in the same order every time. For endpoint reference while you build, keep the TradeTally API Documentation nearby.

Start with the weekly review question before calling the API

Before you write code, decide what the weekly review is supposed to answer. For a systematic trader or developer, a useful starting question is: what happened this week across performance, setups, and diary context?

Use one review period for the whole report, such as the prior trading week. Keep that date range visible in the report header so every section can be checked against the same period where date filtering applies.

In TradeTally, this review can be framed around three supported data areas. The /api/analytics endpoint returns weekly and monthly performance breakdowns. Trade records include setup tags, diary entries linked by date, and P&L per trade. Diary entries are accessible via /api/diary and can be filtered by date range.

That is enough to create a compact weekly summary. It is not a signal engine, recommendation system, or market forecast. Treat the output as a review input only.

Create a read-only API key for external reporting

If the weekly report will be generated by an external script, dashboard, or reporting tool, start by creating an API key. TradeTally API key permissions can be scoped to read-only for external reporting tools.

For reporting, read-only access is the conservative default. The reporting job needs to retrieve information for the review, not change journal data.

Create the key from TradeTally API keys, then store it according to your own security standards. Avoid hard-coding keys into shared notebooks, public repositories, or files that are passed around with the report.

Use the trading journal API to pull weekly and monthly performance

Start the report with the highest-level numbers. The /api/analytics endpoint returns weekly and monthly performance breakdowns, so it is the natural source for the first two sections of the review.

The weekly section should show the result for the review week. The monthly section should sit immediately after it, so the same report can show the week beside the broader monthly breakdown returned by the endpoint.

Keep this part narrow. Do not add unsupported calculations and present them as TradeTally metrics. If you compute anything outside the API response, label it as your own derived calculation.

Hypothetical analytics section

Here is a simple example using hypothetical numbers. The exact formatting is up to your reporting layer, but the structure should stay stable from week to week.

SectionPeriodHypothetical value
Weekly performanceMay 6 to May 10+$1,250
Monthly performanceMay+$3,400

This table does not make a decision for the trader. It simply places the weekly performance breakdown beside the monthly performance breakdown so the review starts with a consistent summary.

After the top-level performance summary, add the trade-level detail. TradeTally trade records include setup tags, diary entries linked by date, and P&L per trade.

For a weekly review, the trade table can list each trade’s setup tag and P&L. Where diary context exists for the date, include it beside the trade or reference it in a separate diary section.

Setup tags are useful because they let the review group trades by the way they were categorized, rather than only by the ticker or date. For more context on setup-based review, read Trading Setup Tags: Why They Matter More Than Tracking More Indicators.

Hypothetical trade-level table

DateSetup tagP&L per tradeDiary context
May 6Opening range+$420Diary entry linked by date
May 7Pullback-$180Diary entry linked by date
May 9Breakout+$310No note shown in this example

The numbers above are hypothetical. The important part is the repeatable structure: date, setup tag, P&L per trade, and any diary context linked by date.

Pull diary entries for the same date range

Next, call /api/diary for the review period. Diary entries are accessible via /api/diary and can be filtered by date range, which makes them a clean fit for a weekly report.

Use diary entries as qualitative context beside the numerical performance summary. A diary note may explain what the trader observed, what was distracting, or what was documented that day, but the report should not convert that note into advice.

A simple diary section might show the date and note text. If your report also includes trade records, you can place diary notes near trades from the same date because trade records include diary entries linked by date.

Use the edge report endpoint for setup-level statistics

Once the report has performance, trades, and diary notes, add setup-level statistics. The edge report endpoint surfaces setup-level win rates, profit factors, and sample counts.

Show sample counts beside win rates and profit factors. A setup statistic without the size of the sample can be easy to overread, so keep the count visible in the same table.

For a deeper discussion of setup-level review, see Trading Edge Report: Turn Setup Data Into One Weekly Action Item.

Hypothetical setup review table

Setup tagWin rateProfit factorSample count
Opening range60%1.815
Pullback45%0.911
Breakout55%1.320

These are hypothetical numbers for illustration only. The review should present setup-level win rates, profit factors, and sample counts as observations, not as instructions for future trades.

Assemble the weekly trade summary into a repeatable format

Once the data pieces are defined, make the report order predictable. A stable weekly format helps systematic traders and developers compare the same categories over time without redesigning the review every Friday.

  1. Weekly performance: use the weekly performance breakdown from /api/analytics.
  2. Monthly performance: include the monthly performance breakdown from /api/analytics.
  3. Trade-level detail: list setup tags and P&L per trade from trade records.
  4. Diary entries: pull entries from /api/diary for the same date range.
  5. Setup-level statistics: include win rates, profit factors, and sample counts from the edge report endpoint.

This order keeps the review moving from broad to specific. It starts with performance, adds trade context, brings in diary notes, and ends with setup-level statistics.

If you are exploring broader API-based journal workflows, the related article TradeTally trading journal API: From CSV imports to programmable trade analytics is a useful companion read.

Add guardrails before sharing the report

Before sending the weekly report to yourself, a team, or an external archive, check the basics. Confirm that the report sections are aligned to the same review period where applicable, especially the diary entries filtered by date range.

Confirm that the API key used by the reporting tool is read-only. TradeTally API key permissions can be scoped to read-only for external reporting tools, which fits this use case.

Also check your language. Weekly results, win rates, profit factors, setup tags, P&L, and diary notes should be presented as review data. Avoid writing the report as financial advice or as a prediction about what should happen next.

FAQ: Building a weekly trading review with the TradeTally API

Which endpoint returns weekly performance?

The /api/analytics endpoint returns weekly and monthly performance breakdowns. Use it for the performance sections of the weekly review.

Can I use a read-only key for my reporting tool?

Yes. API key permissions can be scoped to read-only for external reporting tools. You can create a key at TradeTally API keys.

Can diary notes be included in the weekly review?

Yes. Diary entries are accessible via /api/diary and can be filtered by date range. Use the same review dates you defined for the weekly report.

What setup-level stats can I include?

The edge report endpoint surfaces setup-level win rates, profit factors, and sample counts. Display the sample count beside the other setup statistics so the table includes context.

Does this weekly review provide trade recommendations?

No. The report described here is a structured review of available TradeTally data. It should not be treated as financial advice.

Ready to connect an external reporting tool? Create a scoped reporting key from TradeTally API keys and build your weekly review around the supported API data.

Subscribe to TradeTally Blog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe