API and Claude connector
Your trades are yours. The API and the Claude connector let you log trades, add to the day journal, and read your trades, rules and statistics from your own tools. They are on every plan.
Tradeliftr reviews your own trades against your own rules. It does not give trading advice. The API and the connector give you the same figures the app shows, worked out by Tradeliftr from your trades as taken.
Keys
Make a key in the app under Account, then API keys (owners and admins). A key belongs to one journal and can either read, or read and write (log and change trades and journal entries). Keys never expire unless you choose an expiry date when you make them, and stop working the moment you revoke them. A key is shown once: keep it somewhere safe, like a password.
Calling the API
Send the key in the Authorization header on every request. Answers are JSON.
curl https://tradeliftr.trade-forex-with-paul.workers.dev/api/trades?period=month \ -H "Authorization: Bearer tlk_your_key"
curl https://tradeliftr.trade-forex-with-paul.workers.dev/api/trades \
-H "Authorization: Bearer tlk_your_key" \
-H "Content-Type: application/json" \
-d '{"instrument":"GBPUSD","direction":"long","entry":1.2650,"stop":1.2620,"target":1.2740,"exit_price":1.2710,"opened_at":"2026-11-20T09:30"}'
curl "https://tradeliftr.trade-forex-with-paul.workers.dev/api/stats/breakdown?by=session&from=2026-11-01&to=2026-11-30" \ -H "Authorization: Bearer tlk_your_key"
curl -o trades.csv https://tradeliftr.trade-forex-with-paul.workers.dev/api/export/trades.csv \ -H "Authorization: Bearer tlk_your_key"
Errors come back with a status code and {"error": "what went wrong, in plain words"}: 400 a value is wrong, 401 the key is missing, unknown, revoked or expired, 403 the key cannot do that (a read key trying to write), 404 there is no such item in your journal, 429 too many requests. Up to 600 requests a minute per key. Dates are in your journal's time zone (Settings). Times you send without a zone, such as 2026-11-20T09:30, are read in that zone; answers give times in that zone too.
Endpoints
| Method | Address | Key | What it does |
|---|---|---|---|
| GET | /api/me | any key | The workspace this key belongs to, its plan and time zone, and what the key may do. |
| GET | /api/trades | read | Search trades. Newest first. Answers the total and one page. Query: Trade filters (below), limit (1 to 100, default 25), offset, order (newest or oldest) |
| POST | /api/trades | write | Log a trade. Answers 201 with the trade. R and the outcome are worked out from the prices. Body: Trade fields (below); instrument and direction are required |
| GET | /api/trades/{id} | read | One trade with its exits, rule score per rule, screenshots and linked journal entries. |
| PATCH | /api/trades/{id} | write | Change a trade. Only the fields sent change; null clears a field. Body: Trade fields (below) |
| DELETE | /api/trades/{id} | write | Delete a trade. It can be brought back from the trade list for 30 days. |
| GET | /api/journal/{YYYY-MM-DD} | read | One trading day: journal entries in time order, the day notes and the trades taken that day. |
| POST | /api/journal | write | Add a journal entry. Answers 201 with the entry. Body: {"text": "...", "time": "2026-11-20T09:30" (optional, default now), "trade_id": 12 (optional)} |
| GET | /api/rules | read | Strategies and the rules in each. Query: strategy_id (optional) |
| GET | /api/stats/summary | read | Statistics for a period, worked out from the trades as taken, and the Lift Score. Query: Trade filters (below); default period all |
| GET | /api/stats/breakdown | read | Results split one way. Query: by (instrument, strategy, tag, weekday, hour, session, duration, direction, account, rule_score or month) and trade filters |
| GET | /api/stats/rule-cost | read | What breaking your rules cost: trades that met every rule against trades that broke one, and per rule. Free covers the last 30 days. Query: Trade filters (below) |
| GET | /api/export/trades.csv | read | Every trade matching the filters as a CSV file. Never limited by plan. Query: Trade filters (below) |
| GET | /api/media/{id} | read | A screenshot (PNG, JPEG or WebP) from this workspace. |
Trade filters
For /api/trades, the statistics and the CSV export (as query values), and for the Claude tools (as arguments). account, strategy and q also work in addresses, as in the app.
| Name | Type | Meaning |
|---|---|---|
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
Trade fields
For POST /api/trades, PATCH /api/trades/{id} and the log_trade and edit_trade tools. To save a trade you need the instrument, the direction, and either a result or an entry and exit. R, the outcome and the market are worked out by Tradeliftr.
| Field | Type | Meaning |
|---|---|---|
instrument required | text | Instrument, for example GBPUSD, XAUUSD, NAS100, ESZ6, BTCUSD, AAPL |
direction required | one of: long, short | |
status | one of: planned, open, closed | Default closed |
market | one of: forex, metal, index, future, crypto, share, other, or null | Worked out from the instrument when left out |
account_id | whole number, or null | Trading account id; defaults to the last one used |
strategy_id | whole number, or null | Strategy id (from list_rules) |
entry | number, or null | Entry price |
stop | number, or null | Stop price |
target | number, or null | Target price |
exit_price | number, or null | Exit price (one exit). For several part exits use exits. |
exits | list of object | Partials (part exits); replaces exit_price |
size | number, or null | Position size |
size_unit | one of: lots, contracts, shares, units, or null | |
opened_at | date and time, or null | When the trade was opened: 2026-11-20T09:30 in the workspace time zone, or with a zone such as 2026-11-20T09:30:00Z |
closed_at | date and time, or null | When the trade was closed, same form as opened_at |
fees | number, or null | Fees and commission in the account currency |
result | number, or null | P and L in the account currency (optional; R is worked out from the prices) |
notes | text, or null | Notes |
mood | one of: calm, confident, anxious, impatient, tired, frustrated, excited, or null | |
tags | list of text | Tags. Sending tags replaces all tags on the trade. |
rule_scores | object of boolean, or null | Rule ticks: {"<rule id>": true (met), false (broken) or null (not judged)}. Rule ids come from list_rules. |
Claude connector
Claude can use your journal directly: ask it to log the trade you just described, add to today's journal, or tell you how your London session trades went this month.
- In Tradeliftr, open Account, then API keys, and make a key. Choose read and write if Claude should log trades, or read if it should only look. Leave the expiry on never, so the connector keeps working.
- Copy the Claude connector address shown with the new key. It looks like
https://tradeliftr.trade-forex-with-paul.workers.dev/mcp/tlk_.... - The address holds your key, so treat it like a password and revoke the key if it leaks. Other tools can instead send the key in an
Authorization: Bearer tlk_...header tohttps://tradeliftr.trade-forex-with-paul.workers.dev/mcp, which keeps it out of addresses and logs. - In Claude, open Settings, then Connectors, then Add custom connector.
- Give it a name (for example Tradeliftr), paste the address, and leave authentication empty. Save.
The address contains the key, so treat it like a password. Revoke the key in Tradeliftr to cut Claude off at once. Tools that write show only for read and write keys. Tools can also be called with POST https://tradeliftr.trade-forex-with-paul.workers.dev/mcp and Authorization: Bearer tlk_... (JSON-RPC: initialize, tools/list, tools/call, ping; small batches are accepted). Every tool can also be run over plain HTTP: GET https://tradeliftr.trade-forex-with-paul.workers.dev/api/tools lists them and POST https://tradeliftr.trade-forex-with-paul.workers.dev/api/tools/<name> runs one, with the arguments as the JSON body.
Claude tools
export_csv returns up to about 100k characters and says when it was cut; the full file is at /api/export/trades.csv.
log_trade read and write key
Log a trade in this journal. Only instrument and direction are needed, plus either a result or an entry and exit; everything else is optional. R, the outcome and the market are worked out by Tradeliftr from the prices, never taken from you. Times without a zone are read in the workspace time zone.
| Argument | Type | Meaning |
|---|---|---|
instrument required | text | Instrument, for example GBPUSD, XAUUSD, NAS100, ESZ6, BTCUSD, AAPL |
direction required | one of: long, short | |
status | one of: planned, open, closed | Default closed |
market | one of: forex, metal, index, future, crypto, share, other, or null | Worked out from the instrument when left out |
account_id | whole number, or null | Trading account id; defaults to the last one used |
strategy_id | whole number, or null | Strategy id (from list_rules) |
entry | number, or null | Entry price |
stop | number, or null | Stop price |
target | number, or null | Target price |
exit_price | number, or null | Exit price (one exit). For several part exits use exits. |
exits | list of object | Partials (part exits); replaces exit_price |
size | number, or null | Position size |
size_unit | one of: lots, contracts, shares, units, or null | |
opened_at | date and time, or null | When the trade was opened: 2026-11-20T09:30 in the workspace time zone, or with a zone such as 2026-11-20T09:30:00Z |
closed_at | date and time, or null | When the trade was closed, same form as opened_at |
fees | number, or null | Fees and commission in the account currency |
result | number, or null | P and L in the account currency (optional; R is worked out from the prices) |
notes | text, or null | Notes |
mood | one of: calm, confident, anxious, impatient, tired, frustrated, excited, or null | |
tags | list of text | Tags. Sending tags replaces all tags on the trade. |
rule_scores | object of boolean, or null | Rule ticks: {"<rule id>": true (met), false (broken) or null (not judged)}. Rule ids come from list_rules. |
edit_trade read and write key
Change a trade by id. Only the fields given change; null clears a field. Sending tags replaces all tags. R and the outcome are worked out again from the prices.
| Argument | Type | Meaning |
|---|---|---|
id required | whole number | Trade id (from search_trades or log_trade) |
instrument | text | Instrument, for example GBPUSD, XAUUSD, NAS100, ESZ6, BTCUSD, AAPL |
direction | one of: long, short | |
status | one of: planned, open, closed | Default closed |
market | one of: forex, metal, index, future, crypto, share, other, or null | Worked out from the instrument when left out |
account_id | whole number, or null | Trading account id; defaults to the last one used |
strategy_id | whole number, or null | Strategy id (from list_rules) |
entry | number, or null | Entry price |
stop | number, or null | Stop price |
target | number, or null | Target price |
exit_price | number, or null | Exit price (one exit). For several part exits use exits. |
exits | list of object | Partials (part exits); replaces exit_price |
size | number, or null | Position size |
size_unit | one of: lots, contracts, shares, units, or null | |
opened_at | date and time, or null | When the trade was opened: 2026-11-20T09:30 in the workspace time zone, or with a zone such as 2026-11-20T09:30:00Z |
closed_at | date and time, or null | When the trade was closed, same form as opened_at |
fees | number, or null | Fees and commission in the account currency |
result | number, or null | P and L in the account currency (optional; R is worked out from the prices) |
notes | text, or null | Notes |
mood | one of: calm, confident, anxious, impatient, tired, frustrated, excited, or null | |
tags | list of text | Tags. Sending tags replaces all tags on the trade. |
rule_scores | object of boolean, or null | Rule ticks: {"<rule id>": true (met), false (broken) or null (not judged)}. Rule ids come from list_rules. |
get_trade read
One trade with its prices, R, result, rule score (each rule met, broken or not judged), tags, notes, screenshots and the day-journal entries linked to it.
| Argument | Type | Meaning |
|---|---|---|
id required | whole number | Trade id |
search_trades read
Find trades with filters (dates, instrument, account, strategy, tag, outcome, direction, status, rule score, text). Newest first unless order is oldest. Gives the total and one page of trades.
| Argument | Type | Meaning |
|---|---|---|
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
limit | whole number | Most trades to return (default 25, up to 100) |
offset | whole number | |
order | one of: newest, oldest |
add_journal_entry read and write key
Add an entry to the live trading-day journal: what the trader saw or thought, with the time. It goes on the day it falls in (workspace time zone). Optionally link it to a trade.
| Argument | Type | Meaning |
|---|---|---|
text required | text | The entry |
time | date and time, or null | When it happened; default now. 2026-11-20T09:30 in the workspace time zone, or with a zone. |
trade_id | whole number | Link it to this trade |
get_day read
One trading day: its journal entries in time order (with the trade each led to), the start and end of day notes, and the trades taken that day.
| Argument | Type | Meaning |
|---|---|---|
date | date, YYYY-MM-DD | The day, YYYY-MM-DD; default today in the workspace time zone |
list_rules read
The trader's own strategies and the rules written for each, with ids for rule_scores and filters.
| Argument | Type | Meaning |
|---|---|---|
strategy_id | whole number | Only this strategy |
stats_summary read
Statistics for a period, worked out by Tradeliftr from the trades as taken: win rate, total and average R, average win and loss, profit factor, expectancy, best and worst trade, runs, drawdown, P and L when entered, and the Lift Score (0 to 100, shown from 20 closed trades). Default period: all. Tradeliftr does not give trading advice.
| Argument | Type | Meaning |
|---|---|---|
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
stats_breakdown read
Results split one way: by instrument, strategy, tag, weekday, hour, session (Asia, London, New York in the workspace time zone), trade duration, direction, account, rule score or month. Each row has trades, win rate, total and average R, and money when entered. Tradeliftr does not give trading advice.
| Argument | Type | Meaning |
|---|---|---|
by required | one of: instrument, strategy, tag, weekday, hour, session, duration, direction, account, rule_score, month | |
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
rule_cost read
What breaking the trader's own rules cost: trades that met every rule against trades that broke at least one, the total the rule-breaking trades cost in R (and P and L when entered), and the same per rule, worst first. This is the result of trades as taken, not a forecast. The Free plan covers the last 30 days. Tradeliftr does not give trading advice.
| Argument | Type | Meaning |
|---|---|---|
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
export_csv read
Trades as CSV (the same columns as the full export, without the money columns when privacy mode is on), with filters. Long exports are cut to about 100k characters; the answer says so, and the whole file can be downloaded from Import and export or the API.
| Argument | Type | Meaning |
|---|---|---|
period | one of: week, month, 3m, year, all | week = last 7 days, month = last 30, 3m = last 91, year = last 365, all = everything. Ends today in the workspace time zone. from and to override it. |
from | date, YYYY-MM-DD | First day, YYYY-MM-DD, in the workspace time zone (inclusive) |
to | date, YYYY-MM-DD | Last day, YYYY-MM-DD (inclusive) |
account_id | whole number | Only this trading account |
strategy_id | whole number | Only this strategy (from list_rules) |
instrument | text | Only this instrument, for example GBPUSD or XAUUSD |
tag | text | Only trades with this tag |
outcome | one of: win, loss, breakeven | Only wins, losses or breakevens |
direction | one of: long, short | |
status | one of: planned, open, closed | |
rules | one of: all, broke, unscored | all = met every rule, broke = broke at least one, unscored = no rule score |
query | text | Text to look for in the instrument, notes and tags |
Tradeliftr reviews your own trades against your own rules. It does not give trading advice.