# SDKs and examples

URL: https://docs.fxapis.com/sdks

> 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](https://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](/guides).

## Official SDKs [#official-sdks]

<Tabs items="[&#x22;TypeScript / Node.js&#x22;, &#x22;Python&#x22;]">
  <Tab value="TypeScript / Node.js">
    ```bash
    npm install github:FXapis/fxapis-typescript
    ```

    ```ts
    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](https://github.com/FXapis/fxapis-typescript)
  </Tab>

  <Tab value="Python">
    ```bash
    pip install git+https://github.com/FXapis/fxapis-python.git
    ```

    ```python
    from fxapis import Fxapis

    client = Fxapis()  # reads FXAPIS_API_KEY

    order = client.orders.market(account_id, symbol="EURUSD", side="buy", volume="0.01")
    ```

    Sync (`Fxapis`) and async (`AsyncFxapis`) clients on httpx, fully typed,
    idempotency keys added for you, and one exception class per error code.
    [fxapis-python on GitHub](https://github.com/FXapis/fxapis-python)
  </Tab>
</Tabs>

<Callout title="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.
</Callout>

## Runnable examples and starters [#runnable-examples-and-starters]

<Cards>
  <Card title="Examples" href="https://github.com/FXapis/fxapis-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.
  </Card>

  <Card title="Next.js starter" href="https://github.com/FXapis/fxapis-nextjs-starter">
    A small working app: connect an MT5 account, watch its positions, and place a market order behind
    an explicit confirm step.
  </Card>

  <Card title="MCP client examples" href="https://github.com/FXapis/fxapis-mcp-examples">
    Tested configs for Claude, Claude Code, Cursor, VS Code, the OpenAI API and the Anthropic API.
  </Card>

  <Card title="Integrations" href="https://github.com/FXapis/fxapis-integrations">
    A Postman collection for every endpoint, TradingView alert templates and n8n workflows.
  </Card>
</Cards>

The [MCP](/guides/mcp) and [TradingView](/guides/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 [#any-other-language]

The REST API works from anything that can send HTTPS and JSON. The
[guides](/guides) have complete programs in PHP, C#, Go, Java and Ruby, and the
[API reference](/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`](https://api.fxapis.com/openapi.json).
