Trading Journal API
HTTP API for connecting backtesters, importers, and scripts to your journal. Create a key in Settings, then call /api/v1/*.
Auth
- Open Settings → API & Integrations (or API Keys from the account menu).
- Create a key and copy it once — it is only shown at creation time.
- Send it on every request:
Authorization: Bearer ftw_...Keys can optionally be restricted to a single account. Scopes default to full read/write.
Base URL
https://journal.financialtechwiz.com/api/v1Use this as $BASE in the examples below. CORS is open on /api/v1/*.
Endpoints
GET /accounts
List accounts available to this key.
curl -H "Authorization: Bearer $FTW_API_KEY" \
"https://journal.financialtechwiz.com/api/v1/accounts"POST /accounts
Create a journal account (e.g. one per backtest). name / description become the default public store title/bio when you publish.
{
"name": "Mean Reversion BT 2024-06",
"description": "SPY 15m mean reversion"
}PATCH /accounts/:id
Update account fields. Shared public listings sync title/bio from name/description.
POST /shared-journals
Publish an account to the public store/leaderboard. Omit displayName/bio to use the account name and description.
{ "accountId": "<uuid>" }GET /trades
Query params: accountId, from, to, symbol, status (open|closed), source, limit (max 2000), offset.
curl -H "Authorization: Bearer $FTW_API_KEY" \
"https://journal.financialtechwiz.com/api/v1/trades?status=closed&from=2024-01-01&limit=100"POST /trades
Create one trade, or batch-import many.
Single trade
{
"accountId": "<optional>",
"source": "my-backtester",
"externalId": "run42-trade-7",
"symbol": "AAPL",
"assetType": "stock",
"side": "long",
"openedAt": "2024-06-01T14:30:00.000Z",
"closedAt": "2024-06-03T15:00:00.000Z",
"entryQty": 100,
"entryPrice": 190.5,
"entryFees": 1.0,
"exitQty": 100,
"exitPrice": 195.25,
"exitFees": 1.0,
"notes": "Breakout continuation"
}Batch (recommended for backtests)
{
"accountId": "<optional>",
"source": "my-backtester",
"trades": [
{
"externalId": "run42-trade-1",
"symbol": "SPY",
"assetType": "etf",
"side": "long",
"openedAt": "2024-01-02T15:00:00.000Z",
"closedAt": "2024-01-05T15:00:00.000Z",
"entryQty": 10,
"entryPrice": 470.0,
"exitQty": 10,
"exitPrice": 475.5
}
]
}Dedup: when both source and externalId are set, a repeat POST returns the existing trade (created: false). Safe to re-run imports. P/L, win/loss, and days in trade are computed server-side.
GET /trades/:id
Fetch one trade including executions and legs.
PATCH /trades/:id
Partial update (notes, tags, flat entry/exit fields, dates, accountId, etc.).
curl -X PATCH -H "Authorization: Bearer $FTW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"notes":"Updated thesis"}' \
"https://journal.financialtechwiz.com/api/v1/trades/<tradeId>"DELETE /trades/:id
Delete a trade.
POST /trades/:id/executions
Add an entry/exit fill and recalculate aggregates. Use this to close or partially exit an open trade.
{
"type": "exit",
"executedAt": "2024-06-03T15:00:00.000Z",
"quantity": 50,
"price": 210,
"fees": 0
}PATCH /executions/:id
Edit a fill; returns the updated execution and parent trade.
DELETE /executions/:id
Delete a fill and recalculate the parent trade.
GET /equity
Query params: accountId, from, to.
POST /equity
Upsert one day or a batch:
{
"accountId": "<optional>",
"equity": [
{ "date": "2024-01-02", "netLiq": 100000 },
{ "date": "2024-01-03", "netLiq": 100420 }
]
}DELETE /equity
Delete by id, date, or all=true with accountId.
Backtester integration recipe
- Create an API key (optionally scoped to a “Backtests” account).
- Resolve
accountIdviaGET /accountsif needed. - After each backtest run,
POST /tradeswith a fixedsource(e.g."quantconnect") and a stableexternalIdper trade. - Optionally push daily equity via
POST /equity. - Re-running the same export is idempotent when source + externalId are set.
Enums
assetType: stock | option | callOption | putOption | etf | crypto | forex | futures | other
side: long | short | call | put | longCall | longPut | shortCall | shortPut
MCP server
For Cursor or Claude, a thin MCP wrapper lives in the mcp/ folder of the project. Point it at this same API with your key:
{
"mcpServers": {
"ftw-journal": {
"command": "node",
"args": ["<path-to-repo>/mcp/src/index.js"],
"env": {
"FTW_API_KEY": "ftw_your_key_here",
"FTW_API_BASE": "https://journal.financialtechwiz.com/api/v1"
}
}
}
}