Docs

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-typescript
import { 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

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.

On this page