Trading Journal API: From CSV Imports to TradeTally Analytics
See how TradeTally connects supported broker CSV imports with REST API access to trade fields, filters, full P&L data, expectancy, and profit factor.
A broker export can contain useful trading history, but a CSV file is not always the easiest format to query for a specific review. This article explains what TradeTally exposes after a supported CSV import: trade fields, filters through the REST API, and precomputed analytic summaries.
The focus is narrow and practical: which imported data can be queried, how to limit the records you examine, and where expectancy and profit factor fit into the available API surface.
Start with a supported broker CSV import
TradeTally supports CSV imports from Lightspeed, Schwab, thinkorswim, IBKR, Webull, E*TRADE, Tradovate, Questrade, TradeStation, tastytrade, and more. Start by identifying the broker export you want to bring into TradeTally and confirming that it is among the supported sources.
The important connection for programmatic access is straightforward: after import, trades are available through the REST API with full P&L fields. The supplied product facts establish the CSV import as the source and the REST API as the way to access the imported trades.
For context on preparing broker history and importing it without manual entry, see this guide to importing broker history into a trading journal. Keep the implementation discussion grounded in the documented surface rather than assuming additional broker connections or API actions.
For broader product context, review the TradeTally features page.
Inspect the trade fields available through the REST API
Before writing a query, make a field checklist for the review you want to perform. Each trade includes the following data:
- Broker
- Symbol
- Side
- Quantity
- Entry price
- Exit price
- Dates
- Tags
Imported trades are also available with full P&L fields. That gives your script a defined set of trade-level information to read when examining a selected portion of imported history.
The field list above is the concrete data surface described by the supplied facts. For exact field names, request details, and response details, use the TradeTally API Documentation. Do not assume a particular response format, authentication method, pagination behavior, or update operation unless the documentation confirms it.
Use the trading journal API to filter trades by your review question
The /api/trades endpoint supports filtering by date range, broker, symbol, and tag. This matters when the question is about a defined slice of imported history rather than every record at once.
- Date range: narrow the records to the period you are reviewing.
- Broker: separate records by broker when your imported history contains more than one source.
- Symbol: examine trades for one instrument.
- Tag: organize the query around tags included on each trade.
A practical discipline is to decide what question the query should answer before selecting a filter. For example, “How did trades tagged as opening-range setups perform during one month?” implies a date range and a tag. “What did I trade through one broker?” implies a broker filter. The documented facts do not establish additional filter combinations or query parameters, so verify those details in the API documentation.
Read precomputed analytics instead of calculating every summary yourself
TradeTally exposes precomputed analytic summaries through the API. The supplied facts specifically identify expectancy and profit factor as available summaries.
This means a programmatic review can distinguish between two types of data: individual trade records, such as symbol, quantity, prices, dates, tags, and full P&L fields; and higher-level summaries, including expectancy and profit factor.
The available facts do not specify how either metric is calculated, which other metrics may exist, or whether calculations can be customized. Treat expectancy and profit factor as documented outputs, and consult the related overview of broker CSV imports and TradeTally analytics for additional context.
A practical review sequence: import, filter, then read the summary
The documented capabilities can be organized into a small, verifiable sequence:
- Import a supported broker CSV into TradeTally.
- Use the REST API to access the imported trades.
- Query
/api/trades. - Apply a documented date-range, broker, symbol, or tag filter.
- Read the returned trade fields and full P&L fields, or use the available precomputed summaries such as expectancy and profit factor.
Here is a clearly hypothetical example. Suppose an imported file contains 240 trades, and a review is limited to the hypothetical date range of January 1 through January 31, the hypothetical symbol ES, and a hypothetical tag called “breakout.” If the filtered slice contains 18 trades, the useful output to inspect would include each trade’s broker, symbol, side, quantity, entry and exit prices, dates, tags, and full P&L fields. The API may also expose the documented precomputed expectancy and profit factor for the relevant analytic view; confirm the exact request and response behavior in the documentation.
The numbers in that example are illustrative only. They do not describe a TradeTally result, a user outcome, or a guaranteed response shape. Their purpose is to show how a defined review question can map to the documented filter categories and trade fields.
For a review-oriented example, read this article about building a weekly trading review with the TradeTally API. Before implementation, check the exact request and response details in the TradeTally API Documentation.
FAQ: Trading journal API questions about TradeTally CSV imports and analytics
Which broker CSV files can TradeTally import?
TradeTally supports CSV imports from Lightspeed, Schwab, thinkorswim, IBKR, Webull, E*TRADE, Tradovate, Questrade, TradeStation, tastytrade, and more. See this related guide to importing trade history into a trading journal for additional import context.
Can I access imported trades programmatically?
Yes. After import, trades are available through the REST API with full P&L fields.
What can I filter with /api/trades?
The endpoint supports filtering by date range, broker, symbol, and tag.
Which analytics are available through the API?
Precomputed analytic summaries including expectancy and profit factor are available through the API. Use the TradeTally API Documentation for implementation details and the current reference.
Ready to check the exact API surface for your imported data? Read the TradeTally API Documentation before building your query.