Official FxSocket SDKs
The API is plain HTTP and JSON, so you never have to install anything. But if you work in Python or TypeScript, the official SDKs wrap account management, trading, market data, and the live WebSocket stream with typed models for both MT4 and MT5.
Python
Sync and async clients, typed models, and WebSocket streaming. Published to PyPI as fxsocket.
pip install fxsocket
from fxsocket import Client
with Client(api_key="fxs_live_xxx") as fx:
account = fx.accounts.get("ACCOUNT")
summary = fx.terminal(account).account_summary()
print(summary.balance, summary.equity)Node.js and TypeScript
ESM and CommonJS builds with full type definitions. Published to npm as @fxsocket/sdk.
npm install @fxsocket/sdk
import { FxSocket } from "@fxsocket/sdk";
const fx = new FxSocket({ apiKey: "fxs_live_xxx" });
const account = await fx.accounts.get("ACCOUNT");
const summary = await fx.terminal(account).accountSummary();
console.log(summary.balance, summary.equity);Any other language
There is nothing special about the SDKs. Authentication is a single X-API-Key header, and every response is JSON, so a bare HTTP client is enough:
curl https://api.fxsocket.com/mt5/ACCOUNT/AccountSummary \ -H "X-API-Key: fxs_live_xxx"
Every connected account also serves its own live OpenAPI 3 spec, so you can generate a typed client for Go, Rust, C#, Java, or anything else your generator supports, against the exact endpoints your account exposes. The MT5 and MT4 references show where to find it.
What the SDKs cover
- Account management. Link, list, and remove MT4 and MT5 accounts, and read the account_id every other route needs.
- Account data. Balance and equity, configuration, open positions, trade history, and connection health.
- Market data. Symbol lists, quotes, contract specs, OHLC price history, and broker server time.
- Trading. Market and pending orders, modifies, partial closes, and the margin and profit calculators.
- Live streams. Ticks, bar closes, account updates, positions, and trade events over one WebSocket per account.
- Platform endpoints. Multi-account batch execution and the prepaid balance.
Install it and make a call
Connect an account, copy your API key from the dashboard, and run one of the snippets above against a demo account first.
Get your API key