Skip to main content
Glama
florinel-chis

trading212-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
T212_ENVNoTarget environment: demo (paper trading) or live (real money)demo
T212_API_KEYYesAPI key (Basic auth username), generated in the Trading 212 app
T212_API_SECRETYesAPI secret (Basic auth password)
T212_MCP_ENABLE_TRADINGNoSet to true/1/yes/on to register the write toolsoff

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_account_summaryA

Get the account summary: cash breakdown, investments, and overall result.

Returns a dict with:

  • id: primary trading account number.

  • currency: ISO 4217 primary account currency; every monetary value below is denominated in it.

  • totalValue: total account value (cash plus investments).

  • cash: availableToTrade (free funds), reservedForOrders (held for pending orders), inPies (uninvested cash inside pies).

  • investments: currentValue, totalCost (cost basis of the current holdings), realizedProfitLoss (all-time realized P/L), unrealizedProfitLoss.

Rate limit: 1 request per 5 seconds.

list_exchangesA

List exchanges with working schedules trimmed to session open/close events.

Returns one entry per exchange: id, name (e.g. "NYSE"), and workingSchedules. Each schedule carries its id (instruments reference it via workingScheduleId) and events — the time events filtered down to OPEN and CLOSE (pre-market, after-hours, overnight, and break events are dropped). Event date values are ISO 8601 timestamps.

Rate limit: 1 request per 30 seconds (data refreshes server-side every 10 minutes).

list_instrumentsA

Search the tradable instrument universe.

The API returns the full universe (roughly 17,000 instruments) in one response with no server-side filtering, so search, instrument_type, and limit are applied client-side here.

Rate limit: 1 request per 50 seconds — strict. Every call fetches the whole universe, so batch your lookups into one broad search rather than issuing several calls in quick succession.

Returns per instrument: ticker (unique T212 identifier such as "AAPL_US_EQ"; may contain "/" like "BRK/A_US_EQ"), type, name, shortName (exchange symbol, may contain dots), isin, currencyCode (ISO 4217, except "GBX" — pence — for some LSE lines), maxOpenQuantity (fractional allowed), and extendedHours (whether it trades outside the regular session).

get_portfolioA

List all open positions in the account.

Returns up to limit positions, each with: ticker (Trading 212 identifier, e.g. "AAPL_US_EQ"), quantity (shares held, fractional allowed), averagePrice and currentPrice (per share, instrument currency), ppl (unrealized profit/loss, account currency), fxImpact (currency-conversion component of ppl, account currency; null when the instrument trades in the account currency), and initialFillDate (ISO 8601 timestamp the position was opened).

Rate limit: 1 request per 1 second.

get_positionA

Fetch a single open position by its Trading 212 ticker.

Returns the same trimmed fields as get_portfolio: ticker, quantity (shares, fractional allowed), averagePrice and currentPrice (per share, instrument currency), ppl (unrealized profit/loss, account currency), fxImpact (nullable, account currency), initialFillDate (ISO 8601). Errors if there is no open position for the ticker.

Rate limit: 1 request per 1 second.

list_ordersA

List all pending (not yet filled/cancelled/expired) equity orders.

Returns a list of order objects with: id, ticker (e.g. 'AAPL_US_EQ'), type (LIMIT|STOP|MARKET|STOP_LIMIT), side (BUY|SELL), status, quantity, filledQuantity, limitPrice/stopPrice (when applicable), timeInForce (DAY|GOOD_TILL_CANCEL), currency, extendedHours, createdAt. The API returns every pending order; limit truncates the list locally. Rate limit: 1 request per 5 seconds.

get_orderA

Fetch one pending equity order by its id.

Returns the order's id, ticker, type (LIMIT|STOP|MARKET|STOP_LIMIT), side (BUY|SELL), status, quantity, filledQuantity, limitPrice / stopPrice (when applicable), timeInForce, currency, extendedHours and createdAt. Responds HTTP 404 if no pending order has that id. Rate limit: 1 request per 1 second.

list_piesA

List all pies in the account with money-in, progress, and performance.

Returns a list of pie summaries: id (use with get_pie), cash (money put into the pie, in the account currency), progress (fraction of the goal reached, 0..1), status ("AHEAD" | "ON_TRACK" | "BEHIND"), dividendDetails (gained/inCash/reinvested), and result (invested value, absolute result, result coefficient, current value). The API returns all pies; the limit is applied after fetching. Rate limit: 1 request per 30 seconds.

get_pieA

Fetch one pie's full definition and per-instrument breakdown.

Returns the pie settings (id, name, icon, goal in account currency, creationDate, endDate, dividendCashAction, initialInvestment, instrumentShares as a ticker-to-weight map, publicUrl) plus an instruments list with each holding's ticker, ownedQuantity, currentShare vs expectedShare (weights, 0..1), result, and any issues (e.g. DELISTED, SUSPENDED) with severity. Raises HTTP 404 if the pie does not exist. Rate limit: 1 request per 5 seconds.

list_historical_ordersA

List executed (historical) equity orders, newest first.

Returns {"items": [...], "next_cursor": str | None}. Each item has an "order" part (id, ticker, type LIMIT|STOP|MARKET|STOP_LIMIT, side BUY|SELL, status, quantity, filledQuantity, limitPrice, stopPrice, timeInForce DAY|GOOD_TILL_CANCEL, currency, createdAt) and a "fill" part (filledAt, price, quantity, type e.g. TRADE, tradingMethod TOTV|OTC) plus a "walletImpact" with netValue and realisedProfitLoss in the account currency. Pass next_cursor back as cursor to fetch the next page; next_cursor is null on the last page. Rate limit: 6 requests per 1 minute.

list_dividendsA

List paid-out dividends.

Returns {"items": [...], "next_cursor": str | None}. Each item: ticker, paidOn (ISO 8601), amount (net, in the account currency), grossAmountPerShare (in the instrument currency), quantity (shares held), type (e.g. ORDINARY, INTEREST, CAPITAL_GAINS), reference. Pass next_cursor back as cursor for the next page; it is null on the last page. Rate limit: 6 requests per 1 minute.

list_transactionsA

List cash transactions (deposits, withdrawals, fees, transfers).

Returns {"items": [...], "next_cursor": str | None}. Each item: type (WITHDRAW | DEPOSIT | FEE | TRANSFER), amount (in the transaction currency), currency, dateTime (ISO 8601), reference (transaction ID). Unlike the other history endpoints the cursor here is a string, not a number. Pass next_cursor back as cursor for the next page; it is null on the last page. Rate limit: 6 requests per 1 minute.

list_exportsA

List requested CSV export reports and their processing status.

Returns {"items": [...]} where each report has: reportId, timeFrom, timeTo, dataIncluded (the four include* flags), status, downloadLink (populated once the report is finished). Status values are Mixed-Case, not upper-case: "Queued", "Processing", "Running", "Canceled", "Failed", "Finished". Poll this after request_export until the report's status is "Finished", then fetch the CSV from downloadLink. Rate limit: 1 request per 1 minute.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/florinel-chis/trading212-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server