The Trader API lets you connect a bot or script you write and run yourself — on your own machine or server — to your Seven Stags demo or live account. We don't host it, review it, or see your code. It's your bot, your decisions, and your risk.
Jump to the Python quick startThe Trader API is a REST API scoped to one trading account at a time. A token you generate identifies that account, so every request you send acts on it — reading balances and positions, placing and managing orders, and pulling your own trade history. There is no streaming; a bot built on it polls on whatever schedule makes sense for your strategy.
Nothing you write runs on our servers. Your bot lives on your own machine, server, or VPS, and calls the API from there.
The API only ever receives the requests your bot sends — prices, balances, order instructions. Your strategy logic never touches us.
A bot you build and run is entirely your own responsibility — its logic, its uptime, and every trade it places. We provide the connection, not advice or a guarantee of any outcome.
Open a free demo account and point your bot at it before it ever sees a live account. Demo accounts use the same Trader API base URL as live, with virtual funds standing in for real money — it's the only way to find out how your bot actually behaves before any of your own money is on the line. Only move to a live account once you understand exactly what it does and why.
You start from the client portal, but the token itself is generated inside the Web Trader, per trading account.
The same API Access modal also shows the Trader API base URL (https://trader-api.match-trader.com, with an API Documentation link next to it), an MCP server URL (https://mcp.match-trader.com/mcp, with a Copy configuration button) for AI assistants, and a table of your existing tokens, masked, where you can revoke any of them.
Generate a read-only token first and get your bot reading account data and prices correctly before you ever grant it the right to trade.
If you run more than one bot or script, give each its own token. It's easier to tell them apart later and to revoke just one without touching the others.
Treat it like a password: environment variable only, never hardcoded, never committed, never shared in a screenshot or a support ticket.
Revoke and generate a fresh one immediately in Web Trader's API Access view if a token is ever exposed. A revoked token stops working immediately.
Seven Stags staff will never ask for your token by chat, email or phone. The only place on our side where you may enter a token is the Trader API token field in your client portal, if you use a portal feature that needs it, such as copy trading — for your own bot, keep the token on your own machine. Use a separate token for the portal than the one you give your own bot.
Every account has a per-endpoint and an overall rate limit. Back off and retry using the Retry-After header instead of hammering a failing call.
The Trader API is plain REST over HTTPS — Authorization: Bearer <token> on every request, JSON in and out. Here's the shortest useful example: read your account summary and open positions.
import os
import requests
TOKEN = os.environ["TRADER_API_TOKEN"] # never hardcode this
BASE_URL = os.environ.get("TRADER_API_BASE_URL", "https://trader-api.match-trader.com")
HEADERS = {"Authorization": f"Bearer {TOKEN}"}
account = requests.get(f"{BASE_URL}/v1/account", headers=HEADERS, timeout=10)
account.raise_for_status()
print(account.json()) # login, accountType (REAL/DEMO), currency, leverage, accessRight, ...
positions = requests.get(f"{BASE_URL}/v1/positions", headers=HEADERS, timeout=10)
positions.raise_for_status()
print(positions.json()) # open positions on this account, with live P&L
That's it for reading. Placing an order follows the same pattern with a POST and a JSON body — see the downloadable samples below for a complete, tested version with error handling and a demo-only safety guard.
| Area | What it gives you |
|---|---|
| Account | Profile, currency, leverage and trading permission; live balance, equity, margin and free funds. |
| Market data | Tradable instruments and their size/price rules, live bid/ask quotes, and historical OHLC candles. |
| Positions | Open a position at market, read your open positions, adjust take-profit/stop-loss, close in full or in part. |
| Pending orders | Place a limit or stop order, read/adjust/cancel it before it triggers. |
| History | Closed positions and account ledger entries (deposits, withdrawals, trade results) over a date range. |
There are no deposit or withdrawal endpoints — a Trader API token can never move money in or out of your account, whatever permissions you grant it. Every request needs a valid, unexpired, unrevoked token with the right permission for that call, or it's rejected before anything happens.
Rate limits apply per trading account, shared across every token you've issued for it and any AI assistant session connected to it — not per token. There's a limit per endpoint (below) plus a separate overall pool for the account, over a rolling one-minute window; the overall pool size isn't published and is shown in Web Trader's API Access view once you've generated a token. A 401, 403 or 429 response doesn't count against your limit; other error responses do.
| Endpoints | Limit |
|---|---|
| Quotes, open/update/close position, create/update/cancel pending order | 60 / min |
| Positions, account summary, candles, pending orders list, closed positions, ledgers | 20 / min |
| Account, symbols, platform details, trading hours | 10 / min |
The Trader API is REST only — there is no streaming, so your bot has to poll. A quote request roughly every 2–3 seconds per account leaves comfortable headroom under the 60/min quote limit; polling faster than that eats into the budget your order calls also share. Every response includes X-RateLimit-Remaining-Endpoint and X-RateLimit-Remaining-Global headers so your bot can see how much headroom is left. Go over either limit and you get 429 Too Many Requests with a Retry-After header telling you how many seconds to wait — have your bot sleep that long and retry, with a sane cap on total retries, rather than hammering the endpoint.
If you'd rather point an AI assistant at your account than write a bot yourself, the same API Access modal has an MCP server for it — this is just another way to reach the same Trader API, with the same account scope and rate limit, not a separate product.
https://mcp.match-trader.com/mcp) and add it to your AI assistant's MCP settings. The token itself isn't part of that config — supply it separately as an Authorization: Bearer <token> header, kept in the assistant's secret or environment store, never pasted into a chat prompt or a shared file.Small, tested Python scripts and a shared client module — read-only ones that print your account, positions and quotes, and a demo-only one that places a single small order with a stop-loss. MIT licensed, no warranty, your risk.
trader-api-python.zip — everything below, ready to run.
Read-only: account info, balance, and open positions. Included in the zip.
Read-only: polls quotes for one symbol on a fixed interval, well inside the rate limit. No streaming exists, so this is a template, not a subscription. Included in the zip.
Places one small market order with a stop-loss. Refuses to run on anything but a confirmed demo account. Included in the zip.
If you'd rather keep running your strategy in MetaTrader 5 than write code against the Trader API, MT5 copy lets you copy your own MT5 account's trades into your Seven Stags account automatically.
Open a free demo account and start testing your own bot against real market data, with none of your own capital at risk.
Open a Free Demo Account