Create Broker Account
create_broker_accountConnect a new broker account to TraderWAI (TradeLocker, Match-Trader, MetaTrader, DXtrade, Capital.com, Binance spot or Bybit USDT perpetuals). MetaTrader: each plan adds as many MetaTrader accounts every 30 days as it includes (Trader 1, Max 3); switching to another account sooner costs 3 USD (the user pays it in Settings → Brokers) or goes through support (hi@flex-in.org). So confirm the account number, master password and server with the user BEFORE adding it, and prefer the account they will really trade. A new password or server of the SAME account is free: use update_broker_account. For cTrader accounts, use the connect_ctrader tool instead (it uses OAuth). tastytrade (US futures, beta) cannot be added with this tool either: it is connected with the tastytrade login (OAuth) from the TraderWAI website (Settings → Broker accounts → Connect tastytrade); send the user there. The credentials are encrypted at rest and used only to authenticate with the broker for trade execution. After creating, use test_broker_account to verify the connection works. Available on all plans (FREE: 1, PLUS: 3, TRADER: 5, MAX: 20).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Broker login email. MetaTrader: the account number (login). DXtrade: the platform username. Capital.com / Binance / Bybit: the API key. | ||
| label | Yes | Friendly name for this account (e.g. "My Demo Account") | |
| server | No | Not used for Binance or Bybit. Capital.com: the email the user logs in to Capital.com with. TradeLocker: the broker server name (e.g. "HEROFX"). Match-Trader: the URL of the broker's Match-Trader platform (e.g. "https://mtr.e8markets.com"; any page of it works). MetaTrader: the server name exactly as in MetaTrader (e.g. "HeroFX-Trade"). DXtrade: the web address of the broker's DXtrade platform (e.g. "https://trader.blueberrymarkets.com"), plus "#<domain>" only if the broker uses a domain other than "default". | |
| password | Yes | Broker login password. MetaTrader: the master password (the investor password only allows reading). Binance: the API secret (or the Ed25519 private key in PEM). Bybit: the API secret. Capital.com: the custom password chosen when generating the API key (not the Capital.com password). | |
| brokerType | No | Platform: "tradelocker" (default), "matchtrader", "metatrader", "dxtrade" (username + password + platform address; the broker must enable API access; beta), "capitalcom" (Capital.com's own platform; API key + its password + login email; the user enables two-factor authentication and generates the key in Capital.com → Settings → API integrations; environment "demo" = Capital.com demo account; beta), "binance" (spot; environment "demo" = Binance Spot Testnet) or "bybit" (USDT perpetuals; environment "demo" = Bybit Demo Trading). For Bybit the API key needs only «Contract → Orders & Positions» (never withdrawals), ideally restricted to IP 187.7.69.7. For Binance the user creates an API key with only «Spot & Margin trading» enabled (never withdrawals), ideally restricted to IP 187.7.69.7; suggest connecting it from the web (Settings → Broker accounts) rather than pasting the secret in the chat. For cTrader use the connect_ctrader tool. MetaTrader setup takes 1-3 minutes (check metaapiState with get_broker_accounts); Trader includes 1 MetaTrader account, Max 3. | |
| mtPlatform | No | MetaTrader only: "mt5" (default) or "mt4" | |
| environment | Yes | "demo" for paper trading, "live" for real money | |
| subAccountId | No | Optional, TradeLocker: which account of the login to use, by its id or accNum (test_broker_account lists them). One login can hold several accounts (e.g. accNum 1 and 4); without this the first one is used. To run separate strategies, create one connection per account with the same login and a different subAccountId. |