myTraderDash API (v1) Your myTraderDash workspace over HTTPS: an API key (Settings → API keys) works in its own workspace, sent as a bearer token with the workspace's id in X-Workspace-Id. An API key from Settings, as `Authorization: Bearer `. Its scopes: `read` (GET, and the routes that only read), `write` (POST, PUT, PATCH, DELETE); each operation lists the one it needs. Each line: the method, the path, what the key needs, what it does. An operation's parameters, body and answer: GET /v1/openapi.json (OpenAPI 3.1). health GET /v1/health (no key) Whether the API is up: the database, Redis, notifications and the background jobs, then the dash's own checks auth GET /v1/auth/me (read) Who is calling: the user, their workspace, and for a key or token what it is and its scopes openapi.json GET /v1/openapi.json (no key) This API's OpenAPI 3.1 description: the routes meant for use with an API key or through MCP openapi.txt GET /v1/openapi.txt (no key) The same routes as plain text, one line each (method, path, what the key needs, what it does), by area: short enough to read, or to give to an AI whole trades GET /v1/trades (read) The trades (fills, dividends, expiries, journals) as the broker reported them, newest first, paged POST /v1/trades (write) Adds one trade by hand to an account POST /v1/trades/option-close (write) Records how an open option position ended (expired, assigned or exercised): the rows a broker would write (the option closed at 0, and on assignment or exercise the shares bought or sold at the strike) GET /v1/trades/unallocated (read) The trades in no trade group, each with why (its category), paged, with a summary of the whole unallocated set (counts per category and each filter's values) GET /v1/trades/{id} (read) One trade by its id PATCH /v1/trades/{id} (write) Changes a trade's fields or tags DELETE /v1/trades/{id} (write) Deletes one trade POST /v1/trades/bulk-delete (write) Deletes these trades ({ tradeIds }) POST /v1/trades/bulk-tag (write) Adds and removes tags on these trades ({ tradeIds, addTags?, removeTags? }, at least one of the two) trade-groups GET /v1/trade-groups (read) Trades grouped into positions, open and closed, paged and sorted as the app's Grouped view, with the totals of the whole filtered set POST /v1/trade-groups (write) Groups these trades by hand into one position ({ buyTradeIds, sellTradeIds, dividendTradeIds?, ticker, tags?, broker?, sourceGroupIds? }), taking them out of the groups they were in GET /v1/trade-groups/ids (read) The ids of every trade group matching the Grouped view's filters (as GET /v1/trade-groups takes them), unpaged: for selecting the whole filtered set GET /v1/trade-groups/{id} (read) One trade group by its id: its trade ids, allocations, dates, prices and result PATCH /v1/trade-groups/{id} (write) Adds or removes a trade group's tags, or sets its broker DELETE /v1/trade-groups/{id} (write) Deletes a trade group; its trades go back to automatic grouping on the next regroup POST /v1/trade-groups/merge (write) Merges two or more trade groups into one manual group ({ groupIds }, 2 to 1000), with every trade of the merged groups POST /v1/trade-groups/{id}/unmerge (write) Undoes a manual group: its trades go back to automatic grouping (regrouped before the answer) POST /v1/trade-groups/{id}/unmerge-trade (write) Takes one trade out of a group ({ tradeId }) back to automatic grouping PUT /v1/trade-groups/{id}/confirmations/{code} (write) Confirms what a position's row asks (its confirmable list), by code: short_sale (the sale was a short sale) or uncovered (the sold call was uncovered) DELETE /v1/trade-groups/{id}/confirmations/{code} (write) Takes a confirmation back: the position's flag returns, and an open short made by short_sale is the sale with no buy again (regrouped before the answer) POST /v1/trade-groups/bulk-tag (write) Adds and removes tags on these trade groups ({ groupIds, addTags?, removeTags? }) POST /v1/trade-groups/bulk-unmerge (write) Undoes these manual groups ({ groupIds }, up to 1000): their trades go back to automatic grouping POST /v1/trade-groups/move-trade (write) Moves one trade into another group ({ tradeId, sourceGroupId?, targetGroupId }): both become manual accounts PUT /v1/accounts/order (write) Sets the order every account list follows ({ accountIds }: every account's id, first to last) GET /v1/accounts/sync-skips (read) The brokerage accounts the syncs leave out because they were deleted in the workspace while their login stays connected, newest first DELETE /v1/accounts/sync-skips/{id} (write) Syncs a left-out brokerage account again: the next sync creates it GET /v1/accounts (read) The workspace's brokerage accounts POST /v1/accounts (write) Adds an account ({ name, broker, type, currencies?, isClosed?, openedOn?, closedOn? }) GET /v1/accounts/{id} (read) One account, by its id PATCH /v1/accounts/{id} (write) Changes an account: its name, broker, type, currencies, open or closed and the dates, whether its open positions are watched DELETE /v1/accounts/{id} (write) Deletes an account and everything in it (trades, cash records, journal entries linked to it) DELETE /v1/accounts/{id}/trades (write) Deletes the account's trades and cash records and keeps the account, to start its imports over journal GET /v1/journal/entries (read) Every journal entry of the workspace POST /v1/journal/entries (write) Writes a journal entry GET /v1/journal/entries/{id} (read) One journal entry, by its id PUT /v1/journal/entries/{id} (write) Changes a journal entry DELETE /v1/journal/entries/{id} (write) Deletes a journal entry GET /v1/journal/templates (read) The journal's templates: the text a new entry starts from, and the tags that pick each one POST /v1/journal/templates (write) Adds a journal template ({ name, content, isDefault?, tagAssociations? }) GET /v1/journal/templates/{id} (read) One journal template, by its id PUT /v1/journal/templates/{id} (write) Changes a journal template DELETE /v1/journal/templates/{id} (write) Deletes a journal template GET /v1/journal/stories (read) The journal's stories: named threads that group entries (a theme, a strategy, an account), newest first POST /v1/journal/stories (write) Starts a story ({ name, description?, accountId?, tags? }): a named thread entries can join GET /v1/journal/stories/{id} (read) One story, by its id PUT /v1/journal/stories/{id} (write) Changes a story DELETE /v1/journal/stories/{id} (write) Deletes a story watchlist GET /v1/watchlist/open-positions (read) What the watched accounts hold (stocks and option contracts), as the generated Open and per-account watchlists: each row with its quote and its position per tab, the per-ticker alert settings, the accounts and the totals per tab, in the page currency (currency=USD|CAD, else the workspace's) GET /v1/watchlist/lists (read) The workspace's watchlists (named lists), each with its item count POST /v1/watchlist/lists (write) Makes a watchlist ({ name, description?, color?, sortOrder? }) GET /v1/watchlist/lists/{id} (read) One watchlist with its item count PUT /v1/watchlist/lists/{id} (write) Renames or reorders a watchlist (any of name, description, color, sortOrder) DELETE /v1/watchlist/lists/{id} (write) Deletes a watchlist and every item on it GET /v1/watchlist (read) The watched tickers and option contracts, newest first, each with its alerts and its latest quote POST /v1/watchlist (write) Watches a ticker or an option contract DELETE /v1/watchlist/bulk-delete (write) Stops watching up to 500 items at once ({ ids }) GET /v1/watchlist/{id} (read) One watched item with its alerts (no quote) PUT /v1/watchlist/{id} (write) Changes a watched item: its list, alert levels (null clears one; a changed level is armed again), reminders, channels, automation, notes DELETE /v1/watchlist/{id} (write) Stops watching an item GET /v1/watchlist/security/{securityId} (read) The watched item of a security (no quote) GET /v1/watchlist/check-security/{securityId} (read) Whether a security is on any watchlist POST /v1/watchlist/{id}/reset-alert (write) Arms a triggered alert again without changing its level ({ alertType: priceHigh | priceLow | yield }) POST /v1/watchlist/bulk (write) Adds up to 100 known securities (or option contracts) to a watchlist at once; ones already on it are skipped POST /v1/watchlist/simulate (write) Tests the alerts: checks every watched item of a ticker at a made-up price ({ ticker, price }), sending what would fire without marking it fired, and the open-position Swing % rule the same way workspace GET /v1/workspace/usage (read) The workspace's stored bytes and its limit GET /v1/workspace (read) The caller's workspace GET /v1/workspace/metadata (read) Every filter value in the workspace: its tickers, brokers, accounts, tags and trade types (cached up to 5 minutes) GET /v1/workspace/processing (read) The trade processing's state: since when it has been failing, when it last recovered, the tickers whose strategies weren't built, whether a broker sync didn't complete, whether a Recalculate is owed after grouping by hand, and the data version that changes whenever the workspace's figures do analytics GET /v1/analytics/trade-performance (read) The realized performance of the trade groups the Trade Log's filters select (dates, tickers, statuses, results, tags, accounts, sides, ranges…): P&L, dividends, wins and losses, averages, fees GET /v1/analytics/performance-report (read) As trade-performance, plus the same figures per year and per month (Performance Reports) GET /v1/analytics/portfolio-summary (read) The dashboard's cards: holdings value now, the period's realized P&L, all-time total P&L, the win rate, the best and worst performers, and the dividends per month GET /v1/analytics/today (read) One trading session of the accounts: the holdings value, the day's P&L (the session's fills included), the pre- / post-market move, what was realized, a row per security held or closed that session (with its option contracts and a 30-close trend), and the market indices GET /v1/analytics/today/history (read) The day's P&L of each of the last `sessions` (default 30) US sessions before the latest one, from stored closes, oldest first GET /v1/analytics/upcoming (read) What's coming up over the next `days` (up to 100): earnings, ex-dividend and payment dates (announced or expected; for a held stock the amount for the shares held now), option expirations (held and watched, in or out of the money against the last price), US and Canadian economic events, and market holidays, sorted by date GET /v1/analytics/portfolio-chart (read) The market value and cost of the shares held over time: month-end points (weekly for a range under ~400 days), then today at live prices GET /v1/analytics/pnl-history (read) P&L over time: realized P&L (all time, all instruments) and total P&L (realized + the unrealized P&L of what was held that day, at that day's stored closes; options at their own daily bars) by date: a point per weekday up to ~3 months, weekly up to ~400 days, month-ends beyond, then today live (equal to the Summary's Total and Realized P&L) GET /v1/analytics/positions (read) The shares held now per security (stock positions only, no prices), sorted by ticker GET /v1/analytics/income-stats (read) The dividends received, summed: the total and count, by year, by month, by security, by native currency and by ticker × year GET /v1/analytics/calendar-summary (read) The Events page's counts (trades, dividends, journal entries) and month-by-month realized P&L and dividends over the dates GET /v1/analytics/dividend-projections (read) The dividends to expect from the stocks held: each security's last dividend, frequency, next payment and annual projection, a portfolio summary and year-over-year growth POST /v1/analytics/tax-report (read) Estimates a year's (or a quarter's) tax on the accounts' realized gains and dividends: the lots, the dividends, the brackets, wash sales, transfers, foreign tax, and the flags to act on GET /v1/analytics/dividend-tax-settings (read) Every security the workspace received a dividend from, with the user's settings for how its dividends are taxed: per country (CA: eligible, non_eligible, ordinary; US: qualified, not_qualified) and per tax year or for every year PUT /v1/analytics/dividend-tax-settings (write) Sets how one security's dividends are taxed in one country's tax report ({ securityId, country, year?, treatment, qualifiedPercent? }): for every year, or for one tax year, which wins for that year GET /v1/analytics/year-end-values (read) The user's own values of option contracts on a day (their 1099-B, their broker's year-end statement), one year's with `year` or all PUT /v1/analytics/year-end-values (write) Sets what one option contract was worth on one day ({ securityId of the underlying, optionType, strike, expiration, optionRoot?, date, value, currency? }; value per share of the underlying, as quoted) GET /v1/analytics/tax-report/{reportId} (read) A tax report made earlier, by its reportId POST /v1/analytics/tax-report/compare (read) Compares a broker's T5008 (PDF, multipart field `pdf`) with the app's report for its year and the accounts: per-ticker gains, the differences and their likely causes POST /v1/analytics/tax-report/compare-gl (read) Compares a broker's gains & losses report (PDF, field `pdf`) for one account with the app's report: per-ticker gains in CAD and the differences POST /v1/analytics/tax-report/reconcile-trading-summary (read) Matches a broker's trading summary (PDF, field `pdf`) for one account with the app's trades, transaction by transaction: exact, price mismatch, or on one side only POST /v1/analytics/tax-report/compare-gl-csv (read) Compares a broker's gains & losses worksheet (CSV, field `csv`; TastyTrade's) with the app's report for its year and the accounts POST /v1/analytics/tax-report/compare-1099b (read) Compares the 1099-B of a broker's composite 1099 (PDF, field `pdf`) with the app's report for its year and the accounts POST /v1/analytics/tax-report/compare-1099div (read) Compares a broker's 1099-DIV (PDF, field `pdf`) for one account with the app's dividends: ordinary and return of capital, per ticker POST /v1/analytics/tax-documents/detect (read) Says what a tax document is (multipart field `file`: PDF, CSV or XLSX): its broker, type and account number, or why it isn't supported (the team is told about an unsupported one) GET /v1/analytics/securities/stats (read) A listing's stats with its same-company siblings (1–20 securityIds), all together: shares, cost, value, realized and unrealized P&L, dividends, win rate and averages, labelled with the first one's ticker GET /v1/analytics/tickers/batch-stats (read) Ticker stats for several tickers at once (?tickers=a,b), with the total value and capital invested across them GET /v1/analytics/tickers/performance-history (read) Each ticker's cumulative realized P&L (capital + dividends) by month, for the Compare chart strategies GET /v1/strategies (read) Every strategy the workspace's trade groups use, with its group counts, P&L and win rate in the display currency, highest total P&L first GET /v1/strategies/{strategyKey}/detail (read) One strategy (any case of its key): its totals, a page of its securities (page, pageSize ≤ 100, default 25) and the P&L of each of its groups over time events GET /v1/events (read) The calendar: trades, dividends, journal entries, market holidays, dividends to come, earnings, ex-dividend dates and economic events, newest first, filtered by type, dates, securities and accounts (limit ≤ 10000, default 1000; offset) GET /v1/events/tickers (read) The tickers followed on the calendar without being held or watched, with their reminders POST /v1/events/tickers (write) Follows a security on the calendar ({ securityId, earningsReminder?, exDividendReminder? }) PATCH /v1/events/tickers/{id} (write) Turns a followed ticker's earnings or ex-dividend reminder on or off DELETE /v1/events/tickers/{id} (write) Stops following a ticker on the calendar brokers GET /v1/brokers (read) The brokers myTraderDash supports: name, logo, countries, website, and what it handles for each (file import, sync, options, corporate actions) exports GET /v1/exports/trades (read) The trades and cash records (deposits, withdrawals, interest, fees, FX conversions, dividend withholding) as a file to download, which an import reads back: format csv (the default), json, xlsx, pdf or docx; filtered by accounts (accountIds) and dates (dateFrom, dateTo) GET /v1/exports/tax-report/{reportId} (read) A tax report made by the Tax page (its reportId, kept for a while after it was made) as an Excel workbook imports POST /v1/imports (write) Starts importing a broker's file into an account (multipart: `file`, `accountId`, `previewToken` from POST /v1/imports/preview to import exactly what it showed) PATCH /v1/imports/uploads/{uploadId} (write) Says which broker a file the preview couldn't read is from (`uploadId` from the preview's 400): `broker` is a broker's slug (GET /v1/brokers) or, for one that isn't listed, its name GET /v1/imports/status/{taskId} (read) How an import is going: waiting (for its turn), processing (with its stage), completed (with its result) or failed (with the error) GET /v1/imports/{importId}/enrichment-status (read) How far the background pricing of an import's open positions is (the import's job id), when its result had pricesMissing > 0 POST /v1/imports/api (write) Imports trades into an account: a JSON list of trades, or a broker's file (multipart: `file`, `accountId`, `broker`) POST /v1/imports/preview (write) Reads a broker's file without importing it (multipart: `file`, `accountId`): how many rows will be imported, skipped (and why) or need a look, the broker it recognized, and a `previewToken` that POST /v1/imports takes to import exactly these rows (15 minutes) stock-lists GET /v1/stock-lists (read) The workspace's own stock lists (the screener's), each with its count GET /v1/stock-lists/{id}/export (read) A stock list as CSV (Symbol, Exchange, Name), as a download notifications PUT /v1/notifications/positions/{securityId} (write) Mutes or unmutes the alerts of an open position, or sets its own price-swing threshold ({ muted?, swingThreshold? }, percent; null = the workspace's default) config GET /v1/config (read) The reference lists every client uses: account types (and in which country's tax report each is sheltered), currencies, markets, trade types, statuses, results and sides, dividend frequencies, tax countries and quarters, accounting methods archive GET /v1/archive/exports (read) The workspace's last 10 exports POST /v1/archive/exports (read) Starts an export of the whole workspace as one archive (a job); the passphrase given, else the stored one GET /v1/archive/exports/{id} (read) One export's run DELETE /v1/archive/exports/{id} (write) Deletes a finished export GET /v1/archive/exports/{id}/download (read) The finished archive (a zip; Range works)