Build on the MT5 API, not around it.
Typed SDKs, runnable examples, a hosted MCP server for AI agents, and a starter app — every one of them open source. Pair them with the full API reference, with samples in 13 languages.
- TypeScript & Python SDKs
- 6 open-source repos
- OpenAPI spec · 13 languages
import { Fxapis, newIdempotencyKey } from "fxapis";
const fx = new Fxapis(process.env.FXAPIS_API_KEY!);
const account = await fx.postAccounts({
login: "26177561",
server: "VantageMarkets-Demo",
password: process.env.MT5_PASSWORD,
mode: "warm_on_demand",
});
await fx.postAccountsByIdWarm(account.id);
const order = await fx.postAccountsByIdOrdersMarket(
account.id,
{ symbol: "EURUSD", side: "buy", volume: "0.01" },
{ idempotencyKey: newIdempotencyKey() },
);Six repositories, one GitHub org.
Everything here is MIT-licensed and public at github.com/FXapis. Start with the SDK for your language, or clone a starter and go.
TypeScript / Node.js SDK
One typed method per endpoint, generated from the OpenAPI spec. Zero runtime dependencies, ESM, typed errors with a stable code.
npm install fxapis View on GitHubPython SDK
Sync and async clients on httpx. Fully typed (py.typed, mypy --strict), automatic idempotency keys, typed exceptions per error code.
pip install fxapis View on GitHubExamples
Quickstart, click-to-trade and a copy-trader, each in Python, Node/TypeScript and curl — runnable against a broker demo account.
View on GitHubMCP client examples
Tested configs for Claude, Claude Code, Cursor, VS Code, the OpenAI API and the Anthropic API, plus the full tool reference.
View on GitHubIntegrations
A Postman collection covering every endpoint, ready-to-paste TradingView alert payloads, and n8n automation templates.
View on GitHubNext.js starter
A small working app: connect an MT5 account, watch its positions, and place a market order behind an explicit confirm step.
View on GitHubTest keys reach real brokers.
An fx_test_ key is a label for your configuration, not a sandbox — there is no simulated market at fxapis. Every example and starter here is meant to run against a broker demo account while you build.
Three steps, no terminal to run.
fxapis runs the MT5 terminals in its own cloud. Your code only ever talks to the REST API.
- 01Step 1
Get an API key
Create a workspace and a key in the console. Scope it — read-only, reduce-only or full trading.fxapis.com/sign-up - 02Step 2
Connect a demo account
Its login, trading password and server — fxapis brings it online and keeps the credential encrypted.POST /v1/accounts - 03Step 3
Place your first order
A market order with an idempotency key, from the SDK, curl, or an example repo's quickstart.fx.postAccountsByIdOrdersMarket(…)
Your agent can trade too — on a scoped key.
fxapis also runs a hosted MCP server. Point Claude, Cursor or VS Code at it with an API key, and it can read accounts and positions, or trade if its key allows it — enforced by the API, not the prompt.
New to fxapis? The MT5 API covers what it does end to end. Sending trades from TradingView instead of code? See the TradingView guide and the integrations repo's alert templates.
Questions from developers
Do the SDKs and examples cost anything?
No. Every repository is MIT-licensed and open source on GitHub — free to use, fork and modify. What you pay for is the API itself, on the plan your workspace is on.
Is there a sandbox or test environment?
No. There is one fxapis environment, and every key — including an fx_test_ key — reaches a real broker. Build and test against a broker demo account, not a simulated market.
Which languages are supported?
Official SDKs for TypeScript/Node.js and Python. Beyond those, the OpenAPI specification and API reference include ready-to-run code samples in 13 languages, and the REST API itself works from anything that can send HTTPS and JSON — the curl examples show the raw requests.
Can I contribute to the SDKs or examples?
Yes. Each repository takes pull requests — see its CONTRIBUTING.md. The SDKs' typed clients are generated from the API's OpenAPI spec, so most contributions are to the hand-written parts: helpers, tests, docs and examples.
Where do I report a bug or ask for a feature?
Open an issue on the relevant GitHub repository. For anything about your account, billing or the API itself rather than an SDK or example, email [email protected].
Clone a repo and make your first call today.
Create a workspace, connect a broker demo account, and run a quickstart in whichever language you already use.