SDKs and examples
Official TypeScript and Python SDKs, runnable examples, MCP client configs, integrations and a Next.js starter — all open source on GitHub.
Everything here is MIT-licensed and public at github.com/FXapis. The SDKs wrap the same REST API these docs describe — nothing is SDK-only — so use one if it suits your stack, or call the API directly from any language with the guides.
Official SDKs
npm install github:FXapis/fxapis-typescriptimport { Fxapis, newIdempotencyKey } from "fxapis";
const fx = new Fxapis(process.env.FXAPIS_API_KEY!);
const order = await fx.postAccountsByIdOrdersMarket(
accountId,
{ symbol: "EURUSD", side: "buy", volume: "0.01" },
{ idempotencyKey: newIdempotencyKey() },
);One typed method per endpoint, generated from the OpenAPI spec. Zero runtime
dependencies, ESM, and typed errors carrying the API's stable code.
fxapis-typescript on GitHub
Not on npm or PyPI yet
Both packages install straight from GitHub until their first registry release. Once published
they become npm install fxapis and pip install fxapis — the import and every method stay the
same.
Runnable examples and starters
Examples
A quickstart, click-to-trade and a trade copier, each in Python, Node/TypeScript and curl — plus curl scripts for multi-account orders and history.
Next.js starter
A small working app: connect an MT5 account, watch its positions, and place a market order behind an explicit confirm step.
MCP client examples
Tested configs for Claude, Claude Code, Cursor, VS Code, the OpenAI API and the Anthropic API.
Integrations
A Postman collection for every endpoint, TradingView alert templates and n8n workflows.
The MCP and TradingView guides cover those two in
depth. Run every example against a broker demo account: there is no simulated
market, and an fx_test_ key reaches a real broker like any other.
Any other language
The REST API works from anything that can send HTTPS and JSON. The
guides have complete programs in PHP, C#, Go, Java and Ruby, and the
API reference has samples for each endpoint in 13 languages.
To generate your own client, the OpenAPI spec is at
api.fxapis.com/openapi.json.