IG Markets trading plugin - 53 tools for stocks, CFDs, and spread bets via the IG Markets REST API. Covers authentication, positions, orders, market data, watchlists, sentiment, and cost analysis.
This plugin provides 53 tools for trading stocks, CFDs, and spread bets via the IG Markets REST API. All tool names are prefixed with ig_.
isDemo: true unless the user explicitly asks for live trading. Live trading uses real money.ig_create_position, ig_close_position, ig_create_working_order, or ig_delete_working_order. Summarize the trade parameters first.ig_deal_confirmation with the returned dealReference to verify the trade was accepted (status: OPEN) or rejected.ig_login or check ig_session_status.The plugin auto-logs in at startup if credentials are configured in the plugin config (apiKey, username, password). If not auto-logged in, use ig_login (OAuth v3) or ig_login_v2 (CST tokens). Use ig_session_status to check if a session is active without making an API call. If the session expires, call ig_refresh_token (v3) or re-login.
ig_search_markets with a search term (e.g. "AAPL", "FTSE", "Tesla")epic from results (e.g. "IX.D.FTSE.DAILY.IP")ig_market with the epic for full instrument details (min deal size, margin, hours)epicig_market to check instrument details (expiry, min size, currency)ig_create_position with required fields: epic, direction, size, expiry, currencyCode, forceOpen, guaranteedStop, orderTypeig_deal_confirmation with the returned dealReferenceig_positions to list open positionsig_close_position with dealId, opposite direction, size, orderType: "MARKET"ig_deal_confirmation to verifyig_positions - all open positions with P&Lig_position - single position by dealIdig_update_position - adjust stops/limits on an existing positionig_working_orders - list pending ordersig_create_working_order - place a limit or stop orderig_update_working_order - modify level, stops, limitsig_delete_working_order - cancel an orderig_accounts - list all accounts (demo, live, sub-accounts)ig_activity_history - recent trading activity (v3 paged)ig_transaction_history - transaction records (v2 paged)ig_preferences / ig_update_preferences - trailing stops default etc.ig_prices - default price snapshot for an epic + resolutionig_prices_points - last N data pointsig_prices_range - prices between two datesig_client_sentiment - bull/bear % for a single marketig_client_sentiment_bulk - sentiment for multiple markets at onceig_related_sentiment - sentiment for related markets| Tool | Description |
|---|---|
ig_login | Login with OAuth v3 (recommended) |
ig_login_v2 | Login with CST/security tokens (v2) |
ig_logout | End current session |
ig_session_details | Get session info (account, client, timezone) |
ig_switch_account | Switch active account |
ig_refresh_token | Refresh OAuth access token |
ig_encryption_key | Get password encryption key |
ig_session_status | Check auth status (local, no API call) |
| Tool | Description |
|---|---|
ig_accounts | List all accounts |
ig_preferences | Get account preferences |
ig_update_preferences | Update account preferences |
ig_activity_history | Activity history (v3, paged) |
ig_activity_history_range | Activity by date range (v1) |
ig_activity_history_period | Activity by period (v1) |
ig_transaction_history | Transactions (v2, paged) |
ig_transaction_history_range | Transactions by date range (v1) |
ig_transaction_history_period | Transactions by period (v1) |
| Tool | Description |
|---|---|
ig_deal_confirmation | Check outcome of a trade operation |
ig_positions | List all open positions |
ig_position | Get single position by dealId |
ig_create_position | Open a new position |
ig_close_position | Close a position |
ig_update_position | Update stops/limits on a position |
ig_working_orders | List all working orders |
ig_create_working_order | Create a limit/stop order |
ig_delete_working_order | Cancel a working order |
ig_update_working_order | Modify a working order |
| Tool | Description |
|---|---|
ig_categories | List market categories (top-level navigation) |
ig_category_instruments | List instruments in a category |
ig_markets | Get details for multiple markets (by epic list) |
ig_market | Get full details for a single market |
ig_search_markets | Search markets by keyword |
ig_prices | Price snapshot (default range) |
ig_prices_points | Last N price data points |
ig_prices_range | Prices between two dates |
| Tool | Description |
|---|---|
ig_watchlists | List all watchlists |
ig_create_watchlist | Create a new watchlist |
ig_watchlist | Get instruments in a watchlist |
ig_delete_watchlist | Delete a watchlist |
ig_watchlist_add_market | Add a market to a watchlist |
ig_watchlist_remove_market | Remove a market from a watchlist |
| Tool | Description |
|---|---|
ig_client_sentiment_bulk | Sentiment for multiple markets |
ig_client_sentiment | Sentiment for a single market |
ig_related_sentiment | Sentiment for related markets |
| Tool | Description |
|---|---|
ig_costs_open | Get costs/charges for opening a position |
ig_costs_close | Get costs/charges for closing a position |
ig_costs_edit | Get costs/charges for editing a position |
ig_costs_pdf | Download costs PDF document |
ig_costs_history | Historical costs and charges |
ig_applications | List API applications |
ig_update_application | Update an API application |
ig_disable_application | Disable an API application |
ig_repeat_deal_window | Get repeat deal window info |
ig_deal_confirmationThe plugin includes a configurable trade safety hook that requires user approval before executing trade-mutating tools (ig_create_position, ig_close_position, ig_create_working_order, ig_delete_working_order). This is enabled by default and can be disabled by setting tradeApproval: false in the plugin config.