TraderMemos
API 参考

Analytics

GET/api/v1/analytics/summary

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

application/json

curl -X GET "https://example.com/api/v1/analytics/summary"
{}
GET/api/v1/analytics/daily

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

curl -X GET "https://example.com/api/v1/analytics/daily"
Empty
GET/api/v1/analytics/behavior

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

application/json

curl -X GET "https://example.com/api/v1/analytics/behavior"
{}
GET/api/v1/analytics/equity-curve

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

curl -X GET "https://example.com/api/v1/analytics/equity-curve"
Empty
GET/api/v1/analytics/edge-score

Versioned 0-100 composite of win rate, profit factor, payoff, drawdown, recovery and consistency. Each component scales linearly to a documented full-marks threshold; score is null below min_trades closed trades. Drawdown is measured on trade P&L against the capital in the account.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

curl -X GET "https://example.com/api/v1/analytics/edge-score"
Empty
GET/api/v1/analytics/setup-scorecard

Scores each playbook setup on the filtered closed trades, grouped by the trade's main setup. Stats are in R when at least 60% of a setup's trades carry an initial risk (basis: r), else in account currency. ci_low / ci_high are a 95% interval on the mean; clean_mean excludes every trade the mistake tax charges (mistake tags, broken risk rules, revenge and oversized entries). verdict is one of edge, execution, promising, watch, unproven or bleeding. Trades with no setup come back as none.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

curl -X GET "https://example.com/api/v1/analytics/setup-scorecard"
Empty
GET/api/v1/analytics/mistake-tax

Prices the filtered closed trades that came from a mistake — a mistake tag, a broken risk rule (over max risk, past the daily loss limit, over the daily trade limit, past the losing-streak limit) or a detected revenge / overconfidence entry. total_cost counts each flagged trade's loss once; winners among them are reported as lucky_wins, never netted against the cost. sources total each reason (a trade counts under every reason it has). series trends the cost by week for ranges up to about three months, else by month, in market time. unreviewed_ids are losers with no flag and no note.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

from?string

RFC3339 start time

Formatdate-time
to?string

RFC3339 end time

Formatdate-time
tz?string

IANA timezone of the trader's market clock (e.g. America/New_York, Asia/Hong_Kong). Drives day / hour-of-day / weekday bucketing (defaults to UTC when omitted) and the trading-day comparison behind the duration filter (defaults to America/New_York when omitted). An unknown name returns 400. Session bucketing (Premarket / RTH / Afterhours) always uses the US-equity clock (Eastern), regardless of this parameter.

side?string

Keep only long or short trades. Omit for both.

Value in

  • "long"
  • "short"
duration?string

Keep only trades in one holding-period bucket, decided on the tz market clock (America/New_York when tz is omitted). swing closed on a later calendar day than it opened; scalp opened and closed the same day and was held under 600 seconds; day is any other same-day trade (including unknown time in trade). Open trades never match. Omit for all.

Value in

  • "scalp"
  • "day"
  • "swing"
date_basis?string

Which timestamp from / to (and daily bucketing) apply to: close uses closed_at, open uses opened_at. Omitted behaves as close for analytics.

Value in

  • "close"
  • "open"

Response Body

curl -X GET "https://example.com/api/v1/analytics/mistake-tax"
Empty
GET/api/v1/reviews/inbox

Closed trades with no execution grade (trade_quality) from the last window_days (default 14, max 90), newest first, as list trades. A trade counts as reviewed once it has a grade. backlog counts older ungraded trades that close after any dismissed cutoff.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

account_id?string

Account scope. Accepts a single account id, a comma-separated list, or the parameter repeated (portfolio mode). Multi-account scopes must share one base currency; mixed-currency selections return 400 mixed_currencies. Omit for all accounts.

window_days?integer
Range1 <= value <= 90

Response Body

curl -X GET "https://example.com/api/v1/reviews/inbox"
Empty
POST/api/v1/reviews/dismiss-backlog

Stops counting every ungraded trade older than the window (nothing is graded). Stored as the reviewBacklogCutoff preference.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

window_days?integer
Range1 <= value <= 90

Response Body

curl -X POST "https://example.com/api/v1/reviews/dismiss-backlog"
Empty