Risk Warning: Trading CFD products carries a high level of risk and may not be suitable for all investors.

The First Forex Broker Built for AI Agents

AI Trading API & MCP Server

Connect any AI agent to your trading account. Execute trades, manage positions, and stream market data through natural language.

XBTFX Trading Agent
online · executing trades
Today
Buy 0.10 lots EURUSD with a 30 pip stop loss
10:24 ✓✓
Executed. Bought 0.10 EURUSD at 1.0865. Stop loss set at 1.0835. Ticket #184729.
10:24
What's my current P&L?
10:31 ✓✓
3 open positions.
Floating P&L: +$42.50
Margin usage: 12%
10:31
Move all stops to breakeven on positions in profit
10:42 ✓✓
Done. Updated SL to entry price on 2 positions:
EURUSD #184729
GBPUSD #184731
10:42
Message the agent…

Illustrative example. Not actual trading data. AI agent capabilities depend on the configured client and skill set.

Integration Paths icon
3+
Integration Paths
Instruments icon
400+
Instruments
Market Access icon
24/7
Market Access
Protocol icon
REST + WS
Protocol

Why XBTFX for AI Trading

Built for traders who want LLMs and agents in the loop, not on the side.

Build Your Own Trading Agent

Design the prompt, policy, and risk rules. Your agent runs against your XBTFX account around the clock — same authentication, same endpoints, same execution speed as your manual trades. Tweak the system prompt, swap models, layer in your own filters; the account doesn't care which agent is calling it.

LLM-Driven Decisions

Agents can reason over news, macro data, your open positions, and your strategy rules before acting. Every action is a structured API call you can audit and replay.

AI-Built Dashboards

Ask your AI agent to build you a custom trading dashboard against your API key. Web, terminal, mobile — whatever fits your workflow. No proprietary frontend to fight with.

Edge & ECN Account Compatibility

Connect any XBTFX MetaTrader 5 Edge or ECN account using any supported base currency. Your existing trading account just becomes programmable.

View account types →

Unlimited Automation

REST + WebSocket via the MCP server means anything you can describe in natural language, an agent can execute. No proprietary SDK, no rate-limit walls — just programmable trading.

Works With Your Favorite AI Tools

OpenClaw Claude Code Claude Desktop OpenAI Codex Cursor Windsurf GitHub Copilot LangChain CrewAI Custom Bots

Plus any other MCP-compatible client or any code that can make an HTTP request.

For full technical documentation and endpoint reference, see the XBTFX Trading API page.

What You Can Do

Execute Trades via Natural Language

Tell your AI to buy, sell, set stops, take profits. It translates to API calls automatically.

Automated Risk Management

AI monitors your positions, adjusts stop losses, reduces exposure when margin gets tight.

Portfolio Rebalancing

Define target allocations. AI maintains them by sending adjustment trades when drift exceeds your threshold.

Event-Driven Strategies

AI watches news feeds, economic calendars, and price action — executing trades when conditions are met.

Trade History Analysis

Ask your AI to analyze past trades, calculate win rates by symbol, and identify your best setups.

Real-Time Market Monitoring

Stream live quotes via WebSocket. AI alerts you to price levels, spread changes, or volatility spikes.

How AI Trading Works

Three paths to connect AI to your XBTFX account. Choose the one that fits your workflow.

Skills Hub

Install a skill file into Claude Code, LangChain, CrewAI, or any agent framework. The skill teaches your AI how to use the XBTFX Trading API.

View Skills →

MCP Server

Connect the XBTFX MCP server to Claude Desktop, Cursor, Windsurf, or VS Code Copilot. Your AI gets direct access to trading tools.

Learn More →

Direct API

Build custom integrations using REST endpoints and WebSocket. Any language, any framework. Full programmatic control.

API Docs → Trading API Page →

Connect in 30 Seconds

Add the XBTFX MCP server to your Claude Desktop config:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "xbtfx": {
      "command": "npx",
      "args": ["@xbtfx/mcp-server"],
      "env": {
        "XBTFX_API_KEY": "your_key_here"
      }
    }
  }
}

That's it. Restart Claude Desktop and your agent can trade on your account through natural language. See full setup guide →

Start AI Trading in 3 Steps

1
Create Account
Register at my.xbtfx.com and open a trading account. Choose your preferred base currency.
Sign Up
2
Get Your API Key
Generate a key at console.xbtfx.com. Free, instant. One key per trading account.
Open Console
3
Connect Your AI
Install a skill, connect MCP, or call the API directly. Start trading in minutes.
Read Docs
FAQ

Frequently
Asked Questions

Frequently Asked Questions

  • What is AI trading?

    AI trading uses artificial intelligence to execute trades, manage positions, and analyze markets on your behalf. On XBTFX, you connect any AI agent to your trading account through the XBTFX Trading API.

  • Do I need programming experience?

    Not necessarily. With the MCP Server, you can connect AI assistants like Claude or Cursor without writing code. For custom strategies, basic programming knowledge helps.

  • Is AI trading free on XBTFX?

    Yes. The Trading API is included with every account at no additional cost. You only pay standard trading commissions and spreads.

  • Which AI assistants work with XBTFX?

    Any AI that can make HTTP requests. Officially supported: Claude Code, Claude Desktop, Cursor, Windsurf, LangChain, CrewAI. The MCP server works with any MCP-compatible client.

  • Can AI trade crypto on XBTFX?

    Yes. Every instrument on your account is accessible via the API, including cryptocurrency CFDs. You can also use BTC, ETH, or USDT denominated accounts.

  • Is it safe to let AI trade my account?

    API keys are stored locally by the agent. You can revoke access instantly from the Console. We recommend starting with a demo account to test your setup.

  • What markets can AI trade?

    Forex, crypto, metals, indices, stocks, and energies. Over 400 instruments accessible through the same API.

  • How do I get started?

    Register at my.xbtfx.com, create a trading account, generate an API key at console.xbtfx.com, then connect your AI agent using the Skills Hub, MCP Server, or direct API integration.

Start AI Trading with XBTFX

Create an account, get your API key, and connect your AI in minutes.