Skip to main content
Glama
KyuRish

trading212-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ENVIRONMENTNoAPI environment: 'live' or 'demo'demo
TRADING212_API_KEYYesTrading 212 API key from Settings > API (Beta)
TRADING212_API_SECRETYesTrading 212 API secret from Settings > API (Beta)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
fetch_account_info

Retrieve account metadata such as the currency and unique account identifier.

fetch_account_cash

Get a detailed breakdown of your account balance, including available cash, invested capital, P/L, and blocked funds.

fetch_all_open_positions

Retrieve your current holdings with live prices, quantities, cost basis, and unrealised gains for every position.

search_specific_position_by_ticker

Look up a single position by its ticker symbol to get real-time details on that specific holding.

fetch_all_orders

List all active equity orders (limit, stop, stop-limit) that are waiting to be filled.

fetch_order

Retrieve a single pending order by ID, showing its current status, fill progress, and price parameters.

place_market_order
Execute a market order at the current price for the given instrument.

Args:
    ticker: Instrument ticker to trade (e.g., 'AAPL_US_EQ')
    quantity: Number of shares to trade. Use a positive value to buy, negative to sell.

Returns:
    Order: The newly created order with its initial status
place_limit_order
Submit a limit order that executes only when the instrument reaches your target price.

Args:
    ticker: Instrument ticker to trade (e.g., 'AAPL_US_EQ')
    quantity: Number of shares to trade
    limit_price: Maximum price you are willing to pay (buy) or minimum to accept (sell)
    time_validity: How long the order stays active. Options: DAY, GOOD_TILL_CANCEL

Returns:
    Order: The newly created limit order
place_stop_order
Submit a stop order that triggers a market execution once the instrument hits the specified stop price.

Args:
    ticker: Instrument ticker to trade (e.g., 'AAPL_US_EQ')
    quantity: Number of shares to trade
    stop_price: Trigger price that activates the order
    time_validity: How long the order stays active. Options: DAY, GOOD_TILL_CANCEL

Returns:
    Order: The newly created stop order
place_stop_limit_order
Submit a combined stop-limit order: once the stop price is hit, a limit order
is placed at your specified limit price instead of executing at market.

Args:
    ticker: Instrument ticker to trade (e.g., 'AAPL_US_EQ')
    quantity: Number of shares to trade
    stop_price: Trigger price that activates the limit order
    limit_price: Price at which the resulting limit order will be placed
    time_validity: How long the order stays active. Options: DAY, GOOD_TILL_CANCEL

Returns:
    Order: The newly created stop-limit order
cancel_order

Remove a pending order from the book. This cannot be undone once executed.

fetch_pies

List all your pies with their cash balances, dividend info, goal progress, and investment performance.

fetch_a_pie

Get full details for a single pie including every instrument allocation, current settings, and per-instrument results.

create_pie
Build a new pie with the given instruments and weights.

Args:
    name: Display name for the pie
    instrument_shares: Mapping of instrument tickers to their target weights
        (e.g., {'AAPL_US_EQ': 0.5, 'MSFT_US_EQ': 0.5})
    dividend_cash_action: What to do with dividends - REINVEST or TO_ACCOUNT_CASH
    end_date: Optional target end date in ISO 8601 format
        (e.g., '2025-12-31T23:59:59Z')
    goal: Target total value for the pie in your account currency
    icon: Identifier for the pie icon

Returns:
    PieDetails: Full details of the newly created pie
update_pie
Modify an existing pie's configuration. You must provide a new name when updating.

Args:
    pie_id: Numeric ID of the pie to modify
    name: Updated name for the pie (required by the API)
    instrument_shares: New ticker-to-weight mapping
        (e.g., {'AAPL_US_EQ': 0.5, 'MSFT_US_EQ': 0.5})
    dividend_cash_action: Updated dividend handling - REINVEST or TO_ACCOUNT_CASH
    end_date: Revised end date in ISO 8601 format
        (e.g., '2025-12-31T23:59:59Z')
    goal: Revised target value in account currency
    icon: Updated icon identifier

Returns:
    PieDetails: The pie after applying your changes
duplicate_pie
Clone an existing pie into a new one with identical instrument allocations.

Args:
    pie_id: ID of the source pie to copy
    name: Optional custom name for the clone
    icon: Optional icon for the clone

Returns:
    PieDetails: Full details of the newly cloned pie
delete_pie

Permanently remove a pie. Instruments inside it become standalone positions in your portfolio.

search_instrument
Look up tradeable instruments, with optional filtering by ticker or name.

Args:
    search_term: Case-insensitive text to match against ticker symbols
        and instrument names. Omit to return every available instrument.

Returns:
    List of instruments matching the search, or the full catalogue if
    no search_term is given
search_exchange
Look up exchanges, with optional filtering by name or numeric ID.

Args:
    search_term: Case-insensitive text to match against exchange names,
        or an exact numeric exchange ID. Omit to return all exchanges.

Returns:
    List of matching exchanges, or every exchange if no filter is applied
fetch_historical_order_data

Retrieve past orders (filled, cancelled, rejected) along with their execution details and timestamps.

fetch_paid_out_dividends

Retrieve dividend payouts you have received, including per-share amounts, payment dates, and totals.

fetch_exports_list

Get a list of all previously generated CSV account exports with their status and download links.

request_csv_export
Queue a CSV export of your account history. When finished, the download
link appears in the exports list.

Args:
    include_dividends: Add dividend records to the export. Defaults to True.
    include_interest: Add interest records to the export. Defaults to True.
    include_orders: Add order history to the export. Defaults to True.
    include_transactions: Add deposit/withdrawal records. Defaults to True.
    time_from: Start of the reporting window in ISO 8601
        (e.g., '2024-01-01T00:00:00Z')
    time_to: End of the reporting window in ISO 8601
        (e.g., '2024-12-31T23:59:59Z')

Returns:
    EnqueuedReport: Confirmation with the report ID for tracking
fetch_transaction_list

Retrieve account movements such as deposits, withdrawals, fees, and internal transfers with pagination support.

fetch_portfolio_summary
Produce a full portfolio snapshot in one call.

Pulls account info, cash balance, and every open position, then
calculates totals and ranks holdings by value.

Returns:
    dict with keys: currency, total_value, cash_available, invested,
    profit_loss, profit_loss_pct, position_count, positions (by value
    descending), top_holdings (top 5)
fetch_portfolio_performance
Build a performance report across all positions.

Gathers current holdings, recent order history, and dividend payouts
to calculate per-position returns and identify top/bottom performers.

Returns:
    dict with keys: currency, total_price_ppl, total_dividends,
    total_return, best_performer, worst_performer, positions
    (with individual P/L and dividends), recent_filled_orders
fetch_dividend_summary
Analyse your dividend income history.

Collects up to 200 dividend records and breaks them down by ticker
and by calendar month to reveal income trends.

Returns:
    dict with keys: currency, total_dividends, dividend_count,
    average_monthly, by_ticker (highest first), by_month (chronological)
fetch_recent_activity
Get a unified timeline of recent trades and account movements.

Merges order history with deposit/withdrawal transactions into a
single chronologically sorted feed.

Args:
    limit: How many items to pull from each source (capped at 50, default 20)

Returns:
    dict with keys: currency, activity (merged and sorted newest-first,
    each entry tagged as 'order' or 'transaction'), order_count,
    transaction_count

Prompts

Interactive templates invoked by user choice

NameDescription
analyse_trading212_dataBuild a context prompt for Trading 212 portfolio analysis.

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/KyuRish/trading212-mcp-server'

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